You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
808 B

  1. package common
  2. import (
  3. "math/big"
  4. )
  5. // Slot represents a slot of the Hermez network
  6. // WARNING: this is strongly based on the previous implementation, once the new spec is done, this may change a lot.
  7. type Slot struct {
  8. SlotNum SlotNum
  9. StartingBlock uint64 // Ethereum block in which the slot starts
  10. Forger Coordinator // Current Operaror winner information
  11. }
  12. // SlotMinPrice is the policy of minimum prices for strt bidding in the slots
  13. type SlotMinPrice struct {
  14. EthBlockNum uint64 // Etherum block in which the min price was updated
  15. MinPrices [6]big.Int
  16. }
  17. // GetMinPrice returns the minimum bid to enter the auction for a specific slot
  18. func (smp *SlotMinPrice) GetMinPrice(slotNum SlotNum) *big.Int {
  19. // TODO
  20. return nil
  21. }
  22. // SlotNum identifies a slot
  23. type SlotNum uint32