From 202b98b3e63aa995542f5f4a0f75f64559155ecf Mon Sep 17 00:00:00 2001 From: laisolizq Date: Tue, 6 Oct 2020 12:00:11 +0200 Subject: [PATCH] Update ethclient contracts & rollup iteration 1 --- common/account.go | 7 +- eth/auction.go | 215 +-- eth/auction_test.go | 202 ++- eth/contracts/README.md | 5 +- .../auction/HermezAuctionProtocol.go | 713 ++++----- eth/contracts/erc777/ERC777.go | 2 +- eth/contracts/hermez/Hermez.go | 1303 ++++++----------- .../withdrawdelayer/WithdrawalDelayer.go | 112 +- eth/main_test.go | 31 +- eth/rollup.go | 405 +++-- eth/rollup_test.go | 20 +- eth/wdelayer.go | 49 +- eth/wdelayer_test.go | 110 +- 13 files changed, 1415 insertions(+), 1759 deletions(-) diff --git a/common/account.go b/common/account.go index d7e8ea1..3318db9 100644 --- a/common/account.go +++ b/common/account.go @@ -21,7 +21,8 @@ const ( // maxBalanceBytes is the maximum bytes that can use the Account.Balance *big.Int maxBalanceBytes = 24 - idxBytesLen = 6 + // IdxBytesLen idx bytes + IdxBytesLen = 6 // maxIdxValue is the maximum value that Idx can have (48 bits: maxIdxValue=2**48-1) maxIdxValue = 0xffffffffffff @@ -66,8 +67,8 @@ func (idx Idx) BigInt() *big.Int { // IdxFromBytes returns Idx from a byte array func IdxFromBytes(b []byte) (Idx, error) { - if len(b) != idxBytesLen { - return 0, fmt.Errorf("can not parse Idx, bytes len %d, expected %d", len(b), idxBytesLen) + if len(b) != IdxBytesLen { + return 0, fmt.Errorf("can not parse Idx, bytes len %d, expected %d", len(b), IdxBytesLen) } var idxBytes [8]byte copy(idxBytes[2:], b[:]) diff --git a/eth/auction.go b/eth/auction.go index 46daa3b..8f9d447 100644 --- a/eth/auction.go +++ b/eth/auction.go @@ -27,37 +27,37 @@ type AuctionConstants struct { InitialMinimalBidding *big.Int // First block where the first slot begins GenesisBlockNum int64 - // Hermez Governanze Token smartcontract address who controls some parameters and collects HEZ fee - // Only for test - GovernanceAddress ethCommon.Address // ERC777 token with which the bids will be made TokenHEZ ethCommon.Address // HermezRollup smartcontract address HermezRollup ethCommon.Address + // Hermez Governanze Token smartcontract address who controls some parameters and collects HEZ fee + // Only for test + GovernanceAddress ethCommon.Address } // SlotState is the state of a slot type SlotState struct { - Forger ethCommon.Address + Bidder ethCommon.Address + Fulfilled bool BidAmount *big.Int ClosedMinBid *big.Int - Fulfilled bool } // NewSlotState returns an empty SlotState func NewSlotState() *SlotState { return &SlotState{ - Forger: ethCommon.Address{}, + Bidder: ethCommon.Address{}, + Fulfilled: false, BidAmount: big.NewInt(0), ClosedMinBid: big.NewInt(0), - Fulfilled: false, } } // Coordinator is the details of the Coordinator identified by the forger address type Coordinator struct { - WithdrawalAddress ethCommon.Address - URL string + Forger ethCommon.Address + URL string } // AuctionVariables are the variables of the Auction Smart Contract @@ -92,9 +92,9 @@ type AuctionState struct { // AuctionEventNewBid is an event of the Auction Smart Contract type AuctionEventNewBid struct { - Slot int64 - BidAmount *big.Int - CoordinatorForger ethCommon.Address + Slot int64 + BidAmount *big.Int + Bidder ethCommon.Address } // AuctionEventNewSlotDeadline is an event of the Auction Smart Contract @@ -132,24 +132,18 @@ type AuctionEventNewAllocationRatio struct { NewAllocationRatio [3]uint16 } -// AuctionEventNewCoordinator is an event of the Auction Smart Contract -type AuctionEventNewCoordinator struct { - ForgerAddress ethCommon.Address - WithdrawalAddress ethCommon.Address - CoordinatorURL string -} - -// AuctionEventCoordinatorUpdated is an event of the Auction Smart Contract -type AuctionEventCoordinatorUpdated struct { - ForgerAddress ethCommon.Address - WithdrawalAddress ethCommon.Address - CoordinatorURL string +// AuctionEventSetCoordinator is an event of the Auction Smart Contract +type AuctionEventSetCoordinator struct { + BidderAddress ethCommon.Address + ForgerAddress ethCommon.Address + CoordinatorURL string } // AuctionEventNewForgeAllocated is an event of the Auction Smart Contract type AuctionEventNewForgeAllocated struct { + Bidder ethCommon.Address Forger ethCommon.Address - CurrentSlot int64 + SlotToForge int64 BurnAmount *big.Int DonationAmount *big.Int GovernanceAmount *big.Int @@ -164,7 +158,7 @@ type AuctionEventNewDefaultSlotSetBid struct { // AuctionEventNewForge is an event of the Auction Smart Contract type AuctionEventNewForge struct { Forger ethCommon.Address - CurrentSlot int64 + SlotToForge int64 } // AuctionEventHEZClaimed is an event of the Auction Smart Contract @@ -183,8 +177,7 @@ type AuctionEvents struct { //nolint:structcheck NewBootCoordinator []AuctionEventNewBootCoordinator NewOpenAuctionSlots []AuctionEventNewOpenAuctionSlots NewAllocationRatio []AuctionEventNewAllocationRatio - NewCoordinator []AuctionEventNewCoordinator - CoordinatorUpdated []AuctionEventCoordinatorUpdated + SetCoordinator []AuctionEventSetCoordinator NewForgeAllocated []AuctionEventNewForgeAllocated NewDefaultSlotSetBid []AuctionEventNewDefaultSlotSetBid NewForge []AuctionEventNewForge @@ -202,8 +195,7 @@ func NewAuctionEvents() AuctionEvents { NewBootCoordinator: make([]AuctionEventNewBootCoordinator, 0), NewOpenAuctionSlots: make([]AuctionEventNewOpenAuctionSlots, 0), NewAllocationRatio: make([]AuctionEventNewAllocationRatio, 0), - NewCoordinator: make([]AuctionEventNewCoordinator, 0), - CoordinatorUpdated: make([]AuctionEventCoordinatorUpdated, 0), + SetCoordinator: make([]AuctionEventSetCoordinator, 0), NewForgeAllocated: make([]AuctionEventNewForgeAllocated, 0), NewDefaultSlotSetBid: make([]AuctionEventNewDefaultSlotSetBid, 0), NewForge: make([]AuctionEventNewForge, 0), @@ -235,9 +227,7 @@ type AuctionInterface interface { AuctionChangeDefaultSlotSetBid(slotSet int64, newInitialMinBid *big.Int) (*types.Transaction, error) // Coordinator Management - AuctionRegisterCoordinator(forgerAddress ethCommon.Address, URL string) (*types.Transaction, error) - AuctionIsRegisteredCoordinator(forgerAddress ethCommon.Address) (bool, error) - AuctionUpdateCoordinatorInfo(forgerAddress ethCommon.Address, newWithdrawAddress ethCommon.Address, newURL string) (*types.Transaction, error) + AuctionSetCoordinator(forger ethCommon.Address, coordinatorURL string) (*types.Transaction, error) // Slot Info AuctionGetSlotNumber(blockNum int64) (int64, error) @@ -247,17 +237,16 @@ type AuctionInterface interface { AuctionGetSlotSet(slot int64) (*big.Int, error) // Bidding - // AuctionTokensReceived(operator, from, to ethCommon.Address, amount *big.Int, - // userData, operatorData []byte) error // Only called from another smart contract - AuctionBid(slot int64, bidAmount *big.Int, forger ethCommon.Address) (*types.Transaction, error) - AuctionMultiBid(startingSlot int64, endingSlot int64, slotSet [6]bool, maxBid, closedMinBid, budget *big.Int, forger ethCommon.Address) (*types.Transaction, error) + AuctionBid(slot int64, bidAmount *big.Int) (*types.Transaction, error) + AuctionMultiBid(startingSlot int64, endingSlot int64, slotSet [6]bool, maxBid, closedMinBid, budget *big.Int) (*types.Transaction, error) // Forge AuctionCanForge(forger ethCommon.Address, blockNum int64) (bool, error) - // AuctionForge(forger ethCommon.Address) (bool, error) // Only called from another smart contract + AuctionForge(forger ethCommon.Address) (*types.Transaction, error) // Fees - AuctionClaimHEZ(claimAddress ethCommon.Address) (*types.Transaction, error) + AuctionClaimHEZ() (*types.Transaction, error) + AuctionGetClaimableHEZ(bidder ethCommon.Address) (*big.Int, error) // // Smart Contract Status @@ -576,43 +565,8 @@ func (c *AuctionClient) AuctionGetClaimableHEZ(claimAddress ethCommon.Address) ( return claimableHEZ, nil } -// AuctionRegisterCoordinator is the interface to call the smart contract function -func (c *AuctionClient) AuctionRegisterCoordinator(forgerAddress ethCommon.Address, URL string) (*types.Transaction, error) { - var tx *types.Transaction - var err error - if tx, err = c.client.CallAuth( - c.gasLimit, - func(ec *ethclient.Client, auth *bind.TransactOpts) (*types.Transaction, error) { - auction, err := HermezAuctionProtocol.NewHermezAuctionProtocol(c.address, ec) - if err != nil { - return nil, err - } - return auction.RegisterCoordinator(auth, forgerAddress, URL) - }, - ); err != nil { - return nil, fmt.Errorf("Failed register coordinator: %w", err) - } - return tx, nil -} - -// AuctionIsRegisteredCoordinator is the interface to call the smart contract function -func (c *AuctionClient) AuctionIsRegisteredCoordinator(forgerAddress ethCommon.Address) (bool, error) { - var registered bool - if err := c.client.Call(func(ec *ethclient.Client) error { - auction, err := HermezAuctionProtocol.NewHermezAuctionProtocol(c.address, ec) - if err != nil { - return err - } - registered, err = auction.IsRegisteredCoordinator(nil, forgerAddress) - return err - }); err != nil { - return false, err - } - return registered, nil -} - -// AuctionUpdateCoordinatorInfo is the interface to call the smart contract function -func (c *AuctionClient) AuctionUpdateCoordinatorInfo(forgerAddress ethCommon.Address, newWithdrawAddress ethCommon.Address, newURL string) (*types.Transaction, error) { +// AuctionSetCoordinator is the interface to call the smart contract function +func (c *AuctionClient) AuctionSetCoordinator(forger ethCommon.Address, coordinatorURL string) (*types.Transaction, error) { var tx *types.Transaction var err error if tx, err = c.client.CallAuth( @@ -622,10 +576,10 @@ func (c *AuctionClient) AuctionUpdateCoordinatorInfo(forgerAddress ethCommon.Add if err != nil { return nil, err } - return auction.UpdateCoordinatorInfo(auth, forgerAddress, newWithdrawAddress, newURL) + return auction.SetCoordinator(auth, forger, coordinatorURL) }, ); err != nil { - return nil, fmt.Errorf("Failed update coordinator info: %w", err) + return nil, fmt.Errorf("Failed set coordinator: %w", err) } return tx, nil } @@ -715,7 +669,7 @@ func (c *AuctionClient) AuctionGetSlotNumber(blockNum int64) (int64, error) { } // AuctionBid is the interface to call the smart contract function -func (c *AuctionClient) AuctionBid(slot int64, bidAmount *big.Int, forger ethCommon.Address) (*types.Transaction, error) { +func (c *AuctionClient) AuctionBid(slot int64, bidAmount *big.Int) (*types.Transaction, error) { var tx *types.Transaction var err error if tx, err = c.client.CallAuth( @@ -725,7 +679,7 @@ func (c *AuctionClient) AuctionBid(slot int64, bidAmount *big.Int, forger ethCom if err != nil { return nil, err } - bidFnSignature := []byte("bid(uint128,uint128,address)") + bidFnSignature := []byte("bid(uint128,uint128)") hash := sha3.NewLegacyKeccak256() _, err = hash.Write(bidFnSignature) if err != nil { @@ -736,12 +690,10 @@ func (c *AuctionClient) AuctionBid(slot int64, bidAmount *big.Int, forger ethCom binary.BigEndian.PutUint64(slotBytes, uint64(slot)) paddedSlot := ethCommon.LeftPadBytes(slotBytes, 32) paddedAmount := ethCommon.LeftPadBytes(bidAmount.Bytes(), 32) - paddedAddress := ethCommon.LeftPadBytes(forger.Bytes(), 32) var userData []byte userData = append(userData, methodID...) userData = append(userData, paddedSlot...) userData = append(userData, paddedAmount...) - userData = append(userData, paddedAddress...) return tokens.Send(auth, c.address, bidAmount, userData) }, ); err != nil { @@ -751,7 +703,7 @@ func (c *AuctionClient) AuctionBid(slot int64, bidAmount *big.Int, forger ethCom } // AuctionMultiBid is the interface to call the smart contract function -func (c *AuctionClient) AuctionMultiBid(startingSlot int64, endingSlot int64, slotSet [6]bool, maxBid, closedMinBid, budget *big.Int, forger ethCommon.Address) (*types.Transaction, error) { +func (c *AuctionClient) AuctionMultiBid(startingSlot int64, endingSlot int64, slotSet [6]bool, maxBid, closedMinBid, budget *big.Int) (*types.Transaction, error) { var tx *types.Transaction var err error if tx, err = c.client.CallAuth( @@ -761,7 +713,7 @@ func (c *AuctionClient) AuctionMultiBid(startingSlot int64, endingSlot int64, sl if err != nil { return nil, err } - multiBidFnSignature := []byte("multiBid(uint128,uint128,bool[6],uint128,uint128,address)") + multiBidFnSignature := []byte("multiBid(uint128,uint128,bool[6],uint128,uint128)") hash := sha3.NewLegacyKeccak256() _, err = hash.Write(multiBidFnSignature) if err != nil { @@ -776,7 +728,6 @@ func (c *AuctionClient) AuctionMultiBid(startingSlot int64, endingSlot int64, sl paddedEndingSlot := ethCommon.LeftPadBytes(endingSlotBytes, 32) paddedMinBid := ethCommon.LeftPadBytes(closedMinBid.Bytes(), 32) paddedMaxBid := ethCommon.LeftPadBytes(maxBid.Bytes(), 32) - paddedAddress := ethCommon.LeftPadBytes(forger.Bytes(), 32) var userData []byte userData = append(userData, methodID...) userData = append(userData, paddedStartingSlot...) @@ -792,7 +743,6 @@ func (c *AuctionClient) AuctionMultiBid(startingSlot int64, endingSlot int64, sl } userData = append(userData, paddedMaxBid...) userData = append(userData, paddedMinBid...) - userData = append(userData, paddedAddress...) return tokens.Send(auth, c.address, budget, userData) }, ); err != nil { @@ -817,13 +767,8 @@ func (c *AuctionClient) AuctionCanForge(forger ethCommon.Address, blockNum int64 return canForge, nil } -// AuctionForge is the interface to call the smart contract function -// func (c *AuctionClient) AuctionForge(forger ethCommon.Address) (bool, error) { -// return false, errTODO -// } - // AuctionClaimHEZ is the interface to call the smart contract function -func (c *AuctionClient) AuctionClaimHEZ(claimAddress ethCommon.Address) (*types.Transaction, error) { +func (c *AuctionClient) AuctionClaimHEZ() (*types.Transaction, error) { var tx *types.Transaction var err error if tx, err = c.client.CallAuth( @@ -833,7 +778,7 @@ func (c *AuctionClient) AuctionClaimHEZ(claimAddress ethCommon.Address) (*types. if err != nil { return nil, err } - return auction.ClaimHEZ(auth, claimAddress) + return auction.ClaimHEZ(auth) }, ); err != nil { return nil, fmt.Errorf("Failed claim HEZ: %w", err) @@ -942,20 +887,19 @@ func (c *AuctionClient) AuctionVariables() (*AuctionVariables, error) { } var ( - logNewBid = crypto.Keccak256Hash([]byte("NewBid(uint128,uint128,address)")) - logNewSlotDeadline = crypto.Keccak256Hash([]byte("NewSlotDeadline(uint8)")) - logNewClosedAuctionSlots = crypto.Keccak256Hash([]byte("NewClosedAuctionSlots(uint16)")) - logNewOutbidding = crypto.Keccak256Hash([]byte("NewOutbidding(uint16)")) - logNewDonationAddress = crypto.Keccak256Hash([]byte("NewDonationAddress(address)")) - logNewBootCoordinator = crypto.Keccak256Hash([]byte("NewBootCoordinator(address)")) - logNewOpenAuctionSlots = crypto.Keccak256Hash([]byte("NewOpenAuctionSlots(uint16)")) - logNewAllocationRatio = crypto.Keccak256Hash([]byte("NewAllocationRatio(uint16[3])")) - logNewCoordinator = crypto.Keccak256Hash([]byte("NewCoordinator(address,address,string)")) - logCoordinatorUpdated = crypto.Keccak256Hash([]byte("CoordinatorUpdated(address,address,string)")) - logNewForgeAllocated = crypto.Keccak256Hash([]byte("NewForgeAllocated(address,uint128,uint128,uint128,uint128)")) - logNewDefaultSlotSetBid = crypto.Keccak256Hash([]byte("NewDefaultSlotSetBid(uint128,uint128)")) - logNewForge = crypto.Keccak256Hash([]byte("NewForge(address,uint128)")) - logHEZClaimed = crypto.Keccak256Hash([]byte("HEZClaimed(address,uint128)")) + logAuctionNewBid = crypto.Keccak256Hash([]byte("NewBid(uint128,uint128,address)")) + logAuctionNewSlotDeadline = crypto.Keccak256Hash([]byte("NewSlotDeadline(uint8)")) + logAuctionNewClosedAuctionSlots = crypto.Keccak256Hash([]byte("NewClosedAuctionSlots(uint16)")) + logAuctionNewOutbidding = crypto.Keccak256Hash([]byte("NewOutbidding(uint16)")) + logAuctionNewDonationAddress = crypto.Keccak256Hash([]byte("NewDonationAddress(address)")) + logAuctionNewBootCoordinator = crypto.Keccak256Hash([]byte("NewBootCoordinator(address)")) + logAuctionNewOpenAuctionSlots = crypto.Keccak256Hash([]byte("NewOpenAuctionSlots(uint16)")) + logAuctionNewAllocationRatio = crypto.Keccak256Hash([]byte("NewAllocationRatio(uint16[3])")) + logAuctionSetCoordinator = crypto.Keccak256Hash([]byte("SetCoordinator(address,address,string)")) + logAuctionNewForgeAllocated = crypto.Keccak256Hash([]byte("NewForgeAllocated(address,address,uint128,uint128,uint128,uint128)")) + logAuctionNewDefaultSlotSetBid = crypto.Keccak256Hash([]byte("NewDefaultSlotSetBid(uint128,uint128)")) + logAuctionNewForge = crypto.Keccak256Hash([]byte("NewForge(address,uint128)")) + logAuctionHEZClaimed = crypto.Keccak256Hash([]byte("HEZClaimed(address,uint128)")) ) // AuctionEventsByBlock returns the events in a block that happened in the @@ -986,7 +930,7 @@ func (c *AuctionClient) AuctionEventsByBlock(blockNum int64) (*AuctionEvents, *e return nil, nil, ErrBlockHashMismatchEvent } switch vLog.Topics[0] { - case logNewBid: + case logAuctionNewBid: var auxNewBid struct { Slot *big.Int BidAmount *big.Int @@ -998,71 +942,64 @@ func (c *AuctionClient) AuctionEventsByBlock(blockNum int64) (*AuctionEvents, *e } newBid.BidAmount = auxNewBid.BidAmount newBid.Slot = new(big.Int).SetBytes(vLog.Topics[1][:]).Int64() - newBid.CoordinatorForger = ethCommon.BytesToAddress(vLog.Topics[2].Bytes()) + newBid.Bidder = ethCommon.BytesToAddress(vLog.Topics[2].Bytes()) auctionEvents.NewBid = append(auctionEvents.NewBid, newBid) - case logNewSlotDeadline: + case logAuctionNewSlotDeadline: var newSlotDeadline AuctionEventNewSlotDeadline if err := c.contractAbi.Unpack(&newSlotDeadline, "NewSlotDeadline", vLog.Data); err != nil { return nil, nil, err } auctionEvents.NewSlotDeadline = append(auctionEvents.NewSlotDeadline, newSlotDeadline) - case logNewClosedAuctionSlots: + case logAuctionNewClosedAuctionSlots: var newClosedAuctionSlots AuctionEventNewClosedAuctionSlots if err := c.contractAbi.Unpack(&newClosedAuctionSlots, "NewClosedAuctionSlots", vLog.Data); err != nil { return nil, nil, err } auctionEvents.NewClosedAuctionSlots = append(auctionEvents.NewClosedAuctionSlots, newClosedAuctionSlots) - case logNewOutbidding: + case logAuctionNewOutbidding: var newOutbidding AuctionEventNewOutbidding if err := c.contractAbi.Unpack(&newOutbidding, "NewOutbidding", vLog.Data); err != nil { return nil, nil, err } auctionEvents.NewOutbidding = append(auctionEvents.NewOutbidding, newOutbidding) - case logNewDonationAddress: + case logAuctionNewDonationAddress: var newDonationAddress AuctionEventNewDonationAddress - if err := c.contractAbi.Unpack(&newDonationAddress, "NewDonationAddress", vLog.Data); err != nil { - return nil, nil, err - } + newDonationAddress.NewDonationAddress = ethCommon.BytesToAddress(vLog.Topics[1].Bytes()) auctionEvents.NewDonationAddress = append(auctionEvents.NewDonationAddress, newDonationAddress) - case logNewBootCoordinator: + case logAuctionNewBootCoordinator: var newBootCoordinator AuctionEventNewBootCoordinator - if err := c.contractAbi.Unpack(&newBootCoordinator, "NewBootCoordinator", vLog.Data); err != nil { - return nil, nil, err - } + newBootCoordinator.NewBootCoordinator = ethCommon.BytesToAddress(vLog.Topics[1].Bytes()) auctionEvents.NewBootCoordinator = append(auctionEvents.NewBootCoordinator, newBootCoordinator) - case logNewOpenAuctionSlots: + case logAuctionNewOpenAuctionSlots: var newOpenAuctionSlots AuctionEventNewOpenAuctionSlots if err := c.contractAbi.Unpack(&newOpenAuctionSlots, "NewOpenAuctionSlots", vLog.Data); err != nil { return nil, nil, err } auctionEvents.NewOpenAuctionSlots = append(auctionEvents.NewOpenAuctionSlots, newOpenAuctionSlots) - case logNewAllocationRatio: + case logAuctionNewAllocationRatio: var newAllocationRatio AuctionEventNewAllocationRatio if err := c.contractAbi.Unpack(&newAllocationRatio, "NewAllocationRatio", vLog.Data); err != nil { return nil, nil, err } auctionEvents.NewAllocationRatio = append(auctionEvents.NewAllocationRatio, newAllocationRatio) - case logNewCoordinator: - var newCoordinator AuctionEventNewCoordinator - if err := c.contractAbi.Unpack(&newCoordinator, "NewCoordinator", vLog.Data); err != nil { - return nil, nil, err - } - auctionEvents.NewCoordinator = append(auctionEvents.NewCoordinator, newCoordinator) - case logCoordinatorUpdated: - var coordinatorUpdated AuctionEventCoordinatorUpdated - if err := c.contractAbi.Unpack(&coordinatorUpdated, "CoordinatorUpdated", vLog.Data); err != nil { + case logAuctionSetCoordinator: + var setCoordinator AuctionEventSetCoordinator + if err := c.contractAbi.Unpack(&setCoordinator, "SetCoordinator", vLog.Data); err != nil { return nil, nil, err } - auctionEvents.CoordinatorUpdated = append(auctionEvents.CoordinatorUpdated, coordinatorUpdated) - case logNewForgeAllocated: + setCoordinator.BidderAddress = ethCommon.BytesToAddress(vLog.Topics[1].Bytes()) + setCoordinator.ForgerAddress = ethCommon.BytesToAddress(vLog.Topics[2].Bytes()) + auctionEvents.SetCoordinator = append(auctionEvents.SetCoordinator, setCoordinator) + case logAuctionNewForgeAllocated: var newForgeAllocated AuctionEventNewForgeAllocated if err := c.contractAbi.Unpack(&newForgeAllocated, "NewForgeAllocated", vLog.Data); err != nil { return nil, nil, err } - newForgeAllocated.Forger = ethCommon.BytesToAddress(vLog.Topics[1].Bytes()) - newForgeAllocated.CurrentSlot = new(big.Int).SetBytes(vLog.Topics[2][:]).Int64() + newForgeAllocated.Bidder = ethCommon.BytesToAddress(vLog.Topics[1].Bytes()) + newForgeAllocated.Forger = ethCommon.BytesToAddress(vLog.Topics[2].Bytes()) + newForgeAllocated.SlotToForge = new(big.Int).SetBytes(vLog.Topics[3][:]).Int64() auctionEvents.NewForgeAllocated = append(auctionEvents.NewForgeAllocated, newForgeAllocated) - case logNewDefaultSlotSetBid: + case logAuctionNewDefaultSlotSetBid: var auxNewDefaultSlotSetBid struct { SlotSet *big.Int NewInitialMinBid *big.Int @@ -1074,12 +1011,12 @@ func (c *AuctionClient) AuctionEventsByBlock(blockNum int64) (*AuctionEvents, *e newDefaultSlotSetBid.NewInitialMinBid = auxNewDefaultSlotSetBid.NewInitialMinBid newDefaultSlotSetBid.SlotSet = auxNewDefaultSlotSetBid.SlotSet.Int64() auctionEvents.NewDefaultSlotSetBid = append(auctionEvents.NewDefaultSlotSetBid, newDefaultSlotSetBid) - case logNewForge: + case logAuctionNewForge: var newForge AuctionEventNewForge newForge.Forger = ethCommon.BytesToAddress(vLog.Topics[1].Bytes()) - newForge.CurrentSlot = new(big.Int).SetBytes(vLog.Topics[2][:]).Int64() + newForge.SlotToForge = new(big.Int).SetBytes(vLog.Topics[2][:]).Int64() auctionEvents.NewForge = append(auctionEvents.NewForge, newForge) - case logHEZClaimed: + case logAuctionHEZClaimed: var HEZClaimed AuctionEventHEZClaimed if err := c.contractAbi.Unpack(&HEZClaimed, "HEZClaimed", vLog.Data); err != nil { return nil, nil, err diff --git a/eth/auction_test.go b/eth/auction_test.go index bb286bb..9e31d69 100644 --- a/eth/auction_test.go +++ b/eth/auction_test.go @@ -16,10 +16,10 @@ const currentSlotConst = 0 var allocationRatioConst [3]uint16 = [3]uint16{4000, 4000, 2000} -var auctionClient *AuctionClient +var auctionClientTest *AuctionClient -//var genesisBlock = 91 -var genesisBlock = 98 +//var genesisBlock = 93 +var genesisBlock = 100 var minBidStr = "10000000000000000000" var URL = "http://localhost:3000" @@ -27,7 +27,7 @@ var newURL = "http://localhost:3002" var BLOCKSPERSLOT = uint8(40) func TestAuctionGetCurrentSlotNumber(t *testing.T) { - currentSlot, err := auctionClient.AuctionGetCurrentSlotNumber() + currentSlot, err := auctionClientTest.AuctionGetCurrentSlotNumber() require.Nil(t, err) currentSlotInt := int(currentSlot) assert.Equal(t, currentSlotConst, currentSlotInt) @@ -37,13 +37,13 @@ func TestAuctionConstants(t *testing.T) { INITMINBID := new(big.Int) INITMINBID.SetString(minBidStr, 10) - auctionConstants, err := auctionClient.AuctionConstants() + auctionConstants, err := auctionClientTest.AuctionConstants() require.Nil(t, err) assert.Equal(t, auctionConstants.BlocksPerSlot, BLOCKSPERSLOT) - // assert.Equal(t, auctionConstants.GenesisBlockNum, GENESISBLOCKNUM) + assert.Equal(t, auctionConstants.GenesisBlockNum, int64(genesisBlock)) assert.Equal(t, auctionConstants.HermezRollup, hermezRollupAddressTestConst) assert.Equal(t, auctionConstants.InitialMinimalBidding, INITMINBID) - assert.Equal(t, auctionConstants.TokenHEZ, tokenHezAddressConst) + assert.Equal(t, auctionConstants.TokenHEZ, tokenERC777AddressConst) } func TestAuctionVariables(t *testing.T) { @@ -51,7 +51,7 @@ func TestAuctionVariables(t *testing.T) { INITMINBID.SetString(minBidStr, 10) defaultSlotSetBid := [6]*big.Int{INITMINBID, INITMINBID, INITMINBID, INITMINBID, INITMINBID, INITMINBID} - auctionVariables, err := auctionClient.AuctionVariables() + auctionVariables, err := auctionClientTest.AuctionVariables() require.Nil(t, err) assert.Equal(t, auctionVariables.AllocationRatio, allocationRatioConst) assert.Equal(t, auctionVariables.BootCoordinator, bootCoordinatorAddressConst) @@ -64,7 +64,7 @@ func TestAuctionVariables(t *testing.T) { } func TestAuctionGetSlotDeadline(t *testing.T) { - slotDeadline, err := auctionClient.AuctionGetSlotDeadline() + slotDeadline, err := auctionClientTest.AuctionGetSlotDeadline() require.Nil(t, err) assert.Equal(t, slotDeadlineConst, slotDeadline) } @@ -72,18 +72,18 @@ func TestAuctionGetSlotDeadline(t *testing.T) { func TestAuctionSetSlotDeadline(t *testing.T) { newSlotDeadline := uint8(25) - _, err := auctionClient.AuctionSetSlotDeadline(newSlotDeadline) + _, err := auctionClientTest.AuctionSetSlotDeadline(newSlotDeadline) require.Nil(t, err) - slotDeadline, err := auctionClient.AuctionGetSlotDeadline() + slotDeadline, err := auctionClientTest.AuctionGetSlotDeadline() require.Nil(t, err) assert.Equal(t, newSlotDeadline, slotDeadline) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() - auctionEvents, _, _ := auctionClient.AuctionEventsByBlock(currentBlockNum) + currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() + auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) assert.Equal(t, newSlotDeadline, auctionEvents.NewSlotDeadline[0].NewSlotDeadline) } func TestAuctionGetOpenAuctionSlots(t *testing.T) { - openAuctionSlots, err := auctionClient.AuctionGetOpenAuctionSlots() + openAuctionSlots, err := auctionClientTest.AuctionGetOpenAuctionSlots() require.Nil(t, err) assert.Equal(t, openAuctionSlotsConst, openAuctionSlots) } @@ -91,18 +91,18 @@ func TestAuctionGetOpenAuctionSlots(t *testing.T) { func TestAuctionSetOpenAuctionSlots(t *testing.T) { newOpenAuctionSlots := uint16(4500) - _, err := auctionClient.AuctionSetOpenAuctionSlots(newOpenAuctionSlots) + _, err := auctionClientTest.AuctionSetOpenAuctionSlots(newOpenAuctionSlots) require.Nil(t, err) - openAuctionSlots, err := auctionClient.AuctionGetOpenAuctionSlots() + openAuctionSlots, err := auctionClientTest.AuctionGetOpenAuctionSlots() require.Nil(t, err) assert.Equal(t, newOpenAuctionSlots, openAuctionSlots) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() - auctionEvents, _, _ := auctionClient.AuctionEventsByBlock(currentBlockNum) + currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() + auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) assert.Equal(t, newOpenAuctionSlots, auctionEvents.NewOpenAuctionSlots[0].NewOpenAuctionSlots) } func TestAuctionGetClosedAuctionSlots(t *testing.T) { - closedAuctionSlots, err := auctionClient.AuctionGetClosedAuctionSlots() + closedAuctionSlots, err := auctionClientTest.AuctionGetClosedAuctionSlots() require.Nil(t, err) assert.Equal(t, closedAuctionSlotsConst, closedAuctionSlots) } @@ -110,20 +110,20 @@ func TestAuctionGetClosedAuctionSlots(t *testing.T) { func TestAuctionSetClosedAuctionSlots(t *testing.T) { newClosedAuctionSlots := uint16(1) - _, err := auctionClient.AuctionSetClosedAuctionSlots(newClosedAuctionSlots) + _, err := auctionClientTest.AuctionSetClosedAuctionSlots(newClosedAuctionSlots) require.Nil(t, err) - closedAuctionSlots, err := auctionClient.AuctionGetClosedAuctionSlots() + closedAuctionSlots, err := auctionClientTest.AuctionGetClosedAuctionSlots() require.Nil(t, err) assert.Equal(t, newClosedAuctionSlots, closedAuctionSlots) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() - auctionEvents, _, _ := auctionClient.AuctionEventsByBlock(currentBlockNum) + currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() + auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) assert.Equal(t, newClosedAuctionSlots, auctionEvents.NewClosedAuctionSlots[0].NewClosedAuctionSlots) - _, err = auctionClient.AuctionSetClosedAuctionSlots(closedAuctionSlots) + _, err = auctionClientTest.AuctionSetClosedAuctionSlots(closedAuctionSlots) require.Nil(t, err) } func TestAuctionGetOutbidding(t *testing.T) { - outbidding, err := auctionClient.AuctionGetOutbidding() + outbidding, err := auctionClientTest.AuctionGetOutbidding() require.Nil(t, err) assert.Equal(t, outbiddingConst, outbidding) } @@ -131,20 +131,20 @@ func TestAuctionGetOutbidding(t *testing.T) { func TestAuctionSetOutbidding(t *testing.T) { newOutbidding := uint16(0xb) - _, err := auctionClient.AuctionSetOutbidding(newOutbidding) + _, err := auctionClientTest.AuctionSetOutbidding(newOutbidding) require.Nil(t, err) - outbidding, err := auctionClient.AuctionGetOutbidding() + outbidding, err := auctionClientTest.AuctionGetOutbidding() require.Nil(t, err) assert.Equal(t, newOutbidding, outbidding) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() - auctionEvents, _, _ := auctionClient.AuctionEventsByBlock(currentBlockNum) + currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() + auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) assert.Equal(t, newOutbidding, auctionEvents.NewOutbidding[0].NewOutbidding) - _, err = auctionClient.AuctionSetOutbidding(outbiddingConst) + _, err = auctionClientTest.AuctionSetOutbidding(outbiddingConst) require.Nil(t, err) } func TestAuctionGetAllocationRatio(t *testing.T) { - allocationRatio, err := auctionClient.AuctionGetAllocationRatio() + allocationRatio, err := auctionClientTest.AuctionGetAllocationRatio() require.Nil(t, err) assert.Equal(t, allocationRatioConst, allocationRatio) } @@ -152,26 +152,26 @@ func TestAuctionGetAllocationRatio(t *testing.T) { func TestAuctionSetAllocationRatio(t *testing.T) { newAllocationRatio := [3]uint16{3000, 3000, 4000} - _, err := auctionClient.AuctionSetAllocationRatio(newAllocationRatio) + _, err := auctionClientTest.AuctionSetAllocationRatio(newAllocationRatio) require.Nil(t, err) - allocationRatio, err := auctionClient.AuctionGetAllocationRatio() + allocationRatio, err := auctionClientTest.AuctionGetAllocationRatio() require.Nil(t, err) assert.Equal(t, newAllocationRatio, allocationRatio) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() - auctionEvents, _, _ := auctionClient.AuctionEventsByBlock(currentBlockNum) + currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() + auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) assert.Equal(t, newAllocationRatio, auctionEvents.NewAllocationRatio[0].NewAllocationRatio) - _, err = auctionClient.AuctionSetAllocationRatio(allocationRatioConst) + _, err = auctionClientTest.AuctionSetAllocationRatio(allocationRatioConst) require.Nil(t, err) } func TestAuctionGetDonationAddress(t *testing.T) { - donationAddress, err := auctionClient.AuctionGetDonationAddress() + donationAddress, err := auctionClientTest.AuctionGetDonationAddress() require.Nil(t, err) assert.Equal(t, &donationAddressConst, donationAddress) } func TestAuctionGetBootCoordinator(t *testing.T) { - bootCoordinator, err := auctionClient.AuctionGetBootCoordinator() + bootCoordinator, err := auctionClientTest.AuctionGetBootCoordinator() require.Nil(t, err) assert.Equal(t, &bootCoordinatorAddressConst, bootCoordinator) } @@ -179,37 +179,37 @@ func TestAuctionGetBootCoordinator(t *testing.T) { func TestAuctionSetDonationAddress(t *testing.T) { newDonationAddress := governanceAddressConst - _, err := auctionClient.AuctionSetDonationAddress(newDonationAddress) + _, err := auctionClientTest.AuctionSetDonationAddress(newDonationAddress) require.Nil(t, err) - donationAddress, err := auctionClient.AuctionGetDonationAddress() + donationAddress, err := auctionClientTest.AuctionGetDonationAddress() require.Nil(t, err) assert.Equal(t, &newDonationAddress, donationAddress) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() - auctionEvents, _, _ := auctionClient.AuctionEventsByBlock(currentBlockNum) + currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() + auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) assert.Equal(t, newDonationAddress, auctionEvents.NewDonationAddress[0].NewDonationAddress) - _, err = auctionClient.AuctionSetDonationAddress(donationAddressConst) + _, err = auctionClientTest.AuctionSetDonationAddress(donationAddressConst) require.Nil(t, err) } func TestAuctionSetBootCoordinator(t *testing.T) { newBootCoordinator := governanceAddressConst - _, err := auctionClient.AuctionSetBootCoordinator(newBootCoordinator) + _, err := auctionClientTest.AuctionSetBootCoordinator(newBootCoordinator) require.Nil(t, err) - bootCoordinator, err := auctionClient.AuctionGetBootCoordinator() + bootCoordinator, err := auctionClientTest.AuctionGetBootCoordinator() require.Nil(t, err) assert.Equal(t, &newBootCoordinator, bootCoordinator) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() - auctionEvents, _, _ := auctionClient.AuctionEventsByBlock(currentBlockNum) + currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() + auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) assert.Equal(t, newBootCoordinator, auctionEvents.NewBootCoordinator[0].NewBootCoordinator) - _, err = auctionClient.AuctionSetBootCoordinator(bootCoordinatorAddressConst) + _, err = auctionClientTest.AuctionSetBootCoordinator(bootCoordinatorAddressConst) require.Nil(t, err) } func TestAuctionGetSlotSet(t *testing.T) { slot := int64(10) - slotSet, err := auctionClient.AuctionGetSlotSet(slot) + slotSet, err := auctionClientTest.AuctionGetSlotSet(slot) require.Nil(t, err) assert.Equal(t, slotSet, big.NewInt(4)) } @@ -217,7 +217,7 @@ func TestAuctionGetSlotSet(t *testing.T) { func TestAuctionGetDefaultSlotSetBid(t *testing.T) { slotSet := uint8(3) - minBid, err := auctionClient.AuctionGetDefaultSlotSetBid(slotSet) + minBid, err := auctionClientTest.AuctionGetDefaultSlotSetBid(slotSet) require.Nil(t, err) assert.Equal(t, minBid.String(), minBidStr) } @@ -228,81 +228,53 @@ func TestAuctionChangeDefaultSlotSetBid(t *testing.T) { newInitialMinBid := new(big.Int) newInitialMinBid.SetString("20000000000000000000", 10) - _, err := auctionClient.AuctionChangeDefaultSlotSetBid(slotSet, newInitialMinBid) + _, err := auctionClientTest.AuctionChangeDefaultSlotSetBid(slotSet, newInitialMinBid) require.Nil(t, err) - minBid, err := auctionClient.AuctionGetDefaultSlotSetBid(set) + minBid, err := auctionClientTest.AuctionGetDefaultSlotSetBid(set) require.Nil(t, err) assert.Equal(t, minBid, newInitialMinBid) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() - auctionEvents, _, _ := auctionClient.AuctionEventsByBlock(currentBlockNum) + currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() + auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) assert.Equal(t, slotSet, auctionEvents.NewDefaultSlotSetBid[0].SlotSet) assert.Equal(t, newInitialMinBid, auctionEvents.NewDefaultSlotSetBid[0].NewInitialMinBid) newMinBid := new(big.Int) newMinBid.SetString("10000000000000000000", 10) - _, err = auctionClient.AuctionChangeDefaultSlotSetBid(slotSet, newMinBid) + _, err = auctionClientTest.AuctionChangeDefaultSlotSetBid(slotSet, newMinBid) require.Nil(t, err) } func TestAuctionGetClaimableHEZ(t *testing.T) { forgerAddress := governanceAddressConst - claimableHEZ, err := auctionClient.AuctionGetClaimableHEZ(forgerAddress) + claimableHEZ, err := auctionClientTest.AuctionGetClaimableHEZ(forgerAddress) require.Nil(t, err) assert.Equal(t, claimableHEZ.Int64(), int64(0)) } -func TestAuctionIsRegisteredCoordinator(t *testing.T) { - forgerAddress := governanceAddressConst - - registered, err := auctionClient.AuctionIsRegisteredCoordinator(forgerAddress) - require.Nil(t, err) - assert.Equal(t, registered, false) -} - func TestAuctionRegisterCoordinator(t *testing.T) { forgerAddress := governanceAddressConst - _, err := auctionClient.AuctionRegisterCoordinator(forgerAddress, URL) - require.Nil(t, err) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() - auctionEvents, _, _ := auctionClient.AuctionEventsByBlock(currentBlockNum) - assert.Equal(t, forgerAddress, auctionEvents.NewCoordinator[0].ForgerAddress) - assert.Equal(t, forgerAddress, auctionEvents.NewCoordinator[0].WithdrawalAddress) - assert.Equal(t, URL, auctionEvents.NewCoordinator[0].CoordinatorURL) -} - -func TestAuctionIsRegisteredCoordinatorTrue(t *testing.T) { - forgerAddress := governanceAddressConst - - registered, err := auctionClient.AuctionIsRegisteredCoordinator(forgerAddress) - require.Nil(t, err) - assert.Equal(t, registered, true) -} - -func TestAuctionUpdateCoordinatorInfo(t *testing.T) { - forgerAddress := governanceAddressConst - - _, err := auctionClient.AuctionUpdateCoordinatorInfo(forgerAddress, forgerAddress, newURL) + _, err := auctionClientTest.AuctionSetCoordinator(forgerAddress, URL) require.Nil(t, err) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() - auctionEvents, _, _ := auctionClient.AuctionEventsByBlock(currentBlockNum) - assert.Equal(t, forgerAddress, auctionEvents.CoordinatorUpdated[0].ForgerAddress) - assert.Equal(t, forgerAddress, auctionEvents.CoordinatorUpdated[0].WithdrawalAddress) - assert.Equal(t, newURL, auctionEvents.CoordinatorUpdated[0].CoordinatorURL) + currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() + auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) + assert.Equal(t, forgerAddress, auctionEvents.SetCoordinator[0].ForgerAddress) + assert.Equal(t, forgerAddress, auctionEvents.SetCoordinator[0].BidderAddress) + assert.Equal(t, URL, auctionEvents.SetCoordinator[0].CoordinatorURL) } func TestAuctionBid(t *testing.T) { - currentSlot, err := auctionClient.AuctionGetCurrentSlotNumber() + currentSlot, err := auctionClientTest.AuctionGetCurrentSlotNumber() require.Nil(t, err) bidAmount := new(big.Int) bidAmount.SetString("12000000000000000000", 10) forgerAddress := governanceAddressConst - _, err = auctionClient.AuctionBid(currentSlot+4, bidAmount, forgerAddress) + _, err = auctionClientTest.AuctionBid(currentSlot+4, bidAmount) require.Nil(t, err) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() - auctionEvents, _, _ := auctionClient.AuctionEventsByBlock(currentBlockNum) + currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() + auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) assert.Equal(t, bidAmount, auctionEvents.NewBid[0].BidAmount) - assert.Equal(t, forgerAddress, auctionEvents.NewBid[0].CoordinatorForger) + assert.Equal(t, forgerAddress, auctionEvents.NewBid[0].Bidder) assert.Equal(t, currentSlot+4, auctionEvents.NewBid[0].Slot) } @@ -310,22 +282,22 @@ func TestAuctionGetSlotNumber(t *testing.T) { slotConst := 4 blockNum := int(BLOCKSPERSLOT)*slotConst + genesisBlock - slot, err := auctionClient.AuctionGetSlotNumber(int64(blockNum)) + slot, err := auctionClientTest.AuctionGetSlotNumber(int64(blockNum)) require.Nil(t, err) - assert.Equal(t, slot, big.NewInt(int64(slotConst))) + assert.Equal(t, slot, int64(slotConst)) } func TestAuctionCanForge(t *testing.T) { slotConst := 4 blockNum := int(BLOCKSPERSLOT)*slotConst + genesisBlock - canForge, err := auctionClient.AuctionCanForge(governanceAddressConst, int64(blockNum)) + canForge, err := auctionClientTest.AuctionCanForge(governanceAddressConst, int64(blockNum)) require.Nil(t, err) assert.Equal(t, canForge, true) } func TestAuctionMultiBid(t *testing.T) { - currentSlot, err := auctionClient.AuctionGetCurrentSlotNumber() + currentSlot, err := auctionClientTest.AuctionGetCurrentSlotNumber() require.Nil(t, err) slotSet := [6]bool{true, false, true, false, true, false} maxBid := new(big.Int) @@ -335,17 +307,17 @@ func TestAuctionMultiBid(t *testing.T) { budget := new(big.Int) budget.SetString("45200000000000000000", 10) forgerAddress := governanceAddressConst - _, err = auctionClient.AuctionMultiBid(currentSlot+4, currentSlot+10, slotSet, maxBid, minBid, budget, forgerAddress) + _, err = auctionClientTest.AuctionMultiBid(currentSlot+4, currentSlot+10, slotSet, maxBid, minBid, budget) require.Nil(t, err) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() - auctionEvents, _, _ := auctionClient.AuctionEventsByBlock(currentBlockNum) - assert.Equal(t, forgerAddress, auctionEvents.NewBid[0].CoordinatorForger) + currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() + auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) + assert.Equal(t, forgerAddress, auctionEvents.NewBid[0].Bidder) assert.Equal(t, currentSlot+4, auctionEvents.NewBid[0].Slot) - assert.Equal(t, forgerAddress, auctionEvents.NewBid[1].CoordinatorForger) + assert.Equal(t, forgerAddress, auctionEvents.NewBid[1].Bidder) assert.Equal(t, currentSlot+6, auctionEvents.NewBid[1].Slot) - assert.Equal(t, forgerAddress, auctionEvents.NewBid[2].CoordinatorForger) + assert.Equal(t, forgerAddress, auctionEvents.NewBid[2].Bidder) assert.Equal(t, currentSlot+8, auctionEvents.NewBid[2].Slot) - assert.Equal(t, forgerAddress, auctionEvents.NewBid[3].CoordinatorForger) + assert.Equal(t, forgerAddress, auctionEvents.NewBid[3].Bidder) assert.Equal(t, currentSlot+10, auctionEvents.NewBid[3].Slot) } @@ -354,7 +326,7 @@ func TestAuctionGetClaimableHEZ2(t *testing.T) { amount := new(big.Int) amount.SetString("11000000000000000000", 10) - claimableHEZ, err := auctionClient.AuctionGetClaimableHEZ(forgerAddress) + claimableHEZ, err := auctionClientTest.AuctionGetClaimableHEZ(forgerAddress) require.Nil(t, err) assert.Equal(t, claimableHEZ, amount) } @@ -363,26 +335,26 @@ func TestAuctionClaimHEZ(t *testing.T) { amount := new(big.Int) amount.SetString("11000000000000000000", 10) - _, err := auctionClient.AuctionClaimHEZ(governanceAddressConst) + _, err := auctionClientTest.AuctionClaimHEZ() require.Nil(t, err) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() - auctionEvents, _, _ := auctionClient.AuctionEventsByBlock(currentBlockNum) + currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() + auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) assert.Equal(t, amount, auctionEvents.HEZClaimed[0].Amount) assert.Equal(t, governanceAddressConst, auctionEvents.HEZClaimed[0].Owner) } func TestAuctionForge(t *testing.T) { - auctionClientHermez, err := NewAuctionClient(ethereumClientHermez, auctionAddressConst, tokenHezAddressConst) + auctionClientTestHermez, err := NewAuctionClient(ethereumClientHermez, auctionTestAddressConst, tokenERC777AddressConst) require.Nil(t, err) slotConst := 4 blockNum := int64(int(BLOCKSPERSLOT)*slotConst + genesisBlock) - currentBlockNum, _ := auctionClient.client.EthCurrentBlock() + currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() blocksToAdd := blockNum - currentBlockNum addBlocks(blocksToAdd, ethClientDialURL) - currentBlockNum, _ = auctionClient.client.EthCurrentBlock() + currentBlockNum, _ = auctionClientTest.client.EthCurrentBlock() assert.Equal(t, currentBlockNum, blockNum) - _, err = auctionClientHermez.AuctionForge(bootCoordinatorAddressConst) + _, err = auctionClientTestHermez.AuctionForge(bootCoordinatorAddressConst) require.Contains(t, err.Error(), "Can't forge") - _, err = auctionClientHermez.AuctionForge(governanceAddressConst) + _, err = auctionClientTestHermez.AuctionForge(governanceAddressConst) require.Nil(t, err) } diff --git a/eth/contracts/README.md b/eth/contracts/README.md index f14c397..dde8047 100644 --- a/eth/contracts/README.md +++ b/eth/contracts/README.md @@ -6,9 +6,10 @@ The go code of the contracts has been generated with the following command: abigen --abi=WithdrawalDelayer.abi --bin=WithdrawalDelayer.bin --pkg=WithdrawalDelayer --out=WithdrawalDelayer.go abigen --abi=Hermez.abi --bin=Hermez.bin --pkg=Hermez --out=Hermez.go abigen --abi=HermezAuctionProtocol.abi --bin=HermezAuctionProtocol.bin --pkg=HermezAuctionProtocol --out=HermezAuctionProtocol.go +abigen --abi=ERC777.abi --bin=ERC777.bin --pkg=ERC777 --out=ERC777.go ``` -You must compile the contracts to get the `.bin` and `.abi` files. The contracts used are in the repo: https://github.com/hermeznetwork/contracts-circuits +You must compile the contracts to get the `.bin` and `.abi` files. The contracts used are in the repo: https://github.com/hermeznetwork/contracts -Specifically they have been processed in the commit with hash: `745e8d588496d7762d4084a54bafd4435061ae35` +Specifically they have been processed in the commit with hash: `60e03e981f1ce607c27d405952bfc98de376f0c5` > abigen version 1.9.21 \ No newline at end of file diff --git a/eth/contracts/auction/HermezAuctionProtocol.go b/eth/contracts/auction/HermezAuctionProtocol.go index c534321..7863148 100644 --- a/eth/contracts/auction/HermezAuctionProtocol.go +++ b/eth/contracts/auction/HermezAuctionProtocol.go @@ -27,10 +27,10 @@ var ( ) // HermezAuctionProtocolABI is the input ABI used to generate the binding from. -const HermezAuctionProtocolABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"forgerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"withdrawalAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"coordinatorURL\",\"type\":\"string\"}],\"name\":\"CoordinatorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"name\":\"HEZClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16[3]\",\"name\":\"newAllocationRatio\",\"type\":\"uint16[3]\"}],\"name\":\"NewAllocationRatio\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"slot\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"bidAmount\",\"type\":\"uint128\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"coordinatorForger\",\"type\":\"address\"}],\"name\":\"NewBid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newBootCoordinator\",\"type\":\"address\"}],\"name\":\"NewBootCoordinator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"newClosedAuctionSlots\",\"type\":\"uint16\"}],\"name\":\"NewClosedAuctionSlots\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"forgerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"withdrawalAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"coordinatorURL\",\"type\":\"string\"}],\"name\":\"NewCoordinator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"slotSet\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newInitialMinBid\",\"type\":\"uint128\"}],\"name\":\"NewDefaultSlotSetBid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newDonationAddress\",\"type\":\"address\"}],\"name\":\"NewDonationAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"forger\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"slotToForge\",\"type\":\"uint128\"}],\"name\":\"NewForge\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"forger\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"slotToForge\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"burnAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"donationAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"governanceAmount\",\"type\":\"uint128\"}],\"name\":\"NewForgeAllocated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"newOpenAuctionSlots\",\"type\":\"uint16\"}],\"name\":\"NewOpenAuctionSlots\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"newOutbidding\",\"type\":\"uint16\"}],\"name\":\"NewOutbidding\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"newSlotDeadline\",\"type\":\"uint8\"}],\"name\":\"NewSlotDeadline\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BLOCKS_PER_SLOT\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"INITIAL_MINIMAL_BIDDING\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forger\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"canForge\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"slotSet\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"newInitialMinBid\",\"type\":\"uint128\"}],\"name\":\"changeDefaultSlotSetBid\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"claimAddress\",\"type\":\"address\"}],\"name\":\"claimHEZ\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"coordinators\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"withdrawalAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"coordinatorURL\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forger\",\"type\":\"address\"}],\"name\":\"forge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"genesisBlock\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllocationRatio\",\"outputs\":[{\"internalType\":\"uint16[3]\",\"name\":\"\",\"type\":\"uint16[3]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBootCoordinator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"claimAddress\",\"type\":\"address\"}],\"name\":\"getClaimableHEZ\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getClosedAuctionSlots\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentSlotNumber\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"slotSet\",\"type\":\"uint8\"}],\"name\":\"getDefaultSlotSetBid\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDonationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"slot\",\"type\":\"uint128\"}],\"name\":\"getMinBidBySlot\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOpenAuctionSlots\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOutbidding\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSlotDeadline\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"blockNumber\",\"type\":\"uint128\"}],\"name\":\"getSlotNumber\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"slot\",\"type\":\"uint128\"}],\"name\":\"getSlotSet\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenERC777\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"genesis\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"hermezRollupAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"governanceAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"donationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bootCoordinatorAddress\",\"type\":\"address\"}],\"name\":\"hermezAuctionProtocolInitializer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hermezRollup\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forgerAddress\",\"type\":\"address\"}],\"name\":\"isRegisteredCoordinator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"pendingBalances\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forgerAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"coordinatorURL\",\"type\":\"string\"}],\"name\":\"registerCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16[3]\",\"name\":\"newAllocationRatio\",\"type\":\"uint16[3]\"}],\"name\":\"setAllocationRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newBootCoordinator\",\"type\":\"address\"}],\"name\":\"setBootCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newClosedAuctionSlots\",\"type\":\"uint16\"}],\"name\":\"setClosedAuctionSlots\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newDonationAddress\",\"type\":\"address\"}],\"name\":\"setDonationAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newOpenAuctionSlots\",\"type\":\"uint16\"}],\"name\":\"setOpenAuctionSlots\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newOutbidding\",\"type\":\"uint16\"}],\"name\":\"setOutbidding\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newDeadline\",\"type\":\"uint8\"}],\"name\":\"setSlotDeadline\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"name\":\"slots\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"forger\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"bidAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"closedMinBid\",\"type\":\"uint128\"},{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenHEZ\",\"outputs\":[{\"internalType\":\"contractIERC777\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"tokensReceived\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forgerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newWithdrawAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"newURL\",\"type\":\"string\"}],\"name\":\"updateCoordinatorInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +const HermezAuctionProtocolABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"name\":\"HEZClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16[3]\",\"name\":\"newAllocationRatio\",\"type\":\"uint16[3]\"}],\"name\":\"NewAllocationRatio\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"slot\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"bidAmount\",\"type\":\"uint128\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bidder\",\"type\":\"address\"}],\"name\":\"NewBid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newBootCoordinator\",\"type\":\"address\"}],\"name\":\"NewBootCoordinator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"newClosedAuctionSlots\",\"type\":\"uint16\"}],\"name\":\"NewClosedAuctionSlots\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"slotSet\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newInitialMinBid\",\"type\":\"uint128\"}],\"name\":\"NewDefaultSlotSetBid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newDonationAddress\",\"type\":\"address\"}],\"name\":\"NewDonationAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"forger\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"slotToForge\",\"type\":\"uint128\"}],\"name\":\"NewForge\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bidder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"forger\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"slotToForge\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"burnAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"donationAmount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"governanceAmount\",\"type\":\"uint128\"}],\"name\":\"NewForgeAllocated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"newOpenAuctionSlots\",\"type\":\"uint16\"}],\"name\":\"NewOpenAuctionSlots\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"newOutbidding\",\"type\":\"uint16\"}],\"name\":\"NewOutbidding\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"newSlotDeadline\",\"type\":\"uint8\"}],\"name\":\"NewSlotDeadline\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"bidder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"forger\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"coordinatorURL\",\"type\":\"string\"}],\"name\":\"SetCoordinator\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BLOCKS_PER_SLOT\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"INITIAL_MINIMAL_BIDDING\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forger\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"canForge\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"slotSet\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"newInitialMinBid\",\"type\":\"uint128\"}],\"name\":\"changeDefaultSlotSetBid\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimHEZ\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"coordinators\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"forger\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"coordinatorURL\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forger\",\"type\":\"address\"}],\"name\":\"forge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"genesisBlock\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllocationRatio\",\"outputs\":[{\"internalType\":\"uint16[3]\",\"name\":\"\",\"type\":\"uint16[3]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBootCoordinator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bidder\",\"type\":\"address\"}],\"name\":\"getClaimableHEZ\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getClosedAuctionSlots\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentSlotNumber\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"slotSet\",\"type\":\"uint8\"}],\"name\":\"getDefaultSlotSetBid\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDonationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"slot\",\"type\":\"uint128\"}],\"name\":\"getMinBidBySlot\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOpenAuctionSlots\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOutbidding\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSlotDeadline\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"blockNumber\",\"type\":\"uint128\"}],\"name\":\"getSlotNumber\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"slot\",\"type\":\"uint128\"}],\"name\":\"getSlotSet\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenERC777\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"genesis\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"hermezRollupAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"governanceAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"donationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bootCoordinatorAddress\",\"type\":\"address\"}],\"name\":\"hermezAuctionProtocolInitializer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hermezRollup\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"pendingBalances\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16[3]\",\"name\":\"newAllocationRatio\",\"type\":\"uint16[3]\"}],\"name\":\"setAllocationRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newBootCoordinator\",\"type\":\"address\"}],\"name\":\"setBootCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newClosedAuctionSlots\",\"type\":\"uint16\"}],\"name\":\"setClosedAuctionSlots\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forger\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"coordinatorURL\",\"type\":\"string\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newDonationAddress\",\"type\":\"address\"}],\"name\":\"setDonationAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newOpenAuctionSlots\",\"type\":\"uint16\"}],\"name\":\"setOpenAuctionSlots\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newOutbidding\",\"type\":\"uint16\"}],\"name\":\"setOutbidding\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newDeadline\",\"type\":\"uint8\"}],\"name\":\"setSlotDeadline\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"name\":\"slots\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"bidder\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"bidAmount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"closedMinBid\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenHEZ\",\"outputs\":[{\"internalType\":\"contractIERC777\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"tokensReceived\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" // HermezAuctionProtocolBin is the compiled bytecode used for deploying new contracts. -var HermezAuctionProtocolBin = "0x608060405234801561001057600080fd5b50613b64806100206000396000f3fe608060405234801561001057600080fd5b50600436106102265760003560e01c80637c643b7011610130578063b3dc7bb1116100b8578063d92bdda31161007c578063d92bdda31461091d578063dfd5281b1461093e578063e60659141461095f578063ec29159b14610967578063ecdae41b146109a757610226565b8063b3dc7bb1146107b8578063b3f69047146107de578063b5f7f2f014610892578063bc4155671461089a578063c63de515146108fc57610226565b8063892075c8116100ff578063892075c814610617578063a48af096146106d4578063ac4b901214610782578063ac5f658b1461078a578063aebd6d98146107b057610226565b80637c643b701461054b578063827874051461057957806383b1f6a0146105cb57806387e6b6bb146105f757610226565b80634e5a5178116101b35780635cca4903116101825780635cca49031461047c5780636074db64146104a257806362945af2146104f75780636f48e79b1461051d57806379a135e31461054357610226565b80634e5a51781461040a57806354c03ab71461043057806355b442e614610454578063564e6a711461045c57610226565b806337d1bd0b116101fa57806337d1bd0b1461035d5780633bebeb06146103835780633f2d0c7b146103bd5780634cdc9c63146103e35780634da9639d146103eb57610226565b806223de291461022b5780630c4da4f61461031357806313de9af2146103375780632243de4714610355575b600080fd5b610311600480360360c081101561024157600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561028357600080fd5b82018360208201111561029557600080fd5b803590602001918460018302840111600160201b831117156102b657600080fd5b919390929091602081019035600160201b8111156102d357600080fd5b8201836020820111156102e557600080fd5b803590602001918460018302840111600160201b8311171561030657600080fd5b5090925090506109cd565b005b61031b610be5565b604080516001600160801b039092168252519081900360200190f35b61033f610bf5565b6040805160ff9092168252519081900360200190f35b61033f610c04565b61031b6004803603602081101561037357600080fd5b50356001600160801b0316610c09565b6103a96004803603602081101561039957600080fd5b50356001600160a01b0316610dc4565b604080519115158252519081900360200190f35b610311600480360360208110156103d357600080fd5b50356001600160a01b0316610de4565b61031b610f3f565b6103f3610f4e565b6040805161ffff9092168252519081900360200190f35b6103116004803603602081101561042057600080fd5b50356001600160a01b0316610f5f565b61043861147a565b604080516001600160a01b039092168252519081900360200190f35b6103f3611489565b61031b6004803603602081101561047257600080fd5b503560ff16611493565b61031b6004803603602081101561049257600080fd5b50356001600160a01b03166114cb565b610311600480360360c08110156104b857600080fd5b506001600160a01b0381358116916001600160801b036020820135169160408201358116916060810135821691608082013581169160a00135166114ef565b6103116004803603602081101561050d57600080fd5b50356001600160a01b03166117dd565b6103116004803603602081101561053357600080fd5b50356001600160a01b0316611884565b61043861192b565b6103116004803603604081101561056157600080fd5b506001600160801b038135811691602001351661193a565b6103116004803603606081101561058f57600080fd5b8101908080606001906003806020026040519081016040528092919082600360200280828437600092019190915250919450611bc49350505050565b6103a9600480360360408110156105e157600080fd5b506001600160a01b038135169060200135611cf5565b6103116004803603602081101561060d57600080fd5b503560ff16611fd4565b6103116004803603606081101561062d57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561066057600080fd5b82018360208201111561067257600080fd5b803590602001918460018302840111600160201b8311171561069357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506120d4945050505050565b6106fa600480360360208110156106ea57600080fd5b50356001600160a01b031661231e565b60405180836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561074657818101518382015260200161072e565b50505050905090810190601f1680156107735780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6103f36123d2565b61031b600480360360208110156107a057600080fd5b50356001600160801b03166123e3565b6104386123f9565b61031b600480360360208110156107ce57600080fd5b50356001600160801b0316612408565b610311600480360360408110156107f457600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561081e57600080fd5b82018360208201111561083057600080fd5b803590602001918460018302840111600160201b8311171561085157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612442945050505050565b6104386125bc565b6108c0600480360360208110156108b057600080fd5b50356001600160801b03166125cb565b604080516001600160a01b0390951685526001600160801b03938416602086015291909216838201529015156060830152519081900360800190f35b6103116004803603602081101561091257600080fd5b503561ffff1661260e565b6103116004803603602081101561093357600080fd5b503561ffff1661271f565b6103116004803603602081101561095457600080fd5b503561ffff16612830565b61031b6128cd565b61096f6128d9565b6040518082606080838360005b8381101561099457818101518382015260200161097c565b5050505090500191505060405180910390f35b61031b600480360360208110156109bd57600080fd5b50356001600160a01b031661293b565b60335460ff16610a24576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6033805460ff191690556065546001600160a01b03163314610a84576040805162461bcd60e51b815260206004820152601460248201527324b73b30b634b21022a9219b9b9b903a37b5b2b760611b604482015290519081900360640190fd5b82610ace576040805162461bcd60e51b815260206004820152601560248201527453656e642048455a20776974686f7574206461746160581b604482015290519081900360640190fd5b600160801b8510610b26576040805162461bcd60e51b815260206004820152601e60248201527f416d6f756e74206d757374206265206c657373207468616e20325f3132380000604482015290519081900360640190fd5b600084846020811015610b3857600080fd5b50356001600160e01b0319169050636007a2af60e01b811415610b6557610b60868686612956565b610bcd565b6001600160e01b03198116637a5b973560e11b1415610b8957610b60868686612c50565b6040805162461bcd60e51b81526020600482015260146024820152734e6f7420612076616c69642063616c6c6461746160601b604482015290519081900360640190fd5b50506033805460ff1916600117905550505050505050565b6000610bf043612408565b905090565b606f5462010000900460ff1690565b602881565b606d54600090600160801b900461ffff16610c22610be5565b016001600160801b0316826001600160801b03161015610c89576040805162461bcd60e51b815260206004820152601f60248201527f41756374696f6e2068617320616c7265616479206265656e20636c6f73656400604482015290519081900360640190fd5b6000610c94836123e3565b6001600160801b038085166000908152607060205260409020600101549192501615610d2e57606f546001600160801b03808516600090815260706020526040902060010154610d2992610d059261271092610cf69291169061ffff166130d0565b6001600160801b03169061314a565b6001600160801b03808616600090815260706020526040902060010154169061318c565b610dbd565b606f54610dbd90610d819061271090610cf69061ffff16606a6001600160801b03871660068110610d5b57fe5b60028104919091015460019091166010026101000a90046001600160801b0316906130d0565b606a836001600160801b031660068110610d9757fe5b60028104919091015460019091166010026101000a90046001600160801b03169061318c565b9392505050565b6001600160a01b0390811660009081526072602052604090205416151590565b60335460ff16610e3b576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6033805460ff191690556000610e50826114cb565b90506000816001600160801b031611610eb0576040805162461bcd60e51b815260206004820152601b60248201527f446f65736e2774206861766520656e6f7567682062616c616e63650000000000604482015290519081900360640190fd5b6001600160a01b03808316600090815260716020526040902080546001600160801b0319169055606554610ee6911683836131f2565b604080516001600160801b038316815290516001600160a01b038416917f199ef0cb54d2b296ff6eaec2721bacf0ca3fd8344a43f5bdf4548b34dfa2594f919081900360200190a250506033805460ff19166001179055565b606d546001600160801b031681565b606d54600160801b900461ffff1690565b6066546001600160a01b03163314610fbe576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79204865726d657a20526f6c6c75702041646472657373000000000000604482015290519081900360640190fd5b610fc88143611cf5565b611007576040805162461bcd60e51b815260206004820152600b60248201526a43616e277420666f72676560a81b604482015290519081900360640190fd5b6000611011610be5565b6001600160801b038181166000908152607060205260408120600281018054600160ff198216811790925591015493945060ff16929091600160801b909104161561108257506001600160801b03808316600090815260706020526040902060010154600160801b900416806110c3565b606a61108d846123e3565b6001600160801b0316600681106110a057fe5b600291828204019190066010029054906101000a90046001600160801b03169050805b5081611435576069546001600160a01b03858116911614801561110257506001600160801b038084166000908152607060205260409020600101541615155b801561112d57506001600160801b038381166000908152607060205260409020600101548183169116105b156111d3576001600160801b0383811660009081526070602090815260408083206001810180548616600160801b88881602179081905590546001600160a01b0390811685526072845282852054168085526071909352922054909261119792918116911661318c565b6001600160a01b0391909116600090815260716020526040902080546001600160801b0319166001600160801b03909216919091179055611435565b6069546001600160a01b03858116911614611435576001600160801b03838116600090815260706020526040812060010180548316600160801b81021790819055606e5491926112309261271092610cf692169061ffff166130d0565b606e546001600160801b03868116600090815260706020526040812060010154939450926112719261271092610cf692169062010000900461ffff166130d0565b606e546001600160801b03878116600090815260706020526040812060010154939450926112b39261271092610cf6921690600160201b900461ffff166130d0565b6065546040805163fe9d930360e01b81526001600160801b03871660048201526024810182905260006044820181905291519394506001600160a01b039092169263fe9d930392608480820193929182900301818387803b15801561131757600080fd5b505af115801561132b573d6000803e3d6000fd5b50506068546001600160a01b031660009081526071602052604090205461135e92506001600160801b031690508361318c565b6068546001600160a01b0390811660009081526071602052604080822080546001600160801b0319166001600160801b03958616179055606754909216815220546113aa91168261318c565b6067546001600160a01b0390811660009081526071602090815260409182902080546001600160801b0319166001600160801b03958616179055815187851681528685169181019190915284841681830152905192891692918a16917f9c1175e346e9ec25b59d991c43dd2c3c982970d169dbd7315ad3d8bb91e0acf5916060908290030190a35050505b6040516001600160801b038416906001600160a01b038616907f7cae662d4cfa9d9c5575c65f0cc41a858c51ca14ebcbd02a802a62376c3ad23890600090a350505050565b6068546001600160a01b031690565b606f5461ffff1690565b6000606a8260ff16600681106114a557fe5b600291828204019190066010029054906101000a90046001600160801b03169050919050565b6001600160a01b03166000908152607160205260409020546001600160801b031690565b600054610100900460ff1680611508575061150861338f565b80611516575060005460ff16155b6115515760405162461bcd60e51b815260040180806020018281038252602e815260200180613b01602e913960400191505060405180910390fd5b600054610100900460ff1615801561157c576000805460ff1961ff0019909116610100171660011790555b611584613395565b606f80546103e861ffff199091161762ff0000191662140000179055606d805461ffff60801b1916600160811b1761ffff60901b1916608760951b179055606580546001600160a01b0319166001600160a01b03891617905560408051606081018252610fa080825260208201526107d09181019190915261160a90606e90600361383b565b50606680546001600160a01b038088166001600160a01b03199283161790925560698054858416908316179055606880548684169083161790556067805492871692909116919091179055604080516329965a1d60e01b815230600482018190527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b602483015260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad24916329965a1d91606480830192600092919082900301818387803b1580156116d457600080fd5b505af11580156116e8573d6000803e3d6000fd5b50506040805160c081018252678ac7230489e8000080825260208201819052918101829052606081018290526080810182905260a08101919091526117339250606a915060066138d1565b50606d54600160801b900461ffff9081166028021643016001600160801b03871610156117a7576040805162461bcd60e51b815260206004820152601c60248201527f47656e6573697320736d616c6c6572207468616e206d696e696d616c00000000604482015290519081900360640190fd5b606d80546001600160801b0319166001600160801b03881617905580156117d4576000805461ff00191690555b50505050505050565b6067546001600160a01b0316331461182a576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b606980546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f2161bd0f0e056d18046a81683e5bc845980367451cf4ca5148523a147c51be55916020908290030190a150565b6067546001600160a01b031633146118d1576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b606880546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517fa62863cbad1647a2855e9cd39d04fa6dfd32e1b9cfaff1aaf6523f4aaafeccd7916020908290030190a150565b6065546001600160a01b031681565b6067546001600160a01b03163314611987576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b6006826001600160801b031611156119dc576040805162461bcd60e51b8152602060048201526013602482015272139bdd0818481d985b1a59081cdb1bdd14d95d606a1b604482015290519081900360640190fd5b606a826001600160801b0316600681106119f257fe5b60028104919091015460019091166010026101000a90046001600160801b0316611a63576040805162461bcd60e51b815260206004820152601e60248201527f5468697320736c6f742073657420697320646563656e7472616c697a65640000604482015290519081900360640190fd5b6000611a6d610be5565b9050805b606d54600160801b900461ffff1682016001600160801b0390811690821611611b27576001600160801b03808216600090815260706020526040902060010154600160801b900416611b1f57606a611ac8826123e3565b6001600160801b031660068110611adb57fe5b6002810491909101546001600160801b038381166000908152607060205260409020600190810180548316919094166010026101000a90920416600160801b021790555b600101611a71565b5081606a846001600160801b031660068110611b3f57fe5b600291828204019190066010026101000a8154816001600160801b0302191690836001600160801b031602179055507fa922aa010d1ff8e70b2aa9247d891836795c3d3ba2a543c37c91a44dc4a50172838360405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390a1505050565b6067546001600160a01b03163314611c11576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b806002602002015181600160200201518260006020020151010161ffff1661271014611c6e5760405162461bcd60e51b8152600401808060200182810382526021815260200180613a9f6021913960400191505060405180910390fd5b611c7b606e82600361383b565b506040517f0bb59eceb12f1bdb63e4a7d57c70d6473fefd7c3f51af5a3604f7e97197073e490606e9060608101826000835b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411611cad579050505091505060405180910390a150565b6000600160801b8210611d4f576040805162461bcd60e51b815260206004820152601d60248201527f626c6f636b4e756d62657220686967686572207468616e20325f313238000000604482015290519081900360640190fd5b606d546001600160801b0316821015611daf576040805162461bcd60e51b815260206004820152601b60248201527f41756374696f6e20686173206e6f742073746172746564207965740000000000604482015290519081900360640190fd5b6000611dba83612408565b606d54909150600090611e0390611df3906001600160801b0390811690611de490861660286130d0565b6001600160801b03169061318c565b6001600160801b03861690613444565b6001600160801b0380841660009081526070602052604081206001015492935091600160801b90041615611e5d57506001600160801b03808316600090815260706020526040902060010154600160801b90041680611e9e565b606a611e68846123e3565b6001600160801b031660068110611e7b57fe5b600291828204019190066010029054906101000a90046001600160801b03169050805b506001600160801b03831660009081526070602052604090206002015460ff16158015611edf5750606f5462010000900460ff166001600160801b03831610155b15611ef05760019350505050611fce565b6001600160801b0383166000908152607060205260409020546001600160a01b038781169116148015611f4357506001600160801b03838116600090815260706020526040902060010154818316911610155b15611f545760019350505050611fce565b6069546001600160a01b038781169116148015611fb557506001600160801b0383811660009081526070602052604090206001015481831691161080611fb557506001600160801b0380841660009081526070602052604090206001015416155b15611fc65760019350505050611fce565b600093505050505b92915050565b6067546001600160a01b03163314612021576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b602860ff8216111561207a576040805162461bcd60e51b815260206004820152601c60248201527f47726561746572207468616e20424c4f434b535f5045525f534c4f5400000000604482015290519081900360640190fd5b606f805460ff8084166201000090810262ff0000199093169290921792839055604080519290930416815290517f4a0d90b611c15e02dbf23b10f35b936cf2c77665f8c77822d3eca131f9d986d39181900360200190a150565b6120dd83610dc4565b612126576040805162461bcd60e51b8152602060048201526015602482015274466f7267657220646f65736e27742065786973747360581b604482015290519081900360640190fd5b6001600160a01b03838116600090815260726020526040902054163314612194576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c7920746865207769746864726177616c41646472657373000000000000604482015290519081900360640190fd5b6001600160a01b0382166121ef576040805162461bcd60e51b815260206004820152601e60248201527f5769746864726177616c416464726573732063616e2774206265203078300000604482015290519081900360640190fd5b6001600160a01b03838116600090815260726020908152604090912080546001600160a01b03191692851692909217825582516122329260010191840190613972565b506001600160a01b0380841660008181526072602090815260409182902080548351948552909416908301819052606091830182815260019485018054600260001997821615610100029790970116959095049284018390527f384460dae6dd1682b71131272b0e47bcd8ecef844d632c5062db277378a868c59488949293909291906080830190849080156123095780601f106122de57610100808354040283529160200191612309565b820191906000526020600020905b8154815290600101906020018083116122ec57829003601f168201915b505094505050505060405180910390a1505050565b6072602090815260009182526040918290208054600180830180548651600261010094831615949094026000190190911692909204601f81018690048602830186019096528582526001600160a01b039092169492939092908301828280156123c85780601f1061239d576101008083540402835291602001916123c8565b820191906000526020600020905b8154815290600101906020018083116123ab57829003601f168201915b5050505050905082565b606d54600160901b900461ffff1690565b6000611fce6001600160801b0383166006613486565b6066546001600160a01b031681565b606d546000906001600160801b039081169083161015612429576000611fce565b50606d5460286001600160801b03918216909203160490565b61244b82610dc4565b15612492576040805162461bcd60e51b8152602060048201526012602482015271105b1c9958591e481c9959da5cdd195c995960721b604482015290519081900360640190fd5b6001600160a01b038216600090815260726020908152604090912080546001600160a01b0319163317815582516124d192600190920191840190613972565b506001600160a01b0380831660008181526072602090815260409182902080548351948552909416908301819052606091830182815260019485018054600260001997821615610100029790970116959095049284018390527f669c2ad52258689ce95b5b33025822b1afde214fff3a61dd00007d98b5b2ca369487949293909291906080830190849080156125a85780601f1061257d576101008083540402835291602001916125a8565b820191906000526020600020905b81548152906001019060200180831161258b57829003601f168201915b505094505050505060405180910390a15050565b6069546001600160a01b031690565b6070602052600090815260409020805460018201546002909201546001600160a01b03909116916001600160801b0380821692600160801b909204169060ff1684565b6067546001600160a01b0316331461265b576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b606d5461ffff600160801b909104811690821610156126c1576040805162461bcd60e51b815260206004820152601f60248201527f536d616c6c6572207468616e20636c6f73656441756374696f6e536c6f747300604482015290519081900360640190fd5b606d805461ffff808416600160901b90810261ffff60901b199093169290921792839055604080519290930416815290517f3da0492dea7298351bc14d1c0699905fd0657c33487449751af50fc0c8b593f19181900360200190a150565b6067546001600160a01b0316331461276c576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b606d5461ffff600160901b909104811690821611156127d2576040805162461bcd60e51b815260206004820152601f60248201527f47726561746572207468616e20636c6f73656441756374696f6e536c6f747300604482015290519081900360640190fd5b606d805461ffff808416600160801b90810261ffff60801b199093169290921792839055604080519290930416815290517fc78051d3757db196b1e445f3a9a1380944518c69b5d7922ec747c54f0340a4ea9181900360200190a150565b6067546001600160a01b0316331461287d576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b606f805461ffff191661ffff838116919091179182905560408051929091168252517fd3748b8c326e93d12af934fbf87471e315a89bc3f7b8222343acf0210edf248e916020908290030190a150565b678ac7230489e8000081565b6128e16139ec565b60408051606081019182905290606e90600390826000855b82829054906101000a900461ffff1661ffff16815260200190600201906020826001010492830192600103820291508084116128f95790505050505050905090565b6071602052600090815260409020546001600160801b031681565b600080806129678460048188613a76565b606081101561297557600080fd5b5080356001600160801b0390811694506020820135169250604001356001600160a01b031690506129a581610dc4565b6129f6576040805162461bcd60e51b815260206004820152601a60248201527f436f6f7264696e61746f72206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b606d54600160801b900461ffff16612a0c610be5565b016001600160801b0316836001600160801b03161015612a73576040805162461bcd60e51b815260206004820152601f60248201527f41756374696f6e2068617320616c7265616479206265656e20636c6f73656400604482015290519081900360640190fd5b612a7c83610c09565b6001600160801b0316826001600160801b03161015612ad6576040805162461bcd60e51b81526020600482015260116024820152704269642062656c6f77206d696e696d756d60781b604482015290519081900360640190fd5b606d5461ffff600160901b8204811691600160801b900416612af6610be5565b01016001600160801b0316836001600160801b031610612b5d576040805162461bcd60e51b815260206004820152601b60248201527f42696420686173206e6f74206265656e206f70656e6564207965740000000000604482015290519081900360640190fd5b6001600160a01b038082166000908152607260209081526040808320549093168252607190522054612b98906001600160801b03168761318c565b6001600160a01b038281166000908152607260209081526040808320805485168452607190925280832080546001600160801b0319166001600160801b0396871617905590549092168152205483821691161015612c3d576040805162461bcd60e51b815260206004820152601a60248201527f446f206e6f74206861766520656e6f7567682062616c616e6365000000000000604482015290519081900360640190fd5b612c488383836134c8565b505050505050565b600080612c5b613a0a565b60008080612c6c876004818b613a76565b610160811015612c7b57600080fd5b6040805160c081810183526001600160801b03853581169560208101359091169481019390926101008401929091840190600690839083908082843760009201919091525050606d54969c50949a50985080356001600160801b0390811698506020820135169650604001356001600160a01b031694505050600160801b90910461ffff169050612d0a610be5565b016001600160801b0316866001600160801b03161015612d71576040805162461bcd60e51b815260206004820152601f60248201527f41756374696f6e2068617320616c7265616479206265656e20636c6f73656400604482015290519081900360640190fd5b606d5461ffff600160901b8204811691600160801b900416612d91610be5565b01016001600160801b0316856001600160801b031610612df8576040805162461bcd60e51b815260206004820152601b60248201527f42696420686173206e6f74206265656e206f70656e6564207965740000000000604482015290519081900360640190fd5b816001600160801b0316836001600160801b03161015612e5f576040805162461bcd60e51b815260206004820181905260248201527f6d61784269642073686f756c64206265203e3d20636c6f7365644d696e426964604482015290519081900360640190fd5b612e6881610dc4565b612eb9576040805162461bcd60e51b815260206004820152601a60248201527f436f6f7264696e61746f72206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b6000805b6006811015612eeb57858160068110612ed257fe5b602002015115612ee3576001909101905b600101612ebd565b506001600160a01b038083166000908152607260209081526040808320549093168252607190522054612f27906001600160801b03168b61318c565b6001600160a01b0383811660009081526072602090815260408083205490931682526071905290812080546001600160801b0319166001600160801b039390931692909217909155875b876001600160801b0316816001600160801b0316116130c2576000612f9582610c09565b9050856001600160801b0316816001600160801b031611612fb857859250612ffe565b856001600160801b0316816001600160801b0316118015612feb5750866001600160801b0316816001600160801b031611155b15612ff857809250612ffe565b506130ba565b87613008836123e3565b6001600160801b03166006811061301b57fe5b6020020151156130b8576001600160a01b0380861660009081526072602090815260408083205490931682526071905220546001600160801b03808516911610156130ad576040805162461bcd60e51b815260206004820152601a60248201527f446f206e6f74206861766520656e6f7567682062616c616e6365000000000000604482015290519081900360640190fd5b6130b88284876134c8565b505b600101612f71565b505050505050505050505050565b60006001600160801b0383166130e857506000611fce565b8282026001600160801b03808416908086169083168161310457fe5b046001600160801b031614610dbd5760405162461bcd60e51b8152600401808060200182810382526021815260200180613ac06021913960400191505060405180910390fd5b6000610dbd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613694565b60008282016001600160801b038085169082161015610dbd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0385811660248301526001600160801b038516604480840191909152845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009460609489169392918291908083835b602083106132aa5780518252601f19909201916020918201910161328b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461330c576040519150601f19603f3d011682016040523d82523d6000602084013e613311565b606091505b509150915081801561333f57508051158061333f575080806020019051602081101561333c57600080fd5b50515b613388576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b5050505050565b303b1590565b600054610100900460ff16806133ae57506133ae61338f565b806133bc575060005460ff16155b6133f75760405162461bcd60e51b815260040180806020018281038252602e815260200180613b01602e913960400191505060405180910390fd5b600054610100900460ff16158015613422576000805460ff1961ff0019909116610100171660011790555b6033805460ff191660011790558015613441576000805461ff00191690555b50565b6000610dbd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613751565b6000610dbd83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000008152506137be565b6001600160801b03808416600090815260706020908152604080832080546001909101546001600160a01b03878116865260728552838620548116865260719094529190932054919092169291821691613523911685613444565b6001600160a01b03848116600081815260726020908152604080832054851683526071825280832080546001600160801b03199081166001600160801b03988916179091558b87168452607090925290912080546001600160a01b03191690921782556001919091018054909116928716929092179091558216158015906135b357506001600160801b03811615155b15613639576001600160a01b0380831660009081526072602090815260408083205490931682526071905220546135f3906001600160801b03168261318c565b6001600160a01b038381166000908152607260209081526040808320549093168252607190522080546001600160801b0319166001600160801b03929092169190911790555b826001600160a01b0316856001600160801b03167fd48e8329cdb2fb109b4fe445d7b681a74b256bff16e6f7f33b9d4fbe9038e4338660405180826001600160801b0316815260200191505060405180910390a35050505050565b6000816001600160801b0384166137295760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156136ee5781810151838201526020016136d6565b50505050905090810190601f16801561371b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000836001600160801b0316856001600160801b03168161374757fe5b0495945050505050565b6000836001600160801b0316836001600160801b0316111582906137b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156136ee5781810151838201526020016136d6565b505050900390565b6000816001600160801b0384166138165760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156136ee5781810151838201526020016136d6565b50826001600160801b0316846001600160801b03168161383257fe5b06949350505050565b6001830191839082156138c15791602002820160005b8382111561389157835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302613851565b80156138bf5782816101000a81549061ffff0219169055600201602081600101049283019260010302613891565b505b506138cd929150613a28565b5090565b6003830191839082156139665791602002820160005b8382111561393157835183826101000a8154816001600160801b0302191690836001600160801b031602179055509260200192601001602081600f010492830192600103026138e7565b80156139645782816101000a8154906001600160801b030219169055601001602081600f01049283019260010302613931565b505b506138cd929150613a42565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106139b357805160ff19168380011785556139e0565b828001600101855582156139e0579182015b828111156139e05782518255916020019190600101906139c5565b506138cd929150613a61565b60405180606001604052806003906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b5b808211156138cd57805461ffff19168155600101613a29565b5b808211156138cd5780546001600160801b0319168155600101613a43565b5b808211156138cd5760008155600101613a62565b60008085851115613a85578182fd5b83861115613a91578182fd5b505082019391909203915056fe416c6c6f636174696f6e526174696f2068617320746f206265203130302e303025536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a264697066735822122029cc2200d63f887bdbf1b2b005660db3d08666343aa70a0a1c97577fe46c52c764736f6c634300060c0033" +var HermezAuctionProtocolBin = "0x608060405234801561001057600080fd5b506136da806100206000396000f3fe608060405234801561001057600080fd5b50600436106102105760003560e01c806379a135e311610125578063b3dc7bb1116100ad578063d92bdda31161007c578063d92bdda314610803578063dfd5281b14610824578063e606591414610845578063ec29159b1461084d578063ecdae41b1461088d57610210565b8063b3dc7bb114610755578063b5f7f2f01461077b578063bc41556714610783578063c63de515146107e257610210565b806387e6b6bb116100f457806387e6b6bb14610651578063a48af09614610671578063ac4b90121461071f578063ac5f658b14610727578063aebd6d981461074d57610210565b806379a135e3146105895780637c643b701461059157806382787405146105bf57806383b1f6a01461061157610210565b80634e5a5178116101a85780635cca4903116101775780635cca4903146104ba5780636074db64146104e057806362945af2146105355780636dfe47c91461055b5780636f48e79b1461056357610210565b80634e5a51781461044857806354c03ab71461046e57806355b442e614610492578063564e6a711461049a57610210565b80632243de47116101e45780632243de47146103f357806337d1bd0b146103fb5780634cdc9c63146104215780634da9639d1461042957610210565b806223de29146102155780630c4da4f6146102fd5780630eeaf0801461032157806313de9af2146103d5575b600080fd5b6102fb600480360360c081101561022b57600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561026d57600080fd5b82018360208201111561027f57600080fd5b803590602001918460018302840111600160201b831117156102a057600080fd5b919390929091602081019035600160201b8111156102bd57600080fd5b8201836020820111156102cf57600080fd5b803590602001918460018302840111600160201b831117156102f057600080fd5b5090925090506108b3565b005b610305610baa565b604080516001600160801b039092168252519081900360200190f35b6102fb6004803603604081101561033757600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561036157600080fd5b82018360208201111561037357600080fd5b803590602001918460018302840111600160201b8311171561039457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610bba945050505050565b6103dd610cab565b6040805160ff9092168252519081900360200190f35b6103dd610cba565b6103056004803603602081101561041157600080fd5b50356001600160801b0316610cbf565b610305610e7a565b610431610e89565b6040805161ffff9092168252519081900360200190f35b6102fb6004803603602081101561045e57600080fd5b50356001600160a01b0316610e9a565b6104766113e1565b604080516001600160a01b039092168252519081900360200190f35b6104316113f0565b610305600480360360208110156104b057600080fd5b503560ff166113fa565b610305600480360360208110156104d057600080fd5b50356001600160a01b0316611432565b6102fb600480360360c08110156104f657600080fd5b506001600160a01b0381358116916001600160801b036020820135169160408201358116916060810135821691608082013581169160a0013516611456565b6102fb6004803603602081101561054b57600080fd5b50356001600160a01b0316611746565b6102fb6117e3565b6102fb6004803603602081101561057957600080fd5b50356001600160a01b0316611934565b6104766119d1565b6102fb600480360360408110156105a757600080fd5b506001600160801b03813581169160200135166119e0565b6102fb600480360360608110156105d557600080fd5b8101908080606001906003806020026040519081016040528092919082600360200280828437600092019190915250919450611c6a9350505050565b61063d6004803603604081101561062757600080fd5b506001600160a01b038135169060200135611d9b565b604080519115158252519081900360200190f35b6102fb6004803603602081101561066757600080fd5b503560ff1661208c565b6106976004803603602081101561068757600080fd5b50356001600160a01b031661218c565b60405180836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b838110156106e35781810151838201526020016106cb565b50505050905090810190601f1680156107105780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b610431612240565b6103056004803603602081101561073d57600080fd5b50356001600160801b0316612251565b610476612267565b6103056004803603602081101561076b57600080fd5b50356001600160801b0316612276565b6104766122b0565b6107a96004803603602081101561079957600080fd5b50356001600160801b03166122bf565b604080516001600160a01b03909516855292151560208501526001600160801b0391821684840152166060830152519081900360800190f35b6102fb600480360360208110156107f857600080fd5b503561ffff16612302565b6102fb6004803603602081101561081957600080fd5b503561ffff16612413565b6102fb6004803603602081101561083a57600080fd5b503561ffff16612524565b6103056125c1565b6108556125cd565b6040518082606080838360005b8381101561087a578181015183820152602001610862565b5050505090500191505060405180910390f35b610305600480360360208110156108a357600080fd5b50356001600160a01b031661262f565b60335460ff1661090a576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6033805460ff191690556065546001600160a01b0316331461096a576040805162461bcd60e51b815260206004820152601460248201527324b73b30b634b21022a9219b9b9b903a37b5b2b760611b604482015290519081900360640190fd5b826109b4576040805162461bcd60e51b815260206004820152601560248201527453656e742048455a20776974686f7574206461746160581b604482015290519081900360640190fd5b600160801b8510610a0c576040805162461bcd60e51b815260206004820152601e60248201527f416d6f756e74206d757374206265206c657373207468616e20325f3132380000604482015290519081900360640190fd5b86600085856020811015610a1f57600080fd5b50356001600160e01b031916905063dc22283b60e01b811415610a8557600080610a4c876004818b6135ec565b6040811015610a5a57600080fd5b506001600160801b03813581169350602090910135169050610a7e8983838761264a565b5050610b91565b6001600160e01b03198116639eec96f960e01b1415610b4d57600080610aa96133b1565b600080610ab98a6004818e6135ec565b610140811015610ac857600080fd5b6040805160c081810183526001600160801b038535811695602081013590911694810193909261010084019290918401906006908390839080828437600092019190915250969b5094995097506001600160801b03813581169750602090910135169450610b4393508f92508891508790508686868d6128e6565b5050505050610b91565b6040805162461bcd60e51b81526020600482015260146024820152734e6f7420612076616c69642063616c6c6461746160601b604482015290519081900360640190fd5b50506033805460ff191660011790555050505050505050565b6000610bb543612276565b905090565b33600090815260726020908152604090912080546001600160a01b0319166001600160a01b0385161781558251610bf9926001909201918401906133cf565b50816001600160a01b0316336001600160a01b03167f5246b2ac9ee77efe2e64af6df00055d97e2d6e1b277f5a8d17ba5bca1a573da0836040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c6d578181015183820152602001610c55565b50505050905090810190601f168015610c9a5780820380516001836020036101000a031916815260200191505b509250505060405180910390a35050565b606f5462010000900460ff1690565b602881565b606d54600090600160801b900461ffff16610cd8610baa565b016001600160801b0316826001600160801b03161015610d3f576040805162461bcd60e51b815260206004820152601f60248201527f41756374696f6e2068617320616c7265616479206265656e20636c6f73656400604482015290519081900360640190fd5b6000610d4a83612251565b6001600160801b038085166000908152607060205260409020600101549192501615610de457606f546001600160801b03808516600090815260706020526040902060010154610ddf92610dbb9261271092610dac9291169061ffff16612c6f565b6001600160801b031690612ce9565b6001600160801b038086166000908152607060205260409020600101541690612d2b565b610e73565b606f54610e7390610e379061271090610dac9061ffff16606a6001600160801b03871660068110610e1157fe5b60028104919091015460019091166010026101000a90046001600160801b031690612c6f565b606a836001600160801b031660068110610e4d57fe5b60028104919091015460019091166010026101000a90046001600160801b031690612d2b565b9392505050565b606d546001600160801b031681565b606d54600160801b900461ffff1690565b6066546001600160a01b03163314610ef9576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79204865726d657a20526f6c6c75702041646472657373000000000000604482015290519081900360640190fd5b610f038143611d9b565b610f42576040805162461bcd60e51b815260206004820152600b60248201526a43616e277420666f72676560a81b604482015290519081900360640190fd5b6000610f4c610baa565b6001600160801b0381811660009081526070602052604081208054600190910154939450600160a01b900460ff16929091600160801b9091041615610fb5576001600160801b03808416600090815260706020526040902060010154600160801b900416610ff3565b606a610fc084612251565b6001600160801b031660068110610fd357fe5b600291828204019190066010029054906101000a90046001600160801b03165b90508161139c576001600160801b0383166000908152607060205260409020805460ff60a01b1916600160a01b1790556069546001600160a01b0390811690851614801561105d57506001600160801b038084166000908152607060205260409020600101541615155b801561108857506001600160801b038381166000908152607060205260409020600101548183169116105b1561112d576001600160801b0383811660009081526070602090815260408083206001810180548616600160801b88881602179081905590546001600160a01b031684526071909252909120546110e3929081169116612d2b565b6001600160801b038481166000908152607060209081526040808320546001600160a01b031683526071909152902080546001600160801b0319169290911691909117905561139c565b6069546001600160a01b0385811691161461139c576001600160801b03838116600090815260706020526040812060010180548316600160801b81021790819055606e54919261118a9261271092610dac92169061ffff16612c6f565b606e546001600160801b03868116600090815260706020526040812060010154939450926111cb9261271092610dac92169062010000900461ffff16612c6f565b606e546001600160801b038781166000908152607060205260408120600101549394509261120d9261271092610dac921690600160201b900461ffff16612c6f565b6065546040805163fe9d930360e01b81526001600160801b03871660048201526024810182905260006044820181905291519394506001600160a01b039092169263fe9d930392608480820193929182900301818387803b15801561127157600080fd5b505af1158015611285573d6000803e3d6000fd5b50506068546001600160a01b03166000908152607160205260409020546112b892506001600160801b0316905083612d2b565b6068546001600160a01b0390811660009081526071602052604080822080546001600160801b0319166001600160801b0395861617905560675490921681522054611304911682612d2b565b6067546001600160a01b03908116600090815260716020908152604080832080546001600160801b0319166001600160801b039687161790558a85168084526070835292819020548151898716815288871693810193909352948616828201525191938b84169316917fd64ebb43f4c2b91022b97389834432f1027ef55586129ba05a3a3065b2304f05916060908290030190a45050505b6040516001600160801b038416906001600160a01b038616907f7cae662d4cfa9d9c5575c65f0cc41a858c51ca14ebcbd02a802a62376c3ad23890600090a350505050565b6068546001600160a01b031690565b606f5461ffff1690565b6000606a8260ff166006811061140c57fe5b600291828204019190066010029054906101000a90046001600160801b03169050919050565b6001600160a01b03166000908152607160205260409020546001600160801b031690565b600054610100900460ff168061146f575061146f612d91565b8061147d575060005460ff16155b6114b85760405162461bcd60e51b815260040180806020018281038252602e815260200180613677602e913960400191505060405180910390fd5b600054610100900460ff161580156114e3576000805460ff1961ff0019909116610100171660011790555b6114eb612d97565b606f80546103e861ffff199091161762ff0000191662140000179055606d805461ffff60801b1916600160811b1761ffff60901b1916608760951b17905560408051606081018252610fa080825260208201526107d09181019190915261155690606e90600361344d565b506040805160c081018252678ac7230489e8000080825260208201819052918101829052606081018290526080810182905260a081019190915261159e90606a9060066134df565b50606580546001600160a01b0319166001600160a01b038916179055604080516329965a1d60e01b815230600482018190527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b602483015260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad24916329965a1d91606480830192600092919082900301818387803b15801561163957600080fd5b505af115801561164d573d6000803e3d6000fd5b5050606d54600160801b900461ffff9081166028021643016001600160801b038916101591506116c69050576040805162461bcd60e51b815260206004820152601c60248201527f47656e6573697320736d616c6c6572207468616e206d696e696d616c00000000604482015290519081900360640190fd5b606d80546001600160801b0319166001600160801b038816179055606680546001600160a01b03199081166001600160a01b038881169190911790925560678054821687841617905560688054821686841617905560698054909116918416919091179055801561173d576000805461ff00191690555b50505050505050565b6067546001600160a01b03163314611793576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b606980546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f2161bd0f0e056d18046a81683e5bc845980367451cf4ca5148523a147c51be5590600090a250565b60335460ff1661183a576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6033805460ff19169055600061184f33611432565b90506000816001600160801b0316116118af576040805162461bcd60e51b815260206004820152601b60248201527f446f65736e2774206861766520656e6f7567682062616c616e63650000000000604482015290519081900360640190fd5b33600081815260716020526040902080546001600160801b03191690556065546118e5916001600160a01b039091169083612e46565b604080516001600160801b0383168152905133917f199ef0cb54d2b296ff6eaec2721bacf0ca3fd8344a43f5bdf4548b34dfa2594f919081900360200190a2506033805460ff19166001179055565b6067546001600160a01b03163314611981576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b606880546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fa62863cbad1647a2855e9cd39d04fa6dfd32e1b9cfaff1aaf6523f4aaafeccd790600090a250565b6065546001600160a01b031681565b6067546001600160a01b03163314611a2d576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b6006826001600160801b03161115611a82576040805162461bcd60e51b8152602060048201526013602482015272139bdd0818481d985b1a59081cdb1bdd14d95d606a1b604482015290519081900360640190fd5b606a826001600160801b031660068110611a9857fe5b60028104919091015460019091166010026101000a90046001600160801b0316611b09576040805162461bcd60e51b815260206004820152601e60248201527f5468697320736c6f742073657420697320646563656e7472616c697a65640000604482015290519081900360640190fd5b6000611b13610baa565b9050805b606d54600160801b900461ffff1682016001600160801b0390811690821611611bcd576001600160801b03808216600090815260706020526040902060010154600160801b900416611bc557606a611b6e82612251565b6001600160801b031660068110611b8157fe5b6002810491909101546001600160801b038381166000908152607060205260409020600190810180548316919094166010026101000a90920416600160801b021790555b600101611b17565b5081606a846001600160801b031660068110611be557fe5b600291828204019190066010026101000a8154816001600160801b0302191690836001600160801b031602179055507fa922aa010d1ff8e70b2aa9247d891836795c3d3ba2a543c37c91a44dc4a50172838360405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390a1505050565b6067546001600160a01b03163314611cb7576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b806002602002015181600160200201518260006020020151010161ffff1661271014611d145760405162461bcd60e51b81526004018080602001828103825260218152602001806136156021913960400191505060405180910390fd5b611d21606e82600361344d565b506040517f0bb59eceb12f1bdb63e4a7d57c70d6473fefd7c3f51af5a3604f7e97197073e490606e9060608101826000835b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411611d53579050505091505060405180910390a150565b6000600160801b8210611df5576040805162461bcd60e51b815260206004820152601d60248201527f626c6f636b4e756d62657220686967686572207468616e20325f313238000000604482015290519081900360640190fd5b606d546001600160801b0316821015611e55576040805162461bcd60e51b815260206004820152601b60248201527f41756374696f6e20686173206e6f742073746172746564207965740000000000604482015290519081900360640190fd5b6000611e6083612276565b606d54909150600090611ea990611e99906001600160801b0390811690611e8a9086166028612c6f565b6001600160801b031690612d2b565b6001600160801b03861690612ff0565b6001600160801b0380841660009081526070602052604081206001015492935091600160801b90041615611f01576001600160801b03808416600090815260706020526040902060010154600160801b900416611f3f565b606a611f0c84612251565b6001600160801b031660068110611f1f57fe5b600291828204019190066010029054906101000a90046001600160801b03165b6001600160801b038416600090815260706020526040902054909150600160a01b900460ff16158015611f865750606f5462010000900460ff166001600160801b03831610155b15611f975760019350505050612086565b6001600160801b0383166000908152607060209081526040808320546001600160a01b0390811684526072909252909120548116908716148015611ffb57506001600160801b03838116600090815260706020526040902060010154818316911610155b1561200c5760019350505050612086565b6069546001600160a01b03878116911614801561206d57506001600160801b038381166000908152607060205260409020600101548183169116108061206d57506001600160801b0380841660009081526070602052604090206001015416155b1561207e5760019350505050612086565b600093505050505b92915050565b6067546001600160a01b031633146120d9576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b602860ff82161115612132576040805162461bcd60e51b815260206004820152601c60248201527f47726561746572207468616e20424c4f434b535f5045525f534c4f5400000000604482015290519081900360640190fd5b606f805460ff8084166201000090810262ff0000199093169290921792839055604080519290930416815290517f4a0d90b611c15e02dbf23b10f35b936cf2c77665f8c77822d3eca131f9d986d39181900360200190a150565b6072602090815260009182526040918290208054600180830180548651600261010094831615949094026000190190911692909204601f81018690048602830186019096528582526001600160a01b039092169492939092908301828280156122365780601f1061220b57610100808354040283529160200191612236565b820191906000526020600020905b81548152906001019060200180831161221957829003601f168201915b5050505050905082565b606d54600160901b900461ffff1690565b60006120866001600160801b0383166006613032565b6066546001600160a01b031681565b606d546000906001600160801b039081169083161015612297576000612086565b50606d5460286001600160801b03918216909203160490565b6069546001600160a01b031690565b607060205260009081526040902080546001909101546001600160a01b03821691600160a01b900460ff16906001600160801b0380821691600160801b90041684565b6067546001600160a01b0316331461234f576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b606d5461ffff600160801b909104811690821610156123b5576040805162461bcd60e51b815260206004820152601f60248201527f536d616c6c6572207468616e20636c6f73656441756374696f6e536c6f747300604482015290519081900360640190fd5b606d805461ffff808416600160901b90810261ffff60901b199093169290921792839055604080519290930416815290517f3da0492dea7298351bc14d1c0699905fd0657c33487449751af50fc0c8b593f19181900360200190a150565b6067546001600160a01b03163314612460576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b606d5461ffff600160901b909104811690821611156124c6576040805162461bcd60e51b815260206004820152601f60248201527f47726561746572207468616e20636c6f73656441756374696f6e536c6f747300604482015290519081900360640190fd5b606d805461ffff808416600160801b90810261ffff60801b199093169290921792839055604080519290930416815290517fc78051d3757db196b1e445f3a9a1380944518c69b5d7922ec747c54f0340a4ea9181900360200190a150565b6067546001600160a01b03163314612571576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b606f805461ffff191661ffff838116919091179182905560408051929091168252517fd3748b8c326e93d12af934fbf87471e315a89bc3f7b8222343acf0210edf248e916020908290030190a150565b678ac7230489e8000081565b6125d5613580565b60408051606081019182905290606e90600390826000855b82829054906101000a900461ffff1661ffff16815260200190600201906020826001010492830192600103820291508084116125ed5790505050505050905090565b6071602052600090815260409020546001600160801b031681565b6001600160a01b03818116600090815260726020526040902054166126b6576040805162461bcd60e51b815260206004820152601a60248201527f436f6f7264696e61746f72206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b606d54600160801b900461ffff166126cc610baa565b016001600160801b0316836001600160801b03161015612733576040805162461bcd60e51b815260206004820152601f60248201527f41756374696f6e2068617320616c7265616479206265656e20636c6f73656400604482015290519081900360640190fd5b61273c83610cbf565b6001600160801b0316826001600160801b03161015612796576040805162461bcd60e51b81526020600482015260116024820152704269642062656c6f77206d696e696d756d60781b604482015290519081900360640190fd5b606d5461ffff600160901b8204811691600160801b9004166127b6610baa565b01016001600160801b0316836001600160801b03161061281d576040805162461bcd60e51b815260206004820152601b60248201527f42696420686173206e6f74206265656e206f70656e6564207965740000000000604482015290519081900360640190fd5b6001600160a01b038116600090815260716020526040902054612849906001600160801b031685612d2b565b6001600160a01b038216600090815260716020526040902080546001600160801b0319166001600160801b039283161790819055838216911610156128d5576040805162461bcd60e51b815260206004820152601a60248201527f446f206e6f74206861766520656e6f7567682062616c616e6365000000000000604482015290519081900360640190fd5b6128e0838383613074565b50505050565b606d54600160801b900461ffff166128fc610baa565b016001600160801b0316866001600160801b03161015612963576040805162461bcd60e51b815260206004820152601f60248201527f41756374696f6e2068617320616c7265616479206265656e20636c6f73656400604482015290519081900360640190fd5b606d5461ffff600160901b8204811691600160801b900416612983610baa565b01016001600160801b0316856001600160801b0316106129ea576040805162461bcd60e51b815260206004820152601b60248201527f42696420686173206e6f74206265656e206f70656e6564207965740000000000604482015290519081900360640190fd5b816001600160801b0316836001600160801b03161015612a51576040805162461bcd60e51b815260206004820152601a60248201527f6d61784269642073686f756c64206265203e3d206d696e426964000000000000604482015290519081900360640190fd5b6001600160a01b0381811660009081526072602052604090205416612abd576040805162461bcd60e51b815260206004820152601a60248201527f436f6f7264696e61746f72206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b6001600160a01b038116600090815260716020526040902054612ae9906001600160801b031688612d2b565b6001600160a01b038216600090815260716020526040812080546001600160801b0319166001600160801b039390931692909217909155865b866001600160801b0316816001600160801b031611612c64576000612b4682610cbf565b9050846001600160801b0316816001600160801b031611612b6957849250612baf565b846001600160801b0316816001600160801b0316118015612b9c5750856001600160801b0316816001600160801b031611155b15612ba957809250612baf565b50612c5c565b86612bb983612251565b6001600160801b031660068110612bcc57fe5b602002015115612c5a576001600160a01b0384166000908152607160205260409020546001600160801b0380851691161015612c4f576040805162461bcd60e51b815260206004820152601a60248201527f446f206e6f74206861766520656e6f7567682062616c616e6365000000000000604482015290519081900360640190fd5b612c5a828486613074565b505b600101612b22565b505050505050505050565b60006001600160801b038316612c8757506000612086565b8282026001600160801b038084169080861690831681612ca357fe5b046001600160801b031614610e735760405162461bcd60e51b81526004018080602001828103825260218152602001806136366021913960400191505060405180910390fd5b6000610e7383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061320a565b60008282016001600160801b038085169082161015610e73576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b303b1590565b600054610100900460ff1680612db05750612db0612d91565b80612dbe575060005460ff16155b612df95760405162461bcd60e51b815260040180806020018281038252602e815260200180613677602e913960400191505060405180910390fd5b600054610100900460ff16158015612e24576000805460ff1961ff0019909116610100171660011790555b6033805460ff191660011790558015612e43576000805461ff00191690555b50565b604080518082018252601b81527f73656e6428616464726573732c75696e743235362c627974657329000000000060209182015281516001600160a01b0385811660248301526001600160801b0385166044830152606060648301819052600060848401819052855180850360a401815260c4909401865293830180516001600160e01b0316634decdde360e11b17815294518351949591949289169392909182918083835b60208310612f0b5780518252601f199092019160209182019101612eec565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612f6d576040519150601f19603f3d011682016040523d82523d6000602084013e612f72565b606091505b5091509150818015612fa0575080511580612fa05750808060200190516020811015612f9d57600080fd5b50515b612fe9576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b5050505050565b6000610e7383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506132c7565b6000610e7383836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250613334565b6001600160801b03808416600090815260706020908152604080832080546001909101546001600160a01b038781168652607190945291909320549190921692918216916130c3911685612ff0565b6001600160a01b03848116600081815260716020908152604080832080546001600160801b03199081166001600160801b03988916179091558b87168452607090925290912080546001600160a01b031916909217825560019190910180549091169287169290921790915582161580159061314757506001600160801b03811615155b156131af576001600160a01b038216600090815260716020526040902054613178906001600160801b031682612d2b565b6001600160a01b038316600090815260716020526040902080546001600160801b0319166001600160801b03929092169190911790555b826001600160a01b0316856001600160801b03167fd48e8329cdb2fb109b4fe445d7b681a74b256bff16e6f7f33b9d4fbe9038e4338660405180826001600160801b0316815260200191505060405180910390a35050505050565b6000816001600160801b03841661329f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561326457818101518382015260200161324c565b50505050905090810190601f1680156132915780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000836001600160801b0316856001600160801b0316816132bd57fe5b0495945050505050565b6000836001600160801b0316836001600160801b03161115829061332c5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561326457818101518382015260200161324c565b505050900390565b6000816001600160801b03841661338c5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561326457818101518382015260200161324c565b50826001600160801b0316846001600160801b0316816133a857fe5b06949350505050565b6040518060c001604052806006906020820280368337509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061341057805160ff191683800117855561343d565b8280016001018555821561343d579182015b8281111561343d578251825591602001919060010190613422565b5061344992915061359e565b5090565b6001830191839082156134d35791602002820160005b838211156134a357835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302613463565b80156134d15782816101000a81549061ffff02191690556002016020816001010492830192600103026134a3565b505b506134499291506135b3565b6003830191839082156135745791602002820160005b8382111561353f57835183826101000a8154816001600160801b0302191690836001600160801b031602179055509260200192601001602081600f010492830192600103026134f5565b80156135725782816101000a8154906001600160801b030219169055601001602081600f0104928301926001030261353f565b505b506134499291506135cd565b60405180606001604052806003906020820280368337509192915050565b5b80821115613449576000815560010161359f565b5b8082111561344957805461ffff191681556001016135b4565b5b808211156134495780546001600160801b03191681556001016135ce565b600080858511156135fb578182fd5b83861115613607578182fd5b505082019391909203915056fe416c6c6f636174696f6e526174696f2068617320746f206265203130302e303025536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a26469706673582212202c466d8d4e52482a767ae41ddef468ac109833fb436225bb6bb0dcaf72fe83ca64736f6c634300060c0033" // DeployHermezAuctionProtocol deploys a new Ethereum contract, binding an instance of HermezAuctionProtocol to it. func DeployHermezAuctionProtocol(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *HermezAuctionProtocol, error) { @@ -268,14 +268,14 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolCallerSession) CanForge(forge // Coordinators is a free data retrieval call binding the contract method 0xa48af096. // -// Solidity: function coordinators(address ) view returns(address withdrawalAddress, string coordinatorURL) +// Solidity: function coordinators(address ) view returns(address forger, string coordinatorURL) func (_HermezAuctionProtocol *HermezAuctionProtocolCaller) Coordinators(opts *bind.CallOpts, arg0 common.Address) (struct { - WithdrawalAddress common.Address - CoordinatorURL string + Forger common.Address + CoordinatorURL string }, error) { ret := new(struct { - WithdrawalAddress common.Address - CoordinatorURL string + Forger common.Address + CoordinatorURL string }) out := ret err := _HermezAuctionProtocol.contract.Call(opts, out, "coordinators", arg0) @@ -284,20 +284,20 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolCaller) Coordinators(opts *bi // Coordinators is a free data retrieval call binding the contract method 0xa48af096. // -// Solidity: function coordinators(address ) view returns(address withdrawalAddress, string coordinatorURL) +// Solidity: function coordinators(address ) view returns(address forger, string coordinatorURL) func (_HermezAuctionProtocol *HermezAuctionProtocolSession) Coordinators(arg0 common.Address) (struct { - WithdrawalAddress common.Address - CoordinatorURL string + Forger common.Address + CoordinatorURL string }, error) { return _HermezAuctionProtocol.Contract.Coordinators(&_HermezAuctionProtocol.CallOpts, arg0) } // Coordinators is a free data retrieval call binding the contract method 0xa48af096. // -// Solidity: function coordinators(address ) view returns(address withdrawalAddress, string coordinatorURL) +// Solidity: function coordinators(address ) view returns(address forger, string coordinatorURL) func (_HermezAuctionProtocol *HermezAuctionProtocolCallerSession) Coordinators(arg0 common.Address) (struct { - WithdrawalAddress common.Address - CoordinatorURL string + Forger common.Address + CoordinatorURL string }, error) { return _HermezAuctionProtocol.Contract.Coordinators(&_HermezAuctionProtocol.CallOpts, arg0) } @@ -382,28 +382,28 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolCallerSession) GetBootCoordin // GetClaimableHEZ is a free data retrieval call binding the contract method 0x5cca4903. // -// Solidity: function getClaimableHEZ(address claimAddress) view returns(uint128) -func (_HermezAuctionProtocol *HermezAuctionProtocolCaller) GetClaimableHEZ(opts *bind.CallOpts, claimAddress common.Address) (*big.Int, error) { +// Solidity: function getClaimableHEZ(address bidder) view returns(uint128) +func (_HermezAuctionProtocol *HermezAuctionProtocolCaller) GetClaimableHEZ(opts *bind.CallOpts, bidder common.Address) (*big.Int, error) { var ( ret0 = new(*big.Int) ) out := ret0 - err := _HermezAuctionProtocol.contract.Call(opts, out, "getClaimableHEZ", claimAddress) + err := _HermezAuctionProtocol.contract.Call(opts, out, "getClaimableHEZ", bidder) return *ret0, err } // GetClaimableHEZ is a free data retrieval call binding the contract method 0x5cca4903. // -// Solidity: function getClaimableHEZ(address claimAddress) view returns(uint128) -func (_HermezAuctionProtocol *HermezAuctionProtocolSession) GetClaimableHEZ(claimAddress common.Address) (*big.Int, error) { - return _HermezAuctionProtocol.Contract.GetClaimableHEZ(&_HermezAuctionProtocol.CallOpts, claimAddress) +// Solidity: function getClaimableHEZ(address bidder) view returns(uint128) +func (_HermezAuctionProtocol *HermezAuctionProtocolSession) GetClaimableHEZ(bidder common.Address) (*big.Int, error) { + return _HermezAuctionProtocol.Contract.GetClaimableHEZ(&_HermezAuctionProtocol.CallOpts, bidder) } // GetClaimableHEZ is a free data retrieval call binding the contract method 0x5cca4903. // -// Solidity: function getClaimableHEZ(address claimAddress) view returns(uint128) -func (_HermezAuctionProtocol *HermezAuctionProtocolCallerSession) GetClaimableHEZ(claimAddress common.Address) (*big.Int, error) { - return _HermezAuctionProtocol.Contract.GetClaimableHEZ(&_HermezAuctionProtocol.CallOpts, claimAddress) +// Solidity: function getClaimableHEZ(address bidder) view returns(uint128) +func (_HermezAuctionProtocol *HermezAuctionProtocolCallerSession) GetClaimableHEZ(bidder common.Address) (*big.Int, error) { + return _HermezAuctionProtocol.Contract.GetClaimableHEZ(&_HermezAuctionProtocol.CallOpts, bidder) } // GetClosedAuctionSlots is a free data retrieval call binding the contract method 0x4da9639d. @@ -692,32 +692,6 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolCallerSession) HermezRollup() return _HermezAuctionProtocol.Contract.HermezRollup(&_HermezAuctionProtocol.CallOpts) } -// IsRegisteredCoordinator is a free data retrieval call binding the contract method 0x3bebeb06. -// -// Solidity: function isRegisteredCoordinator(address forgerAddress) view returns(bool) -func (_HermezAuctionProtocol *HermezAuctionProtocolCaller) IsRegisteredCoordinator(opts *bind.CallOpts, forgerAddress common.Address) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _HermezAuctionProtocol.contract.Call(opts, out, "isRegisteredCoordinator", forgerAddress) - return *ret0, err -} - -// IsRegisteredCoordinator is a free data retrieval call binding the contract method 0x3bebeb06. -// -// Solidity: function isRegisteredCoordinator(address forgerAddress) view returns(bool) -func (_HermezAuctionProtocol *HermezAuctionProtocolSession) IsRegisteredCoordinator(forgerAddress common.Address) (bool, error) { - return _HermezAuctionProtocol.Contract.IsRegisteredCoordinator(&_HermezAuctionProtocol.CallOpts, forgerAddress) -} - -// IsRegisteredCoordinator is a free data retrieval call binding the contract method 0x3bebeb06. -// -// Solidity: function isRegisteredCoordinator(address forgerAddress) view returns(bool) -func (_HermezAuctionProtocol *HermezAuctionProtocolCallerSession) IsRegisteredCoordinator(forgerAddress common.Address) (bool, error) { - return _HermezAuctionProtocol.Contract.IsRegisteredCoordinator(&_HermezAuctionProtocol.CallOpts, forgerAddress) -} - // PendingBalances is a free data retrieval call binding the contract method 0xecdae41b. // // Solidity: function pendingBalances(address ) view returns(uint128) @@ -746,18 +720,18 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolCallerSession) PendingBalance // Slots is a free data retrieval call binding the contract method 0xbc415567. // -// Solidity: function slots(uint128 ) view returns(address forger, uint128 bidAmount, uint128 closedMinBid, bool fulfilled) +// Solidity: function slots(uint128 ) view returns(address bidder, bool fulfilled, uint128 bidAmount, uint128 closedMinBid) func (_HermezAuctionProtocol *HermezAuctionProtocolCaller) Slots(opts *bind.CallOpts, arg0 *big.Int) (struct { - Forger common.Address + Bidder common.Address + Fulfilled bool BidAmount *big.Int ClosedMinBid *big.Int - Fulfilled bool }, error) { ret := new(struct { - Forger common.Address + Bidder common.Address + Fulfilled bool BidAmount *big.Int ClosedMinBid *big.Int - Fulfilled bool }) out := ret err := _HermezAuctionProtocol.contract.Call(opts, out, "slots", arg0) @@ -766,24 +740,24 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolCaller) Slots(opts *bind.Call // Slots is a free data retrieval call binding the contract method 0xbc415567. // -// Solidity: function slots(uint128 ) view returns(address forger, uint128 bidAmount, uint128 closedMinBid, bool fulfilled) +// Solidity: function slots(uint128 ) view returns(address bidder, bool fulfilled, uint128 bidAmount, uint128 closedMinBid) func (_HermezAuctionProtocol *HermezAuctionProtocolSession) Slots(arg0 *big.Int) (struct { - Forger common.Address + Bidder common.Address + Fulfilled bool BidAmount *big.Int ClosedMinBid *big.Int - Fulfilled bool }, error) { return _HermezAuctionProtocol.Contract.Slots(&_HermezAuctionProtocol.CallOpts, arg0) } // Slots is a free data retrieval call binding the contract method 0xbc415567. // -// Solidity: function slots(uint128 ) view returns(address forger, uint128 bidAmount, uint128 closedMinBid, bool fulfilled) +// Solidity: function slots(uint128 ) view returns(address bidder, bool fulfilled, uint128 bidAmount, uint128 closedMinBid) func (_HermezAuctionProtocol *HermezAuctionProtocolCallerSession) Slots(arg0 *big.Int) (struct { - Forger common.Address + Bidder common.Address + Fulfilled bool BidAmount *big.Int ClosedMinBid *big.Int - Fulfilled bool }, error) { return _HermezAuctionProtocol.Contract.Slots(&_HermezAuctionProtocol.CallOpts, arg0) } @@ -835,25 +809,25 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) ChangeDefa return _HermezAuctionProtocol.Contract.ChangeDefaultSlotSetBid(&_HermezAuctionProtocol.TransactOpts, slotSet, newInitialMinBid) } -// ClaimHEZ is a paid mutator transaction binding the contract method 0x3f2d0c7b. +// ClaimHEZ is a paid mutator transaction binding the contract method 0x6dfe47c9. // -// Solidity: function claimHEZ(address claimAddress) returns() -func (_HermezAuctionProtocol *HermezAuctionProtocolTransactor) ClaimHEZ(opts *bind.TransactOpts, claimAddress common.Address) (*types.Transaction, error) { - return _HermezAuctionProtocol.contract.Transact(opts, "claimHEZ", claimAddress) +// Solidity: function claimHEZ() returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolTransactor) ClaimHEZ(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HermezAuctionProtocol.contract.Transact(opts, "claimHEZ") } -// ClaimHEZ is a paid mutator transaction binding the contract method 0x3f2d0c7b. +// ClaimHEZ is a paid mutator transaction binding the contract method 0x6dfe47c9. // -// Solidity: function claimHEZ(address claimAddress) returns() -func (_HermezAuctionProtocol *HermezAuctionProtocolSession) ClaimHEZ(claimAddress common.Address) (*types.Transaction, error) { - return _HermezAuctionProtocol.Contract.ClaimHEZ(&_HermezAuctionProtocol.TransactOpts, claimAddress) +// Solidity: function claimHEZ() returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolSession) ClaimHEZ() (*types.Transaction, error) { + return _HermezAuctionProtocol.Contract.ClaimHEZ(&_HermezAuctionProtocol.TransactOpts) } -// ClaimHEZ is a paid mutator transaction binding the contract method 0x3f2d0c7b. +// ClaimHEZ is a paid mutator transaction binding the contract method 0x6dfe47c9. // -// Solidity: function claimHEZ(address claimAddress) returns() -func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) ClaimHEZ(claimAddress common.Address) (*types.Transaction, error) { - return _HermezAuctionProtocol.Contract.ClaimHEZ(&_HermezAuctionProtocol.TransactOpts, claimAddress) +// Solidity: function claimHEZ() returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) ClaimHEZ() (*types.Transaction, error) { + return _HermezAuctionProtocol.Contract.ClaimHEZ(&_HermezAuctionProtocol.TransactOpts) } // Forge is a paid mutator transaction binding the contract method 0x4e5a5178. @@ -898,27 +872,6 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) HermezAuct return _HermezAuctionProtocol.Contract.HermezAuctionProtocolInitializer(&_HermezAuctionProtocol.TransactOpts, tokenERC777, genesis, hermezRollupAddress, governanceAddress, donationAddress, bootCoordinatorAddress) } -// RegisterCoordinator is a paid mutator transaction binding the contract method 0xb3f69047. -// -// Solidity: function registerCoordinator(address forgerAddress, string coordinatorURL) returns() -func (_HermezAuctionProtocol *HermezAuctionProtocolTransactor) RegisterCoordinator(opts *bind.TransactOpts, forgerAddress common.Address, coordinatorURL string) (*types.Transaction, error) { - return _HermezAuctionProtocol.contract.Transact(opts, "registerCoordinator", forgerAddress, coordinatorURL) -} - -// RegisterCoordinator is a paid mutator transaction binding the contract method 0xb3f69047. -// -// Solidity: function registerCoordinator(address forgerAddress, string coordinatorURL) returns() -func (_HermezAuctionProtocol *HermezAuctionProtocolSession) RegisterCoordinator(forgerAddress common.Address, coordinatorURL string) (*types.Transaction, error) { - return _HermezAuctionProtocol.Contract.RegisterCoordinator(&_HermezAuctionProtocol.TransactOpts, forgerAddress, coordinatorURL) -} - -// RegisterCoordinator is a paid mutator transaction binding the contract method 0xb3f69047. -// -// Solidity: function registerCoordinator(address forgerAddress, string coordinatorURL) returns() -func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) RegisterCoordinator(forgerAddress common.Address, coordinatorURL string) (*types.Transaction, error) { - return _HermezAuctionProtocol.Contract.RegisterCoordinator(&_HermezAuctionProtocol.TransactOpts, forgerAddress, coordinatorURL) -} - // SetAllocationRatio is a paid mutator transaction binding the contract method 0x82787405. // // Solidity: function setAllocationRatio(uint16[3] newAllocationRatio) returns() @@ -982,6 +935,27 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) SetClosedA return _HermezAuctionProtocol.Contract.SetClosedAuctionSlots(&_HermezAuctionProtocol.TransactOpts, newClosedAuctionSlots) } +// SetCoordinator is a paid mutator transaction binding the contract method 0x0eeaf080. +// +// Solidity: function setCoordinator(address forger, string coordinatorURL) returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolTransactor) SetCoordinator(opts *bind.TransactOpts, forger common.Address, coordinatorURL string) (*types.Transaction, error) { + return _HermezAuctionProtocol.contract.Transact(opts, "setCoordinator", forger, coordinatorURL) +} + +// SetCoordinator is a paid mutator transaction binding the contract method 0x0eeaf080. +// +// Solidity: function setCoordinator(address forger, string coordinatorURL) returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolSession) SetCoordinator(forger common.Address, coordinatorURL string) (*types.Transaction, error) { + return _HermezAuctionProtocol.Contract.SetCoordinator(&_HermezAuctionProtocol.TransactOpts, forger, coordinatorURL) +} + +// SetCoordinator is a paid mutator transaction binding the contract method 0x0eeaf080. +// +// Solidity: function setCoordinator(address forger, string coordinatorURL) returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) SetCoordinator(forger common.Address, coordinatorURL string) (*types.Transaction, error) { + return _HermezAuctionProtocol.Contract.SetCoordinator(&_HermezAuctionProtocol.TransactOpts, forger, coordinatorURL) +} + // SetDonationAddress is a paid mutator transaction binding the contract method 0x6f48e79b. // // Solidity: function setDonationAddress(address newDonationAddress) returns() @@ -1087,162 +1061,6 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) TokensRece return _HermezAuctionProtocol.Contract.TokensReceived(&_HermezAuctionProtocol.TransactOpts, operator, from, to, amount, userData, operatorData) } -// UpdateCoordinatorInfo is a paid mutator transaction binding the contract method 0x892075c8. -// -// Solidity: function updateCoordinatorInfo(address forgerAddress, address newWithdrawAddress, string newURL) returns() -func (_HermezAuctionProtocol *HermezAuctionProtocolTransactor) UpdateCoordinatorInfo(opts *bind.TransactOpts, forgerAddress common.Address, newWithdrawAddress common.Address, newURL string) (*types.Transaction, error) { - return _HermezAuctionProtocol.contract.Transact(opts, "updateCoordinatorInfo", forgerAddress, newWithdrawAddress, newURL) -} - -// UpdateCoordinatorInfo is a paid mutator transaction binding the contract method 0x892075c8. -// -// Solidity: function updateCoordinatorInfo(address forgerAddress, address newWithdrawAddress, string newURL) returns() -func (_HermezAuctionProtocol *HermezAuctionProtocolSession) UpdateCoordinatorInfo(forgerAddress common.Address, newWithdrawAddress common.Address, newURL string) (*types.Transaction, error) { - return _HermezAuctionProtocol.Contract.UpdateCoordinatorInfo(&_HermezAuctionProtocol.TransactOpts, forgerAddress, newWithdrawAddress, newURL) -} - -// UpdateCoordinatorInfo is a paid mutator transaction binding the contract method 0x892075c8. -// -// Solidity: function updateCoordinatorInfo(address forgerAddress, address newWithdrawAddress, string newURL) returns() -func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) UpdateCoordinatorInfo(forgerAddress common.Address, newWithdrawAddress common.Address, newURL string) (*types.Transaction, error) { - return _HermezAuctionProtocol.Contract.UpdateCoordinatorInfo(&_HermezAuctionProtocol.TransactOpts, forgerAddress, newWithdrawAddress, newURL) -} - -// HermezAuctionProtocolCoordinatorUpdatedIterator is returned from FilterCoordinatorUpdated and is used to iterate over the raw logs and unpacked data for CoordinatorUpdated events raised by the HermezAuctionProtocol contract. -type HermezAuctionProtocolCoordinatorUpdatedIterator struct { - Event *HermezAuctionProtocolCoordinatorUpdated // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *HermezAuctionProtocolCoordinatorUpdatedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(HermezAuctionProtocolCoordinatorUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(HermezAuctionProtocolCoordinatorUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *HermezAuctionProtocolCoordinatorUpdatedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *HermezAuctionProtocolCoordinatorUpdatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// HermezAuctionProtocolCoordinatorUpdated represents a CoordinatorUpdated event raised by the HermezAuctionProtocol contract. -type HermezAuctionProtocolCoordinatorUpdated struct { - ForgerAddress common.Address - WithdrawalAddress common.Address - CoordinatorURL string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterCoordinatorUpdated is a free log retrieval operation binding the contract event 0x384460dae6dd1682b71131272b0e47bcd8ecef844d632c5062db277378a868c5. -// -// Solidity: event CoordinatorUpdated(address forgerAddress, address withdrawalAddress, string coordinatorURL) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterCoordinatorUpdated(opts *bind.FilterOpts) (*HermezAuctionProtocolCoordinatorUpdatedIterator, error) { - - logs, sub, err := _HermezAuctionProtocol.contract.FilterLogs(opts, "CoordinatorUpdated") - if err != nil { - return nil, err - } - return &HermezAuctionProtocolCoordinatorUpdatedIterator{contract: _HermezAuctionProtocol.contract, event: "CoordinatorUpdated", logs: logs, sub: sub}, nil -} - -// WatchCoordinatorUpdated is a free log subscription operation binding the contract event 0x384460dae6dd1682b71131272b0e47bcd8ecef844d632c5062db277378a868c5. -// -// Solidity: event CoordinatorUpdated(address forgerAddress, address withdrawalAddress, string coordinatorURL) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchCoordinatorUpdated(opts *bind.WatchOpts, sink chan<- *HermezAuctionProtocolCoordinatorUpdated) (event.Subscription, error) { - - logs, sub, err := _HermezAuctionProtocol.contract.WatchLogs(opts, "CoordinatorUpdated") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(HermezAuctionProtocolCoordinatorUpdated) - if err := _HermezAuctionProtocol.contract.UnpackLog(event, "CoordinatorUpdated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseCoordinatorUpdated is a log parse operation binding the contract event 0x384460dae6dd1682b71131272b0e47bcd8ecef844d632c5062db277378a868c5. -// -// Solidity: event CoordinatorUpdated(address forgerAddress, address withdrawalAddress, string coordinatorURL) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) ParseCoordinatorUpdated(log types.Log) (*HermezAuctionProtocolCoordinatorUpdated, error) { - event := new(HermezAuctionProtocolCoordinatorUpdated) - if err := _HermezAuctionProtocol.contract.UnpackLog(event, "CoordinatorUpdated", log); err != nil { - return nil, err - } - return event, nil -} - // HermezAuctionProtocolHEZClaimedIterator is returned from FilterHEZClaimed and is used to iterate over the raw logs and unpacked data for HEZClaimed events raised by the HermezAuctionProtocol contract. type HermezAuctionProtocolHEZClaimedIterator struct { Event *HermezAuctionProtocolHEZClaimed // Event containing the contract specifics and raw log @@ -1589,28 +1407,28 @@ func (it *HermezAuctionProtocolNewBidIterator) Close() error { // HermezAuctionProtocolNewBid represents a NewBid event raised by the HermezAuctionProtocol contract. type HermezAuctionProtocolNewBid struct { - Slot *big.Int - BidAmount *big.Int - CoordinatorForger common.Address - Raw types.Log // Blockchain specific contextual infos + Slot *big.Int + BidAmount *big.Int + Bidder common.Address + Raw types.Log // Blockchain specific contextual infos } // FilterNewBid is a free log retrieval operation binding the contract event 0xd48e8329cdb2fb109b4fe445d7b681a74b256bff16e6f7f33b9d4fbe9038e433. // -// Solidity: event NewBid(uint128 indexed slot, uint128 bidAmount, address indexed coordinatorForger) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterNewBid(opts *bind.FilterOpts, slot []*big.Int, coordinatorForger []common.Address) (*HermezAuctionProtocolNewBidIterator, error) { +// Solidity: event NewBid(uint128 indexed slot, uint128 bidAmount, address indexed bidder) +func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterNewBid(opts *bind.FilterOpts, slot []*big.Int, bidder []common.Address) (*HermezAuctionProtocolNewBidIterator, error) { var slotRule []interface{} for _, slotItem := range slot { slotRule = append(slotRule, slotItem) } - var coordinatorForgerRule []interface{} - for _, coordinatorForgerItem := range coordinatorForger { - coordinatorForgerRule = append(coordinatorForgerRule, coordinatorForgerItem) + var bidderRule []interface{} + for _, bidderItem := range bidder { + bidderRule = append(bidderRule, bidderItem) } - logs, sub, err := _HermezAuctionProtocol.contract.FilterLogs(opts, "NewBid", slotRule, coordinatorForgerRule) + logs, sub, err := _HermezAuctionProtocol.contract.FilterLogs(opts, "NewBid", slotRule, bidderRule) if err != nil { return nil, err } @@ -1619,20 +1437,20 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterNewBid(opts * // WatchNewBid is a free log subscription operation binding the contract event 0xd48e8329cdb2fb109b4fe445d7b681a74b256bff16e6f7f33b9d4fbe9038e433. // -// Solidity: event NewBid(uint128 indexed slot, uint128 bidAmount, address indexed coordinatorForger) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewBid(opts *bind.WatchOpts, sink chan<- *HermezAuctionProtocolNewBid, slot []*big.Int, coordinatorForger []common.Address) (event.Subscription, error) { +// Solidity: event NewBid(uint128 indexed slot, uint128 bidAmount, address indexed bidder) +func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewBid(opts *bind.WatchOpts, sink chan<- *HermezAuctionProtocolNewBid, slot []*big.Int, bidder []common.Address) (event.Subscription, error) { var slotRule []interface{} for _, slotItem := range slot { slotRule = append(slotRule, slotItem) } - var coordinatorForgerRule []interface{} - for _, coordinatorForgerItem := range coordinatorForger { - coordinatorForgerRule = append(coordinatorForgerRule, coordinatorForgerItem) + var bidderRule []interface{} + for _, bidderItem := range bidder { + bidderRule = append(bidderRule, bidderItem) } - logs, sub, err := _HermezAuctionProtocol.contract.WatchLogs(opts, "NewBid", slotRule, coordinatorForgerRule) + logs, sub, err := _HermezAuctionProtocol.contract.WatchLogs(opts, "NewBid", slotRule, bidderRule) if err != nil { return nil, err } @@ -1666,7 +1484,7 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewBid(opts *b // ParseNewBid is a log parse operation binding the contract event 0xd48e8329cdb2fb109b4fe445d7b681a74b256bff16e6f7f33b9d4fbe9038e433. // -// Solidity: event NewBid(uint128 indexed slot, uint128 bidAmount, address indexed coordinatorForger) +// Solidity: event NewBid(uint128 indexed slot, uint128 bidAmount, address indexed bidder) func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) ParseNewBid(log types.Log) (*HermezAuctionProtocolNewBid, error) { event := new(HermezAuctionProtocolNewBid) if err := _HermezAuctionProtocol.contract.UnpackLog(event, "NewBid", log); err != nil { @@ -1750,10 +1568,15 @@ type HermezAuctionProtocolNewBootCoordinator struct { // FilterNewBootCoordinator is a free log retrieval operation binding the contract event 0x2161bd0f0e056d18046a81683e5bc845980367451cf4ca5148523a147c51be55. // -// Solidity: event NewBootCoordinator(address newBootCoordinator) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterNewBootCoordinator(opts *bind.FilterOpts) (*HermezAuctionProtocolNewBootCoordinatorIterator, error) { +// Solidity: event NewBootCoordinator(address indexed newBootCoordinator) +func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterNewBootCoordinator(opts *bind.FilterOpts, newBootCoordinator []common.Address) (*HermezAuctionProtocolNewBootCoordinatorIterator, error) { - logs, sub, err := _HermezAuctionProtocol.contract.FilterLogs(opts, "NewBootCoordinator") + var newBootCoordinatorRule []interface{} + for _, newBootCoordinatorItem := range newBootCoordinator { + newBootCoordinatorRule = append(newBootCoordinatorRule, newBootCoordinatorItem) + } + + logs, sub, err := _HermezAuctionProtocol.contract.FilterLogs(opts, "NewBootCoordinator", newBootCoordinatorRule) if err != nil { return nil, err } @@ -1762,10 +1585,15 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterNewBootCoordi // WatchNewBootCoordinator is a free log subscription operation binding the contract event 0x2161bd0f0e056d18046a81683e5bc845980367451cf4ca5148523a147c51be55. // -// Solidity: event NewBootCoordinator(address newBootCoordinator) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewBootCoordinator(opts *bind.WatchOpts, sink chan<- *HermezAuctionProtocolNewBootCoordinator) (event.Subscription, error) { +// Solidity: event NewBootCoordinator(address indexed newBootCoordinator) +func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewBootCoordinator(opts *bind.WatchOpts, sink chan<- *HermezAuctionProtocolNewBootCoordinator, newBootCoordinator []common.Address) (event.Subscription, error) { + + var newBootCoordinatorRule []interface{} + for _, newBootCoordinatorItem := range newBootCoordinator { + newBootCoordinatorRule = append(newBootCoordinatorRule, newBootCoordinatorItem) + } - logs, sub, err := _HermezAuctionProtocol.contract.WatchLogs(opts, "NewBootCoordinator") + logs, sub, err := _HermezAuctionProtocol.contract.WatchLogs(opts, "NewBootCoordinator", newBootCoordinatorRule) if err != nil { return nil, err } @@ -1799,7 +1627,7 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewBootCoordin // ParseNewBootCoordinator is a log parse operation binding the contract event 0x2161bd0f0e056d18046a81683e5bc845980367451cf4ca5148523a147c51be55. // -// Solidity: event NewBootCoordinator(address newBootCoordinator) +// Solidity: event NewBootCoordinator(address indexed newBootCoordinator) func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) ParseNewBootCoordinator(log types.Log) (*HermezAuctionProtocolNewBootCoordinator, error) { event := new(HermezAuctionProtocolNewBootCoordinator) if err := _HermezAuctionProtocol.contract.UnpackLog(event, "NewBootCoordinator", log); err != nil { @@ -1941,141 +1769,6 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) ParseNewClosedAucti return event, nil } -// HermezAuctionProtocolNewCoordinatorIterator is returned from FilterNewCoordinator and is used to iterate over the raw logs and unpacked data for NewCoordinator events raised by the HermezAuctionProtocol contract. -type HermezAuctionProtocolNewCoordinatorIterator struct { - Event *HermezAuctionProtocolNewCoordinator // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *HermezAuctionProtocolNewCoordinatorIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(HermezAuctionProtocolNewCoordinator) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(HermezAuctionProtocolNewCoordinator) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *HermezAuctionProtocolNewCoordinatorIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *HermezAuctionProtocolNewCoordinatorIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// HermezAuctionProtocolNewCoordinator represents a NewCoordinator event raised by the HermezAuctionProtocol contract. -type HermezAuctionProtocolNewCoordinator struct { - ForgerAddress common.Address - WithdrawalAddress common.Address - CoordinatorURL string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterNewCoordinator is a free log retrieval operation binding the contract event 0x669c2ad52258689ce95b5b33025822b1afde214fff3a61dd00007d98b5b2ca36. -// -// Solidity: event NewCoordinator(address forgerAddress, address withdrawalAddress, string coordinatorURL) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterNewCoordinator(opts *bind.FilterOpts) (*HermezAuctionProtocolNewCoordinatorIterator, error) { - - logs, sub, err := _HermezAuctionProtocol.contract.FilterLogs(opts, "NewCoordinator") - if err != nil { - return nil, err - } - return &HermezAuctionProtocolNewCoordinatorIterator{contract: _HermezAuctionProtocol.contract, event: "NewCoordinator", logs: logs, sub: sub}, nil -} - -// WatchNewCoordinator is a free log subscription operation binding the contract event 0x669c2ad52258689ce95b5b33025822b1afde214fff3a61dd00007d98b5b2ca36. -// -// Solidity: event NewCoordinator(address forgerAddress, address withdrawalAddress, string coordinatorURL) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewCoordinator(opts *bind.WatchOpts, sink chan<- *HermezAuctionProtocolNewCoordinator) (event.Subscription, error) { - - logs, sub, err := _HermezAuctionProtocol.contract.WatchLogs(opts, "NewCoordinator") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(HermezAuctionProtocolNewCoordinator) - if err := _HermezAuctionProtocol.contract.UnpackLog(event, "NewCoordinator", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseNewCoordinator is a log parse operation binding the contract event 0x669c2ad52258689ce95b5b33025822b1afde214fff3a61dd00007d98b5b2ca36. -// -// Solidity: event NewCoordinator(address forgerAddress, address withdrawalAddress, string coordinatorURL) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) ParseNewCoordinator(log types.Log) (*HermezAuctionProtocolNewCoordinator, error) { - event := new(HermezAuctionProtocolNewCoordinator) - if err := _HermezAuctionProtocol.contract.UnpackLog(event, "NewCoordinator", log); err != nil { - return nil, err - } - return event, nil -} - // HermezAuctionProtocolNewDefaultSlotSetBidIterator is returned from FilterNewDefaultSlotSetBid and is used to iterate over the raw logs and unpacked data for NewDefaultSlotSetBid events raised by the HermezAuctionProtocol contract. type HermezAuctionProtocolNewDefaultSlotSetBidIterator struct { Event *HermezAuctionProtocolNewDefaultSlotSetBid // Event containing the contract specifics and raw log @@ -2285,10 +1978,15 @@ type HermezAuctionProtocolNewDonationAddress struct { // FilterNewDonationAddress is a free log retrieval operation binding the contract event 0xa62863cbad1647a2855e9cd39d04fa6dfd32e1b9cfaff1aaf6523f4aaafeccd7. // -// Solidity: event NewDonationAddress(address newDonationAddress) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterNewDonationAddress(opts *bind.FilterOpts) (*HermezAuctionProtocolNewDonationAddressIterator, error) { +// Solidity: event NewDonationAddress(address indexed newDonationAddress) +func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterNewDonationAddress(opts *bind.FilterOpts, newDonationAddress []common.Address) (*HermezAuctionProtocolNewDonationAddressIterator, error) { - logs, sub, err := _HermezAuctionProtocol.contract.FilterLogs(opts, "NewDonationAddress") + var newDonationAddressRule []interface{} + for _, newDonationAddressItem := range newDonationAddress { + newDonationAddressRule = append(newDonationAddressRule, newDonationAddressItem) + } + + logs, sub, err := _HermezAuctionProtocol.contract.FilterLogs(opts, "NewDonationAddress", newDonationAddressRule) if err != nil { return nil, err } @@ -2297,10 +1995,15 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterNewDonationAd // WatchNewDonationAddress is a free log subscription operation binding the contract event 0xa62863cbad1647a2855e9cd39d04fa6dfd32e1b9cfaff1aaf6523f4aaafeccd7. // -// Solidity: event NewDonationAddress(address newDonationAddress) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewDonationAddress(opts *bind.WatchOpts, sink chan<- *HermezAuctionProtocolNewDonationAddress) (event.Subscription, error) { +// Solidity: event NewDonationAddress(address indexed newDonationAddress) +func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewDonationAddress(opts *bind.WatchOpts, sink chan<- *HermezAuctionProtocolNewDonationAddress, newDonationAddress []common.Address) (event.Subscription, error) { + + var newDonationAddressRule []interface{} + for _, newDonationAddressItem := range newDonationAddress { + newDonationAddressRule = append(newDonationAddressRule, newDonationAddressItem) + } - logs, sub, err := _HermezAuctionProtocol.contract.WatchLogs(opts, "NewDonationAddress") + logs, sub, err := _HermezAuctionProtocol.contract.WatchLogs(opts, "NewDonationAddress", newDonationAddressRule) if err != nil { return nil, err } @@ -2334,7 +2037,7 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewDonationAdd // ParseNewDonationAddress is a log parse operation binding the contract event 0xa62863cbad1647a2855e9cd39d04fa6dfd32e1b9cfaff1aaf6523f4aaafeccd7. // -// Solidity: event NewDonationAddress(address newDonationAddress) +// Solidity: event NewDonationAddress(address indexed newDonationAddress) func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) ParseNewDonationAddress(log types.Log) (*HermezAuctionProtocolNewDonationAddress, error) { event := new(HermezAuctionProtocolNewDonationAddress) if err := _HermezAuctionProtocol.contract.UnpackLog(event, "NewDonationAddress", log); err != nil { @@ -2564,6 +2267,7 @@ func (it *HermezAuctionProtocolNewForgeAllocatedIterator) Close() error { // HermezAuctionProtocolNewForgeAllocated represents a NewForgeAllocated event raised by the HermezAuctionProtocol contract. type HermezAuctionProtocolNewForgeAllocated struct { + Bidder common.Address Forger common.Address SlotToForge *big.Int BurnAmount *big.Int @@ -2572,11 +2276,15 @@ type HermezAuctionProtocolNewForgeAllocated struct { Raw types.Log // Blockchain specific contextual infos } -// FilterNewForgeAllocated is a free log retrieval operation binding the contract event 0x9c1175e346e9ec25b59d991c43dd2c3c982970d169dbd7315ad3d8bb91e0acf5. +// FilterNewForgeAllocated is a free log retrieval operation binding the contract event 0xd64ebb43f4c2b91022b97389834432f1027ef55586129ba05a3a3065b2304f05. // -// Solidity: event NewForgeAllocated(address indexed forger, uint128 indexed slotToForge, uint128 burnAmount, uint128 donationAmount, uint128 governanceAmount) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterNewForgeAllocated(opts *bind.FilterOpts, forger []common.Address, slotToForge []*big.Int) (*HermezAuctionProtocolNewForgeAllocatedIterator, error) { +// Solidity: event NewForgeAllocated(address indexed bidder, address indexed forger, uint128 indexed slotToForge, uint128 burnAmount, uint128 donationAmount, uint128 governanceAmount) +func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterNewForgeAllocated(opts *bind.FilterOpts, bidder []common.Address, forger []common.Address, slotToForge []*big.Int) (*HermezAuctionProtocolNewForgeAllocatedIterator, error) { + var bidderRule []interface{} + for _, bidderItem := range bidder { + bidderRule = append(bidderRule, bidderItem) + } var forgerRule []interface{} for _, forgerItem := range forger { forgerRule = append(forgerRule, forgerItem) @@ -2586,18 +2294,22 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterNewForgeAlloc slotToForgeRule = append(slotToForgeRule, slotToForgeItem) } - logs, sub, err := _HermezAuctionProtocol.contract.FilterLogs(opts, "NewForgeAllocated", forgerRule, slotToForgeRule) + logs, sub, err := _HermezAuctionProtocol.contract.FilterLogs(opts, "NewForgeAllocated", bidderRule, forgerRule, slotToForgeRule) if err != nil { return nil, err } return &HermezAuctionProtocolNewForgeAllocatedIterator{contract: _HermezAuctionProtocol.contract, event: "NewForgeAllocated", logs: logs, sub: sub}, nil } -// WatchNewForgeAllocated is a free log subscription operation binding the contract event 0x9c1175e346e9ec25b59d991c43dd2c3c982970d169dbd7315ad3d8bb91e0acf5. +// WatchNewForgeAllocated is a free log subscription operation binding the contract event 0xd64ebb43f4c2b91022b97389834432f1027ef55586129ba05a3a3065b2304f05. // -// Solidity: event NewForgeAllocated(address indexed forger, uint128 indexed slotToForge, uint128 burnAmount, uint128 donationAmount, uint128 governanceAmount) -func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewForgeAllocated(opts *bind.WatchOpts, sink chan<- *HermezAuctionProtocolNewForgeAllocated, forger []common.Address, slotToForge []*big.Int) (event.Subscription, error) { +// Solidity: event NewForgeAllocated(address indexed bidder, address indexed forger, uint128 indexed slotToForge, uint128 burnAmount, uint128 donationAmount, uint128 governanceAmount) +func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewForgeAllocated(opts *bind.WatchOpts, sink chan<- *HermezAuctionProtocolNewForgeAllocated, bidder []common.Address, forger []common.Address, slotToForge []*big.Int) (event.Subscription, error) { + var bidderRule []interface{} + for _, bidderItem := range bidder { + bidderRule = append(bidderRule, bidderItem) + } var forgerRule []interface{} for _, forgerItem := range forger { forgerRule = append(forgerRule, forgerItem) @@ -2607,7 +2319,7 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewForgeAlloca slotToForgeRule = append(slotToForgeRule, slotToForgeItem) } - logs, sub, err := _HermezAuctionProtocol.contract.WatchLogs(opts, "NewForgeAllocated", forgerRule, slotToForgeRule) + logs, sub, err := _HermezAuctionProtocol.contract.WatchLogs(opts, "NewForgeAllocated", bidderRule, forgerRule, slotToForgeRule) if err != nil { return nil, err } @@ -2639,9 +2351,9 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchNewForgeAlloca }), nil } -// ParseNewForgeAllocated is a log parse operation binding the contract event 0x9c1175e346e9ec25b59d991c43dd2c3c982970d169dbd7315ad3d8bb91e0acf5. +// ParseNewForgeAllocated is a log parse operation binding the contract event 0xd64ebb43f4c2b91022b97389834432f1027ef55586129ba05a3a3065b2304f05. // -// Solidity: event NewForgeAllocated(address indexed forger, uint128 indexed slotToForge, uint128 burnAmount, uint128 donationAmount, uint128 governanceAmount) +// Solidity: event NewForgeAllocated(address indexed bidder, address indexed forger, uint128 indexed slotToForge, uint128 burnAmount, uint128 donationAmount, uint128 governanceAmount) func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) ParseNewForgeAllocated(log types.Log) (*HermezAuctionProtocolNewForgeAllocated, error) { event := new(HermezAuctionProtocolNewForgeAllocated) if err := _HermezAuctionProtocol.contract.UnpackLog(event, "NewForgeAllocated", log); err != nil { @@ -3048,3 +2760,156 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) ParseNewSlotDeadlin } return event, nil } + +// HermezAuctionProtocolSetCoordinatorIterator is returned from FilterSetCoordinator and is used to iterate over the raw logs and unpacked data for SetCoordinator events raised by the HermezAuctionProtocol contract. +type HermezAuctionProtocolSetCoordinatorIterator struct { + Event *HermezAuctionProtocolSetCoordinator // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *HermezAuctionProtocolSetCoordinatorIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(HermezAuctionProtocolSetCoordinator) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(HermezAuctionProtocolSetCoordinator) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *HermezAuctionProtocolSetCoordinatorIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HermezAuctionProtocolSetCoordinatorIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HermezAuctionProtocolSetCoordinator represents a SetCoordinator event raised by the HermezAuctionProtocol contract. +type HermezAuctionProtocolSetCoordinator struct { + Bidder common.Address + Forger common.Address + CoordinatorURL string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetCoordinator is a free log retrieval operation binding the contract event 0x5246b2ac9ee77efe2e64af6df00055d97e2d6e1b277f5a8d17ba5bca1a573da0. +// +// Solidity: event SetCoordinator(address indexed bidder, address indexed forger, string coordinatorURL) +func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) FilterSetCoordinator(opts *bind.FilterOpts, bidder []common.Address, forger []common.Address) (*HermezAuctionProtocolSetCoordinatorIterator, error) { + + var bidderRule []interface{} + for _, bidderItem := range bidder { + bidderRule = append(bidderRule, bidderItem) + } + var forgerRule []interface{} + for _, forgerItem := range forger { + forgerRule = append(forgerRule, forgerItem) + } + + logs, sub, err := _HermezAuctionProtocol.contract.FilterLogs(opts, "SetCoordinator", bidderRule, forgerRule) + if err != nil { + return nil, err + } + return &HermezAuctionProtocolSetCoordinatorIterator{contract: _HermezAuctionProtocol.contract, event: "SetCoordinator", logs: logs, sub: sub}, nil +} + +// WatchSetCoordinator is a free log subscription operation binding the contract event 0x5246b2ac9ee77efe2e64af6df00055d97e2d6e1b277f5a8d17ba5bca1a573da0. +// +// Solidity: event SetCoordinator(address indexed bidder, address indexed forger, string coordinatorURL) +func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) WatchSetCoordinator(opts *bind.WatchOpts, sink chan<- *HermezAuctionProtocolSetCoordinator, bidder []common.Address, forger []common.Address) (event.Subscription, error) { + + var bidderRule []interface{} + for _, bidderItem := range bidder { + bidderRule = append(bidderRule, bidderItem) + } + var forgerRule []interface{} + for _, forgerItem := range forger { + forgerRule = append(forgerRule, forgerItem) + } + + logs, sub, err := _HermezAuctionProtocol.contract.WatchLogs(opts, "SetCoordinator", bidderRule, forgerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(HermezAuctionProtocolSetCoordinator) + if err := _HermezAuctionProtocol.contract.UnpackLog(event, "SetCoordinator", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetCoordinator is a log parse operation binding the contract event 0x5246b2ac9ee77efe2e64af6df00055d97e2d6e1b277f5a8d17ba5bca1a573da0. +// +// Solidity: event SetCoordinator(address indexed bidder, address indexed forger, string coordinatorURL) +func (_HermezAuctionProtocol *HermezAuctionProtocolFilterer) ParseSetCoordinator(log types.Log) (*HermezAuctionProtocolSetCoordinator, error) { + event := new(HermezAuctionProtocolSetCoordinator) + if err := _HermezAuctionProtocol.contract.UnpackLog(event, "SetCoordinator", log); err != nil { + return nil, err + } + return event, nil +} diff --git a/eth/contracts/erc777/ERC777.go b/eth/contracts/erc777/ERC777.go index c887bd2..c2c618d 100644 --- a/eth/contracts/erc777/ERC777.go +++ b/eth/contracts/erc777/ERC777.go @@ -30,7 +30,7 @@ var ( const ERC777ABI = "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"address[]\",\"name\":\"defaultOperators\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenHolder\",\"type\":\"address\"}],\"name\":\"AuthorizedOperator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenHolder\",\"type\":\"address\"}],\"name\":\"RevokedOperator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"Sent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"authorizeOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenHolder\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defaultOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"granularity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenHolder\",\"type\":\"address\"}],\"name\":\"isOperatorFor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"operatorBurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"operatorSend\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"revokeOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" // ERC777Bin is the compiled bytecode used for deploying new contracts. -var ERC777Bin = "0x60806040523480156200001157600080fd5b50604051620023b0380380620023b0833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084640100000000821115620001bc57600080fd5b908301906020820185811115620001d257600080fd5b8251866020820283011164010000000082111715620001f057600080fd5b82525081516020918201928201910280838360005b838110156200021f57818101518382015260200162000205565b5050505091909101604052505084516200024392506002915060208601906200040b565b508151620002599060039060208501906200040b565b5080516200026f90600490602084019062000490565b5060005b600454811015620002cf57600160056000600484815481106200029257fe5b6000918252602080832091909101546001600160a01b031683528201929092526040019020805460ff191691151591909117905560010162000273565b50604080516329965a1d60e01b815230600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce2177054602483015260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad24916329965a1d91606480830192600092919082900301818387803b1580156200035057600080fd5b505af115801562000365573d6000803e3d6000fd5b5050604080516329965a1d60e01b815230600482018190527faea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a602483015260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad2493506329965a1d9250606480830192600092919082900301818387803b158015620003e957600080fd5b505af1158015620003fe573d6000803e3d6000fd5b505050505050506200052e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200044e57805160ff19168380011785556200047e565b828001600101855582156200047e579182015b828111156200047e57825182559160200191906001019062000461565b506200048c929150620004f6565b5090565b828054828255906000526020600020908101928215620004e8579160200282015b82811115620004e857825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620004b1565b506200048c9291506200050d565b5b808211156200048c5760008155600101620004f7565b5b808211156200048c5780546001600160a01b03191681556001016200050e565b611e72806200053e6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461052a578063dd62ed3e14610558578063fad8b32a14610586578063fc673c4f146105ac578063fe9d9303146106ea57610116565b8063959b8c3f1461041757806395d89b411461043d5780639bd9bbc614610445578063a9059cbb146104fe57610116565b806323b872dd116100e957806323b872dd1461024a578063313ce56714610280578063556f0dc71461029e57806362ad1b83146102a657806370a08231146103f157610116565b806306e485381461011b57806306fdde0314610173578063095ea7b3146101f057806318160ddd14610230575b600080fd5b610123610795565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561015f578181015183820152602001610147565b505050509050019250505060405180910390f35b61017b6107f7565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101b557818101518382015260200161019d565b50505050905090810190601f1680156101e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61021c6004803603604081101561020657600080fd5b506001600160a01b038135169060200135610881565b604080519115158252519081900360200190f35b6102386108a3565b60408051918252519081900360200190f35b61021c6004803603606081101561026057600080fd5b506001600160a01b038135811691602081013590911690604001356108a9565b610288610a26565b6040805160ff9092168252519081900360200190f35b610238610a2b565b6103ef600480360360a08110156102bc57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156102f657600080fd5b82018360208201111561030857600080fd5b803590602001918460018302840111600160201b8311171561032957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561037b57600080fd5b82018360208201111561038d57600080fd5b803590602001918460018302840111600160201b831117156103ae57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610a30945050505050565b005b6102386004803603602081101561040757600080fd5b50356001600160a01b0316610a92565b6103ef6004803603602081101561042d57600080fd5b50356001600160a01b0316610aad565b61017b610bf9565b6103ef6004803603606081101561045b57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561048a57600080fd5b82018360208201111561049c57600080fd5b803590602001918460018302840111600160201b831117156104bd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c5a945050505050565b61021c6004803603604081101561051457600080fd5b506001600160a01b038135169060200135610c84565b61021c6004803603604081101561054057600080fd5b506001600160a01b0381358116916020013516610d5d565b6102386004803603604081101561056e57600080fd5b506001600160a01b0381358116916020013516610dff565b6103ef6004803603602081101561059c57600080fd5b50356001600160a01b0316610e2a565b6103ef600480360360808110156105c257600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156105f157600080fd5b82018360208201111561060357600080fd5b803590602001918460018302840111600160201b8311171561062457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561067657600080fd5b82018360208201111561068857600080fd5b803590602001918460018302840111600160201b831117156106a957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610f76945050505050565b6103ef6004803603604081101561070057600080fd5b81359190810190604081016020820135600160201b81111561072157600080fd5b82018360208201111561073357600080fd5b803590602001918460018302840111600160201b8311171561075457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610fd4945050505050565b606060048054806020026020016040519081016040528092919081815260200182805480156107ed57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116107cf575b5050505050905090565b60028054604080516020601f60001961010060018716150201909416859004938401819004810282018101909252828152606093909290918301828280156107ed5780601f10610855576101008083540402835291602001916107ed565b820191906000526020600020905b81548152906001019060200180831161086357509395945050505050565b60008061088c610ffa565b9050610899818585610ffe565b5060019392505050565b60015490565b60006001600160a01b0383166108f05760405162461bcd60e51b8152600401808060200182810382526024815260200180611d586024913960400191505060405180910390fd5b6001600160a01b0384166109355760405162461bcd60e51b8152600401808060200182810382526026815260200180611dd16026913960400191505060405180910390fd5b600061093f610ffa565b905061096d8186868660405180602001604052806000815250604051806020016040528060008152506110ea565b610999818686866040518060200160405280600081525060405180602001604052806000815250611317565b6109ed85826109e886604051806060016040528060298152602001611da8602991396001600160a01b03808c166000908152600860209081526040808320938b16835292905220549190611530565b610ffe565b610a1b81868686604051806020016040528060008152506040518060200160405280600081525060006115c7565b506001949350505050565b601290565b600190565b610a41610a3b610ffa565b86610d5d565b610a7c5760405162461bcd60e51b815260040180806020018281038252602c815260200180611d7c602c913960400191505060405180910390fd5b610a8b8585858585600161184c565b5050505050565b6001600160a01b031660009081526020819052604090205490565b806001600160a01b0316610abf610ffa565b6001600160a01b03161415610b055760405162461bcd60e51b8152600401808060200182810382526024815260200180611cc66024913960400191505060405180910390fd5b6001600160a01b03811660009081526005602052604090205460ff1615610b685760076000610b32610ffa565b6001600160a01b03908116825260208083019390935260409182016000908120918516815292529020805460ff19169055610baf565b600160066000610b76610ffa565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff19169115159190911790555b610bb7610ffa565b6001600160a01b0316816001600160a01b03167ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f960405160405180910390a350565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ed5780601f10610855576101008083540402835291602001916107ed565b610c7f610c65610ffa565b84848460405180602001604052806000815250600161184c565b505050565b60006001600160a01b038316610ccb5760405162461bcd60e51b8152600401808060200182810382526024815260200180611d586024913960400191505060405180910390fd5b6000610cd5610ffa565b9050610d038182868660405180602001604052806000815250604051806020016040528060008152506110ea565b610d2f818286866040518060200160405280600081525060405180602001604052806000815250611317565b61089981828686604051806020016040528060008152506040518060200160405280600081525060006115c7565b6000816001600160a01b0316836001600160a01b03161480610dc857506001600160a01b03831660009081526005602052604090205460ff168015610dc857506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b80610df857506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b610e32610ffa565b6001600160a01b0316816001600160a01b03161415610e825760405162461bcd60e51b8152600401808060200182810382526021815260200180611cea6021913960400191505060405180910390fd5b6001600160a01b03811660009081526005602052604090205460ff1615610eee57600160076000610eb1610ffa565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff1916911515919091179055610f2c565b60066000610efa610ffa565b6001600160a01b03908116825260208083019390935260409182016000908120918516815292529020805460ff191690555b610f34610ffa565b6001600160a01b0316816001600160a01b03167f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa160405160405180910390a350565b610f87610f81610ffa565b85610d5d565b610fc25760405162461bcd60e51b815260040180806020018281038252602c815260200180611d7c602c913960400191505060405180910390fd5b610fce84848484611923565b50505050565b610ff6610fdf610ffa565b838360405180602001604052806000815250611923565b5050565b3390565b6001600160a01b0383166110435760405162461bcd60e51b8152600401808060200182810382526025815260200180611c366025913960400191505060405180910390fd5b6001600160a01b0382166110885760405162461bcd60e51b8152600401808060200182810382526023815260200180611e1a6023913960400191505060405180910390fd5b6001600160a01b03808416600081815260086020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6040805163555ddc6560e11b81526001600160a01b03871660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe89560248201529051600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b15801561116e57600080fd5b505afa158015611182573d6000803e3d6000fd5b505050506040513d602081101561119857600080fd5b505190506001600160a01b0381161561130e57806001600160a01b03166375ab97828888888888886040518763ffffffff1660e01b815260040180876001600160a01b03168152602001866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561124357818101518382015260200161122b565b50505050905090810190601f1680156112705780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156112a357818101518382015260200161128b565b50505050905090810190601f1680156112d05780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b505050505b50505050505050565b61132386868686610fce565b61136083604051806060016040528060278152602001611c7d602791396001600160a01b0388166000908152602081905260409020549190611530565b6001600160a01b03808716600090815260208190526040808220939093559086168152205461138f9084611b5d565b600080866001600160a01b03166001600160a01b0316815260200190815260200160002081905550836001600160a01b0316856001600160a01b0316876001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987868686604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611440578181015183820152602001611428565b50505050905090810190601f16801561146d5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156114a0578181015183820152602001611488565b50505050905090810190601f1680156114cd5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a4836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050565b600081848411156115bf5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561158457818101518382015260200161156c565b50505050905090810190601f1680156115b15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6040805163555ddc6560e11b81526001600160a01b03871660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b60248201529051600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b15801561164b57600080fd5b505afa15801561165f573d6000803e3d6000fd5b505050506040513d602081101561167557600080fd5b505190506001600160a01b038116156117ee57806001600160a01b03166223de298989898989896040518763ffffffff1660e01b815260040180876001600160a01b03168152602001866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561171f578181015183820152602001611707565b50505050905090810190601f16801561174c5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561177f578181015183820152602001611767565b50505050905090810190601f1680156117ac5780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b1580156117d157600080fd5b505af11580156117e5573d6000803e3d6000fd5b50505050611842565b811561184257611806866001600160a01b0316611bb7565b156118425760405162461bcd60e51b815260040180806020018281038252604d815260200180611d0b604d913960600191505060405180910390fd5b5050505050505050565b6001600160a01b0386166118915760405162461bcd60e51b8152600401808060200182810382526022815260200180611c5b6022913960400191505060405180910390fd5b6001600160a01b0385166118ec576040805162461bcd60e51b815260206004820181905260248201527f4552433737373a2073656e6420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b60006118f6610ffa565b90506119068188888888886110ea565b611914818888888888611317565b61130e818888888888886115c7565b6001600160a01b0384166119685760405162461bcd60e51b8152600401808060200182810382526022815260200180611ca46022913960400191505060405180910390fd5b6000611972610ffa565b90506119818186600087610fce565b611990818660008787876110ea565b6119cd84604051806060016040528060238152602001611df7602391396001600160a01b0388166000908152602081905260409020549190611530565b6001600160a01b0386166000908152602081905260409020556001546119f39085611bf3565b600181905550846001600160a01b0316816001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098868686604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611a78578181015183820152602001611a60565b50505050905090810190601f168015611aa55780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015611ad8578181015183820152602001611ac0565b50505050905090810190601f168015611b055780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a36040805185815290516000916001600160a01b038816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050505050565b600082820183811015610df8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611beb57508115155b949350505050565b6000610df883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061153056fe4552433737373a20617070726f76652066726f6d20746865207a65726f20616464726573734552433737373a2073656e642066726f6d20746865207a65726f20616464726573734552433737373a207472616e7366657220616d6f756e7420657863656564732062616c616e63654552433737373a206275726e2066726f6d20746865207a65726f20616464726573734552433737373a20617574686f72697a696e672073656c66206173206f70657261746f724552433737373a207265766f6b696e672073656c66206173206f70657261746f724552433737373a20746f6b656e20726563697069656e7420636f6e747261637420686173206e6f20696d706c656d656e74657220666f7220455243373737546f6b656e73526563697069656e744552433737373a207472616e7366657220746f20746865207a65726f20616464726573734552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f7220666f7220686f6c6465724552433737373a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654552433737373a207472616e736665722066726f6d20746865207a65726f20616464726573734552433737373a206275726e20616d6f756e7420657863656564732062616c616e63654552433737373a20617070726f766520746f20746865207a65726f2061646472657373a2646970667358221220611f48202c28bfcac7a09c23557f3f0d17116120e469330e9bdeab00ad7edf6d64736f6c634300060c0033" +var ERC777Bin = "0x60806040523480156200001157600080fd5b506040516200237a3803806200237a833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084640100000000821115620001bc57600080fd5b908301906020820185811115620001d257600080fd5b8251866020820283011164010000000082111715620001f057600080fd5b82525081516020918201928201910280838360005b838110156200021f57818101518382015260200162000205565b5050505091909101604052505084516200024392506002915060208601906200040b565b508151620002599060039060208501906200040b565b5080516200026f90600490602084019062000490565b5060005b600454811015620002cf57600160056000600484815481106200029257fe5b6000918252602080832091909101546001600160a01b031683528201929092526040019020805460ff191691151591909117905560010162000273565b50604080516329965a1d60e01b815230600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce2177054602483015260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad24916329965a1d91606480830192600092919082900301818387803b1580156200035057600080fd5b505af115801562000365573d6000803e3d6000fd5b5050604080516329965a1d60e01b815230600482018190527faea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a602483015260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad2493506329965a1d9250606480830192600092919082900301818387803b158015620003e957600080fd5b505af1158015620003fe573d6000803e3d6000fd5b505050505050506200052e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200044e57805160ff19168380011785556200047e565b828001600101855582156200047e579182015b828111156200047e57825182559160200191906001019062000461565b506200048c929150620004f6565b5090565b828054828255906000526020600020908101928215620004e8579160200282015b82811115620004e857825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620004b1565b506200048c9291506200050d565b5b808211156200048c5760008155600101620004f7565b5b808211156200048c5780546001600160a01b03191681556001016200050e565b611e3c806200053e6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461052a578063dd62ed3e14610558578063fad8b32a14610586578063fc673c4f146105ac578063fe9d9303146106ea57610116565b8063959b8c3f1461041757806395d89b411461043d5780639bd9bbc614610445578063a9059cbb146104fe57610116565b806323b872dd116100e957806323b872dd1461024a578063313ce56714610280578063556f0dc71461029e57806362ad1b83146102a657806370a08231146103f157610116565b806306e485381461011b57806306fdde0314610173578063095ea7b3146101f057806318160ddd14610230575b600080fd5b610123610795565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561015f578181015183820152602001610147565b505050509050019250505060405180910390f35b61017b6107f7565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101b557818101518382015260200161019d565b50505050905090810190601f1680156101e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61021c6004803603604081101561020657600080fd5b506001600160a01b038135169060200135610881565b604080519115158252519081900360200190f35b6102386108a3565b60408051918252519081900360200190f35b61021c6004803603606081101561026057600080fd5b506001600160a01b038135811691602081013590911690604001356108a9565b610288610a26565b6040805160ff9092168252519081900360200190f35b610238610a2b565b6103ef600480360360a08110156102bc57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156102f657600080fd5b82018360208201111561030857600080fd5b803590602001918460018302840111600160201b8311171561032957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561037b57600080fd5b82018360208201111561038d57600080fd5b803590602001918460018302840111600160201b831117156103ae57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610a30945050505050565b005b6102386004803603602081101561040757600080fd5b50356001600160a01b0316610a92565b6103ef6004803603602081101561042d57600080fd5b50356001600160a01b0316610aad565b61017b610bf9565b6103ef6004803603606081101561045b57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561048a57600080fd5b82018360208201111561049c57600080fd5b803590602001918460018302840111600160201b831117156104bd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c5a945050505050565b61021c6004803603604081101561051457600080fd5b506001600160a01b038135169060200135610c84565b61021c6004803603604081101561054057600080fd5b506001600160a01b0381358116916020013516610d5d565b6102386004803603604081101561056e57600080fd5b506001600160a01b0381358116916020013516610dff565b6103ef6004803603602081101561059c57600080fd5b50356001600160a01b0316610e2a565b6103ef600480360360808110156105c257600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156105f157600080fd5b82018360208201111561060357600080fd5b803590602001918460018302840111600160201b8311171561062457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561067657600080fd5b82018360208201111561068857600080fd5b803590602001918460018302840111600160201b831117156106a957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610f76945050505050565b6103ef6004803603604081101561070057600080fd5b81359190810190604081016020820135600160201b81111561072157600080fd5b82018360208201111561073357600080fd5b803590602001918460018302840111600160201b8311171561075457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610fd4945050505050565b606060048054806020026020016040519081016040528092919081815260200182805480156107ed57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116107cf575b5050505050905090565b60028054604080516020601f60001961010060018716150201909416859004938401819004810282018101909252828152606093909290918301828280156107ed5780601f10610855576101008083540402835291602001916107ed565b820191906000526020600020905b81548152906001019060200180831161086357509395945050505050565b60008061088c610ffa565b9050610899818585610ffe565b5060019392505050565b60015490565b60006001600160a01b0383166108f05760405162461bcd60e51b8152600401808060200182810382526024815260200180611d226024913960400191505060405180910390fd5b6001600160a01b0384166109355760405162461bcd60e51b8152600401808060200182810382526026815260200180611d9b6026913960400191505060405180910390fd5b600061093f610ffa565b905061096d8186868660405180602001604052806000815250604051806020016040528060008152506110ea565b610999818686866040518060200160405280600081525060405180602001604052806000815250611317565b6109ed85826109e886604051806060016040528060298152602001611d72602991396001600160a01b03808c166000908152600860209081526040808320938b16835292905220549190611530565b610ffe565b610a1b81868686604051806020016040528060008152506040518060200160405280600081525060006115c7565b506001949350505050565b601290565b600190565b610a41610a3b610ffa565b86610d5d565b610a7c5760405162461bcd60e51b815260040180806020018281038252602c815260200180611d46602c913960400191505060405180910390fd5b610a8b8585858585600161184c565b5050505050565b6001600160a01b031660009081526020819052604090205490565b806001600160a01b0316610abf610ffa565b6001600160a01b03161415610b055760405162461bcd60e51b8152600401808060200182810382526024815260200180611c906024913960400191505060405180910390fd5b6001600160a01b03811660009081526005602052604090205460ff1615610b685760076000610b32610ffa565b6001600160a01b03908116825260208083019390935260409182016000908120918516815292529020805460ff19169055610baf565b600160066000610b76610ffa565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff19169115159190911790555b610bb7610ffa565b6001600160a01b0316816001600160a01b03167ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f960405160405180910390a350565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ed5780601f10610855576101008083540402835291602001916107ed565b610c7f610c65610ffa565b84848460405180602001604052806000815250600161184c565b505050565b60006001600160a01b038316610ccb5760405162461bcd60e51b8152600401808060200182810382526024815260200180611d226024913960400191505060405180910390fd5b6000610cd5610ffa565b9050610d038182868660405180602001604052806000815250604051806020016040528060008152506110ea565b610d2f818286866040518060200160405280600081525060405180602001604052806000815250611317565b61089981828686604051806020016040528060008152506040518060200160405280600081525060006115c7565b6000816001600160a01b0316836001600160a01b03161480610dc857506001600160a01b03831660009081526005602052604090205460ff168015610dc857506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b80610df857506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b610e32610ffa565b6001600160a01b0316816001600160a01b03161415610e825760405162461bcd60e51b8152600401808060200182810382526021815260200180611cb46021913960400191505060405180910390fd5b6001600160a01b03811660009081526005602052604090205460ff1615610eee57600160076000610eb1610ffa565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff1916911515919091179055610f2c565b60066000610efa610ffa565b6001600160a01b03908116825260208083019390935260409182016000908120918516815292529020805460ff191690555b610f34610ffa565b6001600160a01b0316816001600160a01b03167f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa160405160405180910390a350565b610f87610f81610ffa565b85610d5d565b610fc25760405162461bcd60e51b815260040180806020018281038252602c815260200180611d46602c913960400191505060405180910390fd5b610fce84848484611923565b50505050565b610ff6610fdf610ffa565b838360405180602001604052806000815250611923565b5050565b3390565b6001600160a01b0383166110435760405162461bcd60e51b8152600401808060200182810382526025815260200180611c006025913960400191505060405180910390fd5b6001600160a01b0382166110885760405162461bcd60e51b8152600401808060200182810382526023815260200180611de46023913960400191505060405180910390fd5b6001600160a01b03808416600081815260086020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6040805163555ddc6560e11b81526001600160a01b03871660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe89560248201529051600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b15801561116e57600080fd5b505afa158015611182573d6000803e3d6000fd5b505050506040513d602081101561119857600080fd5b505190506001600160a01b0381161561130e57806001600160a01b03166375ab97828888888888886040518763ffffffff1660e01b815260040180876001600160a01b03168152602001866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561124357818101518382015260200161122b565b50505050905090810190601f1680156112705780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156112a357818101518382015260200161128b565b50505050905090810190601f1680156112d05780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b505050505b50505050505050565b61132386868686610fce565b61136083604051806060016040528060278152602001611c47602791396001600160a01b0388166000908152602081905260409020549190611530565b6001600160a01b03808716600090815260208190526040808220939093559086168152205461138f9084611b5d565b600080866001600160a01b03166001600160a01b0316815260200190815260200160002081905550836001600160a01b0316856001600160a01b0316876001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987868686604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611440578181015183820152602001611428565b50505050905090810190601f16801561146d5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156114a0578181015183820152602001611488565b50505050905090810190601f1680156114cd5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a4836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050565b600081848411156115bf5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561158457818101518382015260200161156c565b50505050905090810190601f1680156115b15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6040805163555ddc6560e11b81526001600160a01b03871660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b60248201529051600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b15801561164b57600080fd5b505afa15801561165f573d6000803e3d6000fd5b505050506040513d602081101561167557600080fd5b505190506001600160a01b038116156117ee57806001600160a01b03166223de298989898989896040518763ffffffff1660e01b815260040180876001600160a01b03168152602001866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561171f578181015183820152602001611707565b50505050905090810190601f16801561174c5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561177f578181015183820152602001611767565b50505050905090810190601f1680156117ac5780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b1580156117d157600080fd5b505af11580156117e5573d6000803e3d6000fd5b50505050611842565b811561184257611806866001600160a01b0316611bb7565b156118425760405162461bcd60e51b815260040180806020018281038252604d815260200180611cd5604d913960600191505060405180910390fd5b5050505050505050565b6001600160a01b0386166118915760405162461bcd60e51b8152600401808060200182810382526022815260200180611c256022913960400191505060405180910390fd5b6001600160a01b0385166118ec576040805162461bcd60e51b815260206004820181905260248201527f4552433737373a2073656e6420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b60006118f6610ffa565b90506119068188888888886110ea565b611914818888888888611317565b61130e818888888888886115c7565b6001600160a01b0384166119685760405162461bcd60e51b8152600401808060200182810382526022815260200180611c6e6022913960400191505060405180910390fd5b6000611972610ffa565b90506119818186600087610fce565b611990818660008787876110ea565b6119cd84604051806060016040528060238152602001611dc1602391396001600160a01b0388166000908152602081905260409020549190611530565b6001600160a01b0386166000908152602081905260409020556001546119f39085611bbd565b600181905550846001600160a01b0316816001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098868686604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611a78578181015183820152602001611a60565b50505050905090810190601f168015611aa55780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015611ad8578181015183820152602001611ac0565b50505050905090810190601f168015611b055780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a36040805185815290516000916001600160a01b038816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050505050565b600082820183811015610df8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3b151590565b6000610df883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061153056fe4552433737373a20617070726f76652066726f6d20746865207a65726f20616464726573734552433737373a2073656e642066726f6d20746865207a65726f20616464726573734552433737373a207472616e7366657220616d6f756e7420657863656564732062616c616e63654552433737373a206275726e2066726f6d20746865207a65726f20616464726573734552433737373a20617574686f72697a696e672073656c66206173206f70657261746f724552433737373a207265766f6b696e672073656c66206173206f70657261746f724552433737373a20746f6b656e20726563697069656e7420636f6e747261637420686173206e6f20696d706c656d656e74657220666f7220455243373737546f6b656e73526563697069656e744552433737373a207472616e7366657220746f20746865207a65726f20616464726573734552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f7220666f7220686f6c6465724552433737373a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654552433737373a207472616e736665722066726f6d20746865207a65726f20616464726573734552433737373a206275726e20616d6f756e7420657863656564732062616c616e63654552433737373a20617070726f766520746f20746865207a65726f2061646472657373a26469706673582212202863824d471c52348cd21b5ed39b26e9f89d504a3e4ceee40a7a49fb1cca21e364736f6c634300060c0033" // DeployERC777 deploys a new Ethereum contract, binding an instance of ERC777 to it. func DeployERC777(auth *bind.TransactOpts, backend bind.ContractBackend, name string, symbol string, defaultOperators []common.Address) (common.Address, *types.Transaction, *ERC777, error) { diff --git a/eth/contracts/hermez/Hermez.go b/eth/contracts/hermez/Hermez.go index efe29c7..9f4f4ac 100644 --- a/eth/contracts/hermez/Hermez.go +++ b/eth/contracts/hermez/Hermez.go @@ -27,10 +27,10 @@ var ( ) // HermezABI is the input ABI used to generate the binding from. -const HermezABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"}],\"name\":\"AddToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"batchNum\",\"type\":\"uint256\"}],\"name\":\"ForgeBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"l1UserTx\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"queueIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"transactionIndex\",\"type\":\"uint256\"}],\"name\":\"L1UserTxEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newFeeAddToken\",\"type\":\"uint256\"}],\"name\":\"UpdateFeeAddToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newForgeL1L2BatchTimeout\",\"type\":\"uint256\"}],\"name\":\"UpdateForgeL1L2BatchTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"idx\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"numExitRoot\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"instantWithdraw\",\"type\":\"bool\"}],\"name\":\"WithdrawEvent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"EXIT_IDX\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"L1_COORDINATOR_BYTES\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"L1_USER_BYTES\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"L2_BYTES\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LAST_IDX\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_AMOUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_L1_TX\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_L1_USER_TX\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_LOAD_AMOUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_TOKENS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_WITHDRAWAL_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NO_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NUM_BUCKETS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RESERVED_IDX\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RFIELD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"addToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"buckets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ceilUSD\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockStamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawals\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockWithdrawalRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxWithdrawals\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"circuitVerifiers\",\"outputs\":[{\"internalType\":\"contractVerifierInterface\",\"name\":\"verifierInt\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxTx\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"babyPubKey\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"loadAmountF\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"}],\"name\":\"createAccountDeposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"accountCreationAuthSig\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"babyPubKey\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"loadAmountF\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"}],\"name\":\"createAccountDepositFromRelayer\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"babyPubKey\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"loadAmountF\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"amountF\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"toIdx\",\"type\":\"uint32\"}],\"name\":\"createAccountDepositTransfer\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentIdx\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"fromIdx\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"loadAmountF\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"fromIdx\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"loadAmountF\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"amountF\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"toIdx\",\"type\":\"uint32\"}],\"name\":\"depositTransfer\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"exitNullifierMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"exitRoots\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeAddToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"fromIdx\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"amountF\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"}],\"name\":\"forceExit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"fromIdx\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"amountF\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"toIdx\",\"type\":\"uint32\"}],\"name\":\"forceTransfer\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"proofA\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2][2]\",\"name\":\"proofB\",\"type\":\"uint256[2][2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"proofC\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint32\",\"name\":\"newLastIdx\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"newStRoot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newExitRoot\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"encodedL1CoordinatorTx\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"l2TxsData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"feeIdxCoordinator\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"verifierIdx\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"l1Batch\",\"type\":\"bool\"}],\"name\":\"forgeBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forgeL1L2BatchTimeout\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentBatch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governanceAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hermezAuctionContract\",\"outputs\":[{\"internalType\":\"contractConsensusInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_verifiers\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_maxTxVerifiers\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"_tokenHEZ\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_governanceAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_safetyAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_hermezAuctionContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_withdrawDelayerContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poseidon2Elements\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poseidon3Elements\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poseidon4Elements\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAddToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_forgeL1L2BatchTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"_withdrawalDelay\",\"type\":\"uint64\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"instantWithdrawalViewer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastL1L2Batch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"mapL1TxQueue\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextForgedQueue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextL1FillingQueue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"safeMode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"safetyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenExchange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenHEZ\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenList\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[4][5]\",\"name\":\"arrayBuckets\",\"type\":\"uint256[4][5]\"}],\"name\":\"updateBucketsParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newFeeAddToken\",\"type\":\"uint256\"}],\"name\":\"updateFeeAddToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newForgeL1L2BatchTimeout\",\"type\":\"uint256\"}],\"name\":\"updateForgeL1L2BatchTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addressArray\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"valueArray\",\"type\":\"uint256[]\"}],\"name\":\"updateTokenExchange\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newWithdrawalDelay\",\"type\":\"uint64\"}],\"name\":\"updateWithdrawalDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"},{\"internalType\":\"uint192\",\"name\":\"balance\",\"type\":\"uint192\"},{\"internalType\":\"uint256\",\"name\":\"babyPubKey\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numExitRoot\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"siblings\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"idx\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"instantWithdraw\",\"type\":\"bool\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawDelayerContract\",\"outputs\":[{\"internalType\":\"contractWithdrawalDelayerInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawalDelay\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]" +const HermezABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"}],\"name\":\"AddToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"batchNum\",\"type\":\"uint64\"}],\"name\":\"ForgeBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"queueIndex\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"position\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"l1UserTx\",\"type\":\"bytes\"}],\"name\":\"L1UserTxEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newFeeAddToken\",\"type\":\"uint256\"}],\"name\":\"UpdateFeeAddToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"newForgeL1L2BatchTimeout\",\"type\":\"uint8\"}],\"name\":\"UpdateForgeL1L2BatchTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint48\",\"name\":\"idx\",\"type\":\"uint48\"},{\"indexed\":true,\"internalType\":\"uint48\",\"name\":\"numExitRoot\",\"type\":\"uint48\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"instantWithdraw\",\"type\":\"bool\"}],\"name\":\"WithdrawEvent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ABSOLUTE_MAX_L1L2BATCHTIMEOUT\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"babyPubKey\",\"type\":\"uint256\"},{\"internalType\":\"uint48\",\"name\":\"fromIdx\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"loadAmountF\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"amountF\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"},{\"internalType\":\"uint48\",\"name\":\"toIdx\",\"type\":\"uint48\"}],\"name\":\"addL1Transaction\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"buckets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ceilUSD\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockStamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawals\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockWithdrawalRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxWithdrawals\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint48\",\"name\":\"\",\"type\":\"uint48\"}],\"name\":\"exitNullifierMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"exitRootsMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeAddToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint48\",\"name\":\"newLastIdx\",\"type\":\"uint48\"},{\"internalType\":\"uint256\",\"name\":\"newStRoot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newExitRoot\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"encodedL1CoordinatorTx\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"l2TxsData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"feeIdxCoordinator\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"verifierIdx\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"l1Batch\",\"type\":\"bool\"},{\"internalType\":\"uint256[2]\",\"name\":\"proofA\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2][2]\",\"name\":\"proofB\",\"type\":\"uint256[2][2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"proofC\",\"type\":\"uint256[2]\"}],\"name\":\"forgeBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forgeL1L2BatchTimeout\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hermezAuctionContract\",\"outputs\":[{\"internalType\":\"contractAuctionInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hermezGovernanceDAOAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_verifiers\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_verifiersParams\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"_withdrawVerifier\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_hermezAuctionContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenHEZ\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_forgeL1L2BatchTimeout\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_feeAddToken\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_poseidon2Elements\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poseidon3Elements\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poseidon4Elements\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_hermezGovernanceDAOAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_safetyAddress\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_withdrawalDelay\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_withdrawDelayerContract\",\"type\":\"address\"}],\"name\":\"initializeHermez\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"}],\"name\":\"instantWithdrawalViewer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastForgedBatch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastIdx\",\"outputs\":[{\"internalType\":\"uint48\",\"name\":\"\",\"type\":\"uint48\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastL1L2Batch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"mapL1TxQueue\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextL1FillingQueue\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextL1ToForgeQueue\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registerTokensCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rollupVerifiers\",\"outputs\":[{\"internalType\":\"contractVerifierRollupInterface\",\"name\":\"verifierInterface\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxTx\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nLevels\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"safeMode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"safetyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"stateRootMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenExchange\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenHEZ\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenList\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"tokensReceived\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[4][5]\",\"name\":\"arrayBuckets\",\"type\":\"uint256[4][5]\"}],\"name\":\"updateBucketsParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newFeeAddToken\",\"type\":\"uint256\"}],\"name\":\"updateFeeAddToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newForgeL1L2BatchTimeout\",\"type\":\"uint8\"}],\"name\":\"updateForgeL1L2BatchTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addressArray\",\"type\":\"address[]\"},{\"internalType\":\"uint64[]\",\"name\":\"valueArray\",\"type\":\"uint64[]\"}],\"name\":\"updateTokenExchange\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newWithdrawalDelay\",\"type\":\"uint64\"}],\"name\":\"updateWithdrawalDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"proofA\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2][2]\",\"name\":\"proofB\",\"type\":\"uint256[2][2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"proofC\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"},{\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"},{\"internalType\":\"uint48\",\"name\":\"numExitRoot\",\"type\":\"uint48\"},{\"internalType\":\"uint48\",\"name\":\"idx\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"instantWithdraw\",\"type\":\"bool\"}],\"name\":\"withdrawCircuit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawDelayerContract\",\"outputs\":[{\"internalType\":\"contractWithdrawalDelayerInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"},{\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"},{\"internalType\":\"uint256\",\"name\":\"babyPubKey\",\"type\":\"uint256\"},{\"internalType\":\"uint48\",\"name\":\"numExitRoot\",\"type\":\"uint48\"},{\"internalType\":\"uint256[]\",\"name\":\"siblings\",\"type\":\"uint256[]\"},{\"internalType\":\"uint48\",\"name\":\"idx\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"instantWithdraw\",\"type\":\"bool\"}],\"name\":\"withdrawMerkleProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawVerifier\",\"outputs\":[{\"internalType\":\"contractVerifierWithdrawInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawalDelay\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]" // HermezBin is the compiled bytecode used for deploying new contracts. -var HermezBin = "0x608060405234801561001057600080fd5b50614950806100206000396000f3fe60806040526004361061036a5760003560e01c80639588eca2116101c6578063c8464ed1116100f7578063e56e27ae11610095578063ef4a5c4a1161006f578063ef4a5c4a146110af578063f47c84c5146110e3578063ffd3dcf9146110f8578063fff699701461110d5761036a565b8063e56e27ae14610ed1578063e617115014610ee6578063ee67f32e14610f1d5761036a565b8063cc77828d116100d1578063cc77828d14610dc8578063d40dc87014610ddd578063d48bfca714610df2578063d7d207c014610e185761036a565b8063c8464ed114610b35578063c970ea8e14610c83578063cadedd8214610c985761036a565b8063a60034fb11610164578063ac3851cd1161013e578063ac3851cd14610a1a578063bded9bb814610a2f578063be8e25db14610a44578063c56ca84e14610b205761036a565b8063a60034fb146109be578063a7ab6961146109d3578063abe3219c14610a055761036a565b80639ead7222116101a05780639ead72221461091d578063a238f9df14610947578063a32758381461095c578063a4b457ca146109715761036a565b80639588eca21461086a5780639612518a1461087f5780639b51fb0d146108c85761036a565b80634d09f3fd116102a05780635f59f58e1161023e578063795053d311610218578063795053d31461081657806379a135e31461082b57806384ef9ed4146108405780638e65ab4f146108555761036a565b80635f59f58e1461073757806368e95e53146107705780636d78e572146108015761036a565b806351ff68b01161027a57806351ff68b01461069a578063568bc1c5146106af57806358de75c4146106f45780635bfac41f146107095761036a565b80634d09f3fd146106465780634fc515591461065b57806350263f8c146106705761036a565b806330501fcb1161030d5780633787f591116102e75780633787f5911461052b57806339cd0581146105685780633ec0b07c1461059257806345d1c25b146106315761036a565b806330501fcb14610495578063314e5eda146104ca578063363e2a22146104f45761036a565b80631b0a8223116103495780631b0a8223146103fc57806320f6a08f1461042d5780632bd83626146104425780632bf41a2f146104575761036a565b80624aca6e1461036f5780630dd94b96146103b45780630ee8e52b146103e7575b600080fd5b34801561037b57600080fd5b506103a26004803603602081101561039257600080fd5b50356001600160a01b0316611122565b60408051918252519081900360200190f35b3480156103c057600080fd5b506103a2600480360360208110156103d757600080fd5b50356001600160a01b0316611134565b3480156103f357600080fd5b506103a2611146565b34801561040857600080fd5b5061041161114c565b604080516001600160a01b039092168252519081900360200190f35b34801561043957600080fd5b506103a261115b565b34801561044e57600080fd5b50610411611163565b34801561046357600080fd5b506104816004803603602081101561047a57600080fd5b5035611172565b604080519115158252519081900360200190f35b6104c8600480360360608110156104ab57600080fd5b50803590602081013561ffff16906040013563ffffffff16611187565b005b3480156104d657600080fd5b506104c8600480360360208110156104ed57600080fd5b5035611318565b6104c86004803603606081101561050a57600080fd5b5063ffffffff813581169161ffff60208201351691604090910135166113ab565b6104c86004803603608081101561054157600080fd5b5063ffffffff813581169161ffff602082013516916040820135811691606001351661157f565b34801561057457600080fd5b506104c86004803603602081101561058b57600080fd5b503561177f565b34801561059e57600080fd5b506105bc600480360360208110156105b557600080fd5b5035611852565b6040805160208082528351818301528351919283929083019185019080838360005b838110156105f65781810151838201526020016105de565b50505050905090810190601f1680156106235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561063d57600080fd5b506103a26118ed565b34801561065257600080fd5b506103a26118f3565b34801561066757600080fd5b506103a26118f8565b34801561067c57600080fd5b506103a26004803603602081101561069357600080fd5b50356118fd565b3480156106a657600080fd5b506103a261191b565b6104c8600480360360a08110156106c557600080fd5b5080359061ffff602082013581169160408101359091169063ffffffff60608201358116916080013516611920565b34801561070057600080fd5b506103a2611b8d565b34801561071557600080fd5b5061071e611bb1565b6040805163ffffffff9092168252519081900360200190f35b34801561074357600080fd5b506104816004803603604081101561075a57600080fd5b506001600160a01b038135169060200135611bbd565b34801561077c57600080fd5b506104c8600480360361028081101561079457600080fd5b6040805160a0810190915290820191906102808201908260056000835b828210156107f257604080516080818101909252908084028601906004908390839080828437600092019190915250505081526001909101906020016107b1565b50929550611c4f945050505050565b34801561080d57600080fd5b506103a2611e23565b34801561082257600080fd5b50610411611e28565b34801561083757600080fd5b50610411611e37565b34801561084c57600080fd5b506103a2611e46565b34801561086157600080fd5b5061071e611e4c565b34801561087657600080fd5b506103a2611e54565b6104c8600480360360a081101561089557600080fd5b5063ffffffff813581169161ffff6020820135811692604083013590911691606081013582169160809091013516611e5a565b3480156108d457600080fd5b506108f2600480360360208110156108eb57600080fd5b50356120f8565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b34801561092957600080fd5b506104116004803603602081101561094057600080fd5b503561212a565b34801561095357600080fd5b506103a2612151565b34801561096857600080fd5b506103a2612158565b34801561097d57600080fd5b5061099b6004803603602081101561099457600080fd5b503561215e565b604080516001600160a01b03909316835260208301919091528051918290030190f35b3480156109ca57600080fd5b506103a2612193565b3480156109df57600080fd5b506109e8612199565b6040805167ffffffffffffffff9092168252519081900360200190f35b348015610a1157600080fd5b506104c86121b0565b348015610a2657600080fd5b506103a261232f565b348015610a3b57600080fd5b506103a2612335565b348015610a5057600080fd5b506104c8600480360360e0811015610a6757600080fd5b63ffffffff823516916001600160c01b036020820135169160408201359160608101359181019060a081016080820135600160201b811115610aa857600080fd5b820183602082011115610aba57600080fd5b803590602001918460208302840111600160201b83111715610adb57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060200135151561233b565b348015610b2c57600080fd5b506103a2612819565b348015610b4157600080fd5b506104c86004803603610200811015610b5957600080fd5b604082019060c083019063ffffffff610100850135169061012085013590610140860135908601866101808101610160820135600160201b811115610b9d57600080fd5b820183602082011115610baf57600080fd5b803590602001918460018302840111600160201b83111715610bd057600080fd5b919390929091602081019035600160201b811115610bed57600080fd5b820183602082011115610bff57600080fd5b803590602001918460018302840111600160201b83111715610c2057600080fd5b919390929091602081019035600160201b811115610c3d57600080fd5b820183602082011115610c4f57600080fd5b803590602001918460018302840111600160201b83111715610c7057600080fd5b919350915080359060200135151561281e565b348015610c8f57600080fd5b506103a2612aeb565b348015610ca457600080fd5b506104c860048036036040811015610cbb57600080fd5b810190602081018135600160201b811115610cd557600080fd5b820183602082011115610ce757600080fd5b803590602001918460208302840111600160201b83111715610d0857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610d5757600080fd5b820183602082011115610d6957600080fd5b803590602001918460208302840111600160201b83111715610d8a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612af1945050505050565b348015610dd457600080fd5b506103a2612bbc565b348015610de957600080fd5b506103a2612bc2565b6104c860048036036020811015610e0857600080fd5b50356001600160a01b0316612bca565b6104c860048036036080811015610e2e57600080fd5b810190602081018135600160201b811115610e4857600080fd5b820183602082011115610e5a57600080fd5b803590602001918460018302840111600160201b83111715610e7b57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050823593505050602081013561ffff16906040013563ffffffff16612dd3565b348015610edd57600080fd5b50610411612f7f565b6104c860048036036060811015610efc57600080fd5b5063ffffffff813581169161ffff6020820135169160409091013516612f8e565b348015610f2957600080fd5b506104c860048036036101a0811015610f4157600080fd5b810190602081018135600160201b811115610f5b57600080fd5b820183602082011115610f6d57600080fd5b803590602001918460208302840111600160201b83111715610f8e57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610fdd57600080fd5b820183602082011115610fef57600080fd5b803590602001918460208302840111600160201b8311171561101057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550506001600160a01b038335811694506020840135811693604081013582169350606081013582169250608081013582169160a082013581169160c081013582169160e08201351690610100810135906101208101359067ffffffffffffffff6101409091013516613124565b3480156110bb57600080fd5b506104c8600480360360208110156110d257600080fd5b503567ffffffffffffffff16613288565b3480156110ef57600080fd5b506103a2611e4c565b34801561110457600080fd5b5061071e613370565b34801561111957600080fd5b5061071e613375565b60586020526000908152604090205481565b60526020526000908152604090205481565b60605481565b6051546001600160a01b031681565b600160801b81565b605b546001600160a01b031681565b60566020526000908152604090205460ff1681565b60006111928361337a565b9050600160801b81106111da576040805162461bcd60e51b815260206004820152601e60248201526000805160206148fb833981519152604482015290519081900360640190fd5b63ffffffff8216611234573481101561122f576040805162461bcd60e51b8152602060048201526012602482015271195d1a195c880f081b1bd859105b5bdd5b9d60721b604482015290519081900360640190fd5b6112a5565b61126660578363ffffffff168154811061124a57fe5b6000918252602090912001546001600160a01b031682306133c0565b6112a5576040805162461bcd60e51b815260206004820152601e602482015260008051602061486f833981519152604482015290519081900360640190fd5b6040805133606090811b6020830152603482018790526000605483018190526001600160f01b031960f088901b166058840152605a83018190526001600160e01b031960e087901b16605c840152908201528151604481830301815260649091019091526113129061344d565b50505050565b604f546001600160a01b03163314611370576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b605a8190556040805182815290517fd1c873cd16013f0dc5f37992c0d12794389698512895ec036a568e393b46e3c19181900360200190a150565b60006113b68361337a565b9050600160801b81106113fe576040805162461bcd60e51b815260206004820152601e60248201526000805160206148fb833981519152604482015290519081900360640190fd5b60ff63ffffffff8516118015611420575060615463ffffffff90811690851611155b611463576040805162461bcd60e51b815260206004820152600f60248201526e0d2dcecc2d8d2c840cce4deda92c8f608b1b604482015290519081900360640190fd5b63ffffffff82166114bd57348110156114b8576040805162461bcd60e51b8152602060048201526012602482015271195d1a195c880f081b1bd859105b5bdd5b9d60721b604482015290519081900360640190fd5b611512565b6114d360578363ffffffff168154811061124a57fe5b611512576040805162461bcd60e51b815260206004820152601e602482015260008051602061486f833981519152604482015290519081900360640190fd5b60408051600060208201819052603482018190526001600160e01b031960e088811b821660548501526001600160f01b031960f089901b166058850152605a840183905286901b16605c83015260608201528151604481830301815260649091019091526113129061344d565b60575463ffffffff8316106115db576040805162461bcd60e51b815260206004820152601d60248201527f746f6b656e20686173206e6f74206265656e2072656769737465726564000000604482015290519081900360640190fd5b60006115e68461337a565b9050600160c01b8110611639576040805162461bcd60e51b81526020600482015260166024820152750c2dadeeadce840d8c2e4cecae440e8d0c2dc40dac2f60531b604482015290519081900360640190fd5b60ff63ffffffff861611801561165b575060615463ffffffff90811690861611155b61169e576040805162461bcd60e51b815260206004820152600f60248201526e0d2dcecc2d8d2c840cce4deda92c8f608b1b604482015290519081900360640190fd5b60ff63ffffffff83161180156116c0575060615463ffffffff90811690831611155b611701576040805162461bcd60e51b815260206004820152600d60248201526c0d2dcecc2d8d2c840e8de92c8f609b1b604482015290519081900360640190fd5b6040805133606090811b60208301526000603483018190526001600160e01b031960e08a811b8216605486015260588501929092526001600160f01b031960f08a901b16605a85015287821b8116605c8501529086901b16908201528151604481830301815260649091019091526117789061344d565b5050505050565b604f546001600160a01b031633146117d7576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b60f08111156118175760405162461bcd60e51b815260040180806020018281038252602a81526020018061488f602a913960400191505060405180910390fd5b605d8190556040805182815290517f6df2dd186033d1083891be7a27ab27fd480094118e909a1780f9c2a2c49a7aa09181900360200190a150565b605c6020908152600091825260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156118e55780601f106118ba576101008083540402835291602001916118e5565b820191906000526020600020905b8154815290600101906020018083116118c857829003601f168201915b505050505081565b61010081565b606581565b600b81565b6055818154811061190a57fe5b600091825260209091200154905081565b608081565b600061192b8561337a565b9050600160801b8110611985576040805162461bcd60e51b815260206004820152601e60248201527f6465706f73697420616d6f756e74206c6172676572207468616e204d61780000604482015290519081900360640190fd5b60006119908561337a565b9050600160c01b81106119e3576040805162461bcd60e51b81526020600482015260166024820152750c2dadeeadce840d8c2e4cecae440e8d0c2dc40dac2f60531b604482015290519081900360640190fd5b60ff63ffffffff8416118015611a05575060615463ffffffff90811690841611155b611a46576040805162461bcd60e51b815260206004820152600d60248201526c0d2dcecc2d8d2c840e8de92c8f609b1b604482015290519081900360640190fd5b63ffffffff8416611aa05734821015611a9b576040805162461bcd60e51b8152602060048201526012602482015271195d1a195c880f081b1bd859105b5bdd5b9d60721b604482015290519081900360640190fd5b611b11565b611ad260578563ffffffff1681548110611ab657fe5b6000918252602090912001546001600160a01b031683306133c0565b611b11576040805162461bcd60e51b815260206004820152601e602482015260008051602061486f833981519152604482015290519081900360640190fd5b6040805133606090811b6020830152603482018a9052600060548301526001600160f01b031960f08a811b8216605885015289901b16605a8301526001600160e01b031960e088811b8216605c85015287901b1690820152815160448183030181526064909101909152611b849061344d565b50505050505050565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000181565b60615463ffffffff1681565b600080611bca848461361d565b90506000611bd78261366d565b905061ffff811415611bee57600192505050611c49565b600060368260058110611bfd57fe5b600502019050600081600201541115611c1c5760019350505050611c49565b60008160010154430390508160030154811015611c40576000945050505050611c49565b60019450505050505b92915050565b604f546001600160a01b03163314611ca7576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b60005b60058163ffffffff161015611e1f57818163ffffffff1660058110611ccb57fe5b602002015160016020020151828263ffffffff1660058110611ce957fe5b6020020151606001511015611d2f5760405162461bcd60e51b815260040180806020018281038252602e815260200180614813602e913960400191505060405180910390fd5b6040518060a00160405280838363ffffffff1660058110611d4c57fe5b6020020151600060200201518152602001438152602001838363ffffffff1660058110611d7557fe5b6020020151600160200201518152602001838363ffffffff1660058110611d9857fe5b6020020151600260200201518152602001838363ffffffff1660058110611dbb57fe5b6020020151606001519052603663ffffffff831660058110611dd957fe5b6005020160008201518160000155602082015181600101556040820151816002015560608201518160030155608082015181600401559050508080600101915050611caa565b5050565b604481565b604f546001600160a01b031681565b6059546001600160a01b031681565b605e5481565b63ffffffff81565b60545481565b6000611e658561337a565b9050600160801b8110611ead576040805162461bcd60e51b815260206004820152601e60248201526000805160206148fb833981519152604482015290519081900360640190fd5b6000611eb88561337a565b9050600160c01b8110611f0b576040805162461bcd60e51b81526020600482015260166024820152750c2dadeeadce840d8c2e4cecae440e8d0c2dc40dac2f60531b604482015290519081900360640190fd5b60ff63ffffffff8816118015611f2d575060615463ffffffff90811690881611155b611f70576040805162461bcd60e51b815260206004820152600f60248201526e0d2dcecc2d8d2c840cce4deda92c8f608b1b604482015290519081900360640190fd5b60ff63ffffffff8416118015611f92575060615463ffffffff90811690841611155b611fd3576040805162461bcd60e51b815260206004820152600d60248201526c0d2dcecc2d8d2c840e8de92c8f609b1b604482015290519081900360640190fd5b63ffffffff841661202d5734821015612028576040805162461bcd60e51b8152602060048201526012602482015271195d1a195c880f081b1bd859105b5bdd5b9d60721b604482015290519081900360640190fd5b612082565b61204360578563ffffffff1681548110611ab657fe5b612082576040805162461bcd60e51b815260206004820152601e602482015260008051602061486f833981519152604482015290519081900360640190fd5b6040805133606090811b6020830152600060348301526001600160e01b031960e08b811b821660548501526001600160f01b031960f08c811b821660588701528b901b16605a85015288811b8216605c85015287901b1690820152815160448183030181526064909101909152611b849061344d565b6036816005811061210557fe5b6005020180546001820154600283015460038401546004909401549294509092909185565b6057818154811061213757fe5b6000918252602090912001546001600160a01b0316905081565b6212750081565b605d5481565b6053818154811061216b57fe5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b61ffff81565b605054600160a01b900467ffffffffffffffff1681565b6050546001600160a01b03163314806121d35750604f546001600160a01b031633145b612224576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79207361666520626f74206f7220676f766572616e6365000000000000604482015290519081900360640190fd5b60005b60058163ffffffff1610156122bb576040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525060368263ffffffff166005811061227557fe5b6005020160008201518160000155602082015181600101556040820151816002015560608201518160030155608082015181600401559050508080600101915050612227565b5060515460505460408051630e670af560e01b8152600160a01b90920467ffffffffffffffff166004830152516001600160a01b0390921691630e670af59160248082019260009290919082900301818387803b15801561231b57600080fd5b505af1158015611312573d6000803e3d6000fd5b60555490565b605a5481565b80156123d15761237b60578863ffffffff168154811061235757fe5b6000918252602090912001546001600160a01b03166001600160c01b038816613704565b15156001146123d1576040805162461bcd60e51b815260206004820152601860248201527f6d7573742062652064656c617965642077697468647261770000000000000000604482015290519081900360640190fd5b60606123ea886000896001600160c01b0316893361380d565b905060006123f78261391a565b905060006055600188038154811061240b57fe5b600091825260209182902001546040805160038082526080820190925291935060609282018380368337019050509050828160008151811061244957fe5b602002602001018181525050600188038160018151811061246657fe5b602002602001018181525050818160028151811061248057fe5b6020026020010181815250506000612497826139cf565b60008181526056602052604090205490915060ff16156124fe576040805162461bcd60e51b815260206004820152601e60248201527f776974686472617720686173206265656e20616c726561647920646f6e650000604482015290519081900360640190fd5b61250a83898987613a2c565b1515600114612550576040805162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b604482015290519081900360640190fd5b6000818152605660205260409020805460ff19166001179055851561263c5763ffffffff8c166125b55760405133906001600160c01b038d1680156108fc02916000818181858888f193505050501580156125af573d6000803e3d6000fd5b50612637565b6125f060578d63ffffffff16815481106125cb57fe5b6000918252602090912001546001600160a01b0316336001600160c01b038e16613ab3565b612637576040805162461bcd60e51b81526020600482015260136024820152724661696c20455243323020776974686472617760681b604482015290519081900360640190fd5b6127da565b63ffffffff8c166126c8576051546040805163cfc0b64160e01b81523360048201526000602482018190526001600160c01b038f166044830181905292516001600160a01b039094169363cfc0b6419392606480820193929182900301818588803b1580156126aa57600080fd5b505af11580156126be573d6000803e3d6000fd5b50505050506127da565b61270a60578d63ffffffff16815481106126de57fe5b6000918252602090912001546051546001600160a01b03918216916001600160c01b038f169116613b0c565b50605160009054906101000a90046001600160a01b03166001600160a01b031663cfc0b6413360578f63ffffffff168154811061274357fe5b9060005260206000200160009054906101000a90046001600160a01b03168e6040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b03168152602001826001600160c01b031681526020019350505050600060405180830381600087803b1580156127c157600080fd5b505af11580156127d5573d6000803e3d6000fd5b505050505b85151589887f1b9bced8515592200c493bd85d3b9e8508df7ea146ee075c252f034d226fdac660405160405180910390a4505050505050505050505050565b600581565b605b546040805163041d8fb560e51b815233600482015243602482015290516001600160a01b03909216916383b1f6a091604480820192602092909190829003018186803b15801561286f57600080fd5b505afa158015612883573d6000803e3d6000fd5b505050506040513d602081101561289957600080fd5b505115156001146128e2576040805162461bcd60e51b815260206004820152600e60248201526d1a5b98dbdc9c9958dd081cdb1bdd60921b604482015290519081900360640190fd5b806129415743605d54605e540111612941576040805162461bcd60e51b815260206004820152601d60248201527f74696d656f75742c206d75737420666f726765204c314c324261746368000000604482015290519081900360640190fd5b60006129d08c8c8c8c8c8c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c92508d9150613b659050565b90506129df8f8f8f8487613e0d565b60548b9055605580546001810182556000919091527f71beda120aafdd3bb922b360a066d10b7ce81d7ac2ad9874daac46e2282f6b45018a90556061805463ffffffff191663ffffffff8e161790558115612a405743605e55612a40613f4d565b605b54604080516309cb4a2f60e31b815233600482015290516001600160a01b0390921691634e5a51789160248082019260009290919082900301818387803b158015612a8c57600080fd5b505af1158015612aa0573d6000803e3d6000fd5b505060555460408051918252517f9b346777a734ffed277bddd87dee3490eb9dcc5378c095eac5af3e0f5da04f419350908190036020019150a1505050505050505050505050505050565b605f5481565b604f546001600160a01b03163314612b49576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b60005b82518163ffffffff161015612bb757818163ffffffff1681518110612b6d57fe5b602002602001015160526000858463ffffffff1681518110612b8b57fe5b6020908102919091018101516001600160a01b0316825281019190915260400160002055600101612b4c565b505050565b60575490565b600160c01b81565b60575463ffffffff811115612c1b576040805162461bcd60e51b81526020600482015260126024820152711d1bdad95b881b1a5cdd081a5cc8199d5b1b60721b604482015290519081900360640190fd5b6001600160a01b038216612c6b576040805162461bcd60e51b8152602060048201526012602482015271063616e2774206265206164647265737320360741b604482015290519081900360640190fd5b6001600160a01b03821660009081526058602052604090205415612cd6576040805162461bcd60e51b815260206004820152601b60248201527f746f6b656e206164647265737320616c72656164792061646465640000000000604482015290519081900360640190fd5b605954605a54604f54612cf6926001600160a01b039081169291166133c0565b612d35576040805162461bcd60e51b815260206004820152601e602482015260008051602061486f833981519152604482015290519081900360640190fd5b60578054600181019091557fe8e5595d268aaa85b36c3557e9d96c14a4fffaee9f45bcae0c407968a71096300180546001600160a01b0319166001600160a01b038416908117909155600081815260586020908152604091829020849055815192835263ffffffff84169083015280517fcb73d161edb7cd4fb1d92fedfd2555384fd997fd44ab507656f8c81e15747dde9281900390910190a15050565b6000612dde8361337a565b9050600160801b8110612e26576040805162461bcd60e51b815260206004820152601e60248201526000805160206148fb833981519152604482015290519081900360640190fd5b63ffffffff8216612e805734811015612e7b576040805162461bcd60e51b8152602060048201526012602482015271195d1a195c880f081b1bd859105b5bdd5b9d60721b604482015290519081900360640190fd5b612ed5565b612e9660578363ffffffff168154811061124a57fe5b612ed5576040805162461bcd60e51b815260206004820152601e602482015260008051602061486f833981519152604482015290519081900360640190fd5b602085015160408601516060870151600090811a90612ef688858585613f87565b60408051606083811b6bffffffffffffffffffffffff19166020830152603482018c905260006054830181905260f08c901b6001600160f01b0319166058840152605a830181905260e08b901b6001600160e01b031916605c84015290820152815180820360440181526064909101909152909150612f749061344d565b505050505050505050565b6050546001600160a01b031681565b60575463ffffffff821610612fea576040805162461bcd60e51b815260206004820152601d60248201527f746f6b656e20686173206e6f74206265656e2072656769737465726564000000604482015290519081900360640190fd5b6000612ff58361337a565b9050600160c01b8110613048576040805162461bcd60e51b81526020600482015260166024820152750c2dadeeadce840d8c2e4cecae440e8d0c2dc40dac2f60531b604482015290519081900360640190fd5b60ff63ffffffff851611801561306a575060615463ffffffff90811690851611155b6130ad576040805162461bcd60e51b815260206004820152600f60248201526e0d2dcecc2d8d2c840cce4deda92c8f608b1b604482015290519081900360640190fd5b6040805133606090811b60208301526000603483018190526001600160e01b031960e089811b8216605486015260588501929092526001600160f01b031960f089901b16605a8501529086901b16605c830152600160e01b908201528151604481830301815260649091019091526113129061344d565b600054610100900460ff168061313d575061313d614055565b8061314b575060005460ff16155b6131865760405162461bcd60e51b815260040180806020018281038252602e815260200180614841602e913960400191505060405180910390fd5b600054610100900460ff161580156131b1576000805460ff1961ff0019909116610100171660011790555b6131bb8e8e61405b565b605b80546001600160a01b03808c166001600160a01b031992831617909255605a869055605d8590556061805463ffffffff191660ff17905560598054928f16929091169190911790556000605e55600160605561321a878787614101565b6132268b8b848b6141e2565b605780546001810182556000919091527fe8e5595d268aaa85b36c3557e9d96c14a4fffaee9f45bcae0c407968a71096300180546001600160a01b03191690558015613278576000805461ff00191690555b5050505050505050505050505050565b604f546001600160a01b031633146132e0576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b621275008167ffffffffffffffff161115613342576040805162461bcd60e51b815260206004820152601c60248201527f45786365656473204d41585f5749544844524157414c5f44454c415900000000604482015290519081900360640190fd5b6050805467ffffffffffffffff909216600160a01b0267ffffffffffffffff60a01b19909216919091179055565b600181565b60ff81565b60006103ff8216601f600b84901c166001600a85811c8216919083900a9081850290831480156133a957508315155b156133b45760028204015b9450505050505b919050565b604080516323b872dd60e01b81523360048201526001600160a01b0383811660248301526044820185905291516000928616916323b872dd91606480830192602092919082900301818787803b15801561341957600080fd5b505af115801561342d573d6000803e3d6000fd5b505050506040513d602081101561344357600080fd5b5051949350505050565b605c600060605481526020019081526020016000208160405160200180838054600181600116156101000203166002900480156134c15780601f1061349f5761010080835404028352918201916134c1565b820191906000526020600020905b8154815290600101906020018083116134ad575b5050825160208401908083835b602083106134ed5780518252601f1990920191602091820191016134ce565b51815160209384036101000a60001901801990921691161790526040805192909401828103601f1901835284526060546000908152605c825293909320815161353f97509095509201925061473f9050565b506060546000908152605c602052604081205460449060026000196101006001841615020190911604049050806060547f44ed7960659190edb7acf74ac1bd6c7e8803bfa3aebe02c4599a0770fac3f884846040518080602001828103825283818151815260200191508051906020019080838360005b838110156135ce5781810151838201526020016135b6565b50505050905090810190601f1680156135fb5780820380516001836020036101000a031916815260200191505b509250505060405180910390a360808110611e1f576060805460010190555050565b6001600160a01b03821660009081526052602052604081205461364257506000611c49565b506001600160a01b0391909116600090815260526020526040902054670de0b6b3a764000091020490565b60008161367d575061ffff6133bb565b60005b60058163ffffffff1610156136c25760368163ffffffff16600581106136a257fe5b600502015483116136ba5763ffffffff1690506133bb565b600101613680565b506040805162461bcd60e51b8152602060048201526011602482015270195e18d95959081b585e08185b5bdd5b9d607a1b604482015290519081900360640190fd5b600080613711848461361d565b9050600061371e8261366d565b905061ffff811461380257613732816142e5565b60006036826005811061374157fe5b60050201600201541161379b576040805162461bcd60e51b815260206004820152601a60248201527f696e7374616e74207769746864726177616c7320776173746564000000000000604482015290519081900360640190fd5b603681600581106137a857fe5b6005020160040154603682600581106137bd57fe5b600502016002015414156137e55743603682600581106137d957fe5b60050201600101819055505b603681600581106137f257fe5b6005020160020180546000190190555b506001949350505050565b60408051600480825260a08201909252606091829190602082016080803683370190505090508663ffffffff168160008151811061384757fe5b60200260200101818152505060208665ffffffffffff16901b65ffffffffffff168160008151811061387557fe5b602002602001018181511791508181525050604860ff85901c901b8160008151811061389d57fe5b60200260200101818151179150818152505084816001815181106138bd57fe5b602090810291909101015280516001600160ff1b03851690829060029081106138e257fe5b602002602001018181525050826001600160a01b03168160038151811061390557fe5b60209081029190910101529695505050505050565b60355460405163311083ed60e21b81526020600482018181528451602484015284516000946001600160a01b03169363c4420fb49387939283926044019180860191028083838b5b8381101561397a578181015183820152602001613962565b505050509050019250505060206040518083038186803b15801561399d57600080fd5b505afa1580156139b1573d6000803e3d6000fd5b505050506040513d60208110156139c757600080fd5b505192915050565b60345460405163311083ed60e21b81526020600482018181528451602484015284516000946001600160a01b03169363c4420fb49387939283926044019185810191028083838b831561397a578181015183820152602001613962565b600080613a398484614381565b8551909150600090600019015b60008112613aa657868181518110613a5a57fe5b60200260200101519150600081876000821215613a7357fe5b6001911c811614905080613a9057613a8b8484614407565b613a9a565b613a9a8385614407565b93505060001901613a46565b5050909414949350505050565b6000836001600160a01b031663a9059cbb84846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561341957600080fd5b6000836001600160a01b031663095ea7b383856040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561341957600080fd5b60004660608415613bb657613baf89898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061446a92505050565b9050613bd9565b604080516144008082526144208201909252906020820181803683370190505090505b6060600b60538681548110613bea57fe5b9060005260206000209060020201600101540261456a0167ffffffffffffffff81118015613c1757600080fd5b506040519080825280601f01601f191660200182016040528015613c42576020820181803683370190505b5090506060606160009054906101000a900463ffffffff168e6054548f8f604051602001808663ffffffff1660e01b81526004018563ffffffff1660e01b8152600401848152602001838152602001828152602001955050505050506040516020818303038152906040529050600080602083019150602084019050613cca828285516146a1565b825181019050602085019150613ce2828287516146a1565b84518101905060208b0191508a51600b60538a81548110613cff57fe5b906000526020600020906002020160010154020381019050613d2382828d516146a1565b8a518101905060208a019150613d3b82828c516146a1565b8951810190508560f01b81527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016002856040518082805190602001908083835b60208310613d9a5780518252601f199092019160209182019101613d7b565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015613dd9573d6000803e3d6000fd5b5050506040513d6020811015613dee57600080fd5b505181613df757fe5b0696505050505050509998505050505050505050565b60538181548110613e1a57fe5b60009182526020909120600290910201546040805163624c8f8760e01b81526001600160a01b039092169163624c8f879188918891889188916004909101908190869080828437600083820152601f01601f1916909101905084608080828437600083820152601f01601f1916909101905083604080828437600083820152601f01601f19169091019283525050604051602080830195509350915081900382018186803b158015613ecb57600080fd5b505afa158015613edf573d6000803e3d6000fd5b505050506040513d6020811015613ef557600080fd5b50511515600114611778576040805162461bcd60e51b815260206004820152601b60248201527f7a6b2d736e61726b2070726f6f66206973206e6f742076616c69640000000000604482015290519081900360640190fd5b605f546000908152605c60205260408120613f67916147bd565b605f8054600101908190556060541415613f85576060805460010190555b565b6000808560405160200180807f19457468657265756d205369676e6564204d6573736167653a0a393800000000815250601c01806148b96042913960420182815260200191505060405160208183030381529060405280519060200120905060018184878760405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015614040573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b303b1590565b60005b82518161ffff161015612bb75760536040518060400160405280858461ffff168151811061408857fe5b60200260200101516001600160a01b03168152602001848461ffff16815181106140ae57fe5b602090810291909101810151909152825460018082018555600094855293829020835160029092020180546001600160a01b0319166001600160a01b03909216919091178155910151908201550161405e565b600054610100900460ff168061411a575061411a614055565b80614128575060005460ff16155b6141635760405162461bcd60e51b815260040180806020018281038252602e815260200180614841602e913960400191505060405180910390fd5b600054610100900460ff1615801561418e576000805460ff1961ff0019909116610100171660011790555b603380546001600160a01b038087166001600160a01b0319928316179092556034805486841690831617905560358054928516929091169190911790558015611312576000805461ff001916905550505050565b600054610100900460ff16806141fb57506141fb614055565b80614209575060005460ff16155b6142445760405162461bcd60e51b815260040180806020018281038252602e815260200180614841602e913960400191505060405180910390fd5b600054610100900460ff1615801561426f576000805460ff1961ff0019909116610100171660011790555b604f80546001600160a01b03199081166001600160a01b03888116919091179092556050805482168784161767ffffffffffffffff60a01b1916600160a01b67ffffffffffffffff881602179055605180549091169184169190911790558015611778576000805461ff00191690555050505050565b6000603682600581106142f457fe5b600502019050600081600101544303905081600401548260020154148061431e5750816003015481105b1561432a57505061437e565b60008260030154828161433957fe5b0490508260040154818460020154011061435c5760048301546002840155611312565b6002830180548201905560038301546001840180549183029190910190555050505b50565b604080516003808252608082019092526000916060919060208201838036833701905050905083816000815181106143b557fe5b60200260200101818152505082816001815181106143cf57fe5b6020026020010181815250506001816002815181106143ea57fe5b6020026020010181815250506143ff816139cf565b949350505050565b6040805160028082526060808301845260009390929190602083019080368337019050509050838160008151811061443b57fe5b602002602001018181525050828160018151811061445557fe5b6020026020010181815250506143ff816146e2565b60606000606583518161447957fe5b605f546000908152605c60209081526040918290208054835160026001831615610100026000190190921691909104601f81018490048402820184019094528381529490930494506060939291908301828280156145185780601f106144ed57610100808354040283529160200191614518565b820191906000526020600020905b8154815290600101906020018083116144fb57829003601f168201915b505050505090506000604482518161452c57fe5b0490506101008382011115614579576040805162461bcd60e51b815260206004820152600e60248201526d4c31205458206f766572666c6f7760901b604482015290519081900360640190fd5b6040805161440080825261442082019092526060916020820181803683370190505090506000806020850191506020830190506145b8828287516146a1565b6020888101906044860285010160005b888110156146925782516001840151602185015160418601516061870151605754606590980197909460f81c9392919060e086901c908110614651576040805162461bcd60e51b815260206004820152601d60248201527f746f6b656e20686173206e6f74206265656e2072656769737465726564000000604482015290519081900360640190fd5b600060ff86161561466b5761466883858789613f87565b90505b60601b8852601488019190915260e01b603c870152505060449093019250506001016145c8565b50939998505050505050505050565b5b602081106146c1578251825260209283019290910190601f19016146a2565b915181516020939093036101000a6000190180199091169216919091179052565b60335460405163311083ed60e21b81526020600482018181528451602484015284516000946001600160a01b03169363c4420fb49387939283926044019185810191028083838b831561397a578181015183820152602001613962565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061478057805160ff19168380011785556147ad565b828001600101855582156147ad579182015b828111156147ad578251825591602001919060010190614792565b506147b99291506147fd565b5090565b50805460018160011615610100020316600290046000825580601f106147e3575061437e565b601f01602090049060005260206000209081019061437e91905b5b808211156147b957600081556001016147fe56fe63616e2774206265206d6f7265207769746864726177616c73207468616e204d6178207769746864726177616c73436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a65644661696c206465706f736974204552433230207472616e73616374696f6e0000666f7267652074696d656f7574206d757374206265206c657373207468616e2032343020626c6f636b734920617574686f72697a65207468697320626162796a75626a7562206b657920666f72206865726d657a20726f6c6c7570206163636f756e74206372656174696f6e6465706f73697420616d6f756e74206c6172676572207468616e206d61780000a26469706673582212200176189133de85bb288b8c50dabcb1b8969841d43650a1f1f18c4943a908ab0264736f6c634300060c0033" +var HermezBin = "0x608060405234801561001057600080fd5b5061586680620000216000396000f3fe6080604052600436106102235760003560e01c806386c6acc111610123578063bded9bb8116100ab578063dd46bf841161006f578063dd46bf8414610d79578063e56e27ae14610d8e578063e796fcf314610da3578063e9b5269c14610e4b578063ef4a5c4a14610e8c57610223565b8063bded9bb814610c86578063c63cc3a014610c9b578063cbd7b5fb14610d07578063d0f32e6714610d34578063d486645c14610d4957610223565b80639f34e9a3116100f25780639f34e9a314610bdd578063a327583814610bf2578063a7ab696114610c07578063abe3219c14610c1c578063ac171d2814610c3157610223565b806386c6acc114610b0057806395a09f2a14610b335780639b51fb0d14610b5e5780639ead722214610bb357610223565b806338330200116101b157806368e95e531161017557806368e95e53146108de5780636e7e13651461096f57806379a135e314610ac157806384ef9ed414610ad6578063864eb16414610aeb57610223565b806338330200146105bc578063432dd51f1461060e57806344e0b2ce146106fa5780634ee51c261461070f578063506d5463146108ab57610223565b80631a748c2d116101f85780631a748c2d146103c65780631b0a8223146104f65780632bd8362614610527578063314e5eda1461053c578063375110aa1461056657610223565b806223de29146102285780624aca6e1461031d5780630dd94b96146103625780630ee8e52b146103b1575b600080fd5b34801561023457600080fd5b5061031b600480360360c081101561024b57600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561028d57600080fd5b82018360208201111561029f57600080fd5b803590602001918460018302840111600160201b831117156102c057600080fd5b919390929091602081019035600160201b8111156102dd57600080fd5b8201836020820111156102ef57600080fd5b803590602001918460018302840111600160201b8311171561031057600080fd5b509092509050610ebf565b005b34801561032957600080fd5b506103506004803603602081101561034057600080fd5b50356001600160a01b0316611241565b60408051918252519081900360200190f35b34801561036e57600080fd5b506103956004803603602081101561038557600080fd5b50356001600160a01b0316611253565b604080516001600160401b039092168252519081900360200190f35b3480156103bd57600080fd5b5061039561126e565b3480156103d257600080fd5b5061031b600480360360408110156103e957600080fd5b810190602081018135600160201b81111561040357600080fd5b82018360208201111561041557600080fd5b803590602001918460208302840111600160201b8311171561043657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561048557600080fd5b82018360208201111561049757600080fd5b803590602001918460208302840111600160201b831117156104b857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611284945050505050565b34801561050257600080fd5b5061050b6113b1565b604080516001600160a01b039092168252519081900360200190f35b34801561053357600080fd5b5061050b6113c0565b34801561054857600080fd5b5061031b6004803603602081101561055f57600080fd5b50356113cf565b34801561057257600080fd5b506105a86004803603604081101561058957600080fd5b5080356001600160a01b031690602001356001600160c01b0316611462565b604080519115158252519081900360200190f35b3480156105c857600080fd5b506105e6600480360360208110156105df57600080fd5b50356114fe565b604080516001600160a01b039094168452602084019290925282820152519081900360600190f35b34801561061a57600080fd5b5061031b600480360360e081101561063157600080fd5b63ffffffff823516916001600160c01b036020820135169160408201359165ffffffffffff6060820135169181019060a081016080820135600160201b81111561067a57600080fd5b82018360208201111561068c57600080fd5b803590602001918460208302840111600160201b831117156106ad57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505065ffffffffffff83351693505050602001351515611538565b34801561070657600080fd5b5061039561173d565b34801561071b57600080fd5b5061031b60048036036101c081101561073357600080fd5b810190602081018135600160201b81111561074d57600080fd5b82018360208201111561075f57600080fd5b803590602001918460208302840111600160201b8311171561078057600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156107cf57600080fd5b8201836020820111156107e157600080fd5b803590602001918460208302840111600160201b8311171561080257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505081356001600160a01b0390811693506020830135811692604081013582169250606081013560ff169160808201359160a081013582169160c082013581169160e08101358216916101008201358116916101208101358216916101408201356001600160401b03169161016001351661174c565b3480156108b757600080fd5b50610350600480360360208110156108ce57600080fd5b50356001600160401b0316611a00565b3480156108ea57600080fd5b5061031b600480360361028081101561090257600080fd5b6040805160a0810190915290820191906102808201908260056000835b82821015610960576040805160808181019092529080840286019060049083908390808284376000920191909152505050815260019091019060200161091f565b50929550611a12945050505050565b34801561097b57600080fd5b5061031b600480360361020081101561099357600080fd5b65ffffffffffff8235169160208101359160408201359190810190608081016060820135600160201b8111156109c857600080fd5b8201836020820111156109da57600080fd5b803590602001918460018302840111600160201b831117156109fb57600080fd5b919390929091602081019035600160201b811115610a1857600080fd5b820183602082011115610a2a57600080fd5b803590602001918460018302840111600160201b83111715610a4b57600080fd5b919390929091602081019035600160201b811115610a6857600080fd5b820183602082011115610a7a57600080fd5b803590602001918460018302840111600160201b83111715610a9b57600080fd5b919350915060ff8135169060208101351515906040810190608081019061010001611b9b565b348015610acd57600080fd5b5061050b61204a565b348015610ae257600080fd5b50610395612059565b348015610af757600080fd5b5061050b612068565b348015610b0c57600080fd5b5061035060048036036020811015610b2357600080fd5b50356001600160401b0316612077565b348015610b3f57600080fd5b50610b48612089565b6040805160ff9092168252519081900360200190f35b348015610b6a57600080fd5b50610b8860048036036020811015610b8157600080fd5b503561208e565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b348015610bbf57600080fd5b5061050b60048036036020811015610bd657600080fd5b50356120c0565b348015610be957600080fd5b506103506120e7565b348015610bfe57600080fd5b50610b486120ed565b348015610c1357600080fd5b506103956120fd565b348015610c2857600080fd5b5061031b612113565b61031b600480360360c0811015610c4757600080fd5b5080359065ffffffffffff602082013581169161ffff604082013581169260608301359091169163ffffffff6080820135169160a0909101351661228b565b348015610c9257600080fd5b50610350612401565b348015610ca757600080fd5b5061031b60048036036101a0811015610cbf57600080fd5b506040810160c0820163ffffffff610100840135166001600160c01b036101208501351665ffffffffffff610140860135811690610160870135166101808701351515612407565b348015610d1357600080fd5b5061031b60048036036020811015610d2a57600080fd5b503560ff16612802565b348015610d4057600080fd5b506103956128ff565b348015610d5557600080fd5b50610d5e612915565b6040805165ffffffffffff9092168252519081900360200190f35b348015610d8557600080fd5b5061050b61292a565b348015610d9a57600080fd5b5061050b612939565b348015610daf57600080fd5b50610dd660048036036020811015610dc657600080fd5b50356001600160401b0316612948565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610e10578181015183820152602001610df8565b50505050905090810190601f168015610e3d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610e5757600080fd5b506105a860048036036040811015610e6e57600080fd5b5080356001600160401b0316906020013565ffffffffffff166129e3565b348015610e9857600080fd5b5061031b60048036036020811015610eaf57600080fd5b50356001600160401b0316612a03565b82610f11576040805162461bcd60e51b815260206004820152601860248201527f53656e642045524337373720776974686f757420646174610000000000000000604482015290519081900360640190fd5b600084846020811015610f2357600080fd5b50356001600160e01b0319169050631582e3a560e31b8114156111105760008080808080610f548a6004818e61564f565b60c0811015610f6257600080fd5b50605980548235985065ffffffffffff60208401358116985061ffff604085013581169850606085013516965063ffffffff608085013516955060a0909301359092169250339184908110610fb357fe5b6000918252602090912001546001600160a01b03161461101a576040805162461bcd60e51b815260206004820152601760248201527f746f6b656e20494420646f6573206e6f74206d61746368000000000000000000604482015290519081900360640190fd5b600061102533612ae9565b905061ffff8516156110f557600061103c86612c3a565b9050600160801b8110611096576040805162461bcd60e51b815260206004820181905260248201527f6465706f73697420616d6f756e74206c6172676572207468616e206c696d6974604482015290519081900360640190fd5b818e8161109f57fe5b0481146110f3576040805162461bcd60e51b815260206004820152601a60248201527f6c6f6164416d6f756e7420213d20746f6b656e20616d6f756e74000000000000604482015290519081900360640190fd5b505b6111048f888888888888612c7e565b50505050505050611236565b6001600160e01b0319811663d48bfca760e01b14156111f457605f546001600160a01b0316331461117a576040805162461bcd60e51b815260206004820152600f60248201526e36bab9ba103830bc9034b7102422ad60891b604482015290519081900360640190fd5b605b5486146111c1576040805162461bcd60e51b815260206004820152600e60248201526d3737ba1032b737bab3b4102422ad60911b604482015290519081900360640190fd5b6111ef6111d1856004818961564f565b60208110156111df57600080fd5b50356001600160a01b0316612edd565b611236565b6040805162461bcd60e51b81526020600482015260126024820152714e6f742076616c69642063616c6c6461746160701b604482015290519081900360640190fd5b505050505050505050565b605a6020526000908152604090205481565b6052602052600090815260409020546001600160401b031681565b605e54600160801b90046001600160401b031681565b604f546001600160a01b031633146112dc576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b8051825114611332576040805162461bcd60e51b815260206004820152601760248201527f646966666572656e74206172726179206c656e67746820000000000000000000604482015290519081900360640190fd5b60005b82518110156113ac5781818151811061134a57fe5b60200260200101516052600085848151811061136257fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805467ffffffffffffffff19166001600160401b0392909216919091179055600101611335565b505050565b6051546001600160a01b031681565b605c546001600160a01b031681565b604f546001600160a01b03163314611427576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b605b8190556040805182815290517fd1c873cd16013f0dc5f37992c0d12794389698512895ec036a568e393b46e3c19181900360200190a150565b60008061146f8484613081565b9050806114805760019150506114f8565b600061148b82613357565b905060006036826005811061149c57fe5b6005020190506000816002015411156114bb57600193505050506114f8565b60006114d48260010154436133cd90919063ffffffff16565b905081600301548110156114ef5760009450505050506114f8565b60019450505050505b92915050565b6053818154811061150b57fe5b60009182526020909120600390910201805460018201546002909201546001600160a01b03909116925083565b80156115aa5761156f60598863ffffffff168154811061155457fe5b6000918252602090912001546001600160a01b031687613416565b6115aa5760405162461bcd60e51b815260040180806020018281038252602d815260200180615713602d913960400191505060405180910390fd5b60606115c3886000896001600160c01b03168933613560565b905060006115d08261366d565b65ffffffffffff80881660009081526057602090815260408083205460588352818420948a168452939091529020549192509060ff1615611658576040805162461bcd60e51b815260206004820152601e60248201527f776974686472617720686173206265656e20616c726561647920646f6e650000604482015290519081900360640190fd5b61166c81878765ffffffffffff1685613722565b15156001146116b6576040805162461bcd60e51b81526020600482015260116024820152701cdb5d081c1c9bdbd9881a5b9d985b1a59607a1b604482015290519081900360640190fd5b65ffffffffffff8088166000908152605860209081526040808320938916835292905220805460ff191660011790556116f0898b866137a9565b8315158765ffffffffffff168665ffffffffffff167f92dd99230eaf5e3f1238fbbd0d72b34e8c2ad759886075bfc9f426ebeeea34f060405160405180910390a450505050505050505050565b6055546001600160401b031681565b600054610100900460ff16806117655750611765613ca9565b80611773575060005460ff16155b6117ae5760405162461bcd60e51b815260040180806020018281038252602e815260200180615795602e913960400191505060405180910390fd5b600054610100900460ff161580156117d9576000805460ff1961ff0019909116610100171660011790555b6117e38f8f613caf565b8c605460006101000a8154816001600160a01b0302191690836001600160a01b031602179055508b605c60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508a605f60006101000a8154816001600160a01b0302191690836001600160a01b0316021790555089605e60186101000a81548160ff021916908360ff16021790555088605b8190555060ff605460146101000a81548165ffffffffffff021916908365ffffffffffff1602179055506001605e60106101000a8154816001600160401b0302191690836001600160401b03160217905550605960009080600181540180825580915050600190039060005260206000200160009091909190916101000a8154816001600160a01b0302191690836001600160a01b03160217905550731820a4b7618bde71dce8cdc73aab6c95905fad246001600160a01b03166329965a1d307fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b306040518463ffffffff1660e01b815260040180846001600160a01b03168152602001838152602001826001600160a01b031681526020019350505050600060405180830381600087803b1580156119ae57600080fd5b505af11580156119c2573d6000803e3d6000fd5b505050506119d1888888613d7b565b6119dd85858585613e5c565b80156119ef576000805461ff00191690555b505050505050505050505050505050565b60576020526000908152604090205481565b604f546001600160a01b03163314611a6a576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b60005b6005811015611b97576000828260058110611a8457fe5b60200201515190506000838360058110611a9a57fe5b60200201516001602002015190506000848460058110611ab657fe5b60200201516040015190506000858560058110611acf57fe5b602002015160600151905080831115611b195760405162461bcd60e51b815260040180806020018281038252602c8152602001806156a0602c913960400191505060405180910390fd5b6040518060a001604052808581526020014381526020018481526020018381526020018281525060368660058110611b4d57fe5b600502016000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040155905050505050508080600101915050611a6d565b5050565b333214611bd95760405162461bcd60e51b81526004018080602001828103825260348152602001806157406034913960400191505060405180910390fd5b605c546040805163041d8fb560e51b815233600482015243602482015290516001600160a01b03909216916383b1f6a091604480820192602092909190829003018186803b158015611c2a57600080fd5b505afa158015611c3e573d6000803e3d6000fd5b505050506040513d6020811015611c5457600080fd5b50511515600114611cac576040805162461bcd60e51b815260206004820152601860248201527f61756374696f6e2064656e6965642074686520666f7267650000000000000000604482015290519081900360640190fd5b83611d1357605e54600160c01b810460ff166001600160401b0391821601164310611d13576040805162461bcd60e51b8152602060048201526012602482015271130c530c90985d18da081c995c5d5a5c995960721b604482015290519081900360640190fd5b6000611d228f8f8f888a613f5e565b905060538660ff1681548110611d3457fe5b60009182526020918290206003909102015460408051928301815283835280516343753b4d60e01b81526001600160a01b03909216926343753b4d9288928892889290916004909101908190869080828437600083820152601f01601f1916909101905084608080828437600083820152601f01601f1916909101905083604080828437600081840152601f19601f82011690508083019250505082600160200280838360005b83811015611df3578181015183820152602001611ddb565b5050505090500194505050505060206040518083038186803b158015611e1857600080fd5b505afa158015611e2c573d6000803e3d6000fd5b505050506040513d6020811015611e4257600080fd5b5051611e8c576040805162461bcd60e51b815260206004820152601460248201527334b73b30b634b2103937b6363ab810383937b7b360611b604482015290519081900360640190fd5b6055600081819054906101000a90046001600160401b03168092919060010191906101000a8154816001600160401b0302191690836001600160401b03160217905550508e605460146101000a81548165ffffffffffff021916908365ffffffffffff1602179055508d60566000605560009054906101000a90046001600160401b03166001600160401b03166001600160401b03168152602001908152602001600020819055508c60576000605560009054906101000a90046001600160401b03166001600160401b03166001600160401b03168152602001908152602001600020819055508415611f9d57605e805467ffffffffffffffff1916436001600160401b0316179055611f9d614228565b605c54604080516309cb4a2f60e31b815233600482015290516001600160a01b0390921691634e5a51789160248082019260009290919082900301818387803b158015611fe957600080fd5b505af1158015611ffd573d6000803e3d6000fd5b50506055546040516001600160401b0390911692507fd7ab70a9e6ed0d6985e74c5cb553d300a13a2217d58266922b275b72fe7869829150600090a2505050505050505050505050505050565b605f546001600160a01b031681565b605e546001600160401b031681565b6054546001600160a01b031681565b60566020526000908152604090205481565b60f081565b6036816005811061209b57fe5b6005020180546001820154600283015460038401546004909401549294509092909185565b605981815481106120cd57fe5b6000918252602090912001546001600160a01b0316905081565b60595490565b605e54600160c01b900460ff1681565b605054600160a01b90046001600160401b031681565b6050546001600160a01b03163314806121365750604f546001600160a01b031633145b612187576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79207361666520626f74206f7220676f766572616e6365000000000000604482015290519081900360640190fd5b60005b6005811015612212576040518060a00160405280600081526020016000815260200160008152602001600081526020016000815250603682600581106121cc57fe5b600502016000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040155905050808060010191505061218a565b5060515460505460408051630e670af560e01b8152600160a01b9092046001600160401b03166004830152516001600160a01b0390921691630e670af59160248082019260009290919082900301818387803b15801561227157600080fd5b505af1158015612285573d6000803e3d6000fd5b50505050565b60595463ffffffff8316106122e7576040805162461bcd60e51b815260206004820152601d60248201527f746f6b656e20686173206e6f74206265656e2072656769737465726564000000604482015290519081900360640190fd5b60006122f285612c3a565b9050600160801b811061234c576040805162461bcd60e51b815260206004820181905260248201527f6465706f73697420616d6f756e74206c6172676572207468616e206c696d6974604482015290519081900360640190fd5b80156123e95763ffffffff83166123b6573481146123b1576040805162461bcd60e51b815260206004820152601760248201527f6c6f6164416d6f756e7420213d206d73672e76616c7565000000000000000000604482015290519081900360640190fd5b6123e9565b6123e960598463ffffffff16815481106123cc57fe5b6000918252602090912001546001600160a01b03163330846142d6565b6123f833888888888888612c7e565b50505050505050565b605b5481565b80156124795761243e60598663ffffffff168154811061242357fe5b6000918252602090912001546001600160a01b031685613416565b6124795760405162461bcd60e51b815260040180806020018281038252602d815260200180615713602d913960400191505060405180910390fd5b65ffffffffffff80841660009081526058602090815260408083209386168352929052205460ff16156124f3576040805162461bcd60e51b815260206004820152601e60248201527f776974686472617720686173206265656e20616c726561647920646f6e650000604482015290519081900360640190fd5b65ffffffffffff831660009081526057602090815260408083205481518084018290523360601b818401526001600160e01b031960e08b901b16605482015267ffffffffffffffff1989841b1660588201526001600160d01b031960d088901b1660708201528251605681830301815260769091019283905280519194937f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019360029390918291908401908083835b602083106125c15780518252601f1990920191602091820191016125a2565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015612600573d6000803e3d6000fd5b5050506040513d602081101561261557600080fd5b50518161261e57fe5b605454604080516020810182529390920680845282516343753b4d60e01b81529094506001600160a01b03909116926343753b4d928e928e928e929091600401908190869080828437600083820152601f01601f1916909101905084608080828437600083820152601f01601f1916909101905083604080828437600081840152601f19601f82011690508083019250505082600160200280838360005b838110156126d45781810151838201526020016126bc565b5050505090500194505050505060206040518083038186803b1580156126f957600080fd5b505afa15801561270d573d6000803e3d6000fd5b505050506040513d602081101561272357600080fd5b5051151560011461277b576040805162461bcd60e51b815260206004820152601b60248201527f7a6b2d736e61726b2070726f6f66206973206e6f742076616c69640000000000604482015290519081900360640190fd5b65ffffffffffff8086166000908152605860209081526040808320938816835292905220805460ff191660011790556127b58688856137a9565b8215158565ffffffffffff168565ffffffffffff167f92dd99230eaf5e3f1238fbbd0d72b34e8c2ad759886075bfc9f426ebeeea34f060405160405180910390a450505050505050505050565b604f546001600160a01b0316331461285a576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b60f060ff821611156128ab576040805162461bcd60e51b8152602060048201526015602482015274199bdc99d9481d1a5b595bdd5d08195e18d9591959605a1b604482015290519081900360640190fd5b605e805460ff8316600160c01b810260ff60c01b199092169190911790915560408051918252517fff6221781ac525b04585dbb55cd2ebd2a92c828ca3e42b23813a1137ac9744319181900360200190a150565b605e54600160401b90046001600160401b031681565b605454600160a01b900465ffffffffffff1681565b604f546001600160a01b031681565b6050546001600160a01b031681565b605d6020908152600091825260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156129db5780601f106129b0576101008083540402835291602001916129db565b820191906000526020600020905b8154815290600101906020018083116129be57829003601f168201915b505050505081565b605860209081526000928352604080842090915290825290205460ff1681565b604f546001600160a01b03163314612a5b576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b62127500816001600160401b03161115612abc576040805162461bcd60e51b815260206004820152601c60248201527f45786365656473204d41585f5749544844524157414c5f44454c415900000000604482015290519081900360640190fd5b605080546001600160401b03909216600160a01b0267ffffffffffffffff60a01b19909216919091179055565b604080518082018252600d81526c6772616e756c6172697479282960981b60209182015281516004815260248101835290810180516001600160e01b031663556f0dc760e01b1781529151815160009384936060936001600160a01b03881693919290918291908083835b60208310612b735780518252601f199092019160209182019101612b54565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612bd3576040519150601f19603f3d011682016040523d82523d6000602084013e612bd8565b606091505b509150915081612c195760405162461bcd60e51b81526004018080602001828103825260228152602001806156f16022913960400191505060405180910390fd5b808060200190516020811015612c2e57600080fd5b5051925050505b919050565b60006103ff8216601f600b84901c166001600a85811c8216919083900a908185029083148015612c6957508315155b15612c745760028204015b9695505050505050565b6000612c8984612c3a565b9050600160c01b8110612ce3576040805162461bcd60e51b815260206004820152601860248201527f616d6f756e74206c6172676572207468616e206c696d69740000000000000000604482015290519081900360640190fd5b65ffffffffffff8216612d48578015612d43576040805162461bcd60e51b815260206004820152601e60248201527f616d6f756e74206d757374206265203020696620746f49647820697320300000604482015290519081900360640190fd5b612dc9565b60ff65ffffffffffff8316118015612d75575060545465ffffffffffff600160a01b909104811690831611155b80612d88575065ffffffffffff82166001145b612dc9576040805162461bcd60e51b815260206004820152600d60248201526c0d2dcecc2d8d2c840e8de92c8f609b1b604482015290519081900360640190fd5b65ffffffffffff8616612e175786612e125760405162461bcd60e51b81526004018080602001828103825260288152602001806156786028913960400191505060405180910390fd5b612ec4565b60ff65ffffffffffff8716118015612e44575060545465ffffffffffff600160a01b909104811690871611155b612e87576040805162461bcd60e51b815260206004820152600f60248201526e0d2dcecc2d8d2c840cce4deda92c8f608b1b604482015290519081900360640190fd5b8615612ec45760405162461bcd60e51b815260040180806020018281038252602c8152602001806157c3602c913960400191505060405180910390fd5b612ed388888888888888614471565b5050505050505050565b605954600160201b8110612f2d576040805162461bcd60e51b81526020600482015260126024820152711d1bdad95b881b1a5cdd081a5cc8199d5b1b60721b604482015290519081900360640190fd5b6001600160a01b038216612f7d576040805162461bcd60e51b8152602060048201526012602482015271063616e2774206265206164647265737320360741b604482015290519081900360640190fd5b6001600160a01b0382166000908152605a602052604090205415612fe8576040805162461bcd60e51b815260206004820152601b60248201527f746f6b656e206164647265737320616c72656164792061646465640000000000604482015290519081900360640190fd5b60598054600181019091557fd73956b9e00d8f8bc5e44f7184df1387cdd652e7726b8ccda3db4859e02f31bf0180546001600160a01b0319166001600160a01b0384169081179091556000818152605a6020908152604091829020849055815163ffffffff8516815291517fcb73d161edb7cd4fb1d92fedfd2555384fd997fd44ab507656f8c81e15747dde9281900390910190a25050565b6001600160a01b0382166000908152605260205260408120546001600160401b03166130af575060006114f8565b6001600160a01b038316600090815260526020526040812054655af3107a4000906001600160401b03166001600160c01b0385160204905060008060006001600160a01b0316731820a4b7618bde71dce8cdc73aab6c95905fad246001600160a01b031663aabbb8ca887fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce21770546040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561317e57600080fd5b505afa158015613192573d6000803e3d6000fd5b505050506040513d60208110156131a857600080fd5b50516001600160a01b031614156131c05760006131c3565b60015b905080156131d457601291506132e5565b604080518082018252600a815269646563696d616c73282960b01b60209182015281516004815260248101835290810180516001600160e01b031663313ce56760e01b178152915181516000936060936001600160a01b038c16939092909182918083835b602083106132585780518252601f199092019160209182019101613239565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146132b8576040519150601f19603f3d011682016040523d82523d6000602084013e6132bd565b606091505b509150915081156132e2578080602001905160208110156132dd57600080fd5b505193505b50505b604d8260ff161061333d576040805162461bcd60e51b815260206004820152601a60248201527f746f6b656e55534420646563696d616c73206f766572666c6f77000000000000604482015290519081900360640190fd5b8160ff16600a0a838161334c57fe5b049695505050505050565b6000805b600581101561338b576036816005811061337157fe5b60050201548311613383579050612c35565b60010161335b565b506040805162461bcd60e51b8152602060048201526011602482015270195e18d95959081b585e08185b5bdd5b9d607a1b604482015290519081900360640190fd5b600061340f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061464b565b9392505050565b6000806134238484613081565b9050806134345760019150506114f8565b600061343f82613357565b905060006036826005811061345057fe5b600502019050600061346f8260010154436133cd90919063ffffffff16565b905081600301548110156134c3576002820154156134b65781600401548260020154141561349e574360018301555b50600201805460001901905550600191506114f89050565b60009450505050506114f8565b60006134dc8360030154836146e290919063ffffffff16565b905082600401546134fa82856002015461472490919063ffffffff16565b1061351f57600483015461350f9060016133cd565b6002840155436001840155613552565b6002830180548201600019019055600383015461354c9061354190839061477e565b600185015490614724565b60018401555b6001955050505050506114f8565b60408051600480825260a08201909252606091829190602082016080803683370190505090508663ffffffff168160008151811061359a57fe5b60200260200101818152505060208665ffffffffffff16901b65ffffffffffff16816000815181106135c857fe5b602002602001018181511791508181525050604860ff85901c901b816000815181106135f057fe5b602002602001018181511791508181525050848160018151811061361057fe5b602090810291909101015280516001600160ff1b038516908290600290811061363557fe5b602002602001018181525050826001600160a01b03168160038151811061365857fe5b60209081029190910101529695505050505050565b60355460405163311083ed60e21b81526020600482018181528451602484015284516000946001600160a01b03169363c4420fb49387939283926044019180860191028083838b5b838110156136cd5781810151838201526020016136b5565b505050509050019250505060206040518083038186803b1580156136f057600080fd5b505afa158015613704573d6000803e3d6000fd5b505050506040513d602081101561371a57600080fd5b505192915050565b60008061372f84846147d7565b8551909150600090600019015b6000811261379c5786818151811061375057fe5b6020026020010151915060008187600082121561376957fe5b6001911c81161490508061378657613781848461485d565b613790565b613790838561485d565b9350506000190161373c565b5050909414949350505050565b80156137ef576137ea60598363ffffffff16815481106137c557fe5b6000918252602090912001546001600160a01b0316336001600160c01b0386166148c0565b6113ac565b63ffffffff821661387b576051546040805163cfc0b64160e01b81523360048201526000602482018190526001600160c01b0387166044830181905292516001600160a01b039094169363cfc0b6419392606480820193929182900301818588803b15801561385d57600080fd5b505af1158015613871573d6000803e3d6000fd5b50505050506113ac565b600060598363ffffffff168154811061389057fe5b60009182526020808320909101546040805163555ddc6560e11b81526001600160a01b03909216600483018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce2177054602484015290519094508392731820a4b7618bde71dce8cdc73aab6c95905fad249263aabbb8ca9260448083019392829003018186803b15801561392257600080fd5b505afa158015613936573d6000803e3d6000fd5b505050506040513d602081101561394c57600080fd5b50516001600160a01b03161415613964576000613967565b60015b90508015613c0a57600061397a83612ae9565b604080518082018252601b81527f73656e6428616464726573732c75696e743235362c6279746573290000000000602091820152605154825180840184528281527f6465706f73697428616464726573732c616464726573732c75696e7431393229908301528251336024808301919091526001600160a01b03808a1660448085018290526001600160c01b038f168902606480870182905289518088038201815260849788018b5298890180516001600160e01b031663cfc0b64160e01b1781529951979094169487018581529187018190526060938701938452875195870195909552865198995060009891977f9bd9bbc68c9d2d57236e56ab2cc196bd1614295e6e32ba6eba9004e8c27143b697949691939260a4909201918083838d5b83811015613ab3578181015183820152602001613a9b565b50505050905090810190601f168015613ae05780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990991698909817885251815191979096508695509350915081905083835b60208310613b465780518252601f199092019160209182019101613b27565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613ba8576040519150601f19603f3d011682016040523d82523d6000602084013e613bad565b606091505b5050905080613c03576040805162461bcd60e51b815260206004820152601f60248201527f7769746864726177616c2064656c61796572206465706f736974206661696c00604482015290519081900360640190fd5b5050613ca2565b605154613c2b9083906001600160a01b03166001600160c01b038816614e77565b6051546040805163cfc0b64160e01b81523360048201526001600160a01b0385811660248301526001600160c01b03891660448301529151919092169163cfc0b64191606480830192600092919082900301818387803b158015613c8e57600080fd5b505af1158015611236573d6000803e3d6000fd5b5050505050565b303b1590565b60005b82518110156113ac5760536040518060600160405280858481518110613cd457fe5b60200260200101516001600160a01b03168152602001600880868681518110613cf957fe5b6020026020010151901b901c815260200160f8858581518110613d1857fe5b60209081029190910181015190911c909152825460018082018555600094855293829020835160039092020180546001600160a01b0319166001600160a01b03909216919091178155908201518184015560409091015160029091015501613cb2565b600054610100900460ff1680613d945750613d94613ca9565b80613da2575060005460ff16155b613ddd5760405162461bcd60e51b815260040180806020018281038252602e815260200180615795602e913960400191505060405180910390fd5b600054610100900460ff16158015613e08576000805460ff1961ff0019909116610100171660011790555b603380546001600160a01b038087166001600160a01b0319928316179092556034805486841690831617905560358054928516929091169190911790558015612285576000805461ff001916905550505050565b600054610100900460ff1680613e755750613e75613ca9565b80613e83575060005460ff16155b613ebe5760405162461bcd60e51b815260040180806020018281038252602e815260200180615795602e913960400191505060405180910390fd5b600054610100900460ff16158015613ee9576000805460ff1961ff0019909116610100171660011790555b604f80546001600160a01b03199081166001600160a01b03888116919091179092556050805482168784161767ffffffffffffffff60a01b1916600160a01b6001600160401b03881602179055605180549091169184169190911790558015613ca2576000805461ff00191690555050505050565b6055546001600160401b031660009081526056602052604081205460545460538054600160a01b90920465ffffffffffff16918491829182919060ff8916908110613fa557fe5b906000526020600020906003020160010154600860538960ff1681548110613fc957fe5b90600052602060002090600302016002015481613fe257fe5b046002026003010290506000600860538960ff168154811061400057fe5b9060005260206000209060030201600201548161401957fe5b604080519290910481028481018084016148ae0190925261486e909101825260d087811b60208401528e901b6026830152602c8201889052604c82018d9052606c82018c90529150608c810161406f818c614ffb565b6148000161407d6004615249565b9096509450838511156140cd576040805162461bcd60e51b81526020600482015260136024820152726c322074782064617461206f766572666c6f7760681b604482015290519081900360640190fd5b8486823784016140df8186860361525d565b848403016140ed6005615249565b9096509450828514614146576040805162461bcd60e51b815260206004820181905260248201527f666565496478436f6f7264696e61746f72206c656e67746820696e76616c6964604482015290519081900360640190fd5b8486823784016141588186850361525d565b848303810190504660f01b81527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016002836040518082805190602001908083835b602083106141b85780518252601f199092019160209182019101614199565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa1580156141f7573d6000803e3d6000fd5b5050506040513d602081101561420c57600080fd5b50518161421557fe5b069e9d5050505050505050505050505050565b605e54600160401b90046001600160401b03166000908152605d60205260408120614252916155ef565b605e805460016001600160401b03600160401b808404821692909201811682026fffffffffffffffff000000000000000019909316929092179283905582048116600160801b9092041614156142d457605e805460016001600160401b03600160801b808404821692909201160267ffffffffffffffff60801b199091161790555b565b60006060856001600160a01b03166040518060600160405280602581526020016156cc602591398051602091820120604080516001600160a01b03808b166024830152891660448201526064808201899052825180830390910181526084909101825292830180516001600160e01b03166001600160e01b0319909316929092178252518251909182918083835b602083106143835780518252601f199092019160209182019101614364565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146143e5576040519150601f19603f3d011682016040523d82523d6000602084013e6143ea565b606091505b5091509150818015614418575080511580614418575080806020019051602081101561441557600080fd5b50515b614469576040805162461bcd60e51b815260206004820152601960248201527f73616665207472616e736665722066726f6d206661696c656400000000000000604482015290519081900360640190fd5b505050505050565b604080516bffffffffffffffffffffffff1960608a901b16602080830191909152603482018990526001600160d01b031960d089811b821660548501526001600160f01b031960f08a811b8216605a87015289901b16605c8501526001600160e01b031960e088901b16605e808601919091529086901b90911660628401528351604881850301815260689093018452546001600160401b03600160801b909104166000908152605d9091529190912061452b9082615276565b605e54600160801b90046001600160401b03166000818152605d602090815260408083205481518381528651818501528651604860026101006001861615026000190190941693909304929092049560ff87169590947f7f40be4e420c002c02fa9cad961f6a7620769d32d272f3f8c15e3ff59de9310e9489948493918401928601918190849084905b838110156145cd5781810151838201526020016145b5565b50505050905090810190601f1680156145fa5780820380516001836020036101000a031916815260200191505b509250505060405180910390a36080811061123657605e805460016001600160401b03600160801b808404821692909201160267ffffffffffffffff60801b19909116179055505050505050505050565b600081848411156146da5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561469f578181015183820152602001614687565b50505050905090810190601f1680156146cc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600061340f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506153c0565b60008282018381101561340f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008261478d575060006114f8565b8282028284828161479a57fe5b041461340f5760405162461bcd60e51b81526004018080602001828103825260218152602001806157746021913960400191505060405180910390fd5b6040805160038082526080820190925260009160609190602082018380368337019050509050838160008151811061480b57fe5b602002602001018181525050828160018151811061482557fe5b60200260200101818152505060018160028151811061484057fe5b60200260200101818152505061485581615425565b949350505050565b6040805160028082526060808301845260009390929190602083019080368337019050509050838160008151811061489157fe5b60200260200101818152505082816001815181106148ab57fe5b60200260200101818152505061485581615482565b6001600160a01b0383166149ca5760408051600080825260208201909252339083906040518082805190602001908083835b602083106149115780518252601f1990920191602091820191016148f2565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614973576040519150601f19603f3d011682016040523d82523d6000602084013e614978565b606091505b50509050806149c4576040805162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b604482015290519081900360640190fd5b506113ac565b6040805163555ddc6560e11b81526001600160a01b03851660048201527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce2177054602482015290516000918291731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca916044808301926020929190829003018186803b158015614a4f57600080fd5b505afa158015614a63573d6000803e3d6000fd5b505050506040513d6020811015614a7957600080fd5b50516001600160a01b03161415614a91576000614a94565b60015b90508015614cec576000614aa785612ae9565b604080518082018252601b81527f73656e6428616464726573732c75696e743235362c6279746573290000000000602091820152815160008082529181019092529192506060906001600160a01b038816907f9bd9bbc68c9d2d57236e56ab2cc196bd1614295e6e32ba6eba9004e8c27143b69088908887029060405160240180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614b76578181015183820152602001614b5e565b50505050905090810190601f168015614ba35780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990991698909817885251815191979096508695509350915081905083835b60208310614c095780518252601f199092019160209182019101614bea565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c6b576040519150601f19603f3d011682016040523d82523d6000602084013e614c70565b606091505b5091509150818015614c9e575080511580614c9e5750808060200190516020811015614c9b57600080fd5b50515b614ce4576040805162461bcd60e51b8152602060048201526012602482015271115490cdcdcdc81cd95b990819985a5b195960721b604482015290519081900360640190fd5b505050612285565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0386811660248301526044808301879052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b178152925181516000946060948a169392918291908083835b60208310614d995780518252601f199092019160209182019101614d7a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614dfb576040519150601f19603f3d011682016040523d82523d6000602084013e614e00565b606091505b5091509150818015614e2e575080511580614e2e5750808060200190516020811015614e2b57600080fd5b50515b614469576040805162461bcd60e51b8152602060048201526015602482015274115490cc8c081d1c985b9cd9995c8819985a5b1959605a1b604482015290519081900360640190fd5b604080518082018252601881527f617070726f766528616464726573732c75696e7432353629000000000000000060209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180516001600160e01b031663095ea7b360e01b1781529251815160009460609489169392918291908083835b60208310614f245780518252601f199092019160209182019101614f05565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614f86576040519150601f19603f3d011682016040523d82523d6000602084013e614f8b565b606091505b5091509150818015614fb9575080511580614fb95750808060200190516020811015614fb657600080fd5b50515b613ca2576040805162461bcd60e51b815260206004820152600e60248201526d1054141493d59157d1905253115160921b604482015290519081900360640190fd5b6000806150086003615249565b9092509050606581046000606085156150db57605e54600160401b90046001600160401b03166000908152605d60209081526040918290208054835160026101006001841615026000190190921691909104601f81018490048402820184019094528381529290918301828280156150c15780601f10615096576101008083540402835291602001916150c1565b820191906000526020600020905b8154815290600101906020018083116150a457829003601f168201915b5050505050905060488151816150d357fe5b0491506150e0565b600091505b610100838301111561512a576040805162461bcd60e51b815260206004820152600e60248201526d4c31205458206f766572666c6f7760901b604482015290519081900360640190fd5b8115615158576048820287019660208201905b8881101561515557815181526020918201910161513d565b50505b60005b83811015615235576059546065870196803560001a916001820135916021810135916041820135916061013560e01c9081106151de576040805162461bcd60e51b815260206004820152601d60248201527f746f6b656e20686173206e6f74206265656e2072656769737465726564000000604482015290519081900360640190fd5b6001600160a01b0360ff8616156151fe576151fb838587896154df565b90505b60601b8d5260148d0191909152600060348d0181905260e09190911b603e8d015260428c015250506048909801975060010161515b565b506123f8876048858561010003030261525d565b602002600490810135602481019291013590565b808201915b828110156113ac5760008152602001615262565b8154600260018083161561010002038216048251808201602081106020841001600281146153205760018114615345578660005260208404602060002001600160028402018855602085068060200390508088018589016001836101000a0392508282511684540184556001840193506020820191505b8082101561530a57815184556001840193506020820191506152ed565b815191036101000a9081900402909155506123f8565b60028302826020036101000a846020036101000a6020890151040201850187556123f8565b8660005260208404602060002001600160028402018855846020038088018589016001836101000a0392508282511660ff198a160184556020820191506001840193505b808210156153a65781518455600184019350602082019150615389565b815191036101000a90819004029091555050505050505050565b6000818361540f5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561469f578181015183820152602001614687565b50600083858161541b57fe5b0495945050505050565b60345460405163311083ed60e21b81526020600482018181528451602484015284516000946001600160a01b03169363c4420fb49387939283926044019185810191028083838b83156136cd5781810151838201526020016136b5565b60335460405163311083ed60e21b81526020600482018181528451602484015284516000946001600160a01b03169363c4420fb49387939283926044019185810191028083838b83156136cd5781810151838201526020016136b5565b6000808560405160200180807f19457468657265756d205369676e6564204d6573736167653a0a393800000000815250601c01806157ef60429139604201828152602001915050604051602081830303815290604052805190602001209050600060018285888860405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561559a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612c74576040805162461bcd60e51b815260206004820152600a6024820152690657265636f7665722d360b41b604482015290519081900360640190fd5b50805460018160011615610100020316600290046000825580601f106156155750615633565b601f0160209004906000526020600020908101906156339190615636565b50565b5b8082111561564b5760008155600101615637565b5090565b6000808585111561565e578182fd5b8386111561566a578182fd5b505082019391909203915056fe63616e277420637265617465206163636f756e74207769746820626162795075624b6579203d20307769746864726177616c73206d757374206265206c657373207468616e206d61785769746864726177616c737472616e7366657246726f6d28616464726573732c616464726573732c75696e743235362945524337373720646f6e277420696d706c656d656e74206772616e756c6172697479696e7374616e74207769746864726177616c732077617374656420666f722074686973205553442072616e6765666f72676542617463682063616e27742062652063616c6c6564206173206120696e7465726e616c207472616e73616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564626162795075624b6579206d757374206265203020696620757365206578697374696e67206163636f756e744920617574686f72697a65207468697320626162796a75626a7562206b657920666f72206865726d657a20726f6c6c7570206163636f756e74206372656174696f6ea264697066735822122077a11aa776267abae219dc837550f3496a4d51cfa531362d18028a33eb9415d364736f6c634300060c0033" // DeployHermez deploys a new Ethereum contract, binding an instance of Hermez to it. func DeployHermez(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Hermez, error) { @@ -188,394 +188,30 @@ func (_Hermez *HermezTransactorRaw) Transact(opts *bind.TransactOpts, method str return _Hermez.Contract.contract.Transact(opts, method, params...) } -// EXITIDX is a free data retrieval call binding the contract method 0xffd3dcf9. +// ABSOLUTEMAXL1L2BATCHTIMEOUT is a free data retrieval call binding the contract method 0x95a09f2a. // -// Solidity: function EXIT_IDX() view returns(uint32) -func (_Hermez *HermezCaller) EXITIDX(opts *bind.CallOpts) (uint32, error) { +// Solidity: function ABSOLUTE_MAX_L1L2BATCHTIMEOUT() view returns(uint8) +func (_Hermez *HermezCaller) ABSOLUTEMAXL1L2BATCHTIMEOUT(opts *bind.CallOpts) (uint8, error) { var ( - ret0 = new(uint32) + ret0 = new(uint8) ) out := ret0 - err := _Hermez.contract.Call(opts, out, "EXIT_IDX") + err := _Hermez.contract.Call(opts, out, "ABSOLUTE_MAX_L1L2BATCHTIMEOUT") return *ret0, err } -// EXITIDX is a free data retrieval call binding the contract method 0xffd3dcf9. +// ABSOLUTEMAXL1L2BATCHTIMEOUT is a free data retrieval call binding the contract method 0x95a09f2a. // -// Solidity: function EXIT_IDX() view returns(uint32) -func (_Hermez *HermezSession) EXITIDX() (uint32, error) { - return _Hermez.Contract.EXITIDX(&_Hermez.CallOpts) +// Solidity: function ABSOLUTE_MAX_L1L2BATCHTIMEOUT() view returns(uint8) +func (_Hermez *HermezSession) ABSOLUTEMAXL1L2BATCHTIMEOUT() (uint8, error) { + return _Hermez.Contract.ABSOLUTEMAXL1L2BATCHTIMEOUT(&_Hermez.CallOpts) } -// EXITIDX is a free data retrieval call binding the contract method 0xffd3dcf9. +// ABSOLUTEMAXL1L2BATCHTIMEOUT is a free data retrieval call binding the contract method 0x95a09f2a. // -// Solidity: function EXIT_IDX() view returns(uint32) -func (_Hermez *HermezCallerSession) EXITIDX() (uint32, error) { - return _Hermez.Contract.EXITIDX(&_Hermez.CallOpts) -} - -// L1COORDINATORBYTES is a free data retrieval call binding the contract method 0x4d09f3fd. -// -// Solidity: function L1_COORDINATOR_BYTES() view returns(uint256) -func (_Hermez *HermezCaller) L1COORDINATORBYTES(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "L1_COORDINATOR_BYTES") - return *ret0, err -} - -// L1COORDINATORBYTES is a free data retrieval call binding the contract method 0x4d09f3fd. -// -// Solidity: function L1_COORDINATOR_BYTES() view returns(uint256) -func (_Hermez *HermezSession) L1COORDINATORBYTES() (*big.Int, error) { - return _Hermez.Contract.L1COORDINATORBYTES(&_Hermez.CallOpts) -} - -// L1COORDINATORBYTES is a free data retrieval call binding the contract method 0x4d09f3fd. -// -// Solidity: function L1_COORDINATOR_BYTES() view returns(uint256) -func (_Hermez *HermezCallerSession) L1COORDINATORBYTES() (*big.Int, error) { - return _Hermez.Contract.L1COORDINATORBYTES(&_Hermez.CallOpts) -} - -// L1USERBYTES is a free data retrieval call binding the contract method 0x6d78e572. -// -// Solidity: function L1_USER_BYTES() view returns(uint256) -func (_Hermez *HermezCaller) L1USERBYTES(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "L1_USER_BYTES") - return *ret0, err -} - -// L1USERBYTES is a free data retrieval call binding the contract method 0x6d78e572. -// -// Solidity: function L1_USER_BYTES() view returns(uint256) -func (_Hermez *HermezSession) L1USERBYTES() (*big.Int, error) { - return _Hermez.Contract.L1USERBYTES(&_Hermez.CallOpts) -} - -// L1USERBYTES is a free data retrieval call binding the contract method 0x6d78e572. -// -// Solidity: function L1_USER_BYTES() view returns(uint256) -func (_Hermez *HermezCallerSession) L1USERBYTES() (*big.Int, error) { - return _Hermez.Contract.L1USERBYTES(&_Hermez.CallOpts) -} - -// L2BYTES is a free data retrieval call binding the contract method 0x4fc51559. -// -// Solidity: function L2_BYTES() view returns(uint256) -func (_Hermez *HermezCaller) L2BYTES(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "L2_BYTES") - return *ret0, err -} - -// L2BYTES is a free data retrieval call binding the contract method 0x4fc51559. -// -// Solidity: function L2_BYTES() view returns(uint256) -func (_Hermez *HermezSession) L2BYTES() (*big.Int, error) { - return _Hermez.Contract.L2BYTES(&_Hermez.CallOpts) -} - -// L2BYTES is a free data retrieval call binding the contract method 0x4fc51559. -// -// Solidity: function L2_BYTES() view returns(uint256) -func (_Hermez *HermezCallerSession) L2BYTES() (*big.Int, error) { - return _Hermez.Contract.L2BYTES(&_Hermez.CallOpts) -} - -// LASTIDX is a free data retrieval call binding the contract method 0x8e65ab4f. -// -// Solidity: function LAST_IDX() view returns(uint32) -func (_Hermez *HermezCaller) LASTIDX(opts *bind.CallOpts) (uint32, error) { - var ( - ret0 = new(uint32) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "LAST_IDX") - return *ret0, err -} - -// LASTIDX is a free data retrieval call binding the contract method 0x8e65ab4f. -// -// Solidity: function LAST_IDX() view returns(uint32) -func (_Hermez *HermezSession) LASTIDX() (uint32, error) { - return _Hermez.Contract.LASTIDX(&_Hermez.CallOpts) -} - -// LASTIDX is a free data retrieval call binding the contract method 0x8e65ab4f. -// -// Solidity: function LAST_IDX() view returns(uint32) -func (_Hermez *HermezCallerSession) LASTIDX() (uint32, error) { - return _Hermez.Contract.LASTIDX(&_Hermez.CallOpts) -} - -// MAXAMOUNT is a free data retrieval call binding the contract method 0xd40dc870. -// -// Solidity: function MAX_AMOUNT() view returns(uint256) -func (_Hermez *HermezCaller) MAXAMOUNT(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "MAX_AMOUNT") - return *ret0, err -} - -// MAXAMOUNT is a free data retrieval call binding the contract method 0xd40dc870. -// -// Solidity: function MAX_AMOUNT() view returns(uint256) -func (_Hermez *HermezSession) MAXAMOUNT() (*big.Int, error) { - return _Hermez.Contract.MAXAMOUNT(&_Hermez.CallOpts) -} - -// MAXAMOUNT is a free data retrieval call binding the contract method 0xd40dc870. -// -// Solidity: function MAX_AMOUNT() view returns(uint256) -func (_Hermez *HermezCallerSession) MAXAMOUNT() (*big.Int, error) { - return _Hermez.Contract.MAXAMOUNT(&_Hermez.CallOpts) -} - -// MAXL1TX is a free data retrieval call binding the contract method 0x45d1c25b. -// -// Solidity: function MAX_L1_TX() view returns(uint256) -func (_Hermez *HermezCaller) MAXL1TX(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "MAX_L1_TX") - return *ret0, err -} - -// MAXL1TX is a free data retrieval call binding the contract method 0x45d1c25b. -// -// Solidity: function MAX_L1_TX() view returns(uint256) -func (_Hermez *HermezSession) MAXL1TX() (*big.Int, error) { - return _Hermez.Contract.MAXL1TX(&_Hermez.CallOpts) -} - -// MAXL1TX is a free data retrieval call binding the contract method 0x45d1c25b. -// -// Solidity: function MAX_L1_TX() view returns(uint256) -func (_Hermez *HermezCallerSession) MAXL1TX() (*big.Int, error) { - return _Hermez.Contract.MAXL1TX(&_Hermez.CallOpts) -} - -// MAXL1USERTX is a free data retrieval call binding the contract method 0x51ff68b0. -// -// Solidity: function MAX_L1_USER_TX() view returns(uint256) -func (_Hermez *HermezCaller) MAXL1USERTX(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "MAX_L1_USER_TX") - return *ret0, err -} - -// MAXL1USERTX is a free data retrieval call binding the contract method 0x51ff68b0. -// -// Solidity: function MAX_L1_USER_TX() view returns(uint256) -func (_Hermez *HermezSession) MAXL1USERTX() (*big.Int, error) { - return _Hermez.Contract.MAXL1USERTX(&_Hermez.CallOpts) -} - -// MAXL1USERTX is a free data retrieval call binding the contract method 0x51ff68b0. -// -// Solidity: function MAX_L1_USER_TX() view returns(uint256) -func (_Hermez *HermezCallerSession) MAXL1USERTX() (*big.Int, error) { - return _Hermez.Contract.MAXL1USERTX(&_Hermez.CallOpts) -} - -// MAXLOADAMOUNT is a free data retrieval call binding the contract method 0x20f6a08f. -// -// Solidity: function MAX_LOAD_AMOUNT() view returns(uint256) -func (_Hermez *HermezCaller) MAXLOADAMOUNT(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "MAX_LOAD_AMOUNT") - return *ret0, err -} - -// MAXLOADAMOUNT is a free data retrieval call binding the contract method 0x20f6a08f. -// -// Solidity: function MAX_LOAD_AMOUNT() view returns(uint256) -func (_Hermez *HermezSession) MAXLOADAMOUNT() (*big.Int, error) { - return _Hermez.Contract.MAXLOADAMOUNT(&_Hermez.CallOpts) -} - -// MAXLOADAMOUNT is a free data retrieval call binding the contract method 0x20f6a08f. -// -// Solidity: function MAX_LOAD_AMOUNT() view returns(uint256) -func (_Hermez *HermezCallerSession) MAXLOADAMOUNT() (*big.Int, error) { - return _Hermez.Contract.MAXLOADAMOUNT(&_Hermez.CallOpts) -} - -// MAXTOKENS is a free data retrieval call binding the contract method 0xf47c84c5. -// -// Solidity: function MAX_TOKENS() view returns(uint256) -func (_Hermez *HermezCaller) MAXTOKENS(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "MAX_TOKENS") - return *ret0, err -} - -// MAXTOKENS is a free data retrieval call binding the contract method 0xf47c84c5. -// -// Solidity: function MAX_TOKENS() view returns(uint256) -func (_Hermez *HermezSession) MAXTOKENS() (*big.Int, error) { - return _Hermez.Contract.MAXTOKENS(&_Hermez.CallOpts) -} - -// MAXTOKENS is a free data retrieval call binding the contract method 0xf47c84c5. -// -// Solidity: function MAX_TOKENS() view returns(uint256) -func (_Hermez *HermezCallerSession) MAXTOKENS() (*big.Int, error) { - return _Hermez.Contract.MAXTOKENS(&_Hermez.CallOpts) -} - -// MAXWITHDRAWALDELAY is a free data retrieval call binding the contract method 0xa238f9df. -// -// Solidity: function MAX_WITHDRAWAL_DELAY() view returns(uint256) -func (_Hermez *HermezCaller) MAXWITHDRAWALDELAY(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "MAX_WITHDRAWAL_DELAY") - return *ret0, err -} - -// MAXWITHDRAWALDELAY is a free data retrieval call binding the contract method 0xa238f9df. -// -// Solidity: function MAX_WITHDRAWAL_DELAY() view returns(uint256) -func (_Hermez *HermezSession) MAXWITHDRAWALDELAY() (*big.Int, error) { - return _Hermez.Contract.MAXWITHDRAWALDELAY(&_Hermez.CallOpts) -} - -// MAXWITHDRAWALDELAY is a free data retrieval call binding the contract method 0xa238f9df. -// -// Solidity: function MAX_WITHDRAWAL_DELAY() view returns(uint256) -func (_Hermez *HermezCallerSession) MAXWITHDRAWALDELAY() (*big.Int, error) { - return _Hermez.Contract.MAXWITHDRAWALDELAY(&_Hermez.CallOpts) -} - -// NOLIMIT is a free data retrieval call binding the contract method 0xa60034fb. -// -// Solidity: function NO_LIMIT() view returns(uint256) -func (_Hermez *HermezCaller) NOLIMIT(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "NO_LIMIT") - return *ret0, err -} - -// NOLIMIT is a free data retrieval call binding the contract method 0xa60034fb. -// -// Solidity: function NO_LIMIT() view returns(uint256) -func (_Hermez *HermezSession) NOLIMIT() (*big.Int, error) { - return _Hermez.Contract.NOLIMIT(&_Hermez.CallOpts) -} - -// NOLIMIT is a free data retrieval call binding the contract method 0xa60034fb. -// -// Solidity: function NO_LIMIT() view returns(uint256) -func (_Hermez *HermezCallerSession) NOLIMIT() (*big.Int, error) { - return _Hermez.Contract.NOLIMIT(&_Hermez.CallOpts) -} - -// NUMBUCKETS is a free data retrieval call binding the contract method 0xc56ca84e. -// -// Solidity: function NUM_BUCKETS() view returns(uint256) -func (_Hermez *HermezCaller) NUMBUCKETS(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "NUM_BUCKETS") - return *ret0, err -} - -// NUMBUCKETS is a free data retrieval call binding the contract method 0xc56ca84e. -// -// Solidity: function NUM_BUCKETS() view returns(uint256) -func (_Hermez *HermezSession) NUMBUCKETS() (*big.Int, error) { - return _Hermez.Contract.NUMBUCKETS(&_Hermez.CallOpts) -} - -// NUMBUCKETS is a free data retrieval call binding the contract method 0xc56ca84e. -// -// Solidity: function NUM_BUCKETS() view returns(uint256) -func (_Hermez *HermezCallerSession) NUMBUCKETS() (*big.Int, error) { - return _Hermez.Contract.NUMBUCKETS(&_Hermez.CallOpts) -} - -// RESERVEDIDX is a free data retrieval call binding the contract method 0xfff69970. -// -// Solidity: function RESERVED_IDX() view returns(uint32) -func (_Hermez *HermezCaller) RESERVEDIDX(opts *bind.CallOpts) (uint32, error) { - var ( - ret0 = new(uint32) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "RESERVED_IDX") - return *ret0, err -} - -// RESERVEDIDX is a free data retrieval call binding the contract method 0xfff69970. -// -// Solidity: function RESERVED_IDX() view returns(uint32) -func (_Hermez *HermezSession) RESERVEDIDX() (uint32, error) { - return _Hermez.Contract.RESERVEDIDX(&_Hermez.CallOpts) -} - -// RESERVEDIDX is a free data retrieval call binding the contract method 0xfff69970. -// -// Solidity: function RESERVED_IDX() view returns(uint32) -func (_Hermez *HermezCallerSession) RESERVEDIDX() (uint32, error) { - return _Hermez.Contract.RESERVEDIDX(&_Hermez.CallOpts) -} - -// RFIELD is a free data retrieval call binding the contract method 0x58de75c4. -// -// Solidity: function RFIELD() view returns(uint256) -func (_Hermez *HermezCaller) RFIELD(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "RFIELD") - return *ret0, err -} - -// RFIELD is a free data retrieval call binding the contract method 0x58de75c4. -// -// Solidity: function RFIELD() view returns(uint256) -func (_Hermez *HermezSession) RFIELD() (*big.Int, error) { - return _Hermez.Contract.RFIELD(&_Hermez.CallOpts) -} - -// RFIELD is a free data retrieval call binding the contract method 0x58de75c4. -// -// Solidity: function RFIELD() view returns(uint256) -func (_Hermez *HermezCallerSession) RFIELD() (*big.Int, error) { - return _Hermez.Contract.RFIELD(&_Hermez.CallOpts) +// Solidity: function ABSOLUTE_MAX_L1L2BATCHTIMEOUT() view returns(uint8) +func (_Hermez *HermezCallerSession) ABSOLUTEMAXL1L2BATCHTIMEOUT() (uint8, error) { + return _Hermez.Contract.ABSOLUTEMAXL1L2BATCHTIMEOUT(&_Hermez.CallOpts) } // Buckets is a free data retrieval call binding the contract method 0x9b51fb0d. @@ -626,118 +262,56 @@ func (_Hermez *HermezCallerSession) Buckets(arg0 *big.Int) (struct { return _Hermez.Contract.Buckets(&_Hermez.CallOpts, arg0) } -// CircuitVerifiers is a free data retrieval call binding the contract method 0xa4b457ca. -// -// Solidity: function circuitVerifiers(uint256 ) view returns(address verifierInt, uint256 maxTx) -func (_Hermez *HermezCaller) CircuitVerifiers(opts *bind.CallOpts, arg0 *big.Int) (struct { - VerifierInt common.Address - MaxTx *big.Int -}, error) { - ret := new(struct { - VerifierInt common.Address - MaxTx *big.Int - }) - out := ret - err := _Hermez.contract.Call(opts, out, "circuitVerifiers", arg0) - return *ret, err -} - -// CircuitVerifiers is a free data retrieval call binding the contract method 0xa4b457ca. +// ExitNullifierMap is a free data retrieval call binding the contract method 0xe9b5269c. // -// Solidity: function circuitVerifiers(uint256 ) view returns(address verifierInt, uint256 maxTx) -func (_Hermez *HermezSession) CircuitVerifiers(arg0 *big.Int) (struct { - VerifierInt common.Address - MaxTx *big.Int -}, error) { - return _Hermez.Contract.CircuitVerifiers(&_Hermez.CallOpts, arg0) -} - -// CircuitVerifiers is a free data retrieval call binding the contract method 0xa4b457ca. -// -// Solidity: function circuitVerifiers(uint256 ) view returns(address verifierInt, uint256 maxTx) -func (_Hermez *HermezCallerSession) CircuitVerifiers(arg0 *big.Int) (struct { - VerifierInt common.Address - MaxTx *big.Int -}, error) { - return _Hermez.Contract.CircuitVerifiers(&_Hermez.CallOpts, arg0) -} - -// CurrentIdx is a free data retrieval call binding the contract method 0x5bfac41f. -// -// Solidity: function currentIdx() view returns(uint32) -func (_Hermez *HermezCaller) CurrentIdx(opts *bind.CallOpts) (uint32, error) { - var ( - ret0 = new(uint32) - ) - out := ret0 - err := _Hermez.contract.Call(opts, out, "currentIdx") - return *ret0, err -} - -// CurrentIdx is a free data retrieval call binding the contract method 0x5bfac41f. -// -// Solidity: function currentIdx() view returns(uint32) -func (_Hermez *HermezSession) CurrentIdx() (uint32, error) { - return _Hermez.Contract.CurrentIdx(&_Hermez.CallOpts) -} - -// CurrentIdx is a free data retrieval call binding the contract method 0x5bfac41f. -// -// Solidity: function currentIdx() view returns(uint32) -func (_Hermez *HermezCallerSession) CurrentIdx() (uint32, error) { - return _Hermez.Contract.CurrentIdx(&_Hermez.CallOpts) -} - -// ExitNullifierMap is a free data retrieval call binding the contract method 0x2bf41a2f. -// -// Solidity: function exitNullifierMap(uint256 ) view returns(bool) -func (_Hermez *HermezCaller) ExitNullifierMap(opts *bind.CallOpts, arg0 *big.Int) (bool, error) { +// Solidity: function exitNullifierMap(uint64 , uint48 ) view returns(bool) +func (_Hermez *HermezCaller) ExitNullifierMap(opts *bind.CallOpts, arg0 uint64, arg1 *big.Int) (bool, error) { var ( ret0 = new(bool) ) out := ret0 - err := _Hermez.contract.Call(opts, out, "exitNullifierMap", arg0) + err := _Hermez.contract.Call(opts, out, "exitNullifierMap", arg0, arg1) return *ret0, err } -// ExitNullifierMap is a free data retrieval call binding the contract method 0x2bf41a2f. +// ExitNullifierMap is a free data retrieval call binding the contract method 0xe9b5269c. // -// Solidity: function exitNullifierMap(uint256 ) view returns(bool) -func (_Hermez *HermezSession) ExitNullifierMap(arg0 *big.Int) (bool, error) { - return _Hermez.Contract.ExitNullifierMap(&_Hermez.CallOpts, arg0) +// Solidity: function exitNullifierMap(uint64 , uint48 ) view returns(bool) +func (_Hermez *HermezSession) ExitNullifierMap(arg0 uint64, arg1 *big.Int) (bool, error) { + return _Hermez.Contract.ExitNullifierMap(&_Hermez.CallOpts, arg0, arg1) } -// ExitNullifierMap is a free data retrieval call binding the contract method 0x2bf41a2f. +// ExitNullifierMap is a free data retrieval call binding the contract method 0xe9b5269c. // -// Solidity: function exitNullifierMap(uint256 ) view returns(bool) -func (_Hermez *HermezCallerSession) ExitNullifierMap(arg0 *big.Int) (bool, error) { - return _Hermez.Contract.ExitNullifierMap(&_Hermez.CallOpts, arg0) +// Solidity: function exitNullifierMap(uint64 , uint48 ) view returns(bool) +func (_Hermez *HermezCallerSession) ExitNullifierMap(arg0 uint64, arg1 *big.Int) (bool, error) { + return _Hermez.Contract.ExitNullifierMap(&_Hermez.CallOpts, arg0, arg1) } -// ExitRoots is a free data retrieval call binding the contract method 0x50263f8c. +// ExitRootsMap is a free data retrieval call binding the contract method 0x506d5463. // -// Solidity: function exitRoots(uint256 ) view returns(uint256) -func (_Hermez *HermezCaller) ExitRoots(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { +// Solidity: function exitRootsMap(uint64 ) view returns(uint256) +func (_Hermez *HermezCaller) ExitRootsMap(opts *bind.CallOpts, arg0 uint64) (*big.Int, error) { var ( ret0 = new(*big.Int) ) out := ret0 - err := _Hermez.contract.Call(opts, out, "exitRoots", arg0) + err := _Hermez.contract.Call(opts, out, "exitRootsMap", arg0) return *ret0, err } -// ExitRoots is a free data retrieval call binding the contract method 0x50263f8c. +// ExitRootsMap is a free data retrieval call binding the contract method 0x506d5463. // -// Solidity: function exitRoots(uint256 ) view returns(uint256) -func (_Hermez *HermezSession) ExitRoots(arg0 *big.Int) (*big.Int, error) { - return _Hermez.Contract.ExitRoots(&_Hermez.CallOpts, arg0) +// Solidity: function exitRootsMap(uint64 ) view returns(uint256) +func (_Hermez *HermezSession) ExitRootsMap(arg0 uint64) (*big.Int, error) { + return _Hermez.Contract.ExitRootsMap(&_Hermez.CallOpts, arg0) } -// ExitRoots is a free data retrieval call binding the contract method 0x50263f8c. +// ExitRootsMap is a free data retrieval call binding the contract method 0x506d5463. // -// Solidity: function exitRoots(uint256 ) view returns(uint256) -func (_Hermez *HermezCallerSession) ExitRoots(arg0 *big.Int) (*big.Int, error) { - return _Hermez.Contract.ExitRoots(&_Hermez.CallOpts, arg0) +// Solidity: function exitRootsMap(uint64 ) view returns(uint256) +func (_Hermez *HermezCallerSession) ExitRootsMap(arg0 uint64) (*big.Int, error) { + return _Hermez.Contract.ExitRootsMap(&_Hermez.CallOpts, arg0) } // FeeAddToken is a free data retrieval call binding the contract method 0xbded9bb8. @@ -768,10 +342,10 @@ func (_Hermez *HermezCallerSession) FeeAddToken() (*big.Int, error) { // ForgeL1L2BatchTimeout is a free data retrieval call binding the contract method 0xa3275838. // -// Solidity: function forgeL1L2BatchTimeout() view returns(uint256) -func (_Hermez *HermezCaller) ForgeL1L2BatchTimeout(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function forgeL1L2BatchTimeout() view returns(uint8) +func (_Hermez *HermezCaller) ForgeL1L2BatchTimeout(opts *bind.CallOpts) (uint8, error) { var ( - ret0 = new(*big.Int) + ret0 = new(uint8) ) out := ret0 err := _Hermez.contract.Call(opts, out, "forgeL1L2BatchTimeout") @@ -780,154 +354,154 @@ func (_Hermez *HermezCaller) ForgeL1L2BatchTimeout(opts *bind.CallOpts) (*big.In // ForgeL1L2BatchTimeout is a free data retrieval call binding the contract method 0xa3275838. // -// Solidity: function forgeL1L2BatchTimeout() view returns(uint256) -func (_Hermez *HermezSession) ForgeL1L2BatchTimeout() (*big.Int, error) { +// Solidity: function forgeL1L2BatchTimeout() view returns(uint8) +func (_Hermez *HermezSession) ForgeL1L2BatchTimeout() (uint8, error) { return _Hermez.Contract.ForgeL1L2BatchTimeout(&_Hermez.CallOpts) } // ForgeL1L2BatchTimeout is a free data retrieval call binding the contract method 0xa3275838. // -// Solidity: function forgeL1L2BatchTimeout() view returns(uint256) -func (_Hermez *HermezCallerSession) ForgeL1L2BatchTimeout() (*big.Int, error) { +// Solidity: function forgeL1L2BatchTimeout() view returns(uint8) +func (_Hermez *HermezCallerSession) ForgeL1L2BatchTimeout() (uint8, error) { return _Hermez.Contract.ForgeL1L2BatchTimeout(&_Hermez.CallOpts) } -// GetCurrentBatch is a free data retrieval call binding the contract method 0xac3851cd. +// HermezAuctionContract is a free data retrieval call binding the contract method 0x2bd83626. // -// Solidity: function getCurrentBatch() view returns(uint256) -func (_Hermez *HermezCaller) GetCurrentBatch(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function hermezAuctionContract() view returns(address) +func (_Hermez *HermezCaller) HermezAuctionContract(opts *bind.CallOpts) (common.Address, error) { var ( - ret0 = new(*big.Int) + ret0 = new(common.Address) ) out := ret0 - err := _Hermez.contract.Call(opts, out, "getCurrentBatch") + err := _Hermez.contract.Call(opts, out, "hermezAuctionContract") return *ret0, err } -// GetCurrentBatch is a free data retrieval call binding the contract method 0xac3851cd. +// HermezAuctionContract is a free data retrieval call binding the contract method 0x2bd83626. // -// Solidity: function getCurrentBatch() view returns(uint256) -func (_Hermez *HermezSession) GetCurrentBatch() (*big.Int, error) { - return _Hermez.Contract.GetCurrentBatch(&_Hermez.CallOpts) +// Solidity: function hermezAuctionContract() view returns(address) +func (_Hermez *HermezSession) HermezAuctionContract() (common.Address, error) { + return _Hermez.Contract.HermezAuctionContract(&_Hermez.CallOpts) } -// GetCurrentBatch is a free data retrieval call binding the contract method 0xac3851cd. +// HermezAuctionContract is a free data retrieval call binding the contract method 0x2bd83626. // -// Solidity: function getCurrentBatch() view returns(uint256) -func (_Hermez *HermezCallerSession) GetCurrentBatch() (*big.Int, error) { - return _Hermez.Contract.GetCurrentBatch(&_Hermez.CallOpts) +// Solidity: function hermezAuctionContract() view returns(address) +func (_Hermez *HermezCallerSession) HermezAuctionContract() (common.Address, error) { + return _Hermez.Contract.HermezAuctionContract(&_Hermez.CallOpts) } -// GetCurrentTokens is a free data retrieval call binding the contract method 0xcc77828d. +// HermezGovernanceDAOAddress is a free data retrieval call binding the contract method 0xdd46bf84. // -// Solidity: function getCurrentTokens() view returns(uint256) -func (_Hermez *HermezCaller) GetCurrentTokens(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function hermezGovernanceDAOAddress() view returns(address) +func (_Hermez *HermezCaller) HermezGovernanceDAOAddress(opts *bind.CallOpts) (common.Address, error) { var ( - ret0 = new(*big.Int) + ret0 = new(common.Address) ) out := ret0 - err := _Hermez.contract.Call(opts, out, "getCurrentTokens") + err := _Hermez.contract.Call(opts, out, "hermezGovernanceDAOAddress") return *ret0, err } -// GetCurrentTokens is a free data retrieval call binding the contract method 0xcc77828d. +// HermezGovernanceDAOAddress is a free data retrieval call binding the contract method 0xdd46bf84. // -// Solidity: function getCurrentTokens() view returns(uint256) -func (_Hermez *HermezSession) GetCurrentTokens() (*big.Int, error) { - return _Hermez.Contract.GetCurrentTokens(&_Hermez.CallOpts) +// Solidity: function hermezGovernanceDAOAddress() view returns(address) +func (_Hermez *HermezSession) HermezGovernanceDAOAddress() (common.Address, error) { + return _Hermez.Contract.HermezGovernanceDAOAddress(&_Hermez.CallOpts) } -// GetCurrentTokens is a free data retrieval call binding the contract method 0xcc77828d. +// HermezGovernanceDAOAddress is a free data retrieval call binding the contract method 0xdd46bf84. // -// Solidity: function getCurrentTokens() view returns(uint256) -func (_Hermez *HermezCallerSession) GetCurrentTokens() (*big.Int, error) { - return _Hermez.Contract.GetCurrentTokens(&_Hermez.CallOpts) +// Solidity: function hermezGovernanceDAOAddress() view returns(address) +func (_Hermez *HermezCallerSession) HermezGovernanceDAOAddress() (common.Address, error) { + return _Hermez.Contract.HermezGovernanceDAOAddress(&_Hermez.CallOpts) } -// GovernanceAddress is a free data retrieval call binding the contract method 0x795053d3. +// InstantWithdrawalViewer is a free data retrieval call binding the contract method 0x375110aa. // -// Solidity: function governanceAddress() view returns(address) -func (_Hermez *HermezCaller) GovernanceAddress(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function instantWithdrawalViewer(address tokenAddress, uint192 amount) view returns(bool) +func (_Hermez *HermezCaller) InstantWithdrawalViewer(opts *bind.CallOpts, tokenAddress common.Address, amount *big.Int) (bool, error) { var ( - ret0 = new(common.Address) + ret0 = new(bool) ) out := ret0 - err := _Hermez.contract.Call(opts, out, "governanceAddress") + err := _Hermez.contract.Call(opts, out, "instantWithdrawalViewer", tokenAddress, amount) return *ret0, err } -// GovernanceAddress is a free data retrieval call binding the contract method 0x795053d3. +// InstantWithdrawalViewer is a free data retrieval call binding the contract method 0x375110aa. // -// Solidity: function governanceAddress() view returns(address) -func (_Hermez *HermezSession) GovernanceAddress() (common.Address, error) { - return _Hermez.Contract.GovernanceAddress(&_Hermez.CallOpts) +// Solidity: function instantWithdrawalViewer(address tokenAddress, uint192 amount) view returns(bool) +func (_Hermez *HermezSession) InstantWithdrawalViewer(tokenAddress common.Address, amount *big.Int) (bool, error) { + return _Hermez.Contract.InstantWithdrawalViewer(&_Hermez.CallOpts, tokenAddress, amount) } -// GovernanceAddress is a free data retrieval call binding the contract method 0x795053d3. +// InstantWithdrawalViewer is a free data retrieval call binding the contract method 0x375110aa. // -// Solidity: function governanceAddress() view returns(address) -func (_Hermez *HermezCallerSession) GovernanceAddress() (common.Address, error) { - return _Hermez.Contract.GovernanceAddress(&_Hermez.CallOpts) +// Solidity: function instantWithdrawalViewer(address tokenAddress, uint192 amount) view returns(bool) +func (_Hermez *HermezCallerSession) InstantWithdrawalViewer(tokenAddress common.Address, amount *big.Int) (bool, error) { + return _Hermez.Contract.InstantWithdrawalViewer(&_Hermez.CallOpts, tokenAddress, amount) } -// HermezAuctionContract is a free data retrieval call binding the contract method 0x2bd83626. +// LastForgedBatch is a free data retrieval call binding the contract method 0x44e0b2ce. // -// Solidity: function hermezAuctionContract() view returns(address) -func (_Hermez *HermezCaller) HermezAuctionContract(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function lastForgedBatch() view returns(uint64) +func (_Hermez *HermezCaller) LastForgedBatch(opts *bind.CallOpts) (uint64, error) { var ( - ret0 = new(common.Address) + ret0 = new(uint64) ) out := ret0 - err := _Hermez.contract.Call(opts, out, "hermezAuctionContract") + err := _Hermez.contract.Call(opts, out, "lastForgedBatch") return *ret0, err } -// HermezAuctionContract is a free data retrieval call binding the contract method 0x2bd83626. +// LastForgedBatch is a free data retrieval call binding the contract method 0x44e0b2ce. // -// Solidity: function hermezAuctionContract() view returns(address) -func (_Hermez *HermezSession) HermezAuctionContract() (common.Address, error) { - return _Hermez.Contract.HermezAuctionContract(&_Hermez.CallOpts) +// Solidity: function lastForgedBatch() view returns(uint64) +func (_Hermez *HermezSession) LastForgedBatch() (uint64, error) { + return _Hermez.Contract.LastForgedBatch(&_Hermez.CallOpts) } -// HermezAuctionContract is a free data retrieval call binding the contract method 0x2bd83626. +// LastForgedBatch is a free data retrieval call binding the contract method 0x44e0b2ce. // -// Solidity: function hermezAuctionContract() view returns(address) -func (_Hermez *HermezCallerSession) HermezAuctionContract() (common.Address, error) { - return _Hermez.Contract.HermezAuctionContract(&_Hermez.CallOpts) +// Solidity: function lastForgedBatch() view returns(uint64) +func (_Hermez *HermezCallerSession) LastForgedBatch() (uint64, error) { + return _Hermez.Contract.LastForgedBatch(&_Hermez.CallOpts) } -// InstantWithdrawalViewer is a free data retrieval call binding the contract method 0x5f59f58e. +// LastIdx is a free data retrieval call binding the contract method 0xd486645c. // -// Solidity: function instantWithdrawalViewer(address tokenAddress, uint256 amount) view returns(bool) -func (_Hermez *HermezCaller) InstantWithdrawalViewer(opts *bind.CallOpts, tokenAddress common.Address, amount *big.Int) (bool, error) { +// Solidity: function lastIdx() view returns(uint48) +func (_Hermez *HermezCaller) LastIdx(opts *bind.CallOpts) (*big.Int, error) { var ( - ret0 = new(bool) + ret0 = new(*big.Int) ) out := ret0 - err := _Hermez.contract.Call(opts, out, "instantWithdrawalViewer", tokenAddress, amount) + err := _Hermez.contract.Call(opts, out, "lastIdx") return *ret0, err } -// InstantWithdrawalViewer is a free data retrieval call binding the contract method 0x5f59f58e. +// LastIdx is a free data retrieval call binding the contract method 0xd486645c. // -// Solidity: function instantWithdrawalViewer(address tokenAddress, uint256 amount) view returns(bool) -func (_Hermez *HermezSession) InstantWithdrawalViewer(tokenAddress common.Address, amount *big.Int) (bool, error) { - return _Hermez.Contract.InstantWithdrawalViewer(&_Hermez.CallOpts, tokenAddress, amount) +// Solidity: function lastIdx() view returns(uint48) +func (_Hermez *HermezSession) LastIdx() (*big.Int, error) { + return _Hermez.Contract.LastIdx(&_Hermez.CallOpts) } -// InstantWithdrawalViewer is a free data retrieval call binding the contract method 0x5f59f58e. +// LastIdx is a free data retrieval call binding the contract method 0xd486645c. // -// Solidity: function instantWithdrawalViewer(address tokenAddress, uint256 amount) view returns(bool) -func (_Hermez *HermezCallerSession) InstantWithdrawalViewer(tokenAddress common.Address, amount *big.Int) (bool, error) { - return _Hermez.Contract.InstantWithdrawalViewer(&_Hermez.CallOpts, tokenAddress, amount) +// Solidity: function lastIdx() view returns(uint48) +func (_Hermez *HermezCallerSession) LastIdx() (*big.Int, error) { + return _Hermez.Contract.LastIdx(&_Hermez.CallOpts) } // LastL1L2Batch is a free data retrieval call binding the contract method 0x84ef9ed4. // -// Solidity: function lastL1L2Batch() view returns(uint256) -func (_Hermez *HermezCaller) LastL1L2Batch(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function lastL1L2Batch() view returns(uint64) +func (_Hermez *HermezCaller) LastL1L2Batch(opts *bind.CallOpts) (uint64, error) { var ( - ret0 = new(*big.Int) + ret0 = new(uint64) ) out := ret0 err := _Hermez.contract.Call(opts, out, "lastL1L2Batch") @@ -936,22 +510,22 @@ func (_Hermez *HermezCaller) LastL1L2Batch(opts *bind.CallOpts) (*big.Int, error // LastL1L2Batch is a free data retrieval call binding the contract method 0x84ef9ed4. // -// Solidity: function lastL1L2Batch() view returns(uint256) -func (_Hermez *HermezSession) LastL1L2Batch() (*big.Int, error) { +// Solidity: function lastL1L2Batch() view returns(uint64) +func (_Hermez *HermezSession) LastL1L2Batch() (uint64, error) { return _Hermez.Contract.LastL1L2Batch(&_Hermez.CallOpts) } // LastL1L2Batch is a free data retrieval call binding the contract method 0x84ef9ed4. // -// Solidity: function lastL1L2Batch() view returns(uint256) -func (_Hermez *HermezCallerSession) LastL1L2Batch() (*big.Int, error) { +// Solidity: function lastL1L2Batch() view returns(uint64) +func (_Hermez *HermezCallerSession) LastL1L2Batch() (uint64, error) { return _Hermez.Contract.LastL1L2Batch(&_Hermez.CallOpts) } -// MapL1TxQueue is a free data retrieval call binding the contract method 0x3ec0b07c. +// MapL1TxQueue is a free data retrieval call binding the contract method 0xe796fcf3. // -// Solidity: function mapL1TxQueue(uint256 ) view returns(bytes) -func (_Hermez *HermezCaller) MapL1TxQueue(opts *bind.CallOpts, arg0 *big.Int) ([]byte, error) { +// Solidity: function mapL1TxQueue(uint64 ) view returns(bytes) +func (_Hermez *HermezCaller) MapL1TxQueue(opts *bind.CallOpts, arg0 uint64) ([]byte, error) { var ( ret0 = new([]byte) ) @@ -960,70 +534,136 @@ func (_Hermez *HermezCaller) MapL1TxQueue(opts *bind.CallOpts, arg0 *big.Int) ([ return *ret0, err } -// MapL1TxQueue is a free data retrieval call binding the contract method 0x3ec0b07c. +// MapL1TxQueue is a free data retrieval call binding the contract method 0xe796fcf3. // -// Solidity: function mapL1TxQueue(uint256 ) view returns(bytes) -func (_Hermez *HermezSession) MapL1TxQueue(arg0 *big.Int) ([]byte, error) { +// Solidity: function mapL1TxQueue(uint64 ) view returns(bytes) +func (_Hermez *HermezSession) MapL1TxQueue(arg0 uint64) ([]byte, error) { return _Hermez.Contract.MapL1TxQueue(&_Hermez.CallOpts, arg0) } -// MapL1TxQueue is a free data retrieval call binding the contract method 0x3ec0b07c. +// MapL1TxQueue is a free data retrieval call binding the contract method 0xe796fcf3. // -// Solidity: function mapL1TxQueue(uint256 ) view returns(bytes) -func (_Hermez *HermezCallerSession) MapL1TxQueue(arg0 *big.Int) ([]byte, error) { +// Solidity: function mapL1TxQueue(uint64 ) view returns(bytes) +func (_Hermez *HermezCallerSession) MapL1TxQueue(arg0 uint64) ([]byte, error) { return _Hermez.Contract.MapL1TxQueue(&_Hermez.CallOpts, arg0) } -// NextForgedQueue is a free data retrieval call binding the contract method 0xc970ea8e. +// NextL1FillingQueue is a free data retrieval call binding the contract method 0x0ee8e52b. // -// Solidity: function nextForgedQueue() view returns(uint256) -func (_Hermez *HermezCaller) NextForgedQueue(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function nextL1FillingQueue() view returns(uint64) +func (_Hermez *HermezCaller) NextL1FillingQueue(opts *bind.CallOpts) (uint64, error) { var ( - ret0 = new(*big.Int) + ret0 = new(uint64) ) out := ret0 - err := _Hermez.contract.Call(opts, out, "nextForgedQueue") + err := _Hermez.contract.Call(opts, out, "nextL1FillingQueue") return *ret0, err } -// NextForgedQueue is a free data retrieval call binding the contract method 0xc970ea8e. +// NextL1FillingQueue is a free data retrieval call binding the contract method 0x0ee8e52b. +// +// Solidity: function nextL1FillingQueue() view returns(uint64) +func (_Hermez *HermezSession) NextL1FillingQueue() (uint64, error) { + return _Hermez.Contract.NextL1FillingQueue(&_Hermez.CallOpts) +} + +// NextL1FillingQueue is a free data retrieval call binding the contract method 0x0ee8e52b. // -// Solidity: function nextForgedQueue() view returns(uint256) -func (_Hermez *HermezSession) NextForgedQueue() (*big.Int, error) { - return _Hermez.Contract.NextForgedQueue(&_Hermez.CallOpts) +// Solidity: function nextL1FillingQueue() view returns(uint64) +func (_Hermez *HermezCallerSession) NextL1FillingQueue() (uint64, error) { + return _Hermez.Contract.NextL1FillingQueue(&_Hermez.CallOpts) } -// NextForgedQueue is a free data retrieval call binding the contract method 0xc970ea8e. +// NextL1ToForgeQueue is a free data retrieval call binding the contract method 0xd0f32e67. // -// Solidity: function nextForgedQueue() view returns(uint256) -func (_Hermez *HermezCallerSession) NextForgedQueue() (*big.Int, error) { - return _Hermez.Contract.NextForgedQueue(&_Hermez.CallOpts) +// Solidity: function nextL1ToForgeQueue() view returns(uint64) +func (_Hermez *HermezCaller) NextL1ToForgeQueue(opts *bind.CallOpts) (uint64, error) { + var ( + ret0 = new(uint64) + ) + out := ret0 + err := _Hermez.contract.Call(opts, out, "nextL1ToForgeQueue") + return *ret0, err } -// NextL1FillingQueue is a free data retrieval call binding the contract method 0x0ee8e52b. +// NextL1ToForgeQueue is a free data retrieval call binding the contract method 0xd0f32e67. +// +// Solidity: function nextL1ToForgeQueue() view returns(uint64) +func (_Hermez *HermezSession) NextL1ToForgeQueue() (uint64, error) { + return _Hermez.Contract.NextL1ToForgeQueue(&_Hermez.CallOpts) +} + +// NextL1ToForgeQueue is a free data retrieval call binding the contract method 0xd0f32e67. // -// Solidity: function nextL1FillingQueue() view returns(uint256) -func (_Hermez *HermezCaller) NextL1FillingQueue(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function nextL1ToForgeQueue() view returns(uint64) +func (_Hermez *HermezCallerSession) NextL1ToForgeQueue() (uint64, error) { + return _Hermez.Contract.NextL1ToForgeQueue(&_Hermez.CallOpts) +} + +// RegisterTokensCount is a free data retrieval call binding the contract method 0x9f34e9a3. +// +// Solidity: function registerTokensCount() view returns(uint256) +func (_Hermez *HermezCaller) RegisterTokensCount(opts *bind.CallOpts) (*big.Int, error) { var ( ret0 = new(*big.Int) ) out := ret0 - err := _Hermez.contract.Call(opts, out, "nextL1FillingQueue") + err := _Hermez.contract.Call(opts, out, "registerTokensCount") return *ret0, err } -// NextL1FillingQueue is a free data retrieval call binding the contract method 0x0ee8e52b. +// RegisterTokensCount is a free data retrieval call binding the contract method 0x9f34e9a3. // -// Solidity: function nextL1FillingQueue() view returns(uint256) -func (_Hermez *HermezSession) NextL1FillingQueue() (*big.Int, error) { - return _Hermez.Contract.NextL1FillingQueue(&_Hermez.CallOpts) +// Solidity: function registerTokensCount() view returns(uint256) +func (_Hermez *HermezSession) RegisterTokensCount() (*big.Int, error) { + return _Hermez.Contract.RegisterTokensCount(&_Hermez.CallOpts) } -// NextL1FillingQueue is a free data retrieval call binding the contract method 0x0ee8e52b. +// RegisterTokensCount is a free data retrieval call binding the contract method 0x9f34e9a3. // -// Solidity: function nextL1FillingQueue() view returns(uint256) -func (_Hermez *HermezCallerSession) NextL1FillingQueue() (*big.Int, error) { - return _Hermez.Contract.NextL1FillingQueue(&_Hermez.CallOpts) +// Solidity: function registerTokensCount() view returns(uint256) +func (_Hermez *HermezCallerSession) RegisterTokensCount() (*big.Int, error) { + return _Hermez.Contract.RegisterTokensCount(&_Hermez.CallOpts) +} + +// RollupVerifiers is a free data retrieval call binding the contract method 0x38330200. +// +// Solidity: function rollupVerifiers(uint256 ) view returns(address verifierInterface, uint256 maxTx, uint256 nLevels) +func (_Hermez *HermezCaller) RollupVerifiers(opts *bind.CallOpts, arg0 *big.Int) (struct { + VerifierInterface common.Address + MaxTx *big.Int + NLevels *big.Int +}, error) { + ret := new(struct { + VerifierInterface common.Address + MaxTx *big.Int + NLevels *big.Int + }) + out := ret + err := _Hermez.contract.Call(opts, out, "rollupVerifiers", arg0) + return *ret, err +} + +// RollupVerifiers is a free data retrieval call binding the contract method 0x38330200. +// +// Solidity: function rollupVerifiers(uint256 ) view returns(address verifierInterface, uint256 maxTx, uint256 nLevels) +func (_Hermez *HermezSession) RollupVerifiers(arg0 *big.Int) (struct { + VerifierInterface common.Address + MaxTx *big.Int + NLevels *big.Int +}, error) { + return _Hermez.Contract.RollupVerifiers(&_Hermez.CallOpts, arg0) +} + +// RollupVerifiers is a free data retrieval call binding the contract method 0x38330200. +// +// Solidity: function rollupVerifiers(uint256 ) view returns(address verifierInterface, uint256 maxTx, uint256 nLevels) +func (_Hermez *HermezCallerSession) RollupVerifiers(arg0 *big.Int) (struct { + VerifierInterface common.Address + MaxTx *big.Int + NLevels *big.Int +}, error) { + return _Hermez.Contract.RollupVerifiers(&_Hermez.CallOpts, arg0) } // SafetyAddress is a free data retrieval call binding the contract method 0xe56e27ae. @@ -1052,38 +692,38 @@ func (_Hermez *HermezCallerSession) SafetyAddress() (common.Address, error) { return _Hermez.Contract.SafetyAddress(&_Hermez.CallOpts) } -// StateRoot is a free data retrieval call binding the contract method 0x9588eca2. +// StateRootMap is a free data retrieval call binding the contract method 0x86c6acc1. // -// Solidity: function stateRoot() view returns(uint256) -func (_Hermez *HermezCaller) StateRoot(opts *bind.CallOpts) (*big.Int, error) { +// Solidity: function stateRootMap(uint64 ) view returns(uint256) +func (_Hermez *HermezCaller) StateRootMap(opts *bind.CallOpts, arg0 uint64) (*big.Int, error) { var ( ret0 = new(*big.Int) ) out := ret0 - err := _Hermez.contract.Call(opts, out, "stateRoot") + err := _Hermez.contract.Call(opts, out, "stateRootMap", arg0) return *ret0, err } -// StateRoot is a free data retrieval call binding the contract method 0x9588eca2. +// StateRootMap is a free data retrieval call binding the contract method 0x86c6acc1. // -// Solidity: function stateRoot() view returns(uint256) -func (_Hermez *HermezSession) StateRoot() (*big.Int, error) { - return _Hermez.Contract.StateRoot(&_Hermez.CallOpts) +// Solidity: function stateRootMap(uint64 ) view returns(uint256) +func (_Hermez *HermezSession) StateRootMap(arg0 uint64) (*big.Int, error) { + return _Hermez.Contract.StateRootMap(&_Hermez.CallOpts, arg0) } -// StateRoot is a free data retrieval call binding the contract method 0x9588eca2. +// StateRootMap is a free data retrieval call binding the contract method 0x86c6acc1. // -// Solidity: function stateRoot() view returns(uint256) -func (_Hermez *HermezCallerSession) StateRoot() (*big.Int, error) { - return _Hermez.Contract.StateRoot(&_Hermez.CallOpts) +// Solidity: function stateRootMap(uint64 ) view returns(uint256) +func (_Hermez *HermezCallerSession) StateRootMap(arg0 uint64) (*big.Int, error) { + return _Hermez.Contract.StateRootMap(&_Hermez.CallOpts, arg0) } // TokenExchange is a free data retrieval call binding the contract method 0x0dd94b96. // -// Solidity: function tokenExchange(address ) view returns(uint256) -func (_Hermez *HermezCaller) TokenExchange(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { +// Solidity: function tokenExchange(address ) view returns(uint64) +func (_Hermez *HermezCaller) TokenExchange(opts *bind.CallOpts, arg0 common.Address) (uint64, error) { var ( - ret0 = new(*big.Int) + ret0 = new(uint64) ) out := ret0 err := _Hermez.contract.Call(opts, out, "tokenExchange", arg0) @@ -1092,15 +732,15 @@ func (_Hermez *HermezCaller) TokenExchange(opts *bind.CallOpts, arg0 common.Addr // TokenExchange is a free data retrieval call binding the contract method 0x0dd94b96. // -// Solidity: function tokenExchange(address ) view returns(uint256) -func (_Hermez *HermezSession) TokenExchange(arg0 common.Address) (*big.Int, error) { +// Solidity: function tokenExchange(address ) view returns(uint64) +func (_Hermez *HermezSession) TokenExchange(arg0 common.Address) (uint64, error) { return _Hermez.Contract.TokenExchange(&_Hermez.CallOpts, arg0) } // TokenExchange is a free data retrieval call binding the contract method 0x0dd94b96. // -// Solidity: function tokenExchange(address ) view returns(uint256) -func (_Hermez *HermezCallerSession) TokenExchange(arg0 common.Address) (*big.Int, error) { +// Solidity: function tokenExchange(address ) view returns(uint64) +func (_Hermez *HermezCallerSession) TokenExchange(arg0 common.Address) (uint64, error) { return _Hermez.Contract.TokenExchange(&_Hermez.CallOpts, arg0) } @@ -1208,6 +848,32 @@ func (_Hermez *HermezCallerSession) WithdrawDelayerContract() (common.Address, e return _Hermez.Contract.WithdrawDelayerContract(&_Hermez.CallOpts) } +// WithdrawVerifier is a free data retrieval call binding the contract method 0x864eb164. +// +// Solidity: function withdrawVerifier() view returns(address) +func (_Hermez *HermezCaller) WithdrawVerifier(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _Hermez.contract.Call(opts, out, "withdrawVerifier") + return *ret0, err +} + +// WithdrawVerifier is a free data retrieval call binding the contract method 0x864eb164. +// +// Solidity: function withdrawVerifier() view returns(address) +func (_Hermez *HermezSession) WithdrawVerifier() (common.Address, error) { + return _Hermez.Contract.WithdrawVerifier(&_Hermez.CallOpts) +} + +// WithdrawVerifier is a free data retrieval call binding the contract method 0x864eb164. +// +// Solidity: function withdrawVerifier() view returns(address) +func (_Hermez *HermezCallerSession) WithdrawVerifier() (common.Address, error) { + return _Hermez.Contract.WithdrawVerifier(&_Hermez.CallOpts) +} + // WithdrawalDelay is a free data retrieval call binding the contract method 0xa7ab6961. // // Solidity: function withdrawalDelay() view returns(uint64) @@ -1234,214 +900,67 @@ func (_Hermez *HermezCallerSession) WithdrawalDelay() (uint64, error) { return _Hermez.Contract.WithdrawalDelay(&_Hermez.CallOpts) } -// AddToken is a paid mutator transaction binding the contract method 0xd48bfca7. +// AddL1Transaction is a paid mutator transaction binding the contract method 0xac171d28. // -// Solidity: function addToken(address tokenAddress) payable returns() -func (_Hermez *HermezTransactor) AddToken(opts *bind.TransactOpts, tokenAddress common.Address) (*types.Transaction, error) { - return _Hermez.contract.Transact(opts, "addToken", tokenAddress) +// Solidity: function addL1Transaction(uint256 babyPubKey, uint48 fromIdx, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint48 toIdx) payable returns() +func (_Hermez *HermezTransactor) AddL1Transaction(opts *bind.TransactOpts, babyPubKey *big.Int, fromIdx *big.Int, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx *big.Int) (*types.Transaction, error) { + return _Hermez.contract.Transact(opts, "addL1Transaction", babyPubKey, fromIdx, loadAmountF, amountF, tokenID, toIdx) } -// AddToken is a paid mutator transaction binding the contract method 0xd48bfca7. +// AddL1Transaction is a paid mutator transaction binding the contract method 0xac171d28. // -// Solidity: function addToken(address tokenAddress) payable returns() -func (_Hermez *HermezSession) AddToken(tokenAddress common.Address) (*types.Transaction, error) { - return _Hermez.Contract.AddToken(&_Hermez.TransactOpts, tokenAddress) +// Solidity: function addL1Transaction(uint256 babyPubKey, uint48 fromIdx, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint48 toIdx) payable returns() +func (_Hermez *HermezSession) AddL1Transaction(babyPubKey *big.Int, fromIdx *big.Int, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx *big.Int) (*types.Transaction, error) { + return _Hermez.Contract.AddL1Transaction(&_Hermez.TransactOpts, babyPubKey, fromIdx, loadAmountF, amountF, tokenID, toIdx) } -// AddToken is a paid mutator transaction binding the contract method 0xd48bfca7. +// AddL1Transaction is a paid mutator transaction binding the contract method 0xac171d28. // -// Solidity: function addToken(address tokenAddress) payable returns() -func (_Hermez *HermezTransactorSession) AddToken(tokenAddress common.Address) (*types.Transaction, error) { - return _Hermez.Contract.AddToken(&_Hermez.TransactOpts, tokenAddress) +// Solidity: function addL1Transaction(uint256 babyPubKey, uint48 fromIdx, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint48 toIdx) payable returns() +func (_Hermez *HermezTransactorSession) AddL1Transaction(babyPubKey *big.Int, fromIdx *big.Int, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx *big.Int) (*types.Transaction, error) { + return _Hermez.Contract.AddL1Transaction(&_Hermez.TransactOpts, babyPubKey, fromIdx, loadAmountF, amountF, tokenID, toIdx) } -// CreateAccountDeposit is a paid mutator transaction binding the contract method 0x30501fcb. +// ForgeBatch is a paid mutator transaction binding the contract method 0x6e7e1365. // -// Solidity: function createAccountDeposit(uint256 babyPubKey, uint16 loadAmountF, uint32 tokenID) payable returns() -func (_Hermez *HermezTransactor) CreateAccountDeposit(opts *bind.TransactOpts, babyPubKey *big.Int, loadAmountF uint16, tokenID uint32) (*types.Transaction, error) { - return _Hermez.contract.Transact(opts, "createAccountDeposit", babyPubKey, loadAmountF, tokenID) +// Solidity: function forgeBatch(uint48 newLastIdx, uint256 newStRoot, uint256 newExitRoot, bytes encodedL1CoordinatorTx, bytes l2TxsData, bytes feeIdxCoordinator, uint8 verifierIdx, bool l1Batch, uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC) returns() +func (_Hermez *HermezTransactor) ForgeBatch(opts *bind.TransactOpts, newLastIdx *big.Int, newStRoot *big.Int, newExitRoot *big.Int, encodedL1CoordinatorTx []byte, l2TxsData []byte, feeIdxCoordinator []byte, verifierIdx uint8, l1Batch bool, proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int) (*types.Transaction, error) { + return _Hermez.contract.Transact(opts, "forgeBatch", newLastIdx, newStRoot, newExitRoot, encodedL1CoordinatorTx, l2TxsData, feeIdxCoordinator, verifierIdx, l1Batch, proofA, proofB, proofC) } -// CreateAccountDeposit is a paid mutator transaction binding the contract method 0x30501fcb. +// ForgeBatch is a paid mutator transaction binding the contract method 0x6e7e1365. // -// Solidity: function createAccountDeposit(uint256 babyPubKey, uint16 loadAmountF, uint32 tokenID) payable returns() -func (_Hermez *HermezSession) CreateAccountDeposit(babyPubKey *big.Int, loadAmountF uint16, tokenID uint32) (*types.Transaction, error) { - return _Hermez.Contract.CreateAccountDeposit(&_Hermez.TransactOpts, babyPubKey, loadAmountF, tokenID) +// Solidity: function forgeBatch(uint48 newLastIdx, uint256 newStRoot, uint256 newExitRoot, bytes encodedL1CoordinatorTx, bytes l2TxsData, bytes feeIdxCoordinator, uint8 verifierIdx, bool l1Batch, uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC) returns() +func (_Hermez *HermezSession) ForgeBatch(newLastIdx *big.Int, newStRoot *big.Int, newExitRoot *big.Int, encodedL1CoordinatorTx []byte, l2TxsData []byte, feeIdxCoordinator []byte, verifierIdx uint8, l1Batch bool, proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int) (*types.Transaction, error) { + return _Hermez.Contract.ForgeBatch(&_Hermez.TransactOpts, newLastIdx, newStRoot, newExitRoot, encodedL1CoordinatorTx, l2TxsData, feeIdxCoordinator, verifierIdx, l1Batch, proofA, proofB, proofC) } -// CreateAccountDeposit is a paid mutator transaction binding the contract method 0x30501fcb. +// ForgeBatch is a paid mutator transaction binding the contract method 0x6e7e1365. // -// Solidity: function createAccountDeposit(uint256 babyPubKey, uint16 loadAmountF, uint32 tokenID) payable returns() -func (_Hermez *HermezTransactorSession) CreateAccountDeposit(babyPubKey *big.Int, loadAmountF uint16, tokenID uint32) (*types.Transaction, error) { - return _Hermez.Contract.CreateAccountDeposit(&_Hermez.TransactOpts, babyPubKey, loadAmountF, tokenID) +// Solidity: function forgeBatch(uint48 newLastIdx, uint256 newStRoot, uint256 newExitRoot, bytes encodedL1CoordinatorTx, bytes l2TxsData, bytes feeIdxCoordinator, uint8 verifierIdx, bool l1Batch, uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC) returns() +func (_Hermez *HermezTransactorSession) ForgeBatch(newLastIdx *big.Int, newStRoot *big.Int, newExitRoot *big.Int, encodedL1CoordinatorTx []byte, l2TxsData []byte, feeIdxCoordinator []byte, verifierIdx uint8, l1Batch bool, proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int) (*types.Transaction, error) { + return _Hermez.Contract.ForgeBatch(&_Hermez.TransactOpts, newLastIdx, newStRoot, newExitRoot, encodedL1CoordinatorTx, l2TxsData, feeIdxCoordinator, verifierIdx, l1Batch, proofA, proofB, proofC) } -// CreateAccountDepositFromRelayer is a paid mutator transaction binding the contract method 0xd7d207c0. +// InitializeHermez is a paid mutator transaction binding the contract method 0x4ee51c26. // -// Solidity: function createAccountDepositFromRelayer(bytes accountCreationAuthSig, uint256 babyPubKey, uint16 loadAmountF, uint32 tokenID) payable returns() -func (_Hermez *HermezTransactor) CreateAccountDepositFromRelayer(opts *bind.TransactOpts, accountCreationAuthSig []byte, babyPubKey *big.Int, loadAmountF uint16, tokenID uint32) (*types.Transaction, error) { - return _Hermez.contract.Transact(opts, "createAccountDepositFromRelayer", accountCreationAuthSig, babyPubKey, loadAmountF, tokenID) +// Solidity: function initializeHermez(address[] _verifiers, uint256[] _verifiersParams, address _withdrawVerifier, address _hermezAuctionContract, address _tokenHEZ, uint8 _forgeL1L2BatchTimeout, uint256 _feeAddToken, address _poseidon2Elements, address _poseidon3Elements, address _poseidon4Elements, address _hermezGovernanceDAOAddress, address _safetyAddress, uint64 _withdrawalDelay, address _withdrawDelayerContract) returns() +func (_Hermez *HermezTransactor) InitializeHermez(opts *bind.TransactOpts, _verifiers []common.Address, _verifiersParams []*big.Int, _withdrawVerifier common.Address, _hermezAuctionContract common.Address, _tokenHEZ common.Address, _forgeL1L2BatchTimeout uint8, _feeAddToken *big.Int, _poseidon2Elements common.Address, _poseidon3Elements common.Address, _poseidon4Elements common.Address, _hermezGovernanceDAOAddress common.Address, _safetyAddress common.Address, _withdrawalDelay uint64, _withdrawDelayerContract common.Address) (*types.Transaction, error) { + return _Hermez.contract.Transact(opts, "initializeHermez", _verifiers, _verifiersParams, _withdrawVerifier, _hermezAuctionContract, _tokenHEZ, _forgeL1L2BatchTimeout, _feeAddToken, _poseidon2Elements, _poseidon3Elements, _poseidon4Elements, _hermezGovernanceDAOAddress, _safetyAddress, _withdrawalDelay, _withdrawDelayerContract) } -// CreateAccountDepositFromRelayer is a paid mutator transaction binding the contract method 0xd7d207c0. +// InitializeHermez is a paid mutator transaction binding the contract method 0x4ee51c26. // -// Solidity: function createAccountDepositFromRelayer(bytes accountCreationAuthSig, uint256 babyPubKey, uint16 loadAmountF, uint32 tokenID) payable returns() -func (_Hermez *HermezSession) CreateAccountDepositFromRelayer(accountCreationAuthSig []byte, babyPubKey *big.Int, loadAmountF uint16, tokenID uint32) (*types.Transaction, error) { - return _Hermez.Contract.CreateAccountDepositFromRelayer(&_Hermez.TransactOpts, accountCreationAuthSig, babyPubKey, loadAmountF, tokenID) +// Solidity: function initializeHermez(address[] _verifiers, uint256[] _verifiersParams, address _withdrawVerifier, address _hermezAuctionContract, address _tokenHEZ, uint8 _forgeL1L2BatchTimeout, uint256 _feeAddToken, address _poseidon2Elements, address _poseidon3Elements, address _poseidon4Elements, address _hermezGovernanceDAOAddress, address _safetyAddress, uint64 _withdrawalDelay, address _withdrawDelayerContract) returns() +func (_Hermez *HermezSession) InitializeHermez(_verifiers []common.Address, _verifiersParams []*big.Int, _withdrawVerifier common.Address, _hermezAuctionContract common.Address, _tokenHEZ common.Address, _forgeL1L2BatchTimeout uint8, _feeAddToken *big.Int, _poseidon2Elements common.Address, _poseidon3Elements common.Address, _poseidon4Elements common.Address, _hermezGovernanceDAOAddress common.Address, _safetyAddress common.Address, _withdrawalDelay uint64, _withdrawDelayerContract common.Address) (*types.Transaction, error) { + return _Hermez.Contract.InitializeHermez(&_Hermez.TransactOpts, _verifiers, _verifiersParams, _withdrawVerifier, _hermezAuctionContract, _tokenHEZ, _forgeL1L2BatchTimeout, _feeAddToken, _poseidon2Elements, _poseidon3Elements, _poseidon4Elements, _hermezGovernanceDAOAddress, _safetyAddress, _withdrawalDelay, _withdrawDelayerContract) } -// CreateAccountDepositFromRelayer is a paid mutator transaction binding the contract method 0xd7d207c0. +// InitializeHermez is a paid mutator transaction binding the contract method 0x4ee51c26. // -// Solidity: function createAccountDepositFromRelayer(bytes accountCreationAuthSig, uint256 babyPubKey, uint16 loadAmountF, uint32 tokenID) payable returns() -func (_Hermez *HermezTransactorSession) CreateAccountDepositFromRelayer(accountCreationAuthSig []byte, babyPubKey *big.Int, loadAmountF uint16, tokenID uint32) (*types.Transaction, error) { - return _Hermez.Contract.CreateAccountDepositFromRelayer(&_Hermez.TransactOpts, accountCreationAuthSig, babyPubKey, loadAmountF, tokenID) -} - -// CreateAccountDepositTransfer is a paid mutator transaction binding the contract method 0x568bc1c5. -// -// Solidity: function createAccountDepositTransfer(uint256 babyPubKey, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint32 toIdx) payable returns() -func (_Hermez *HermezTransactor) CreateAccountDepositTransfer(opts *bind.TransactOpts, babyPubKey *big.Int, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx uint32) (*types.Transaction, error) { - return _Hermez.contract.Transact(opts, "createAccountDepositTransfer", babyPubKey, loadAmountF, amountF, tokenID, toIdx) -} - -// CreateAccountDepositTransfer is a paid mutator transaction binding the contract method 0x568bc1c5. -// -// Solidity: function createAccountDepositTransfer(uint256 babyPubKey, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint32 toIdx) payable returns() -func (_Hermez *HermezSession) CreateAccountDepositTransfer(babyPubKey *big.Int, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx uint32) (*types.Transaction, error) { - return _Hermez.Contract.CreateAccountDepositTransfer(&_Hermez.TransactOpts, babyPubKey, loadAmountF, amountF, tokenID, toIdx) -} - -// CreateAccountDepositTransfer is a paid mutator transaction binding the contract method 0x568bc1c5. -// -// Solidity: function createAccountDepositTransfer(uint256 babyPubKey, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint32 toIdx) payable returns() -func (_Hermez *HermezTransactorSession) CreateAccountDepositTransfer(babyPubKey *big.Int, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx uint32) (*types.Transaction, error) { - return _Hermez.Contract.CreateAccountDepositTransfer(&_Hermez.TransactOpts, babyPubKey, loadAmountF, amountF, tokenID, toIdx) -} - -// Deposit is a paid mutator transaction binding the contract method 0x363e2a22. -// -// Solidity: function deposit(uint32 fromIdx, uint16 loadAmountF, uint32 tokenID) payable returns() -func (_Hermez *HermezTransactor) Deposit(opts *bind.TransactOpts, fromIdx uint32, loadAmountF uint16, tokenID uint32) (*types.Transaction, error) { - return _Hermez.contract.Transact(opts, "deposit", fromIdx, loadAmountF, tokenID) -} - -// Deposit is a paid mutator transaction binding the contract method 0x363e2a22. -// -// Solidity: function deposit(uint32 fromIdx, uint16 loadAmountF, uint32 tokenID) payable returns() -func (_Hermez *HermezSession) Deposit(fromIdx uint32, loadAmountF uint16, tokenID uint32) (*types.Transaction, error) { - return _Hermez.Contract.Deposit(&_Hermez.TransactOpts, fromIdx, loadAmountF, tokenID) -} - -// Deposit is a paid mutator transaction binding the contract method 0x363e2a22. -// -// Solidity: function deposit(uint32 fromIdx, uint16 loadAmountF, uint32 tokenID) payable returns() -func (_Hermez *HermezTransactorSession) Deposit(fromIdx uint32, loadAmountF uint16, tokenID uint32) (*types.Transaction, error) { - return _Hermez.Contract.Deposit(&_Hermez.TransactOpts, fromIdx, loadAmountF, tokenID) -} - -// DepositTransfer is a paid mutator transaction binding the contract method 0x9612518a. -// -// Solidity: function depositTransfer(uint32 fromIdx, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint32 toIdx) payable returns() -func (_Hermez *HermezTransactor) DepositTransfer(opts *bind.TransactOpts, fromIdx uint32, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx uint32) (*types.Transaction, error) { - return _Hermez.contract.Transact(opts, "depositTransfer", fromIdx, loadAmountF, amountF, tokenID, toIdx) -} - -// DepositTransfer is a paid mutator transaction binding the contract method 0x9612518a. -// -// Solidity: function depositTransfer(uint32 fromIdx, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint32 toIdx) payable returns() -func (_Hermez *HermezSession) DepositTransfer(fromIdx uint32, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx uint32) (*types.Transaction, error) { - return _Hermez.Contract.DepositTransfer(&_Hermez.TransactOpts, fromIdx, loadAmountF, amountF, tokenID, toIdx) -} - -// DepositTransfer is a paid mutator transaction binding the contract method 0x9612518a. -// -// Solidity: function depositTransfer(uint32 fromIdx, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint32 toIdx) payable returns() -func (_Hermez *HermezTransactorSession) DepositTransfer(fromIdx uint32, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx uint32) (*types.Transaction, error) { - return _Hermez.Contract.DepositTransfer(&_Hermez.TransactOpts, fromIdx, loadAmountF, amountF, tokenID, toIdx) -} - -// ForceExit is a paid mutator transaction binding the contract method 0xe6171150. -// -// Solidity: function forceExit(uint32 fromIdx, uint16 amountF, uint32 tokenID) payable returns() -func (_Hermez *HermezTransactor) ForceExit(opts *bind.TransactOpts, fromIdx uint32, amountF uint16, tokenID uint32) (*types.Transaction, error) { - return _Hermez.contract.Transact(opts, "forceExit", fromIdx, amountF, tokenID) -} - -// ForceExit is a paid mutator transaction binding the contract method 0xe6171150. -// -// Solidity: function forceExit(uint32 fromIdx, uint16 amountF, uint32 tokenID) payable returns() -func (_Hermez *HermezSession) ForceExit(fromIdx uint32, amountF uint16, tokenID uint32) (*types.Transaction, error) { - return _Hermez.Contract.ForceExit(&_Hermez.TransactOpts, fromIdx, amountF, tokenID) -} - -// ForceExit is a paid mutator transaction binding the contract method 0xe6171150. -// -// Solidity: function forceExit(uint32 fromIdx, uint16 amountF, uint32 tokenID) payable returns() -func (_Hermez *HermezTransactorSession) ForceExit(fromIdx uint32, amountF uint16, tokenID uint32) (*types.Transaction, error) { - return _Hermez.Contract.ForceExit(&_Hermez.TransactOpts, fromIdx, amountF, tokenID) -} - -// ForceTransfer is a paid mutator transaction binding the contract method 0x3787f591. -// -// Solidity: function forceTransfer(uint32 fromIdx, uint16 amountF, uint32 tokenID, uint32 toIdx) payable returns() -func (_Hermez *HermezTransactor) ForceTransfer(opts *bind.TransactOpts, fromIdx uint32, amountF uint16, tokenID uint32, toIdx uint32) (*types.Transaction, error) { - return _Hermez.contract.Transact(opts, "forceTransfer", fromIdx, amountF, tokenID, toIdx) -} - -// ForceTransfer is a paid mutator transaction binding the contract method 0x3787f591. -// -// Solidity: function forceTransfer(uint32 fromIdx, uint16 amountF, uint32 tokenID, uint32 toIdx) payable returns() -func (_Hermez *HermezSession) ForceTransfer(fromIdx uint32, amountF uint16, tokenID uint32, toIdx uint32) (*types.Transaction, error) { - return _Hermez.Contract.ForceTransfer(&_Hermez.TransactOpts, fromIdx, amountF, tokenID, toIdx) -} - -// ForceTransfer is a paid mutator transaction binding the contract method 0x3787f591. -// -// Solidity: function forceTransfer(uint32 fromIdx, uint16 amountF, uint32 tokenID, uint32 toIdx) payable returns() -func (_Hermez *HermezTransactorSession) ForceTransfer(fromIdx uint32, amountF uint16, tokenID uint32, toIdx uint32) (*types.Transaction, error) { - return _Hermez.Contract.ForceTransfer(&_Hermez.TransactOpts, fromIdx, amountF, tokenID, toIdx) -} - -// ForgeBatch is a paid mutator transaction binding the contract method 0xc8464ed1. -// -// Solidity: function forgeBatch(uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC, uint32 newLastIdx, uint256 newStRoot, uint256 newExitRoot, bytes encodedL1CoordinatorTx, bytes l2TxsData, bytes feeIdxCoordinator, uint256 verifierIdx, bool l1Batch) returns() -func (_Hermez *HermezTransactor) ForgeBatch(opts *bind.TransactOpts, proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int, newLastIdx uint32, newStRoot *big.Int, newExitRoot *big.Int, encodedL1CoordinatorTx []byte, l2TxsData []byte, feeIdxCoordinator []byte, verifierIdx *big.Int, l1Batch bool) (*types.Transaction, error) { - return _Hermez.contract.Transact(opts, "forgeBatch", proofA, proofB, proofC, newLastIdx, newStRoot, newExitRoot, encodedL1CoordinatorTx, l2TxsData, feeIdxCoordinator, verifierIdx, l1Batch) -} - -// ForgeBatch is a paid mutator transaction binding the contract method 0xc8464ed1. -// -// Solidity: function forgeBatch(uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC, uint32 newLastIdx, uint256 newStRoot, uint256 newExitRoot, bytes encodedL1CoordinatorTx, bytes l2TxsData, bytes feeIdxCoordinator, uint256 verifierIdx, bool l1Batch) returns() -func (_Hermez *HermezSession) ForgeBatch(proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int, newLastIdx uint32, newStRoot *big.Int, newExitRoot *big.Int, encodedL1CoordinatorTx []byte, l2TxsData []byte, feeIdxCoordinator []byte, verifierIdx *big.Int, l1Batch bool) (*types.Transaction, error) { - return _Hermez.Contract.ForgeBatch(&_Hermez.TransactOpts, proofA, proofB, proofC, newLastIdx, newStRoot, newExitRoot, encodedL1CoordinatorTx, l2TxsData, feeIdxCoordinator, verifierIdx, l1Batch) -} - -// ForgeBatch is a paid mutator transaction binding the contract method 0xc8464ed1. -// -// Solidity: function forgeBatch(uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC, uint32 newLastIdx, uint256 newStRoot, uint256 newExitRoot, bytes encodedL1CoordinatorTx, bytes l2TxsData, bytes feeIdxCoordinator, uint256 verifierIdx, bool l1Batch) returns() -func (_Hermez *HermezTransactorSession) ForgeBatch(proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int, newLastIdx uint32, newStRoot *big.Int, newExitRoot *big.Int, encodedL1CoordinatorTx []byte, l2TxsData []byte, feeIdxCoordinator []byte, verifierIdx *big.Int, l1Batch bool) (*types.Transaction, error) { - return _Hermez.Contract.ForgeBatch(&_Hermez.TransactOpts, proofA, proofB, proofC, newLastIdx, newStRoot, newExitRoot, encodedL1CoordinatorTx, l2TxsData, feeIdxCoordinator, verifierIdx, l1Batch) -} - -// Initialize is a paid mutator transaction binding the contract method 0xee67f32e. -// -// Solidity: function initialize(address[] _verifiers, uint256[] _maxTxVerifiers, address _tokenHEZ, address _governanceAddress, address _safetyAddress, address _hermezAuctionContract, address _withdrawDelayerContract, address _poseidon2Elements, address _poseidon3Elements, address _poseidon4Elements, uint256 _feeAddToken, uint256 _forgeL1L2BatchTimeout, uint64 _withdrawalDelay) returns() -func (_Hermez *HermezTransactor) Initialize(opts *bind.TransactOpts, _verifiers []common.Address, _maxTxVerifiers []*big.Int, _tokenHEZ common.Address, _governanceAddress common.Address, _safetyAddress common.Address, _hermezAuctionContract common.Address, _withdrawDelayerContract common.Address, _poseidon2Elements common.Address, _poseidon3Elements common.Address, _poseidon4Elements common.Address, _feeAddToken *big.Int, _forgeL1L2BatchTimeout *big.Int, _withdrawalDelay uint64) (*types.Transaction, error) { - return _Hermez.contract.Transact(opts, "initialize", _verifiers, _maxTxVerifiers, _tokenHEZ, _governanceAddress, _safetyAddress, _hermezAuctionContract, _withdrawDelayerContract, _poseidon2Elements, _poseidon3Elements, _poseidon4Elements, _feeAddToken, _forgeL1L2BatchTimeout, _withdrawalDelay) -} - -// Initialize is a paid mutator transaction binding the contract method 0xee67f32e. -// -// Solidity: function initialize(address[] _verifiers, uint256[] _maxTxVerifiers, address _tokenHEZ, address _governanceAddress, address _safetyAddress, address _hermezAuctionContract, address _withdrawDelayerContract, address _poseidon2Elements, address _poseidon3Elements, address _poseidon4Elements, uint256 _feeAddToken, uint256 _forgeL1L2BatchTimeout, uint64 _withdrawalDelay) returns() -func (_Hermez *HermezSession) Initialize(_verifiers []common.Address, _maxTxVerifiers []*big.Int, _tokenHEZ common.Address, _governanceAddress common.Address, _safetyAddress common.Address, _hermezAuctionContract common.Address, _withdrawDelayerContract common.Address, _poseidon2Elements common.Address, _poseidon3Elements common.Address, _poseidon4Elements common.Address, _feeAddToken *big.Int, _forgeL1L2BatchTimeout *big.Int, _withdrawalDelay uint64) (*types.Transaction, error) { - return _Hermez.Contract.Initialize(&_Hermez.TransactOpts, _verifiers, _maxTxVerifiers, _tokenHEZ, _governanceAddress, _safetyAddress, _hermezAuctionContract, _withdrawDelayerContract, _poseidon2Elements, _poseidon3Elements, _poseidon4Elements, _feeAddToken, _forgeL1L2BatchTimeout, _withdrawalDelay) -} - -// Initialize is a paid mutator transaction binding the contract method 0xee67f32e. -// -// Solidity: function initialize(address[] _verifiers, uint256[] _maxTxVerifiers, address _tokenHEZ, address _governanceAddress, address _safetyAddress, address _hermezAuctionContract, address _withdrawDelayerContract, address _poseidon2Elements, address _poseidon3Elements, address _poseidon4Elements, uint256 _feeAddToken, uint256 _forgeL1L2BatchTimeout, uint64 _withdrawalDelay) returns() -func (_Hermez *HermezTransactorSession) Initialize(_verifiers []common.Address, _maxTxVerifiers []*big.Int, _tokenHEZ common.Address, _governanceAddress common.Address, _safetyAddress common.Address, _hermezAuctionContract common.Address, _withdrawDelayerContract common.Address, _poseidon2Elements common.Address, _poseidon3Elements common.Address, _poseidon4Elements common.Address, _feeAddToken *big.Int, _forgeL1L2BatchTimeout *big.Int, _withdrawalDelay uint64) (*types.Transaction, error) { - return _Hermez.Contract.Initialize(&_Hermez.TransactOpts, _verifiers, _maxTxVerifiers, _tokenHEZ, _governanceAddress, _safetyAddress, _hermezAuctionContract, _withdrawDelayerContract, _poseidon2Elements, _poseidon3Elements, _poseidon4Elements, _feeAddToken, _forgeL1L2BatchTimeout, _withdrawalDelay) +// Solidity: function initializeHermez(address[] _verifiers, uint256[] _verifiersParams, address _withdrawVerifier, address _hermezAuctionContract, address _tokenHEZ, uint8 _forgeL1L2BatchTimeout, uint256 _feeAddToken, address _poseidon2Elements, address _poseidon3Elements, address _poseidon4Elements, address _hermezGovernanceDAOAddress, address _safetyAddress, uint64 _withdrawalDelay, address _withdrawDelayerContract) returns() +func (_Hermez *HermezTransactorSession) InitializeHermez(_verifiers []common.Address, _verifiersParams []*big.Int, _withdrawVerifier common.Address, _hermezAuctionContract common.Address, _tokenHEZ common.Address, _forgeL1L2BatchTimeout uint8, _feeAddToken *big.Int, _poseidon2Elements common.Address, _poseidon3Elements common.Address, _poseidon4Elements common.Address, _hermezGovernanceDAOAddress common.Address, _safetyAddress common.Address, _withdrawalDelay uint64, _withdrawDelayerContract common.Address) (*types.Transaction, error) { + return _Hermez.Contract.InitializeHermez(&_Hermez.TransactOpts, _verifiers, _verifiersParams, _withdrawVerifier, _hermezAuctionContract, _tokenHEZ, _forgeL1L2BatchTimeout, _feeAddToken, _poseidon2Elements, _poseidon3Elements, _poseidon4Elements, _hermezGovernanceDAOAddress, _safetyAddress, _withdrawalDelay, _withdrawDelayerContract) } // SafeMode is a paid mutator transaction binding the contract method 0xabe3219c. @@ -1465,6 +984,27 @@ func (_Hermez *HermezTransactorSession) SafeMode() (*types.Transaction, error) { return _Hermez.Contract.SafeMode(&_Hermez.TransactOpts) } +// TokensReceived is a paid mutator transaction binding the contract method 0x0023de29. +// +// Solidity: function tokensReceived(address operator, address from, address to, uint256 amount, bytes userData, bytes operatorData) returns() +func (_Hermez *HermezTransactor) TokensReceived(opts *bind.TransactOpts, operator common.Address, from common.Address, to common.Address, amount *big.Int, userData []byte, operatorData []byte) (*types.Transaction, error) { + return _Hermez.contract.Transact(opts, "tokensReceived", operator, from, to, amount, userData, operatorData) +} + +// TokensReceived is a paid mutator transaction binding the contract method 0x0023de29. +// +// Solidity: function tokensReceived(address operator, address from, address to, uint256 amount, bytes userData, bytes operatorData) returns() +func (_Hermez *HermezSession) TokensReceived(operator common.Address, from common.Address, to common.Address, amount *big.Int, userData []byte, operatorData []byte) (*types.Transaction, error) { + return _Hermez.Contract.TokensReceived(&_Hermez.TransactOpts, operator, from, to, amount, userData, operatorData) +} + +// TokensReceived is a paid mutator transaction binding the contract method 0x0023de29. +// +// Solidity: function tokensReceived(address operator, address from, address to, uint256 amount, bytes userData, bytes operatorData) returns() +func (_Hermez *HermezTransactorSession) TokensReceived(operator common.Address, from common.Address, to common.Address, amount *big.Int, userData []byte, operatorData []byte) (*types.Transaction, error) { + return _Hermez.Contract.TokensReceived(&_Hermez.TransactOpts, operator, from, to, amount, userData, operatorData) +} + // UpdateBucketsParameters is a paid mutator transaction binding the contract method 0x68e95e53. // // Solidity: function updateBucketsParameters(uint256[4][5] arrayBuckets) returns() @@ -1507,45 +1047,45 @@ func (_Hermez *HermezTransactorSession) UpdateFeeAddToken(newFeeAddToken *big.In return _Hermez.Contract.UpdateFeeAddToken(&_Hermez.TransactOpts, newFeeAddToken) } -// UpdateForgeL1L2BatchTimeout is a paid mutator transaction binding the contract method 0x39cd0581. +// UpdateForgeL1L2BatchTimeout is a paid mutator transaction binding the contract method 0xcbd7b5fb. // -// Solidity: function updateForgeL1L2BatchTimeout(uint256 newForgeL1L2BatchTimeout) returns() -func (_Hermez *HermezTransactor) UpdateForgeL1L2BatchTimeout(opts *bind.TransactOpts, newForgeL1L2BatchTimeout *big.Int) (*types.Transaction, error) { +// Solidity: function updateForgeL1L2BatchTimeout(uint8 newForgeL1L2BatchTimeout) returns() +func (_Hermez *HermezTransactor) UpdateForgeL1L2BatchTimeout(opts *bind.TransactOpts, newForgeL1L2BatchTimeout uint8) (*types.Transaction, error) { return _Hermez.contract.Transact(opts, "updateForgeL1L2BatchTimeout", newForgeL1L2BatchTimeout) } -// UpdateForgeL1L2BatchTimeout is a paid mutator transaction binding the contract method 0x39cd0581. +// UpdateForgeL1L2BatchTimeout is a paid mutator transaction binding the contract method 0xcbd7b5fb. // -// Solidity: function updateForgeL1L2BatchTimeout(uint256 newForgeL1L2BatchTimeout) returns() -func (_Hermez *HermezSession) UpdateForgeL1L2BatchTimeout(newForgeL1L2BatchTimeout *big.Int) (*types.Transaction, error) { +// Solidity: function updateForgeL1L2BatchTimeout(uint8 newForgeL1L2BatchTimeout) returns() +func (_Hermez *HermezSession) UpdateForgeL1L2BatchTimeout(newForgeL1L2BatchTimeout uint8) (*types.Transaction, error) { return _Hermez.Contract.UpdateForgeL1L2BatchTimeout(&_Hermez.TransactOpts, newForgeL1L2BatchTimeout) } -// UpdateForgeL1L2BatchTimeout is a paid mutator transaction binding the contract method 0x39cd0581. +// UpdateForgeL1L2BatchTimeout is a paid mutator transaction binding the contract method 0xcbd7b5fb. // -// Solidity: function updateForgeL1L2BatchTimeout(uint256 newForgeL1L2BatchTimeout) returns() -func (_Hermez *HermezTransactorSession) UpdateForgeL1L2BatchTimeout(newForgeL1L2BatchTimeout *big.Int) (*types.Transaction, error) { +// Solidity: function updateForgeL1L2BatchTimeout(uint8 newForgeL1L2BatchTimeout) returns() +func (_Hermez *HermezTransactorSession) UpdateForgeL1L2BatchTimeout(newForgeL1L2BatchTimeout uint8) (*types.Transaction, error) { return _Hermez.Contract.UpdateForgeL1L2BatchTimeout(&_Hermez.TransactOpts, newForgeL1L2BatchTimeout) } -// UpdateTokenExchange is a paid mutator transaction binding the contract method 0xcadedd82. +// UpdateTokenExchange is a paid mutator transaction binding the contract method 0x1a748c2d. // -// Solidity: function updateTokenExchange(address[] addressArray, uint256[] valueArray) returns() -func (_Hermez *HermezTransactor) UpdateTokenExchange(opts *bind.TransactOpts, addressArray []common.Address, valueArray []*big.Int) (*types.Transaction, error) { +// Solidity: function updateTokenExchange(address[] addressArray, uint64[] valueArray) returns() +func (_Hermez *HermezTransactor) UpdateTokenExchange(opts *bind.TransactOpts, addressArray []common.Address, valueArray []uint64) (*types.Transaction, error) { return _Hermez.contract.Transact(opts, "updateTokenExchange", addressArray, valueArray) } -// UpdateTokenExchange is a paid mutator transaction binding the contract method 0xcadedd82. +// UpdateTokenExchange is a paid mutator transaction binding the contract method 0x1a748c2d. // -// Solidity: function updateTokenExchange(address[] addressArray, uint256[] valueArray) returns() -func (_Hermez *HermezSession) UpdateTokenExchange(addressArray []common.Address, valueArray []*big.Int) (*types.Transaction, error) { +// Solidity: function updateTokenExchange(address[] addressArray, uint64[] valueArray) returns() +func (_Hermez *HermezSession) UpdateTokenExchange(addressArray []common.Address, valueArray []uint64) (*types.Transaction, error) { return _Hermez.Contract.UpdateTokenExchange(&_Hermez.TransactOpts, addressArray, valueArray) } -// UpdateTokenExchange is a paid mutator transaction binding the contract method 0xcadedd82. +// UpdateTokenExchange is a paid mutator transaction binding the contract method 0x1a748c2d. // -// Solidity: function updateTokenExchange(address[] addressArray, uint256[] valueArray) returns() -func (_Hermez *HermezTransactorSession) UpdateTokenExchange(addressArray []common.Address, valueArray []*big.Int) (*types.Transaction, error) { +// Solidity: function updateTokenExchange(address[] addressArray, uint64[] valueArray) returns() +func (_Hermez *HermezTransactorSession) UpdateTokenExchange(addressArray []common.Address, valueArray []uint64) (*types.Transaction, error) { return _Hermez.Contract.UpdateTokenExchange(&_Hermez.TransactOpts, addressArray, valueArray) } @@ -1570,25 +1110,46 @@ func (_Hermez *HermezTransactorSession) UpdateWithdrawalDelay(newWithdrawalDelay return _Hermez.Contract.UpdateWithdrawalDelay(&_Hermez.TransactOpts, newWithdrawalDelay) } -// Withdraw is a paid mutator transaction binding the contract method 0xbe8e25db. +// WithdrawCircuit is a paid mutator transaction binding the contract method 0xc63cc3a0. +// +// Solidity: function withdrawCircuit(uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC, uint32 tokenID, uint192 amount, uint48 numExitRoot, uint48 idx, bool instantWithdraw) returns() +func (_Hermez *HermezTransactor) WithdrawCircuit(opts *bind.TransactOpts, proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int, tokenID uint32, amount *big.Int, numExitRoot *big.Int, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) { + return _Hermez.contract.Transact(opts, "withdrawCircuit", proofA, proofB, proofC, tokenID, amount, numExitRoot, idx, instantWithdraw) +} + +// WithdrawCircuit is a paid mutator transaction binding the contract method 0xc63cc3a0. +// +// Solidity: function withdrawCircuit(uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC, uint32 tokenID, uint192 amount, uint48 numExitRoot, uint48 idx, bool instantWithdraw) returns() +func (_Hermez *HermezSession) WithdrawCircuit(proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int, tokenID uint32, amount *big.Int, numExitRoot *big.Int, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) { + return _Hermez.Contract.WithdrawCircuit(&_Hermez.TransactOpts, proofA, proofB, proofC, tokenID, amount, numExitRoot, idx, instantWithdraw) +} + +// WithdrawCircuit is a paid mutator transaction binding the contract method 0xc63cc3a0. // -// Solidity: function withdraw(uint32 tokenID, uint192 balance, uint256 babyPubKey, uint256 numExitRoot, uint256[] siblings, uint256 idx, bool instantWithdraw) returns() -func (_Hermez *HermezTransactor) Withdraw(opts *bind.TransactOpts, tokenID uint32, balance *big.Int, babyPubKey *big.Int, numExitRoot *big.Int, siblings []*big.Int, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) { - return _Hermez.contract.Transact(opts, "withdraw", tokenID, balance, babyPubKey, numExitRoot, siblings, idx, instantWithdraw) +// Solidity: function withdrawCircuit(uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC, uint32 tokenID, uint192 amount, uint48 numExitRoot, uint48 idx, bool instantWithdraw) returns() +func (_Hermez *HermezTransactorSession) WithdrawCircuit(proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int, tokenID uint32, amount *big.Int, numExitRoot *big.Int, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) { + return _Hermez.Contract.WithdrawCircuit(&_Hermez.TransactOpts, proofA, proofB, proofC, tokenID, amount, numExitRoot, idx, instantWithdraw) } -// Withdraw is a paid mutator transaction binding the contract method 0xbe8e25db. +// WithdrawMerkleProof is a paid mutator transaction binding the contract method 0x432dd51f. // -// Solidity: function withdraw(uint32 tokenID, uint192 balance, uint256 babyPubKey, uint256 numExitRoot, uint256[] siblings, uint256 idx, bool instantWithdraw) returns() -func (_Hermez *HermezSession) Withdraw(tokenID uint32, balance *big.Int, babyPubKey *big.Int, numExitRoot *big.Int, siblings []*big.Int, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) { - return _Hermez.Contract.Withdraw(&_Hermez.TransactOpts, tokenID, balance, babyPubKey, numExitRoot, siblings, idx, instantWithdraw) +// Solidity: function withdrawMerkleProof(uint32 tokenID, uint192 amount, uint256 babyPubKey, uint48 numExitRoot, uint256[] siblings, uint48 idx, bool instantWithdraw) returns() +func (_Hermez *HermezTransactor) WithdrawMerkleProof(opts *bind.TransactOpts, tokenID uint32, amount *big.Int, babyPubKey *big.Int, numExitRoot *big.Int, siblings []*big.Int, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) { + return _Hermez.contract.Transact(opts, "withdrawMerkleProof", tokenID, amount, babyPubKey, numExitRoot, siblings, idx, instantWithdraw) } -// Withdraw is a paid mutator transaction binding the contract method 0xbe8e25db. +// WithdrawMerkleProof is a paid mutator transaction binding the contract method 0x432dd51f. // -// Solidity: function withdraw(uint32 tokenID, uint192 balance, uint256 babyPubKey, uint256 numExitRoot, uint256[] siblings, uint256 idx, bool instantWithdraw) returns() -func (_Hermez *HermezTransactorSession) Withdraw(tokenID uint32, balance *big.Int, babyPubKey *big.Int, numExitRoot *big.Int, siblings []*big.Int, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) { - return _Hermez.Contract.Withdraw(&_Hermez.TransactOpts, tokenID, balance, babyPubKey, numExitRoot, siblings, idx, instantWithdraw) +// Solidity: function withdrawMerkleProof(uint32 tokenID, uint192 amount, uint256 babyPubKey, uint48 numExitRoot, uint256[] siblings, uint48 idx, bool instantWithdraw) returns() +func (_Hermez *HermezSession) WithdrawMerkleProof(tokenID uint32, amount *big.Int, babyPubKey *big.Int, numExitRoot *big.Int, siblings []*big.Int, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) { + return _Hermez.Contract.WithdrawMerkleProof(&_Hermez.TransactOpts, tokenID, amount, babyPubKey, numExitRoot, siblings, idx, instantWithdraw) +} + +// WithdrawMerkleProof is a paid mutator transaction binding the contract method 0x432dd51f. +// +// Solidity: function withdrawMerkleProof(uint32 tokenID, uint192 amount, uint256 babyPubKey, uint48 numExitRoot, uint256[] siblings, uint48 idx, bool instantWithdraw) returns() +func (_Hermez *HermezTransactorSession) WithdrawMerkleProof(tokenID uint32, amount *big.Int, babyPubKey *big.Int, numExitRoot *big.Int, siblings []*big.Int, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) { + return _Hermez.Contract.WithdrawMerkleProof(&_Hermez.TransactOpts, tokenID, amount, babyPubKey, numExitRoot, siblings, idx, instantWithdraw) } // HermezAddTokenIterator is returned from FilterAddToken and is used to iterate over the raw logs and unpacked data for AddToken events raised by the Hermez contract. @@ -1667,10 +1228,15 @@ type HermezAddToken struct { // FilterAddToken is a free log retrieval operation binding the contract event 0xcb73d161edb7cd4fb1d92fedfd2555384fd997fd44ab507656f8c81e15747dde. // -// Solidity: event AddToken(address tokenAddress, uint32 tokenID) -func (_Hermez *HermezFilterer) FilterAddToken(opts *bind.FilterOpts) (*HermezAddTokenIterator, error) { +// Solidity: event AddToken(address indexed tokenAddress, uint32 tokenID) +func (_Hermez *HermezFilterer) FilterAddToken(opts *bind.FilterOpts, tokenAddress []common.Address) (*HermezAddTokenIterator, error) { + + var tokenAddressRule []interface{} + for _, tokenAddressItem := range tokenAddress { + tokenAddressRule = append(tokenAddressRule, tokenAddressItem) + } - logs, sub, err := _Hermez.contract.FilterLogs(opts, "AddToken") + logs, sub, err := _Hermez.contract.FilterLogs(opts, "AddToken", tokenAddressRule) if err != nil { return nil, err } @@ -1679,10 +1245,15 @@ func (_Hermez *HermezFilterer) FilterAddToken(opts *bind.FilterOpts) (*HermezAdd // WatchAddToken is a free log subscription operation binding the contract event 0xcb73d161edb7cd4fb1d92fedfd2555384fd997fd44ab507656f8c81e15747dde. // -// Solidity: event AddToken(address tokenAddress, uint32 tokenID) -func (_Hermez *HermezFilterer) WatchAddToken(opts *bind.WatchOpts, sink chan<- *HermezAddToken) (event.Subscription, error) { +// Solidity: event AddToken(address indexed tokenAddress, uint32 tokenID) +func (_Hermez *HermezFilterer) WatchAddToken(opts *bind.WatchOpts, sink chan<- *HermezAddToken, tokenAddress []common.Address) (event.Subscription, error) { - logs, sub, err := _Hermez.contract.WatchLogs(opts, "AddToken") + var tokenAddressRule []interface{} + for _, tokenAddressItem := range tokenAddress { + tokenAddressRule = append(tokenAddressRule, tokenAddressItem) + } + + logs, sub, err := _Hermez.contract.WatchLogs(opts, "AddToken", tokenAddressRule) if err != nil { return nil, err } @@ -1716,7 +1287,7 @@ func (_Hermez *HermezFilterer) WatchAddToken(opts *bind.WatchOpts, sink chan<- * // ParseAddToken is a log parse operation binding the contract event 0xcb73d161edb7cd4fb1d92fedfd2555384fd997fd44ab507656f8c81e15747dde. // -// Solidity: event AddToken(address tokenAddress, uint32 tokenID) +// Solidity: event AddToken(address indexed tokenAddress, uint32 tokenID) func (_Hermez *HermezFilterer) ParseAddToken(log types.Log) (*HermezAddToken, error) { event := new(HermezAddToken) if err := _Hermez.contract.UnpackLog(event, "AddToken", log); err != nil { @@ -1794,28 +1365,38 @@ func (it *HermezForgeBatchIterator) Close() error { // HermezForgeBatch represents a ForgeBatch event raised by the Hermez contract. type HermezForgeBatch struct { - BatchNum *big.Int + BatchNum uint64 Raw types.Log // Blockchain specific contextual infos } -// FilterForgeBatch is a free log retrieval operation binding the contract event 0x9b346777a734ffed277bddd87dee3490eb9dcc5378c095eac5af3e0f5da04f41. +// FilterForgeBatch is a free log retrieval operation binding the contract event 0xd7ab70a9e6ed0d6985e74c5cb553d300a13a2217d58266922b275b72fe786982. // -// Solidity: event ForgeBatch(uint256 batchNum) -func (_Hermez *HermezFilterer) FilterForgeBatch(opts *bind.FilterOpts) (*HermezForgeBatchIterator, error) { +// Solidity: event ForgeBatch(uint64 indexed batchNum) +func (_Hermez *HermezFilterer) FilterForgeBatch(opts *bind.FilterOpts, batchNum []uint64) (*HermezForgeBatchIterator, error) { + + var batchNumRule []interface{} + for _, batchNumItem := range batchNum { + batchNumRule = append(batchNumRule, batchNumItem) + } - logs, sub, err := _Hermez.contract.FilterLogs(opts, "ForgeBatch") + logs, sub, err := _Hermez.contract.FilterLogs(opts, "ForgeBatch", batchNumRule) if err != nil { return nil, err } return &HermezForgeBatchIterator{contract: _Hermez.contract, event: "ForgeBatch", logs: logs, sub: sub}, nil } -// WatchForgeBatch is a free log subscription operation binding the contract event 0x9b346777a734ffed277bddd87dee3490eb9dcc5378c095eac5af3e0f5da04f41. +// WatchForgeBatch is a free log subscription operation binding the contract event 0xd7ab70a9e6ed0d6985e74c5cb553d300a13a2217d58266922b275b72fe786982. // -// Solidity: event ForgeBatch(uint256 batchNum) -func (_Hermez *HermezFilterer) WatchForgeBatch(opts *bind.WatchOpts, sink chan<- *HermezForgeBatch) (event.Subscription, error) { +// Solidity: event ForgeBatch(uint64 indexed batchNum) +func (_Hermez *HermezFilterer) WatchForgeBatch(opts *bind.WatchOpts, sink chan<- *HermezForgeBatch, batchNum []uint64) (event.Subscription, error) { + + var batchNumRule []interface{} + for _, batchNumItem := range batchNum { + batchNumRule = append(batchNumRule, batchNumItem) + } - logs, sub, err := _Hermez.contract.WatchLogs(opts, "ForgeBatch") + logs, sub, err := _Hermez.contract.WatchLogs(opts, "ForgeBatch", batchNumRule) if err != nil { return nil, err } @@ -1847,9 +1428,9 @@ func (_Hermez *HermezFilterer) WatchForgeBatch(opts *bind.WatchOpts, sink chan<- }), nil } -// ParseForgeBatch is a log parse operation binding the contract event 0x9b346777a734ffed277bddd87dee3490eb9dcc5378c095eac5af3e0f5da04f41. +// ParseForgeBatch is a log parse operation binding the contract event 0xd7ab70a9e6ed0d6985e74c5cb553d300a13a2217d58266922b275b72fe786982. // -// Solidity: event ForgeBatch(uint256 batchNum) +// Solidity: event ForgeBatch(uint64 indexed batchNum) func (_Hermez *HermezFilterer) ParseForgeBatch(log types.Log) (*HermezForgeBatch, error) { event := new(HermezForgeBatch) if err := _Hermez.contract.UnpackLog(event, "ForgeBatch", log); err != nil { @@ -1927,48 +1508,48 @@ func (it *HermezL1UserTxEventIterator) Close() error { // HermezL1UserTxEvent represents a L1UserTxEvent event raised by the Hermez contract. type HermezL1UserTxEvent struct { - L1UserTx []byte - QueueIndex *big.Int - TransactionIndex *big.Int - Raw types.Log // Blockchain specific contextual infos + QueueIndex uint64 + Position uint8 + L1UserTx []byte + Raw types.Log // Blockchain specific contextual infos } -// FilterL1UserTxEvent is a free log retrieval operation binding the contract event 0x44ed7960659190edb7acf74ac1bd6c7e8803bfa3aebe02c4599a0770fac3f884. +// FilterL1UserTxEvent is a free log retrieval operation binding the contract event 0x7f40be4e420c002c02fa9cad961f6a7620769d32d272f3f8c15e3ff59de9310e. // -// Solidity: event L1UserTxEvent(bytes l1UserTx, uint256 indexed queueIndex, uint256 indexed transactionIndex) -func (_Hermez *HermezFilterer) FilterL1UserTxEvent(opts *bind.FilterOpts, queueIndex []*big.Int, transactionIndex []*big.Int) (*HermezL1UserTxEventIterator, error) { +// Solidity: event L1UserTxEvent(uint64 indexed queueIndex, uint8 indexed position, bytes l1UserTx) +func (_Hermez *HermezFilterer) FilterL1UserTxEvent(opts *bind.FilterOpts, queueIndex []uint64, position []uint8) (*HermezL1UserTxEventIterator, error) { var queueIndexRule []interface{} for _, queueIndexItem := range queueIndex { queueIndexRule = append(queueIndexRule, queueIndexItem) } - var transactionIndexRule []interface{} - for _, transactionIndexItem := range transactionIndex { - transactionIndexRule = append(transactionIndexRule, transactionIndexItem) + var positionRule []interface{} + for _, positionItem := range position { + positionRule = append(positionRule, positionItem) } - logs, sub, err := _Hermez.contract.FilterLogs(opts, "L1UserTxEvent", queueIndexRule, transactionIndexRule) + logs, sub, err := _Hermez.contract.FilterLogs(opts, "L1UserTxEvent", queueIndexRule, positionRule) if err != nil { return nil, err } return &HermezL1UserTxEventIterator{contract: _Hermez.contract, event: "L1UserTxEvent", logs: logs, sub: sub}, nil } -// WatchL1UserTxEvent is a free log subscription operation binding the contract event 0x44ed7960659190edb7acf74ac1bd6c7e8803bfa3aebe02c4599a0770fac3f884. +// WatchL1UserTxEvent is a free log subscription operation binding the contract event 0x7f40be4e420c002c02fa9cad961f6a7620769d32d272f3f8c15e3ff59de9310e. // -// Solidity: event L1UserTxEvent(bytes l1UserTx, uint256 indexed queueIndex, uint256 indexed transactionIndex) -func (_Hermez *HermezFilterer) WatchL1UserTxEvent(opts *bind.WatchOpts, sink chan<- *HermezL1UserTxEvent, queueIndex []*big.Int, transactionIndex []*big.Int) (event.Subscription, error) { +// Solidity: event L1UserTxEvent(uint64 indexed queueIndex, uint8 indexed position, bytes l1UserTx) +func (_Hermez *HermezFilterer) WatchL1UserTxEvent(opts *bind.WatchOpts, sink chan<- *HermezL1UserTxEvent, queueIndex []uint64, position []uint8) (event.Subscription, error) { var queueIndexRule []interface{} for _, queueIndexItem := range queueIndex { queueIndexRule = append(queueIndexRule, queueIndexItem) } - var transactionIndexRule []interface{} - for _, transactionIndexItem := range transactionIndex { - transactionIndexRule = append(transactionIndexRule, transactionIndexItem) + var positionRule []interface{} + for _, positionItem := range position { + positionRule = append(positionRule, positionItem) } - logs, sub, err := _Hermez.contract.WatchLogs(opts, "L1UserTxEvent", queueIndexRule, transactionIndexRule) + logs, sub, err := _Hermez.contract.WatchLogs(opts, "L1UserTxEvent", queueIndexRule, positionRule) if err != nil { return nil, err } @@ -2000,9 +1581,9 @@ func (_Hermez *HermezFilterer) WatchL1UserTxEvent(opts *bind.WatchOpts, sink cha }), nil } -// ParseL1UserTxEvent is a log parse operation binding the contract event 0x44ed7960659190edb7acf74ac1bd6c7e8803bfa3aebe02c4599a0770fac3f884. +// ParseL1UserTxEvent is a log parse operation binding the contract event 0x7f40be4e420c002c02fa9cad961f6a7620769d32d272f3f8c15e3ff59de9310e. // -// Solidity: event L1UserTxEvent(bytes l1UserTx, uint256 indexed queueIndex, uint256 indexed transactionIndex) +// Solidity: event L1UserTxEvent(uint64 indexed queueIndex, uint8 indexed position, bytes l1UserTx) func (_Hermez *HermezFilterer) ParseL1UserTxEvent(log types.Log) (*HermezL1UserTxEvent, error) { event := new(HermezL1UserTxEvent) if err := _Hermez.contract.UnpackLog(event, "L1UserTxEvent", log); err != nil { @@ -2213,13 +1794,13 @@ func (it *HermezUpdateForgeL1L2BatchTimeoutIterator) Close() error { // HermezUpdateForgeL1L2BatchTimeout represents a UpdateForgeL1L2BatchTimeout event raised by the Hermez contract. type HermezUpdateForgeL1L2BatchTimeout struct { - NewForgeL1L2BatchTimeout *big.Int + NewForgeL1L2BatchTimeout uint8 Raw types.Log // Blockchain specific contextual infos } -// FilterUpdateForgeL1L2BatchTimeout is a free log retrieval operation binding the contract event 0x6df2dd186033d1083891be7a27ab27fd480094118e909a1780f9c2a2c49a7aa0. +// FilterUpdateForgeL1L2BatchTimeout is a free log retrieval operation binding the contract event 0xff6221781ac525b04585dbb55cd2ebd2a92c828ca3e42b23813a1137ac974431. // -// Solidity: event UpdateForgeL1L2BatchTimeout(uint256 newForgeL1L2BatchTimeout) +// Solidity: event UpdateForgeL1L2BatchTimeout(uint8 newForgeL1L2BatchTimeout) func (_Hermez *HermezFilterer) FilterUpdateForgeL1L2BatchTimeout(opts *bind.FilterOpts) (*HermezUpdateForgeL1L2BatchTimeoutIterator, error) { logs, sub, err := _Hermez.contract.FilterLogs(opts, "UpdateForgeL1L2BatchTimeout") @@ -2229,9 +1810,9 @@ func (_Hermez *HermezFilterer) FilterUpdateForgeL1L2BatchTimeout(opts *bind.Filt return &HermezUpdateForgeL1L2BatchTimeoutIterator{contract: _Hermez.contract, event: "UpdateForgeL1L2BatchTimeout", logs: logs, sub: sub}, nil } -// WatchUpdateForgeL1L2BatchTimeout is a free log subscription operation binding the contract event 0x6df2dd186033d1083891be7a27ab27fd480094118e909a1780f9c2a2c49a7aa0. +// WatchUpdateForgeL1L2BatchTimeout is a free log subscription operation binding the contract event 0xff6221781ac525b04585dbb55cd2ebd2a92c828ca3e42b23813a1137ac974431. // -// Solidity: event UpdateForgeL1L2BatchTimeout(uint256 newForgeL1L2BatchTimeout) +// Solidity: event UpdateForgeL1L2BatchTimeout(uint8 newForgeL1L2BatchTimeout) func (_Hermez *HermezFilterer) WatchUpdateForgeL1L2BatchTimeout(opts *bind.WatchOpts, sink chan<- *HermezUpdateForgeL1L2BatchTimeout) (event.Subscription, error) { logs, sub, err := _Hermez.contract.WatchLogs(opts, "UpdateForgeL1L2BatchTimeout") @@ -2266,9 +1847,9 @@ func (_Hermez *HermezFilterer) WatchUpdateForgeL1L2BatchTimeout(opts *bind.Watch }), nil } -// ParseUpdateForgeL1L2BatchTimeout is a log parse operation binding the contract event 0x6df2dd186033d1083891be7a27ab27fd480094118e909a1780f9c2a2c49a7aa0. +// ParseUpdateForgeL1L2BatchTimeout is a log parse operation binding the contract event 0xff6221781ac525b04585dbb55cd2ebd2a92c828ca3e42b23813a1137ac974431. // -// Solidity: event UpdateForgeL1L2BatchTimeout(uint256 newForgeL1L2BatchTimeout) +// Solidity: event UpdateForgeL1L2BatchTimeout(uint8 newForgeL1L2BatchTimeout) func (_Hermez *HermezFilterer) ParseUpdateForgeL1L2BatchTimeout(log types.Log) (*HermezUpdateForgeL1L2BatchTimeout, error) { event := new(HermezUpdateForgeL1L2BatchTimeout) if err := _Hermez.contract.UnpackLog(event, "UpdateForgeL1L2BatchTimeout", log); err != nil { @@ -2352,9 +1933,9 @@ type HermezWithdrawEvent struct { Raw types.Log // Blockchain specific contextual infos } -// FilterWithdrawEvent is a free log retrieval operation binding the contract event 0x1b9bced8515592200c493bd85d3b9e8508df7ea146ee075c252f034d226fdac6. +// FilterWithdrawEvent is a free log retrieval operation binding the contract event 0x92dd99230eaf5e3f1238fbbd0d72b34e8c2ad759886075bfc9f426ebeeea34f0. // -// Solidity: event WithdrawEvent(uint256 indexed idx, uint256 indexed numExitRoot, bool indexed instantWithdraw) +// Solidity: event WithdrawEvent(uint48 indexed idx, uint48 indexed numExitRoot, bool indexed instantWithdraw) func (_Hermez *HermezFilterer) FilterWithdrawEvent(opts *bind.FilterOpts, idx []*big.Int, numExitRoot []*big.Int, instantWithdraw []bool) (*HermezWithdrawEventIterator, error) { var idxRule []interface{} @@ -2377,9 +1958,9 @@ func (_Hermez *HermezFilterer) FilterWithdrawEvent(opts *bind.FilterOpts, idx [] return &HermezWithdrawEventIterator{contract: _Hermez.contract, event: "WithdrawEvent", logs: logs, sub: sub}, nil } -// WatchWithdrawEvent is a free log subscription operation binding the contract event 0x1b9bced8515592200c493bd85d3b9e8508df7ea146ee075c252f034d226fdac6. +// WatchWithdrawEvent is a free log subscription operation binding the contract event 0x92dd99230eaf5e3f1238fbbd0d72b34e8c2ad759886075bfc9f426ebeeea34f0. // -// Solidity: event WithdrawEvent(uint256 indexed idx, uint256 indexed numExitRoot, bool indexed instantWithdraw) +// Solidity: event WithdrawEvent(uint48 indexed idx, uint48 indexed numExitRoot, bool indexed instantWithdraw) func (_Hermez *HermezFilterer) WatchWithdrawEvent(opts *bind.WatchOpts, sink chan<- *HermezWithdrawEvent, idx []*big.Int, numExitRoot []*big.Int, instantWithdraw []bool) (event.Subscription, error) { var idxRule []interface{} @@ -2427,9 +2008,9 @@ func (_Hermez *HermezFilterer) WatchWithdrawEvent(opts *bind.WatchOpts, sink cha }), nil } -// ParseWithdrawEvent is a log parse operation binding the contract event 0x1b9bced8515592200c493bd85d3b9e8508df7ea146ee075c252f034d226fdac6. +// ParseWithdrawEvent is a log parse operation binding the contract event 0x92dd99230eaf5e3f1238fbbd0d72b34e8c2ad759886075bfc9f426ebeeea34f0. // -// Solidity: event WithdrawEvent(uint256 indexed idx, uint256 indexed numExitRoot, bool indexed instantWithdraw) +// Solidity: event WithdrawEvent(uint48 indexed idx, uint48 indexed numExitRoot, bool indexed instantWithdraw) func (_Hermez *HermezFilterer) ParseWithdrawEvent(log types.Log) (*HermezWithdrawEvent, error) { event := new(HermezWithdrawEvent) if err := _Hermez.contract.UnpackLog(event, "WithdrawEvent", log); err != nil { diff --git a/eth/contracts/withdrawdelayer/WithdrawalDelayer.go b/eth/contracts/withdrawdelayer/WithdrawalDelayer.go index a692a0e..41a0f44 100644 --- a/eth/contracts/withdrawdelayer/WithdrawalDelayer.go +++ b/eth/contracts/withdrawdelayer/WithdrawalDelayer.go @@ -27,10 +27,10 @@ var ( ) // WithdrawalDelayerABI is the input ABI used to generate the binding from. -const WithdrawalDelayerABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"depositTimestamp\",\"type\":\"uint64\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyModeEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"EscapeHatchWithdrawal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newHermezGovernanceDAOAddress\",\"type\":\"address\"}],\"name\":\"NewHermezGovernanceDAOAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newHermezKeeperAddress\",\"type\":\"address\"}],\"name\":\"NewHermezKeeperAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newWhiteHackGroupAddress\",\"type\":\"address\"}],\"name\":\"NewWhiteHackGroupAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"withdrawalDelay\",\"type\":\"uint64\"}],\"name\":\"NewWithdrawalDelay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_EMERGENCY_MODE_TIME\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_WITHDRAWAL_DELAY\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_newWithdrawalDelay\",\"type\":\"uint64\"}],\"name\":\"changeWithdrawalDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint192\",\"name\":\"_amount\",\"type\":\"uint192\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"depositInfo\",\"outputs\":[{\"internalType\":\"uint192\",\"name\":\"\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"deposits\",\"outputs\":[{\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"depositTimestamp\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enableEmergencyMode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"escapeHatchWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getEmergencyModeStartingTime\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHermezGovernanceDAOAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHermezKeeperAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWhiteHackGroupAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWithdrawalDelay\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hermezRollupAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_initialWithdrawalDelay\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_initialHermezRollup\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_initialHermezKeeperAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_initialHermezGovernanceDAOAddress\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"_initialWhiteHackGroupAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isEmergencyMode\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"setHermezGovernanceDAOAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"setHermezKeeperAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"setWhiteHackGroupAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"withdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +const WithdrawalDelayerABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"depositTimestamp\",\"type\":\"uint64\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyModeEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EscapeHatchWithdrawal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newHermezGovernanceDAOAddress\",\"type\":\"address\"}],\"name\":\"NewHermezGovernanceDAOAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newHermezKeeperAddress\",\"type\":\"address\"}],\"name\":\"NewHermezKeeperAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newWhiteHackGroupAddress\",\"type\":\"address\"}],\"name\":\"NewWhiteHackGroupAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"withdrawalDelay\",\"type\":\"uint64\"}],\"name\":\"NewWithdrawalDelay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_EMERGENCY_MODE_TIME\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_WITHDRAWAL_DELAY\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_newWithdrawalDelay\",\"type\":\"uint64\"}],\"name\":\"changeWithdrawalDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint192\",\"name\":\"_amount\",\"type\":\"uint192\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"depositInfo\",\"outputs\":[{\"internalType\":\"uint192\",\"name\":\"\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"deposits\",\"outputs\":[{\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"depositTimestamp\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enableEmergencyMode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"escapeHatchWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getEmergencyModeStartingTime\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHermezGovernanceDAOAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHermezKeeperAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWhiteHackGroupAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWithdrawalDelay\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hermezRollupAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isEmergencyMode\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"setHermezGovernanceDAOAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"setHermezKeeperAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"setWhiteHackGroupAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"tokensReceived\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"withdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_initialWithdrawalDelay\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_initialHermezRollup\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_initialHermezKeeperAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_initialHermezGovernanceDAOAddress\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"_initialWhiteHackGroupAddress\",\"type\":\"address\"}],\"name\":\"withdrawalDelayerInitializer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" // WithdrawalDelayerBin is the compiled bytecode used for deploying new contracts. -var WithdrawalDelayerBin = "0x60806040526037805460ff60a01b1916905534801561001d57600080fd5b506001600055611776806100326000396000f3fe60806040526004361061011f5760003560e01c8063668cdd67116100a0578063c5b1c7d011610064578063c5b1c7d0146103d7578063cf3a25d9146103ec578063cfc0b64114610427578063d82b217c14610467578063de35f2821461049a5761011f565b8063668cdd6714610334578063a238f9df14610349578063acfd6ea81461037a578063ae7efbbd146103ad578063b4b8e39d146103c25761011f565b806320a194b8116100e757806320a194b814610251578063305887f91461027a5780633d4dff7b1461028f578063493b0170146102e4578063580fc6111461031f5761011f565b806303160940146101245780630a4db01b1461015e5780630e670af5146101935780630fd266d7146101c657806316b487ff146101f7575b600080fd5b34801561013057600080fd5b506101396104d5565b604080516fffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561016a57600080fd5b506101916004803603602081101561018157600080fd5b50356001600160a01b03166104e4565b005b34801561019f57600080fd5b50610191600480360360208110156101b657600080fd5b50356001600160401b0316610590565b3480156101d257600080fd5b506101db6106c0565b604080516001600160a01b039092168252519081900360200190f35b34801561020357600080fd5b50610191600480360360a081101561021a57600080fd5b506001600160401b03813516906001600160a01b0360208201358116916040810135821691606082013581169160800135166106cf565b34801561025d57600080fd5b506102666107db565b604080519115158252519081900360200190f35b34801561028657600080fd5b506101db6107eb565b34801561029b57600080fd5b506102b9600480360360208110156102b257600080fd5b50356107fa565b604080516001600160c01b0390931683526001600160401b0390911660208301528051918290030190f35b3480156102f057600080fd5b506102b96004803603604081101561030757600080fd5b506001600160a01b0381358116916020013516610827565b34801561032b57600080fd5b506101db6108b8565b34801561034057600080fd5b506101396108c7565b34801561035557600080fd5b5061035e6108dd565b604080516001600160401b039092168252519081900360200190f35b34801561038657600080fd5b506101916004803603602081101561039d57600080fd5b50356001600160a01b03166108e4565b3480156103b957600080fd5b506101db61099d565b3480156103ce57600080fd5b5061035e6109ac565b3480156103e357600080fd5b506101916109b4565b3480156103f857600080fd5b506101916004803603604081101561040f57600080fd5b506001600160a01b0381358116916020013516610adc565b6101916004803603606081101561043d57600080fd5b5080356001600160a01b0390811691602081013590911690604001356001600160c01b0316610d72565b34801561047357600080fd5b506101916004803603602081101561048a57600080fd5b50356001600160a01b0316611191565b3480156104a657600080fd5b50610191600480360360408110156104bd57600080fd5b506001600160a01b038135811691602001351661124a565b6034546001600160401b031690565b6036546001600160a01b03163314610536576040805162461bcd60e51b815260206004820152601060248201526f4f6e6c7920574847206164647265737360801b604482015290519081900360640190fd5b603680546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f284ca073b8bdde2195ae98779277678773a99d7739e5f0477dc19a03fc689011916020908290030190a150565b6037546001600160a01b03163314806105b357506038546001600160a01b031633145b610604576040805162461bcd60e51b815260206004820152601c60248201527f4f6e6c79206865726d657a206b6565706572206f7220726f6c6c757000000000604482015290519081900360640190fd5b621275006001600160401b0382161115610665576040805162461bcd60e51b815260206004820152601c60248201527f45786365656473204d41585f5749544844524157414c5f44454c415900000000604482015290519081900360640190fd5b6034805467ffffffffffffffff19166001600160401b03838116919091179182905560408051929091168252517f6b3670ab51e04a9da086741e5fd1eb36ffaf1d661a15330c528e1f3e0c8722d7916020908290030190a150565b6038546001600160a01b031681565b600154610100900460ff16806106e857506106e86114c2565b806106f6575060015460ff16155b6107315760405162461bcd60e51b815260040180806020018281038252602e815260200180611713602e913960400191505060405180910390fd5b600154610100900460ff1615801561075b576001805460ff1961ff00199091166101001716811790555b6034805467ffffffffffffffff19166001600160401b038816179055603880546001600160a01b03199081166001600160a01b03888116919091179092556037805482168784161790556035805482168684161790556036805490911691841691909117905580156107d3576001805461ff00191690555b505050505050565b603754600160a01b900460ff1690565b6037546001600160a01b031690565b6039602052600090815260409020546001600160c01b03811690600160c01b90046001600160401b031682565b6000806108326116fb565b505060408051606094851b6001600160601b03199081166020808401919091529490951b90941660348501528051808503602801815260488501808352815191850191909120600090815260399094529281902060888501909152546001600160c01b03811692839052600160c01b90046001600160401b031660689093018390525091565b6035546001600160a01b031690565b603454600160401b90046001600160401b031690565b6212750081565b6035546001600160a01b03163314610943576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79204865726d657a20476f7665726e616e63652044414f000000000000604482015290519081900360640190fd5b603580546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f03683be8debd93f8f5ff23dd03419bfcb9b8287a1868b0f130d858f03c3a08a1916020908290030190a150565b6036546001600160a01b031690565b6301dfe20081565b6037546001600160a01b03163314610a13576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c79206865726d657a4b6565706572416464726573730000000000000000604482015290519081900360640190fd5b603754600160a01b900460ff1615610a72576040805162461bcd60e51b815260206004820152601e60248201527f456d657267656e6379206d6f646520616c726561647920656e61626c65640000604482015290519081900360640190fd5b6037805460ff60a01b1916600160a01b179055603480546001600160401b034216600160401b026fffffffffffffffff0000000000000000199091161790556040517f2064d51aa5a8bd67928c7675e267e05c67ad5adf7c9098d0a602d01f36fda9c590600090a1565b60026000541415610b34576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600055603754600160a01b900460ff16610b8d576040805162461bcd60e51b81526020600482015260136024820152724f6e6c7920456d657267656e6379204d6f646560681b604482015290519081900360640190fd5b6036546001600160a01b0316331480610bb057506035546001600160a01b031633145b610c01576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c7920476f7665726e616e636544414f206f722057484700000000000000604482015290519081900360640190fd5b6036546001600160a01b0316331415610c88576034546001600160401b03600160401b90910481166301dfe200018116429091161015610c88576040805162461bcd60e51b815260206004820152601a60248201527f4e4f204d41585f454d455247454e43595f4d4f44455f54494d45000000000000604482015290519081900360640190fd5b60006001600160a01b038216610ca9575047610ca483826114c8565b610d2d565b604080516370a0823160e01b8152306004820152905183916001600160a01b038316916370a0823191602480820192602092909190829003018186803b158015610cf257600080fd5b505afa158015610d06573d6000803e3d6000fd5b505050506040513d6020811015610d1c57600080fd5b50519150610d2b838584611569565b505b6040516001600160a01b03808416919085169033907f065a030f4e05509e10831215a77cf703ff0d78a252b9fa008749d832eb1f61d990600090a45050600160005550565b6038546001600160a01b03163314610dd1576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c79206865726d657a526f6c6c7570416464726573730000000000000000604482015290519081900360640190fd5b3415610e95576001600160a01b03821615610e33576040805162461bcd60e51b815260206004820152601d60248201527f4554482073686f756c6420626520746865203078302061646472657373000000604482015290519081900360640190fd5b34816001600160c01b031614610e90576040805162461bcd60e51b815260206004820152601e60248201527f446966666572656e7420616d6f756e7420616e64206d73672e76616c75650000604482015290519081900360640190fd5b611049565b60385460408051636eb1769f60e11b81526001600160a01b03928316600482015230602482015290516001600160c01b0384169285169163dd62ed3e916044808301926020929190829003018186803b158015610ef157600080fd5b505afa158015610f05573d6000803e3d6000fd5b505050506040513d6020811015610f1b57600080fd5b50511015610f70576040805162461bcd60e51b815260206004820152601d60248201527f446f65736e2774206861766520656e6f75676820616c6c6f77616e6365000000604482015290519081900360640190fd5b603854604080516323b872dd60e01b81526001600160a01b0392831660048201523060248201526001600160c01b03841660448201529051918416916323b872dd916064808201926020929091908290030181600087803b158015610fd457600080fd5b505af1158015610fe8573d6000803e3d6000fd5b505050506040513d6020811015610ffe57600080fd5b5051611049576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b60408051606085811b6001600160601b03199081166020808501919091529186901b166034830152825180830360280181526048909201835281519181019190912060008181526039909252919020546001600160c01b0390811683810191821610156110f0576040805162461bcd60e51b815260206004820152601060248201526f4465706f736974206f766572666c6f7760801b604482015290519081900360640190fd5b60008281526039602090815260409182902080546001600160401b03428116600160c01b9081026001600160c01b038089166001600160c01b03199095169490941784161793849055855192891683529092049091169181019190915281516001600160a01b0380881693908916927f41219b99485f78192a5b9b1be28c7d53c3a2bdbe7900ae40c79fae8d9d6108fd929081900390910190a35050505050565b6037546001600160a01b031633146111f0576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79204865726d657a204b65657065722041646472657373000000000000604482015290519081900360640190fd5b603780546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517fc1e9be84fce652abec6a6944f7ec5bbb40de18caa44c285b05a0de7e3ad9d016916020908290030190a150565b600260005414156112a2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600055603754600160a01b900460ff16156112f7576040805162461bcd60e51b815260206004820152600e60248201526d456d657267656e6379206d6f646560901b604482015290519081900360640190fd5b60408051606084811b6001600160601b03199081166020808501919091529185901b166034830152825180830360280181526048909201835281519181019190912060008181526039909252919020546001600160c01b031680611399576040805162461bcd60e51b81526020600482015260146024820152734e6f2066756e647320746f20776974686472617760601b604482015290519081900360640190fd5b6034546000838152603960205260409020546001600160401b03918216600160c01b909104821601811642909116101561141a576040805162461bcd60e51b815260206004820152601a60248201527f5769746864726177616c206e6f7420616c6c6f77656420796574000000000000604482015290519081900360640190fd5b6000828152603960205260408120556001600160a01b03831661144f5761144a84826001600160c01b03166114c8565b611463565b6114638385836001600160c01b0316611569565b836001600160a01b0316836001600160a01b03167f72608e45b52a95a12c2ac7f15ff53f92fc9572c9d84b6e6b5d7f0f7826cf32718360405180826001600160c01b0316815260200191505060405180910390a3505060016000555050565b303b1590565b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114611513576040519150601f19603f3d011682016040523d82523d6000602084013e611518565b606091505b5050905080611564576040805162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b604482015290519081900360640190fd5b505050565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009460609489169392918291908083835b602083106116165780518252601f1990920191602091820191016115f7565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611678576040519150601f19603f3d011682016040523d82523d6000602084013e61167d565b606091505b50915091508180156116ab5750805115806116ab57508080602001905160208110156116a857600080fd5b50515b6116f4576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b5050505050565b60408051808201909152600080825260208201529056fe436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a2646970667358221220c1c762163fd298f0328559fb5d7027caf2d51af3b3691a9b8808a2b55947492d64736f6c634300060c0033" +var WithdrawalDelayerBin = "0x608060405234801561001057600080fd5b50611f43806100206000396000f3fe6080604052600436106101295760003560e01c8063580fc611116100ab578063ae7efbbd1161006f578063ae7efbbd146104f1578063b4b8e39d14610506578063c5b1c7d01461051b578063cfc0b64114610530578063d82b217c14610570578063de35f282146105a357610129565b8063580fc61114610420578063668cdd67146104355780637fd6b1021461044a578063a238f9df1461048d578063acfd6ea8146104be57610129565b806320a194b8116100f257806320a194b8146102f8578063305887f91461032157806336e566ed146103365780633d4dff7b14610390578063493b0170146103e557610129565b806223de291461012e57806303160940146102275780630a4db01b146102615780630e670af5146102945780630fd266d7146102c7575b600080fd5b34801561013a57600080fd5b50610225600480360360c081101561015157600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a08101608082013564010000000081111561019457600080fd5b8201836020820111156101a657600080fd5b803590602001918460018302840111640100000000831117156101c857600080fd5b9193909290916020810190356401000000008111156101e657600080fd5b8201836020820111156101f857600080fd5b8035906020019184600183028401116401000000008311171561021a57600080fd5b5090925090506105de565b005b34801561023357600080fd5b5061023c610830565b604080516fffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561026d57600080fd5b506102256004803603602081101561028457600080fd5b50356001600160a01b031661083f565b3480156102a057600080fd5b50610225600480360360208110156102b757600080fd5b50356001600160401b03166108eb565b3480156102d357600080fd5b506102dc610a1b565b604080516001600160a01b039092168252519081900360200190f35b34801561030457600080fd5b5061030d610a2a565b604080519115158252519081900360200190f35b34801561032d57600080fd5b506102dc610a3a565b34801561034257600080fd5b50610225600480360360a081101561035957600080fd5b506001600160401b03813516906001600160a01b036020820135811691604081013582169160608201358116916080013516610a49565b34801561039c57600080fd5b506103ba600480360360208110156103b357600080fd5b5035610bfc565b604080516001600160c01b0390931683526001600160401b0390911660208301528051918290030190f35b3480156103f157600080fd5b506103ba6004803603604081101561040857600080fd5b506001600160a01b0381358116916020013516610c29565b34801561042c57600080fd5b506102dc610cba565b34801561044157600080fd5b5061023c610cc9565b34801561045657600080fd5b506102256004803603606081101561046d57600080fd5b506001600160a01b03813581169160208101359091169060400135610cdf565b34801561049957600080fd5b506104a2610f0b565b604080516001600160401b039092168252519081900360200190f35b3480156104ca57600080fd5b50610225600480360360208110156104e157600080fd5b50356001600160a01b0316610f12565b3480156104fd57600080fd5b506102dc610fcb565b34801561051257600080fd5b506104a2610fda565b34801561052757600080fd5b50610225610fe1565b6102256004803603606081101561054657600080fd5b5080356001600160a01b0390811691602081013590911690604001356001600160c01b0316611109565b34801561057c57600080fd5b506102256004803603602081101561059357600080fd5b50356001600160a01b031661150a565b3480156105af57600080fd5b50610225600480360360408110156105c657600080fd5b506001600160a01b03813581169160200135166115c3565b60335460ff16610623576040805162461bcd60e51b815260206004820152601f6024820152600080516020611e9b833981519152604482015290519081900360640190fd5b6033805460ff191690556069546001600160a01b0388811691161461068a576040805162461bcd60e51b81526020600482015260186024820152774f6e6c79206865726d657a526f6c6c75704164647265737360401b604482015290519081900360640190fd5b826106cd576040805162461bcd60e51b815260206004820152600e60248201526d557365724461746120656d70747960901b604482015290519081900360640190fd5b6000848460208110156106df57600080fd5b506040805180820190915260208082527f6465706f73697428616464726573732c616464726573732c75696e7431393229910152356001600160e01b031916905063cfc0b64160e01b8114156107d45760008080610740876004818b611e72565b606081101561074e57600080fd5b5080356001600160a01b0390811694506020820135169250604001356001600160c01b031690508881146107c1576040805162461bcd60e51b8152602060048201526015602482015274105b5bdd5b9d081cd95b9d08191a5999995c995b9d605a1b604482015290519081900360640190fd5b6107cc833383611835565b505050610818565b6040805162461bcd60e51b81526020600482015260146024820152734e6f7420612076616c69642063616c6c6461746160601b604482015290519081900360640190fd5b50506033805460ff1916600117905550505050505050565b6065546001600160401b031690565b6067546001600160a01b03163314610891576040805162461bcd60e51b815260206004820152601060248201526f4f6e6c7920574847206164647265737360801b604482015290519081900360640190fd5b606780546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f284ca073b8bdde2195ae98779277678773a99d7739e5f0477dc19a03fc689011916020908290030190a150565b6068546001600160a01b031633148061090e57506069546001600160a01b031633145b61095f576040805162461bcd60e51b815260206004820152601c60248201527f4f6e6c79206865726d657a206b6565706572206f7220726f6c6c757000000000604482015290519081900360640190fd5b621275006001600160401b03821611156109c0576040805162461bcd60e51b815260206004820152601c60248201527f45786365656473204d41585f5749544844524157414c5f44454c415900000000604482015290519081900360640190fd5b6065805467ffffffffffffffff19166001600160401b03838116919091179182905560408051929091168252517f6b3670ab51e04a9da086741e5fd1eb36ffaf1d661a15330c528e1f3e0c8722d7916020908290030190a150565b6069546001600160a01b031681565b606854600160a01b900460ff1690565b6068546001600160a01b031690565b600054610100900460ff1680610a625750610a6261197d565b80610a70575060005460ff16155b610aab5760405162461bcd60e51b815260040180806020018281038252602e815260200180611ee0602e913960400191505060405180910390fd5b600054610100900460ff16158015610ad6576000805460ff1961ff0019909116610100171660011790555b610ade611983565b6065805467ffffffffffffffff19166001600160401b038816179055606980546001600160a01b03199081166001600160a01b0388811691909117909255606880546066805484168886161790556067805484168786161790559091169186169190911760ff60a01b19169055604080516329965a1d60e01b815230600482018190527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b602483015260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad24916329965a1d91606480830192600092919082900301818387803b158015610bca57600080fd5b505af1158015610bde573d6000803e3d6000fd5b505050508015610bf4576000805461ff00191690555b505050505050565b606a602052600090815260409020546001600160c01b03811690600160c01b90046001600160401b031682565b600080610c34611e5b565b505060408051606094851b6001600160601b03199081166020808401919091529490951b909416603485015280518085036028018152604885018083528151918501919091206000908152606a9094529281902060888501909152546001600160c01b03811692839052600160c01b90046001600160401b031660689093018390525091565b6066546001600160a01b031690565b606554600160401b90046001600160401b031690565b60335460ff16610d24576040805162461bcd60e51b815260206004820152601f6024820152600080516020611e9b833981519152604482015290519081900360640190fd5b6033805460ff19169055606854600160a01b900460ff16610d82576040805162461bcd60e51b81526020600482015260136024820152724f6e6c7920456d657267656e6379204d6f646560681b604482015290519081900360640190fd5b6067546001600160a01b0316331480610da557506066546001600160a01b031633145b610df6576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c7920476f7665726e616e636544414f206f722057484700000000000000604482015290519081900360640190fd5b6067546001600160a01b0316331415610e7c576065546001600160401b03600160401b909104811662eff100018116429091161015610e7c576040805162461bcd60e51b815260206004820152601a60248201527f4e4f204d41585f454d455247454e43595f4d4f44455f54494d45000000000000604482015290519081900360640190fd5b6001600160a01b038216610e9957610e948382611a32565b610ea4565b610ea4828483611ad3565b816001600160a01b0316836001600160a01b0316336001600160a01b03167fde200220117ba95c9a6c4a1a13bb06b0b7be90faa85c8fb4576630119f891693846040518082815260200191505060405180910390a450506033805460ff1916600117905550565b6212750081565b6066546001600160a01b03163314610f71576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79204865726d657a20476f7665726e616e63652044414f000000000000604482015290519081900360640190fd5b606680546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f03683be8debd93f8f5ff23dd03419bfcb9b8287a1868b0f130d858f03c3a08a1916020908290030190a150565b6067546001600160a01b031690565b62eff10081565b6068546001600160a01b03163314611040576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c79206865726d657a4b6565706572416464726573730000000000000000604482015290519081900360640190fd5b606854600160a01b900460ff161561109f576040805162461bcd60e51b815260206004820152601e60248201527f456d657267656e6379206d6f646520616c726561647920656e61626c65640000604482015290519081900360640190fd5b6068805460ff60a01b1916600160a01b179055606580546001600160401b034216600160401b026fffffffffffffffff0000000000000000199091161790556040517f2064d51aa5a8bd67928c7675e267e05c67ad5adf7c9098d0a602d01f36fda9c590600090a1565b60335460ff1661114e576040805162461bcd60e51b815260206004820152601f6024820152600080516020611e9b833981519152604482015290519081900360640190fd5b6033805460ff191690556069546001600160a01b031633146111b2576040805162461bcd60e51b81526020600482015260186024820152774f6e6c79206865726d657a526f6c6c75704164647265737360401b604482015290519081900360640190fd5b3415611276576001600160a01b03821615611214576040805162461bcd60e51b815260206004820152601d60248201527f4554482073686f756c6420626520746865203078302061646472657373000000604482015290519081900360640190fd5b34816001600160c01b031614611271576040805162461bcd60e51b815260206004820152601e60248201527f446966666572656e7420616d6f756e7420616e64206d73672e76616c75650000604482015290519081900360640190fd5b6114ed565b60695460408051636eb1769f60e11b81526001600160a01b03928316600482015230602482015290516001600160c01b0384169285169163dd62ed3e916044808301926020929190829003018186803b1580156112d257600080fd5b505afa1580156112e6573d6000803e3d6000fd5b505050506040513d60208110156112fc57600080fd5b50511015611351576040805162461bcd60e51b815260206004820152601d60248201527f446f65736e2774206861766520656e6f75676820616c6c6f77616e6365000000604482015290519081900360640190fd5b60006060836001600160a01b0316604051806060016040528060258152602001611ebb602591398051602091820120606954604080516001600160a01b0390921660248301523060448301526001600160c01b038816606480840191909152815180840390910181526084909201815292810180516001600160e01b03166001600160e01b031990931692909217825291518251909182918083835b6020831061140c5780518252601f1990920191602091820191016113ed565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461146e576040519150601f19603f3d011682016040523d82523d6000602084013e611473565b606091505b50915091508180156114a15750805115806114a1575080806020019051602081101561149e57600080fd5b50515b6114ea576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b50505b6114f8838383611835565b50506033805460ff1916600117905550565b6068546001600160a01b03163314611569576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79204865726d657a204b65657065722041646472657373000000000000604482015290519081900360640190fd5b606880546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517fc1e9be84fce652abec6a6944f7ec5bbb40de18caa44c285b05a0de7e3ad9d016916020908290030190a150565b60335460ff16611608576040805162461bcd60e51b815260206004820152601f6024820152600080516020611e9b833981519152604482015290519081900360640190fd5b6033805460ff19169055606854600160a01b900460ff1615611662576040805162461bcd60e51b815260206004820152600e60248201526d456d657267656e6379206d6f646560901b604482015290519081900360640190fd5b60408051606084811b6001600160601b03199081166020808501919091529185901b16603483015282518083036028018152604890920183528151918101919091206000818152606a909252919020546001600160c01b031680611704576040805162461bcd60e51b81526020600482015260146024820152734e6f2066756e647320746f20776974686472617760601b604482015290519081900360640190fd5b6065546000838152606a60205260409020546001600160401b03918216600160c01b9091048216018116429091161015611785576040805162461bcd60e51b815260206004820152601a60248201527f5769746864726177616c206e6f7420616c6c6f77656420796574000000000000604482015290519081900360640190fd5b6000828152606a60205260408120556001600160a01b0383166117ba576117b584826001600160c01b0316611a32565b6117ce565b6117ce8385836001600160c01b0316611ad3565b836001600160a01b0316836001600160a01b03167f72608e45b52a95a12c2ac7f15ff53f92fc9572c9d84b6e6b5d7f0f7826cf32718360405180826001600160c01b0316815260200191505060405180910390a350506033805460ff191660011790555050565b60408051606085811b6001600160601b03199081166020808501919091529186901b16603483015282518083036028018152604890920183528151918101919091206000818152606a909252919020546001600160c01b0390811683810191821610156118dc576040805162461bcd60e51b815260206004820152601060248201526f4465706f736974206f766572666c6f7760801b604482015290519081900360640190fd5b6000828152606a602090815260409182902080546001600160401b03428116600160c01b9081026001600160c01b038089166001600160c01b03199095169490941784161793849055855192891683529092049091169181019190915281516001600160a01b0380881693908916927f41219b99485f78192a5b9b1be28c7d53c3a2bdbe7900ae40c79fae8d9d6108fd929081900390910190a35050505050565b303b1590565b600054610100900460ff168061199c575061199c61197d565b806119aa575060005460ff16155b6119e55760405162461bcd60e51b815260040180806020018281038252602e815260200180611ee0602e913960400191505060405180910390fd5b600054610100900460ff16158015611a10576000805460ff1961ff0019909116610100171660011790555b6033805460ff191660011790558015611a2f576000805461ff00191690555b50565b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114611a7d576040519150601f19603f3d011682016040523d82523d6000602084013e611a82565b606091505b5050905080611ace576040805162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b604482015290519081900360640190fd5b505050565b6040805163555ddc6560e11b81526001600160a01b03851660048201527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce21770546024820152905160009160609183918291731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca916044808301926020929190829003018186803b158015611b5d57600080fd5b505afa158015611b71573d6000803e3d6000fd5b505050506040513d6020811015611b8757600080fd5b50516001600160a01b03161415611b9f576000611ba2565b60015b90508015611cd257604080518082018252601b81527f73656e6428616464726573732c75696e743235362c627974657329000000000060209182015281516001600160a01b038881166024830152604482018890526060606483015260006084830152835180830360a401815260c4909201845291810180516001600160e01b0316634decdde360e11b17815292518151928a16939192909182918083835b60208310611c605780518252601f199092019160209182019101611c41565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611cc2576040519150601f19603f3d011682016040523d82523d6000602084013e611cc7565b606091505b509093509150611de9565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0388811660248301526044808301899052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b17815292518151928a16939192909182918083835b60208310611d7b5780518252601f199092019160209182019101611d5c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611ddd576040519150601f19603f3d011682016040523d82523d6000602084013e611de2565b606091505b5090935091505b828015611e12575081511580611e125750818060200190516020811015611e0f57600080fd5b50515b610bf4576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b604080518082019091526000808252602082015290565b60008085851115611e81578182fd5b83861115611e8d578182fd5b505082019391909203915056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c007472616e7366657246726f6d28616464726573732c616464726573732c75696e7432353629436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a26469706673582212208627d01a36cb65caf417b630b097c562d21a655bf5c386bcdde1eafb9d94cf7464736f6c634300060c0033" // DeployWithdrawalDelayer deploys a new Ethereum contract, binding an instance of WithdrawalDelayer to it. func DeployWithdrawalDelayer(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *WithdrawalDelayer, error) { @@ -551,46 +551,25 @@ func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) EnableEmergencyMod return _WithdrawalDelayer.Contract.EnableEmergencyMode(&_WithdrawalDelayer.TransactOpts) } -// EscapeHatchWithdrawal is a paid mutator transaction binding the contract method 0xcf3a25d9. +// EscapeHatchWithdrawal is a paid mutator transaction binding the contract method 0x7fd6b102. // -// Solidity: function escapeHatchWithdrawal(address _to, address _token) returns() -func (_WithdrawalDelayer *WithdrawalDelayerTransactor) EscapeHatchWithdrawal(opts *bind.TransactOpts, _to common.Address, _token common.Address) (*types.Transaction, error) { - return _WithdrawalDelayer.contract.Transact(opts, "escapeHatchWithdrawal", _to, _token) +// Solidity: function escapeHatchWithdrawal(address _to, address _token, uint256 _amount) returns() +func (_WithdrawalDelayer *WithdrawalDelayerTransactor) EscapeHatchWithdrawal(opts *bind.TransactOpts, _to common.Address, _token common.Address, _amount *big.Int) (*types.Transaction, error) { + return _WithdrawalDelayer.contract.Transact(opts, "escapeHatchWithdrawal", _to, _token, _amount) } -// EscapeHatchWithdrawal is a paid mutator transaction binding the contract method 0xcf3a25d9. +// EscapeHatchWithdrawal is a paid mutator transaction binding the contract method 0x7fd6b102. // -// Solidity: function escapeHatchWithdrawal(address _to, address _token) returns() -func (_WithdrawalDelayer *WithdrawalDelayerSession) EscapeHatchWithdrawal(_to common.Address, _token common.Address) (*types.Transaction, error) { - return _WithdrawalDelayer.Contract.EscapeHatchWithdrawal(&_WithdrawalDelayer.TransactOpts, _to, _token) +// Solidity: function escapeHatchWithdrawal(address _to, address _token, uint256 _amount) returns() +func (_WithdrawalDelayer *WithdrawalDelayerSession) EscapeHatchWithdrawal(_to common.Address, _token common.Address, _amount *big.Int) (*types.Transaction, error) { + return _WithdrawalDelayer.Contract.EscapeHatchWithdrawal(&_WithdrawalDelayer.TransactOpts, _to, _token, _amount) } -// EscapeHatchWithdrawal is a paid mutator transaction binding the contract method 0xcf3a25d9. +// EscapeHatchWithdrawal is a paid mutator transaction binding the contract method 0x7fd6b102. // -// Solidity: function escapeHatchWithdrawal(address _to, address _token) returns() -func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) EscapeHatchWithdrawal(_to common.Address, _token common.Address) (*types.Transaction, error) { - return _WithdrawalDelayer.Contract.EscapeHatchWithdrawal(&_WithdrawalDelayer.TransactOpts, _to, _token) -} - -// Initialize is a paid mutator transaction binding the contract method 0x16b487ff. -// -// Solidity: function initialize(uint64 _initialWithdrawalDelay, address _initialHermezRollup, address _initialHermezKeeperAddress, address _initialHermezGovernanceDAOAddress, address _initialWhiteHackGroupAddress) returns() -func (_WithdrawalDelayer *WithdrawalDelayerTransactor) Initialize(opts *bind.TransactOpts, _initialWithdrawalDelay uint64, _initialHermezRollup common.Address, _initialHermezKeeperAddress common.Address, _initialHermezGovernanceDAOAddress common.Address, _initialWhiteHackGroupAddress common.Address) (*types.Transaction, error) { - return _WithdrawalDelayer.contract.Transact(opts, "initialize", _initialWithdrawalDelay, _initialHermezRollup, _initialHermezKeeperAddress, _initialHermezGovernanceDAOAddress, _initialWhiteHackGroupAddress) -} - -// Initialize is a paid mutator transaction binding the contract method 0x16b487ff. -// -// Solidity: function initialize(uint64 _initialWithdrawalDelay, address _initialHermezRollup, address _initialHermezKeeperAddress, address _initialHermezGovernanceDAOAddress, address _initialWhiteHackGroupAddress) returns() -func (_WithdrawalDelayer *WithdrawalDelayerSession) Initialize(_initialWithdrawalDelay uint64, _initialHermezRollup common.Address, _initialHermezKeeperAddress common.Address, _initialHermezGovernanceDAOAddress common.Address, _initialWhiteHackGroupAddress common.Address) (*types.Transaction, error) { - return _WithdrawalDelayer.Contract.Initialize(&_WithdrawalDelayer.TransactOpts, _initialWithdrawalDelay, _initialHermezRollup, _initialHermezKeeperAddress, _initialHermezGovernanceDAOAddress, _initialWhiteHackGroupAddress) -} - -// Initialize is a paid mutator transaction binding the contract method 0x16b487ff. -// -// Solidity: function initialize(uint64 _initialWithdrawalDelay, address _initialHermezRollup, address _initialHermezKeeperAddress, address _initialHermezGovernanceDAOAddress, address _initialWhiteHackGroupAddress) returns() -func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) Initialize(_initialWithdrawalDelay uint64, _initialHermezRollup common.Address, _initialHermezKeeperAddress common.Address, _initialHermezGovernanceDAOAddress common.Address, _initialWhiteHackGroupAddress common.Address) (*types.Transaction, error) { - return _WithdrawalDelayer.Contract.Initialize(&_WithdrawalDelayer.TransactOpts, _initialWithdrawalDelay, _initialHermezRollup, _initialHermezKeeperAddress, _initialHermezGovernanceDAOAddress, _initialWhiteHackGroupAddress) +// Solidity: function escapeHatchWithdrawal(address _to, address _token, uint256 _amount) returns() +func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) EscapeHatchWithdrawal(_to common.Address, _token common.Address, _amount *big.Int) (*types.Transaction, error) { + return _WithdrawalDelayer.Contract.EscapeHatchWithdrawal(&_WithdrawalDelayer.TransactOpts, _to, _token, _amount) } // SetHermezGovernanceDAOAddress is a paid mutator transaction binding the contract method 0xacfd6ea8. @@ -656,6 +635,27 @@ func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) SetWhiteHackGroupA return _WithdrawalDelayer.Contract.SetWhiteHackGroupAddress(&_WithdrawalDelayer.TransactOpts, newAddress) } +// TokensReceived is a paid mutator transaction binding the contract method 0x0023de29. +// +// Solidity: function tokensReceived(address operator, address from, address to, uint256 amount, bytes userData, bytes operatorData) returns() +func (_WithdrawalDelayer *WithdrawalDelayerTransactor) TokensReceived(opts *bind.TransactOpts, operator common.Address, from common.Address, to common.Address, amount *big.Int, userData []byte, operatorData []byte) (*types.Transaction, error) { + return _WithdrawalDelayer.contract.Transact(opts, "tokensReceived", operator, from, to, amount, userData, operatorData) +} + +// TokensReceived is a paid mutator transaction binding the contract method 0x0023de29. +// +// Solidity: function tokensReceived(address operator, address from, address to, uint256 amount, bytes userData, bytes operatorData) returns() +func (_WithdrawalDelayer *WithdrawalDelayerSession) TokensReceived(operator common.Address, from common.Address, to common.Address, amount *big.Int, userData []byte, operatorData []byte) (*types.Transaction, error) { + return _WithdrawalDelayer.Contract.TokensReceived(&_WithdrawalDelayer.TransactOpts, operator, from, to, amount, userData, operatorData) +} + +// TokensReceived is a paid mutator transaction binding the contract method 0x0023de29. +// +// Solidity: function tokensReceived(address operator, address from, address to, uint256 amount, bytes userData, bytes operatorData) returns() +func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) TokensReceived(operator common.Address, from common.Address, to common.Address, amount *big.Int, userData []byte, operatorData []byte) (*types.Transaction, error) { + return _WithdrawalDelayer.Contract.TokensReceived(&_WithdrawalDelayer.TransactOpts, operator, from, to, amount, userData, operatorData) +} + // Withdrawal is a paid mutator transaction binding the contract method 0xde35f282. // // Solidity: function withdrawal(address _owner, address _token) returns() @@ -677,6 +677,27 @@ func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) Withdrawal(_owner return _WithdrawalDelayer.Contract.Withdrawal(&_WithdrawalDelayer.TransactOpts, _owner, _token) } +// WithdrawalDelayerInitializer is a paid mutator transaction binding the contract method 0x36e566ed. +// +// Solidity: function withdrawalDelayerInitializer(uint64 _initialWithdrawalDelay, address _initialHermezRollup, address _initialHermezKeeperAddress, address _initialHermezGovernanceDAOAddress, address _initialWhiteHackGroupAddress) returns() +func (_WithdrawalDelayer *WithdrawalDelayerTransactor) WithdrawalDelayerInitializer(opts *bind.TransactOpts, _initialWithdrawalDelay uint64, _initialHermezRollup common.Address, _initialHermezKeeperAddress common.Address, _initialHermezGovernanceDAOAddress common.Address, _initialWhiteHackGroupAddress common.Address) (*types.Transaction, error) { + return _WithdrawalDelayer.contract.Transact(opts, "withdrawalDelayerInitializer", _initialWithdrawalDelay, _initialHermezRollup, _initialHermezKeeperAddress, _initialHermezGovernanceDAOAddress, _initialWhiteHackGroupAddress) +} + +// WithdrawalDelayerInitializer is a paid mutator transaction binding the contract method 0x36e566ed. +// +// Solidity: function withdrawalDelayerInitializer(uint64 _initialWithdrawalDelay, address _initialHermezRollup, address _initialHermezKeeperAddress, address _initialHermezGovernanceDAOAddress, address _initialWhiteHackGroupAddress) returns() +func (_WithdrawalDelayer *WithdrawalDelayerSession) WithdrawalDelayerInitializer(_initialWithdrawalDelay uint64, _initialHermezRollup common.Address, _initialHermezKeeperAddress common.Address, _initialHermezGovernanceDAOAddress common.Address, _initialWhiteHackGroupAddress common.Address) (*types.Transaction, error) { + return _WithdrawalDelayer.Contract.WithdrawalDelayerInitializer(&_WithdrawalDelayer.TransactOpts, _initialWithdrawalDelay, _initialHermezRollup, _initialHermezKeeperAddress, _initialHermezGovernanceDAOAddress, _initialWhiteHackGroupAddress) +} + +// WithdrawalDelayerInitializer is a paid mutator transaction binding the contract method 0x36e566ed. +// +// Solidity: function withdrawalDelayerInitializer(uint64 _initialWithdrawalDelay, address _initialHermezRollup, address _initialHermezKeeperAddress, address _initialHermezGovernanceDAOAddress, address _initialWhiteHackGroupAddress) returns() +func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) WithdrawalDelayerInitializer(_initialWithdrawalDelay uint64, _initialHermezRollup common.Address, _initialHermezKeeperAddress common.Address, _initialHermezGovernanceDAOAddress common.Address, _initialWhiteHackGroupAddress common.Address) (*types.Transaction, error) { + return _WithdrawalDelayer.Contract.WithdrawalDelayerInitializer(&_WithdrawalDelayer.TransactOpts, _initialWithdrawalDelay, _initialHermezRollup, _initialHermezKeeperAddress, _initialHermezGovernanceDAOAddress, _initialWhiteHackGroupAddress) +} + // WithdrawalDelayerDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the WithdrawalDelayer contract. type WithdrawalDelayerDepositIterator struct { Event *WithdrawalDelayerDeposit // Event containing the contract specifics and raw log @@ -1032,15 +1053,16 @@ func (it *WithdrawalDelayerEscapeHatchWithdrawalIterator) Close() error { // WithdrawalDelayerEscapeHatchWithdrawal represents a EscapeHatchWithdrawal event raised by the WithdrawalDelayer contract. type WithdrawalDelayerEscapeHatchWithdrawal struct { - Who common.Address - To common.Address - Token common.Address - Raw types.Log // Blockchain specific contextual infos + Who common.Address + To common.Address + Token common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterEscapeHatchWithdrawal is a free log retrieval operation binding the contract event 0x065a030f4e05509e10831215a77cf703ff0d78a252b9fa008749d832eb1f61d9. +// FilterEscapeHatchWithdrawal is a free log retrieval operation binding the contract event 0xde200220117ba95c9a6c4a1a13bb06b0b7be90faa85c8fb4576630119f891693. // -// Solidity: event EscapeHatchWithdrawal(address indexed who, address indexed to, address indexed token) +// Solidity: event EscapeHatchWithdrawal(address indexed who, address indexed to, address indexed token, uint256 amount) func (_WithdrawalDelayer *WithdrawalDelayerFilterer) FilterEscapeHatchWithdrawal(opts *bind.FilterOpts, who []common.Address, to []common.Address, token []common.Address) (*WithdrawalDelayerEscapeHatchWithdrawalIterator, error) { var whoRule []interface{} @@ -1063,9 +1085,9 @@ func (_WithdrawalDelayer *WithdrawalDelayerFilterer) FilterEscapeHatchWithdrawal return &WithdrawalDelayerEscapeHatchWithdrawalIterator{contract: _WithdrawalDelayer.contract, event: "EscapeHatchWithdrawal", logs: logs, sub: sub}, nil } -// WatchEscapeHatchWithdrawal is a free log subscription operation binding the contract event 0x065a030f4e05509e10831215a77cf703ff0d78a252b9fa008749d832eb1f61d9. +// WatchEscapeHatchWithdrawal is a free log subscription operation binding the contract event 0xde200220117ba95c9a6c4a1a13bb06b0b7be90faa85c8fb4576630119f891693. // -// Solidity: event EscapeHatchWithdrawal(address indexed who, address indexed to, address indexed token) +// Solidity: event EscapeHatchWithdrawal(address indexed who, address indexed to, address indexed token, uint256 amount) func (_WithdrawalDelayer *WithdrawalDelayerFilterer) WatchEscapeHatchWithdrawal(opts *bind.WatchOpts, sink chan<- *WithdrawalDelayerEscapeHatchWithdrawal, who []common.Address, to []common.Address, token []common.Address) (event.Subscription, error) { var whoRule []interface{} @@ -1113,9 +1135,9 @@ func (_WithdrawalDelayer *WithdrawalDelayerFilterer) WatchEscapeHatchWithdrawal( }), nil } -// ParseEscapeHatchWithdrawal is a log parse operation binding the contract event 0x065a030f4e05509e10831215a77cf703ff0d78a252b9fa008749d832eb1f61d9. +// ParseEscapeHatchWithdrawal is a log parse operation binding the contract event 0xde200220117ba95c9a6c4a1a13bb06b0b7be90faa85c8fb4576630119f891693. // -// Solidity: event EscapeHatchWithdrawal(address indexed who, address indexed to, address indexed token) +// Solidity: event EscapeHatchWithdrawal(address indexed who, address indexed to, address indexed token, uint256 amount) func (_WithdrawalDelayer *WithdrawalDelayerFilterer) ParseEscapeHatchWithdrawal(log types.Log) (*WithdrawalDelayerEscapeHatchWithdrawal, error) { event := new(WithdrawalDelayerEscapeHatchWithdrawal) if err := _WithdrawalDelayer.contract.UnpackLog(event, "EscapeHatchWithdrawal", log); err != nil { diff --git a/eth/main_test.go b/eth/main_test.go index 63589b7..3cd74ce 100644 --- a/eth/main_test.go +++ b/eth/main_test.go @@ -25,20 +25,26 @@ var password = "pass" // Smart Contract Addresses var ( - // auctionAddressStr = "0x3619DbE27d7c1e7E91aA738697Ae7Bc5FC3eACA5" - // wdelayerAddressStr = "0x1A1FEe7EeD918BD762173e4dc5EfDB8a78C924A8" - auctionAddressStr = "0x8B5B7a6055E54a36fF574bbE40cf2eA68d5554b3" + auctionAddressStr = "0x500D1d6A4c7D8Ae28240b47c8FCde034D827fD5e" auctionAddressConst = ethCommon.HexToAddress(auctionAddressStr) + auctionTestAddressStr = "0x1d80315fac6aBd3EfeEbE97dEc44461ba7556160" + auctionTestAddressConst = ethCommon.HexToAddress(auctionTestAddressStr) donationAddressStr = "0x6c365935CA8710200C7595F0a72EB6023A7706Cd" donationAddressConst = ethCommon.HexToAddress(donationAddressStr) bootCoordinatorAddressStr = "0xc783df8a850f42e7f7e57013759c285caa701eb6" bootCoordinatorAddressConst = ethCommon.HexToAddress(bootCoordinatorAddressStr) - tokenHezAddressStr = "0xf4e77E5Da47AC3125140c470c71cBca77B5c638c" //nolint:gosec - tokenHezAddressConst = ethCommon.HexToAddress(tokenHezAddressStr) - hermezRollupAddressStr = "0xc4905364b78a742ccce7B890A89514061E47068D" + tokenERC777AddressStr = "0xf784709d2317D872237C4bC22f867d1BAe2913AB" //nolint:gosec + tokenERC777AddressConst = ethCommon.HexToAddress(tokenERC777AddressStr) + tokenERC20AddressStr = "0x3619DbE27d7c1e7E91aA738697Ae7Bc5FC3eACA5" + tokenERC20AddressConst = ethCommon.HexToAddress(tokenERC20AddressStr) + hermezRollupAddressStr = "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0" hermezRollupAddressConst = ethCommon.HexToAddress(hermezRollupAddressStr) - wdelayerAddressStr = "0x20Ce94F404343aD2752A2D01b43fa407db9E0D00" + wdelayerAddressStr = "0xD6C850aeBFDC46D7F4c207e445cC0d6B0919BDBe" wdelayerAddressConst = ethCommon.HexToAddress(wdelayerAddressStr) + wdelayerTestAddressStr = "0x52d3b94181f8654db2530b0fEe1B19173f519C52" + wdelayerTestAddressConst = ethCommon.HexToAddress(wdelayerTestAddressStr) + safetyAddressStr = "0xE5904695748fe4A84b40b3fc79De2277660BD1D3" + safetyAddressConst = ethCommon.HexToAddress(safetyAddressStr) ) // Ethereum Accounts @@ -126,15 +132,22 @@ func TestMain(m *testing.M) { // Controllable Governance Address ethereumClientGov := NewEthereumClient(ethClient, accountGov, ks, nil) - auctionClient, err = NewAuctionClient(ethereumClientGov, auctionAddressConst, tokenHezAddressConst) + auctionClientTest, err = NewAuctionClient(ethereumClientGov, auctionTestAddressConst, tokenERC777AddressConst) + if err != nil { + panic(err) + } + rollupClient, err = NewRollupClient(ethereumClientGov, hermezRollupAddressConst) if err != nil { panic(err) } - rollupClient = NewRollupClient(ethereumClientGov, hermezRollupAddressConst) wdelayerClient, err = NewWDelayerClient(ethereumClientGov, wdelayerAddressConst) if err != nil { panic(err) } + wdelayerClientTest, err = NewWDelayerClient(ethereumClientGov, wdelayerTestAddressConst) + if err != nil { + panic(err) + } ethereumClientKep = NewEthereumClient(ethClient, accountKep, ks, nil) ethereumClientWhite = NewEthereumClient(ethClient, accountWhite, ks, nil) diff --git a/eth/rollup.go b/eth/rollup.go index 399041c..b24688c 100644 --- a/eth/rollup.go +++ b/eth/rollup.go @@ -1,27 +1,103 @@ package eth import ( + "context" "math/big" + "strings" + + Hermez "github.com/hermeznetwork/hermez-node/eth/contracts/hermez" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethclient" ethCommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethclient" "github.com/hermeznetwork/hermez-node/common" - Hermez "github.com/hermeznetwork/hermez-node/eth/contracts/hermez" "github.com/hermeznetwork/hermez-node/log" "github.com/iden3/go-iden3-crypto/babyjub" ) const ( - // FeeIdxCoordinatorLen is the number of tokens the coordinator can use + // RollupConstFeeIdxCoordinatorLen is the number of tokens the coordinator can use // to collect fees (determines the number of tokens that the // coordinator can collect fees from). This value is determined by the // circuit. - FeeIdxCoordinatorLen = 64 + RollupConstFeeIdxCoordinatorLen = 64 + // RollupConstReservedIDx First 256 indexes reserved, first user index will be the 256 + RollupConstReservedIDx = 255 + // RollupConstExitIDx IDX 1 is reserved for exits + RollupConstExitIDx = 1 + // RollupConstLimitLoadAmount Max load amount allowed (loadAmount: L1 --> L2) + RollupConstLimitLoadAmount = (1 << 128) + // RollupConstLimitL2TransferAmount Max amount allowed (amount L2 --> L2) + RollupConstLimitL2TransferAmount = (1 << 192) + // RollupConstLimitTokens Max number of tokens allowed to be registered inside the rollup + RollupConstLimitTokens = (1 << 32) + // RollupConstL1CoordinatorTotalBytes [4 bytes] token + [32 bytes] babyjub + [65 bytes] compressedSignature + RollupConstL1CoordinatorTotalBytes = 101 + // RollupConstL1UserTotalBytes [20 bytes] fromEthAddr + [32 bytes] fromBjj-compressed + [6 bytes] fromIdx + + // [2 bytes] loadAmountFloat16 + [2 bytes] amountFloat16 + [4 bytes] tokenId + [6 bytes] toIdx + RollupConstL1UserTotalBytes = 72 + // RollupConstMaxL1UserTX Maximum L1-user transactions allowed to be queued in a batch + RollupConstMaxL1UserTX = 128 + // RollupConstMaxL1TX Maximum L1 transactions allowed to be queued in a batch + RollupConstMaxL1TX = 256 + // RollupConstRfield Modulus zkSNARK + RollupConstRfield = 21888242871839275222246405745257275088548364400416034343698204186575808495617 + // RollupConstInputSHAConstantBytes [6 bytes] lastIdx + [6 bytes] newLastIdx + [32 bytes] stateRoot + [32 bytes] newStRoot + [32 bytes] newExitRoot + + // [_MAX_L1_TX * _L1_USER_TOTALBYTES bytes] l1TxsData + totalL2TxsDataLength + feeIdxCoordinatorLength + [2 bytes] chainID = + // 18542 bytes + totalL2TxsDataLength + feeIdxCoordinatorLength + RollupConstInputSHAConstantBytes = 18542 + // RollupConstNumBuckets Number of buckets + RollupConstNumBuckets = 5 + // RollupConstMaxWithdrawalDelay max withdrawal delay in seconds + RollupConstMaxWithdrawalDelay = 2 * 7 * 24 * 60 * 60 + // RollupConstExchangeMultiplier exchange multiplier + RollupConstExchangeMultiplier = 1e14 + // LenVerifiers number of Rollup Smart Contract Verifiers + LenVerifiers = 1 +) + +var ( + // RollupConstEthAddressInternalOnly This ethereum address is used internally for rollup accounts that don't have ethereum address, only Babyjubjub + // This non-ethereum accounts can be created by the coordinator and allow users to have a rollup + // account without needing an ethereum address + RollupConstEthAddressInternalOnly = ethCommon.HexToAddress("0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF") + + // RollupConstERC1820 ERC1820Registry address + RollupConstERC1820 = ethCommon.HexToAddress("0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24") + + // ERC777 tokens signatures + + // RollupConstRecipientInterfaceHash ERC777 recipient interface hash + RollupConstRecipientInterfaceHash = crypto.Keccak256([]byte("ERC777TokensRecipient")) + // RollupConstPerformL1UserTXSignature the signature of the function that can be called thru an ERC777 `send` + RollupConstPerformL1UserTXSignature = crypto.Keccak256([]byte("addL1Transaction(uint256,uint48,uint16,uint16,uint32,uint48)")) + // RollupConstAddTokenSignature the signature of the function that can be called thru an ERC777 `send` + RollupConstAddTokenSignature = crypto.Keccak256([]byte("addToken(address)")) + // RollupConstSendSignature ERC777 Signature + RollupConstSendSignature = crypto.Keccak256([]byte("send(address,uint256,bytes)")) + // RollupConstERC777Granularity ERC777 Signature + RollupConstERC777Granularity = crypto.Keccak256([]byte("granularity()")) + // RollupConstWithdrawalDelayerDeposit This constant are used to deposit tokens from ERC77 tokens into withdrawal delayer + RollupConstWithdrawalDelayerDeposit = crypto.Keccak256([]byte("deposit(address,address,uint192)")) + + // ERC20 signature + + // RollupConstTransferSignature This constant is used in the _safeTransfer internal method in order to safe GAS. + RollupConstTransferSignature = crypto.Keccak256([]byte("transfer(address,uint256)")) + // RollupConstTransferFromSignature This constant is used in the _safeTransfer internal method in order to safe GAS. + RollupConstTransferFromSignature = crypto.Keccak256([]byte("transferFrom(address,address,uint256)")) + // RollupConstApproveSignature This constant is used in the _safeTransfer internal method in order to safe GAS. + RollupConstApproveSignature = crypto.Keccak256([]byte("approve(address,uint256)")) + // RollupConstERC20Signature ERC20 decimals signature + RollupConstERC20Signature = crypto.Keccak256([]byte("decimals()")) ) // RollupConstants are the constants of the Rollup Smart Contract -type RollupConstants struct { +/* type RollupConstants struct { // Maxim Deposit allowed MaxAmountDeposit *big.Int MaxAmountL2 *big.Int @@ -50,12 +126,24 @@ type RollupConstants struct { NoLimitToken int NumBuckets int MaxWDelay int64 +}*/ + +// RollupPublicConstants are the constants of the Rollup Smart Contract +type RollupPublicConstants struct { + AbsoluteMaxL1L2BatchTimeout uint8 + TokenHEZ ethCommon.Address + Verifiers []RollupVerifierStruct + HermezAuctionContract ethCommon.Address + HermezGovernanceDAOAddress ethCommon.Address + SafetyAddress ethCommon.Address + WithdrawDelayerContract ethCommon.Address } // RollupVariables are the variables of the Rollup Smart Contract type RollupVariables struct { - FeeAddToken *big.Int - ForgeL1Timeout int64 + FeeAddToken *big.Int + ForgeL1L2BatchTimeout int64 + WithdrawalDelay uint64 } // QueueStruct is the queue of L1Txs for a batch @@ -73,6 +161,12 @@ func NewQueueStruct() *QueueStruct { } } +// RollupVerifierStruct is the information about verifiers of the Rollup Smart Contract +type RollupVerifierStruct struct { + MaxTx *big.Int + NLevels *big.Int +} + // RollupState represents the state of the Rollup in the Smart Contract //nolint:structcheck,unused type RollupState struct { @@ -90,9 +184,16 @@ type RollupState struct { // RollupEventL1UserTx is an event of the Rollup Smart Contract type RollupEventL1UserTx struct { + ToForgeL1TxsNum uint64 // QueueIndex *big.Int + Position uint8 // TransactionIndex *big.Int L1Tx common.L1Tx - ToForgeL1TxsNum int64 // QueueIndex *big.Int - Position int // TransactionIndex *big.Int +} + +// RollupEventL1UserTxAux is an event of the Rollup Smart Contract +type RollupEventL1UserTxAux struct { + ToForgeL1TxsNum uint64 // QueueIndex *big.Int + Position uint8 // TransactionIndex *big.Int + L1Tx []byte } // RollupEventAddToken is an event of the Rollup Smart Contract @@ -109,7 +210,7 @@ type RollupEventForgeBatch struct { // RollupEventUpdateForgeL1L2BatchTimeout is an event of the Rollup Smart Contract type RollupEventUpdateForgeL1L2BatchTimeout struct { - ForgeL1Timeout *big.Int + ForgeL1L2BatchTimeout uint8 } // RollupEventUpdateFeeAddToken is an event of the Rollup Smart Contract @@ -119,8 +220,8 @@ type RollupEventUpdateFeeAddToken struct { // RollupEventWithdrawEvent is an event of the Rollup Smart Contract type RollupEventWithdrawEvent struct { - Idx *big.Int - NumExitRoot *big.Int + Idx uint64 + NumExitRoot uint64 InstantWithdraw bool } @@ -149,19 +250,35 @@ func NewRollupEvents() RollupEvents { // RollupForgeBatchArgs are the arguments to the ForgeBatch function in the Rollup Smart Contract //nolint:structcheck,unused type RollupForgeBatchArgs struct { - ProofA [2]*big.Int - ProofB [2][2]*big.Int - ProofC [2]*big.Int - NewLastIdx int64 - NewStRoot *big.Int - NewExitRoot *big.Int - L1CoordinatorTxs []*common.L1Tx - L1CoordinatorTxsAuths [][]byte // Authorization for accountCreations for each L1CoordinatorTxs - L2Txs []*common.L2Tx - FeeIdxCoordinator []common.Idx + NewLastIdx uint64 + NewStRoot *big.Int + NewExitRoot *big.Int + L1CoordinatorTxs []*common.L1Tx + L2TxsData []*common.L2Tx + FeeIdxCoordinator []common.Idx + // Circuit selector + VerifierIdx uint8 + L1Batch bool + ProofA [2]*big.Int + ProofB [2][2]*big.Int + ProofC [2]*big.Int +} + +// RollupForgeBatchArgsAux are the arguments to the ForgeBatch function in the Rollup Smart Contract +//nolint:structcheck,unused +type RollupForgeBatchArgsAux struct { + NewLastIdx uint64 + NewStRoot *big.Int + NewExitRoot *big.Int + L1CoordinatorTxs []byte + L2TxsData []byte + FeeIdxCoordinator []byte // Circuit selector - VerifierIdx int64 + VerifierIdx uint8 L1Batch bool + ProofA [2]*big.Int + ProofB [2][2]*big.Int + ProofC [2]*big.Int } // RollupInterface is the inteface to to Rollup Smart Contract @@ -201,7 +318,7 @@ type RollupInterface interface { // Smart Contract Status // - RollupConstants() (*RollupConstants, error) + RollupConstants() (*RollupPublicConstants, error) RollupEventsByBlock(blockNum int64) (*RollupEvents, *ethCommon.Hash, error) RollupForgeBatchArgs(ethCommon.Hash) (*RollupForgeBatchArgs, error) } @@ -212,16 +329,22 @@ type RollupInterface interface { // RollupClient is the implementation of the interface to the Rollup Smart Contract in ethereum. type RollupClient struct { - client *EthereumClient - address ethCommon.Address + client *EthereumClient + address ethCommon.Address + contractAbi abi.ABI } // NewRollupClient creates a new RollupClient -func NewRollupClient(client *EthereumClient, address ethCommon.Address) *RollupClient { - return &RollupClient{ - client: client, - address: address, +func NewRollupClient(client *EthereumClient, address ethCommon.Address) (*RollupClient, error) { + contractAbi, err := abi.JSON(strings.NewReader(string(Hermez.HermezABI))) + if err != nil { + return nil, err } + return &RollupClient{ + client: client, + address: address, + contractAbi: contractAbi, + }, nil } // RollupForgeBatch is the interface to call the smart contract function @@ -323,99 +446,205 @@ func (c *RollupClient) RollupUpdateFeeAddToken(newFeeAddToken *big.Int) (*types. } // RollupConstants returns the Constants of the Rollup Smart Contract -func (c *RollupClient) RollupConstants() (*RollupConstants, error) { - rollupConstants := new(RollupConstants) +func (c *RollupClient) RollupConstants() (*RollupPublicConstants, error) { + rollupConstants := new(RollupPublicConstants) if err := c.client.Call(func(ec *ethclient.Client) error { - rollup, err := Hermez.NewHermez(c.address, ec) - if err != nil { - return err - } - // rollupConstants.GovernanceAddress := - l1CoordinatorBytes, err := rollup.L1COORDINATORBYTES(nil) - if err != nil { - return err - } - rollupConstants.L1CoordinatorBytes = int(l1CoordinatorBytes.Int64()) - l1UserBytes, err := rollup.L1USERBYTES(nil) - if err != nil { - return err - } - rollupConstants.L1UserBytes = int(l1UserBytes.Int64()) - l2Bytes, err := rollup.L2BYTES(nil) - if err != nil { - return err - } - rollupConstants.L2Bytes = int(l2Bytes.Int64()) - rollupConstants.LastIDx, err = rollup.LASTIDX(nil) - if err != nil { - return err - } - rollupConstants.MaxAmountDeposit, err = rollup.MAXLOADAMOUNT(nil) + hermez, err := Hermez.NewHermez(c.address, ec) if err != nil { return err } - rollupConstants.MaxAmountL2, err = rollup.MAXAMOUNT(nil) + rollupConstants.AbsoluteMaxL1L2BatchTimeout, err = hermez.ABSOLUTEMAXL1L2BATCHTIMEOUT(nil) if err != nil { return err } - maxL1Tx, err := rollup.MAXL1TX(nil) + rollupConstants.TokenHEZ, err = hermez.TokenHEZ(nil) if err != nil { return err } - rollupConstants.MaxL1Tx = int(maxL1Tx.Int64()) - maxL1UserTx, err := rollup.MAXL1USERTX(nil) - if err != nil { - return err - } - rollupConstants.MaxL1UserTx = int(maxL1UserTx.Int64()) - maxTokens, err := rollup.MAXTOKENS(nil) - if err != nil { - return err - } - rollupConstants.MaxTokens = maxTokens.Int64() - maxWDelay, err := rollup.MAXWITHDRAWALDELAY(nil) - if err != nil { - return err + for i := int64(0); i < int64(LenVerifiers); i++ { + newRollupVerifier := new(RollupVerifierStruct) + rollupVerifier, err := hermez.RollupVerifiers(nil, big.NewInt(i)) + if err != nil { + return err + } + newRollupVerifier.MaxTx = rollupVerifier.MaxTx + newRollupVerifier.NLevels = rollupVerifier.NLevels + rollupConstants.Verifiers = append(rollupConstants.Verifiers, *newRollupVerifier) } - rollupConstants.MaxWDelay = maxWDelay.Int64() - noLimitToken, err := rollup.NOLIMIT(nil) + rollupConstants.HermezAuctionContract, err = hermez.HermezAuctionContract(nil) if err != nil { return err } - rollupConstants.NoLimitToken = int(noLimitToken.Int64()) - numBuckets, err := rollup.NUMBUCKETS(nil) + rollupConstants.HermezGovernanceDAOAddress, err = hermez.HermezGovernanceDAOAddress(nil) if err != nil { return err } - rollupConstants.NumBuckets = int(numBuckets.Int64()) - // rollupConstants.ReservedIDx = - rollupConstants.Rfield, err = rollup.RFIELD(nil) + rollupConstants.SafetyAddress, err = hermez.SafetyAddress(nil) if err != nil { return err } - // rollupConstants.SafetyBot = - // rollupConstants.TokenHEZ = - // rollupConstants.WithdrawalContract = - return nil + rollupConstants.WithdrawDelayerContract, err = hermez.WithdrawDelayerContract(nil) + return err }); err != nil { return nil, err } return rollupConstants, nil } +var ( + logHermezL1UserTXEvent = crypto.Keccak256Hash([]byte("L1UserTxEvent(uint64,uint8,bytes)")) + logHermezAddToken = crypto.Keccak256Hash([]byte("AddToken(address,uint32)")) + logHermezForgeBatch = crypto.Keccak256Hash([]byte("ForgeBatch(uint64)")) + logHermezUpdateForgeL1L2BatchTimeout = crypto.Keccak256Hash([]byte("UpdateForgeL1L2BatchTimeout(uint8)")) + logHermezUpdateFeeAddToken = crypto.Keccak256Hash([]byte("UpdateFeeAddToken(uint256)")) + logHermezWithdrawEvent = crypto.Keccak256Hash([]byte("WithdrawEvent(uint48,uint48,bool)")) +) + // RollupEventsByBlock returns the events in a block that happened in the Rollup Smart Contract func (c *RollupClient) RollupEventsByBlock(blockNum int64) (*RollupEvents, *ethCommon.Hash, error) { - log.Error("TODO") - return nil, nil, errTODO + var rollupEvents RollupEvents + var blockHash ethCommon.Hash + + query := ethereum.FilterQuery{ + FromBlock: big.NewInt(blockNum), + ToBlock: big.NewInt(blockNum), + Addresses: []ethCommon.Address{ + c.address, + }, + BlockHash: nil, + Topics: [][]ethCommon.Hash{}, + } + logs, err := c.client.client.FilterLogs(context.Background(), query) + if err != nil { + return nil, nil, err + } + if len(logs) > 0 { + blockHash = logs[0].BlockHash + } + for _, vLog := range logs { + if vLog.BlockHash != blockHash { + return nil, nil, ErrBlockHashMismatchEvent + } + switch vLog.Topics[0] { + case logHermezL1UserTXEvent: + var L1UserTxAux RollupEventL1UserTxAux + var L1UserTx RollupEventL1UserTx + err := c.contractAbi.Unpack(&L1UserTxAux, "L1UserTxEvent", vLog.Data) + if err != nil { + return nil, nil, err + } + L1Tx, err := common.L1TxFromBytes(L1UserTxAux.L1Tx) + if err != nil { + return nil, nil, err + } + L1UserTx.ToForgeL1TxsNum = new(big.Int).SetBytes(vLog.Topics[1][:]).Uint64() + L1UserTx.Position = uint8(new(big.Int).SetBytes(vLog.Topics[2][:]).Uint64()) + L1UserTx.L1Tx = *L1Tx + rollupEvents.L1UserTx = append(rollupEvents.L1UserTx, L1UserTx) + case logHermezAddToken: + var addToken RollupEventAddToken + err := c.contractAbi.Unpack(&addToken, "AddToken", vLog.Data) + if err != nil { + return nil, nil, err + } + addToken.Address = ethCommon.BytesToAddress(vLog.Topics[1].Bytes()) + rollupEvents.AddToken = append(rollupEvents.AddToken, addToken) + case logHermezForgeBatch: + var forgeBatch RollupEventForgeBatch + forgeBatch.BatchNum = new(big.Int).SetBytes(vLog.Topics[1][:]).Int64() + rollupEvents.ForgeBatch = append(rollupEvents.ForgeBatch, forgeBatch) + case logHermezUpdateForgeL1L2BatchTimeout: + var updateForgeL1L2BatchTimeout RollupEventUpdateForgeL1L2BatchTimeout + err := c.contractAbi.Unpack(&updateForgeL1L2BatchTimeout, "UpdateForgeL1L2BatchTimeout", vLog.Data) + if err != nil { + return nil, nil, err + } + rollupEvents.UpdateForgeL1L2BatchTimeout = append(rollupEvents.UpdateForgeL1L2BatchTimeout, updateForgeL1L2BatchTimeout) + case logHermezUpdateFeeAddToken: + var updateFeeAddToken RollupEventUpdateFeeAddToken + err := c.contractAbi.Unpack(&updateFeeAddToken, "UpdateFeeAddToken", vLog.Data) + if err != nil { + return nil, nil, err + } + rollupEvents.UpdateFeeAddToken = append(rollupEvents.UpdateFeeAddToken, updateFeeAddToken) + case logHermezWithdrawEvent: + var withdraw RollupEventWithdrawEvent + err := c.contractAbi.Unpack(&withdraw, "WithdrawEvent", vLog.Data) + if err != nil { + return nil, nil, err + } + withdraw.Idx = new(big.Int).SetBytes(vLog.Topics[1][:]).Uint64() + withdraw.NumExitRoot = new(big.Int).SetBytes(vLog.Topics[2][:]).Uint64() + rollupEvents.WithdrawEvent = append(rollupEvents.WithdrawEvent, withdraw) + } + } + return &rollupEvents, &blockHash, nil } // RollupForgeBatchArgs returns the arguments used in a ForgeBatch call in the Rollup Smart Contract in the given transaction func (c *RollupClient) RollupForgeBatchArgs(ethTxHash ethCommon.Hash) (*RollupForgeBatchArgs, error) { + tx, _, err := c.client.client.TransactionByHash(context.Background(), ethTxHash) + if err != nil { + return nil, err + } + txData := tx.Data() + method, err := c.contractAbi.MethodById(txData) + if err != nil { + return nil, err + } + aux := new(RollupForgeBatchArgsAux) + method.Inputs.Unpack(aux, txData) + rollupForgeBatchArgs := new(RollupForgeBatchArgs) + rollupForgeBatchArgs.L1Batch = aux.L1Batch + rollupForgeBatchArgs.NewExitRoot = aux.NewExitRoot + rollupForgeBatchArgs.NewLastIdx = aux.NewLastIdx + rollupForgeBatchArgs.NewStRoot = aux.NewStRoot + rollupForgeBatchArgs.ProofA = aux.ProofA + rollupForgeBatchArgs.ProofB = aux.ProofB + rollupForgeBatchArgs.ProofC = aux.ProofC + rollupForgeBatchArgs.VerifierIdx = aux.VerifierIdx + + numTxsL1 := len(aux.L1CoordinatorTxs) / common.L1TxBytesLen + for i := 0; i < numTxsL1; i++ { + L1Tx, err := common.L1TxFromCoordinatorBytes(aux.L1CoordinatorTxs[i*common.L1CoordinatorTxBytesLen : (i+1)*common.L1CoordinatorTxBytesLen]) + if err != nil { + return nil, err + } + rollupForgeBatchArgs.L1CoordinatorTxs = append(rollupForgeBatchArgs.L1CoordinatorTxs, L1Tx) + } + rollupConsts, err := c.RollupConstants() + if err != nil { + return nil, err + } + nLevels := rollupConsts.Verifiers[rollupForgeBatchArgs.VerifierIdx].NLevels.Int64() + lenL2TxsBytes := int((nLevels/8)*2 + 2 + 1) + numTxsL2 := len(aux.L2TxsData) / lenL2TxsBytes + for i := 0; i < numTxsL2; i++ { + L2Tx, err := common.L2TxFromBytes(aux.L2TxsData[i*lenL2TxsBytes:(i+1)*lenL2TxsBytes], int(nLevels)) + if err != nil { + return nil, err + } + rollupForgeBatchArgs.L2TxsData = append(rollupForgeBatchArgs.L2TxsData, L2Tx) + } + lenFeeIdxCoordinatorBytes := int(nLevels / 8) + numFeeIdxCoordinator := len(aux.FeeIdxCoordinator) / lenFeeIdxCoordinatorBytes + for i := 0; i < numFeeIdxCoordinator; i++ { + var paddedFeeIdx [6]byte + if lenFeeIdxCoordinatorBytes < common.IdxBytesLen { + copy(paddedFeeIdx[6-lenFeeIdxCoordinatorBytes:], aux.FeeIdxCoordinator[i*lenFeeIdxCoordinatorBytes:(i+1)*lenFeeIdxCoordinatorBytes]) + } else { + copy(paddedFeeIdx[:], aux.FeeIdxCoordinator[i*lenFeeIdxCoordinatorBytes:(i+1)*lenFeeIdxCoordinatorBytes]) + } + FeeIdxCoordinator, err := common.IdxFromBytes(paddedFeeIdx[:]) + if err != nil { + return nil, err + } + rollupForgeBatchArgs.FeeIdxCoordinator = append(rollupForgeBatchArgs.FeeIdxCoordinator, FeeIdxCoordinator) + } + return rollupForgeBatchArgs, nil // tx := client.TransactionByHash(ethTxHash) -> types.Transaction // txData := types.Transaction -> Data() // m := abi.MethodById(txData) -> Method // m.Inputs.Unpack(txData) -> Args // client.TransactionReceipt()? - log.Error("TODO") - return nil, errTODO } diff --git a/eth/rollup_test.go b/eth/rollup_test.go index 684d286..3709443 100644 --- a/eth/rollup_test.go +++ b/eth/rollup_test.go @@ -1,16 +1,28 @@ package eth import ( + "math/big" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) var rollupClient *RollupClient +var absoluteMaxL1L2BatchTimeout = uint8(240) +var maxTx = big.NewInt(512) +var nLevels = big.NewInt(32) + func TestRollupConstants(t *testing.T) { - if rollupClient != nil { - _, err := rollupClient.RollupConstants() - require.Nil(t, err) - } + rollupConstants, err := rollupClient.RollupConstants() + require.Nil(t, err) + assert.Equal(t, absoluteMaxL1L2BatchTimeout, rollupConstants.AbsoluteMaxL1L2BatchTimeout) + assert.Equal(t, auctionAddressConst, rollupConstants.HermezAuctionContract) + assert.Equal(t, tokenERC777AddressConst, rollupConstants.TokenHEZ) + assert.Equal(t, maxTx, rollupConstants.Verifiers[0].MaxTx) + assert.Equal(t, nLevels, rollupConstants.Verifiers[0].NLevels) + assert.Equal(t, governanceAddressConst, rollupConstants.HermezGovernanceDAOAddress) + assert.Equal(t, safetyAddressConst, rollupConstants.SafetyAddress) + assert.Equal(t, wdelayerAddressConst, rollupConstants.WithdrawDelayerContract) } diff --git a/eth/wdelayer.go b/eth/wdelayer.go index b89bb68..2865ab2 100644 --- a/eth/wdelayer.go +++ b/eth/wdelayer.go @@ -58,9 +58,10 @@ type WDelayerEventNewWithdrawalDelay struct { // WDelayerEventEscapeHatchWithdrawal an event of the WithdrawalDelayer Smart Contract type WDelayerEventEscapeHatchWithdrawal struct { - Who ethCommon.Address - To ethCommon.Address - Token ethCommon.Address + Who ethCommon.Address + To ethCommon.Address + Token ethCommon.Address + Amount *big.Int } // WDelayerEventNewHermezKeeperAddress an event of the WithdrawalDelayer Smart Contract @@ -124,7 +125,7 @@ type WDelayerInterface interface { WDelayerDepositInfo(owner, token ethCommon.Address) (*big.Int, uint64) WDelayerDeposit(onwer, token ethCommon.Address, amount *big.Int) (*types.Transaction, error) WDelayerWithdrawal(owner, token ethCommon.Address) (*types.Transaction, error) - WDelayerEscapeHatchWithdrawal(to, token ethCommon.Address) (*types.Transaction, error) + WDelayerEscapeHatchWithdrawal(to, token ethCommon.Address, amount *big.Int) (*types.Transaction, error) } // @@ -401,7 +402,7 @@ func (c *WDelayerClient) WDelayerWithdrawal(owner, token ethCommon.Address) (*ty } // WDelayerEscapeHatchWithdrawal is the interface to call the smart contract function -func (c *WDelayerClient) WDelayerEscapeHatchWithdrawal(to, token ethCommon.Address) (*types.Transaction, error) { +func (c *WDelayerClient) WDelayerEscapeHatchWithdrawal(to, token ethCommon.Address, amount *big.Int) (*types.Transaction, error) { var tx *types.Transaction var err error if tx, err = c.client.CallAuth( @@ -411,7 +412,7 @@ func (c *WDelayerClient) WDelayerEscapeHatchWithdrawal(to, token ethCommon.Addre if err != nil { return nil, err } - return wdelayer.EscapeHatchWithdrawal(auth, to, token) + return wdelayer.EscapeHatchWithdrawal(auth, to, token, amount) }, ); err != nil { return nil, fmt.Errorf("Failed escapeHatchWithdrawal: %w", err) @@ -420,14 +421,14 @@ func (c *WDelayerClient) WDelayerEscapeHatchWithdrawal(to, token ethCommon.Addre } var ( - logDeposit = crypto.Keccak256Hash([]byte("Deposit(address,address,uint192,uint64)")) - logWithdraw = crypto.Keccak256Hash([]byte("Withdraw(address,address,uint192)")) - logEmergencyModeEnabled = crypto.Keccak256Hash([]byte("EmergencyModeEnabled()")) - logNewWithdrawalDelay = crypto.Keccak256Hash([]byte("NewWithdrawalDelay(uint64)")) - logEscapeHatchWithdrawal = crypto.Keccak256Hash([]byte("EscapeHatchWithdrawal(address,address,address)")) - logNewHermezKeeperAddress = crypto.Keccak256Hash([]byte("NewHermezKeeperAddress(address)")) - logNewWhiteHackGroupAddress = crypto.Keccak256Hash([]byte("NewWhiteHackGroupAddress(address)")) - logNewHermezGovernanceDAOAddress = crypto.Keccak256Hash([]byte("NewHermezGovernanceDAOAddress(address)")) + logWDelayerDeposit = crypto.Keccak256Hash([]byte("Deposit(address,address,uint192,uint64)")) + logWDelayerWithdraw = crypto.Keccak256Hash([]byte("Withdraw(address,address,uint192)")) + logWDelayerEmergencyModeEnabled = crypto.Keccak256Hash([]byte("EmergencyModeEnabled()")) + logWDelayerNewWithdrawalDelay = crypto.Keccak256Hash([]byte("NewWithdrawalDelay(uint64)")) + logWDelayerEscapeHatchWithdrawal = crypto.Keccak256Hash([]byte("EscapeHatchWithdrawal(address,address,address,uint256)")) + logWDelayerNewHermezKeeperAddress = crypto.Keccak256Hash([]byte("NewHermezKeeperAddress(address)")) + logWDelayerNewWhiteHackGroupAddress = crypto.Keccak256Hash([]byte("NewWhiteHackGroupAddress(address)")) + logWDelayerNewHermezGovernanceDAOAddress = crypto.Keccak256Hash([]byte("NewHermezGovernanceDAOAddress(address)")) ) // WDelayerEventsByBlock returns the events in a block that happened in the @@ -459,7 +460,7 @@ func (c *WDelayerClient) WDelayerEventsByBlock(blockNum int64) (*WDelayerEvents, return nil, nil, ErrBlockHashMismatchEvent } switch vLog.Topics[0] { - case logDeposit: + case logWDelayerDeposit: var deposit WDelayerEventDeposit err := c.contractAbi.Unpack(&deposit, "Deposit", vLog.Data) if err != nil { @@ -469,7 +470,7 @@ func (c *WDelayerClient) WDelayerEventsByBlock(blockNum int64) (*WDelayerEvents, deposit.Token = ethCommon.BytesToAddress(vLog.Topics[2].Bytes()) wdelayerEvents.Deposit = append(wdelayerEvents.Deposit, deposit) - case logWithdraw: + case logWDelayerWithdraw: var withdraw WDelayerEventWithdraw err := c.contractAbi.Unpack(&withdraw, "Withdraw", vLog.Data) if err != nil { @@ -479,11 +480,11 @@ func (c *WDelayerClient) WDelayerEventsByBlock(blockNum int64) (*WDelayerEvents, withdraw.Owner = ethCommon.BytesToAddress(vLog.Topics[2].Bytes()) wdelayerEvents.Withdraw = append(wdelayerEvents.Withdraw, withdraw) - case logEmergencyModeEnabled: + case logWDelayerEmergencyModeEnabled: var emergencyModeEnabled WDelayerEventEmergencyModeEnabled wdelayerEvents.EmergencyModeEnabled = append(wdelayerEvents.EmergencyModeEnabled, emergencyModeEnabled) - case logNewWithdrawalDelay: + case logWDelayerNewWithdrawalDelay: var withdrawalDelay WDelayerEventNewWithdrawalDelay err := c.contractAbi.Unpack(&withdrawalDelay, "NewWithdrawalDelay", vLog.Data) if err != nil { @@ -491,14 +492,18 @@ func (c *WDelayerClient) WDelayerEventsByBlock(blockNum int64) (*WDelayerEvents, } wdelayerEvents.NewWithdrawalDelay = append(wdelayerEvents.NewWithdrawalDelay, withdrawalDelay) - case logEscapeHatchWithdrawal: + case logWDelayerEscapeHatchWithdrawal: var escapeHatchWithdrawal WDelayerEventEscapeHatchWithdrawal + err := c.contractAbi.Unpack(&escapeHatchWithdrawal, "EscapeHatchWithdrawal", vLog.Data) + if err != nil { + return nil, nil, err + } escapeHatchWithdrawal.Who = ethCommon.BytesToAddress(vLog.Topics[1].Bytes()) escapeHatchWithdrawal.To = ethCommon.BytesToAddress(vLog.Topics[2].Bytes()) escapeHatchWithdrawal.Token = ethCommon.BytesToAddress(vLog.Topics[3].Bytes()) wdelayerEvents.EscapeHatchWithdrawal = append(wdelayerEvents.EscapeHatchWithdrawal, escapeHatchWithdrawal) - case logNewHermezKeeperAddress: + case logWDelayerNewHermezKeeperAddress: var keeperAddress WDelayerEventNewHermezKeeperAddress err := c.contractAbi.Unpack(&keeperAddress, "NewHermezKeeperAddress", vLog.Data) if err != nil { @@ -506,7 +511,7 @@ func (c *WDelayerClient) WDelayerEventsByBlock(blockNum int64) (*WDelayerEvents, } wdelayerEvents.NewHermezKeeperAddress = append(wdelayerEvents.NewHermezKeeperAddress, keeperAddress) - case logNewWhiteHackGroupAddress: + case logWDelayerNewWhiteHackGroupAddress: var whiteHackGroupAddress WDelayerEventNewWhiteHackGroupAddress err := c.contractAbi.Unpack(&whiteHackGroupAddress, "NewWhiteHackGroupAddress", vLog.Data) if err != nil { @@ -514,7 +519,7 @@ func (c *WDelayerClient) WDelayerEventsByBlock(blockNum int64) (*WDelayerEvents, } wdelayerEvents.NewWhiteHackGroupAddress = append(wdelayerEvents.NewWhiteHackGroupAddress, whiteHackGroupAddress) - case logNewHermezGovernanceDAOAddress: + case logWDelayerNewHermezGovernanceDAOAddress: var governanceDAOAddress WDelayerEventNewHermezGovernanceDAOAddress err := c.contractAbi.Unpack(&governanceDAOAddress, "NewHermezGovernanceDAOAddress", vLog.Data) if err != nil { diff --git a/eth/wdelayer_test.go b/eth/wdelayer_test.go index 4c2a5cb..9893fbd 100644 --- a/eth/wdelayer_test.go +++ b/eth/wdelayer_test.go @@ -10,6 +10,7 @@ import ( ) var wdelayerClient *WDelayerClient +var wdelayerClientTest *WDelayerClient // var wdelayerClientKep *WDelayerClient @@ -18,117 +19,117 @@ var newWithdrawalDelay = big.NewInt(79) var maxEmergencyModeTime = time.Hour * 24 * 7 * 26 func TestWDelayerGetHermezGovernanceDAOAddress(t *testing.T) { - governanceAddress, err := wdelayerClient.WDelayerGetHermezGovernanceDAOAddress() + governanceAddress, err := wdelayerClientTest.WDelayerGetHermezGovernanceDAOAddress() require.Nil(t, err) assert.Equal(t, &hermezGovernanceDAOAddressConst, governanceAddress) } func TestWDelayerSetHermezGovernanceDAOAddress(t *testing.T) { - wdelayerClientGov, err := NewWDelayerClient(ethereumClientGovDAO, wdelayerAddressConst) + wdelayerClientGov, err := NewWDelayerClient(ethereumClientGovDAO, wdelayerTestAddressConst) require.Nil(t, err) _, err = wdelayerClientGov.WDelayerSetHermezGovernanceDAOAddress(auxAddressConst) require.Nil(t, err) - auxAddress, err := wdelayerClient.WDelayerGetHermezGovernanceDAOAddress() + auxAddress, err := wdelayerClientTest.WDelayerGetHermezGovernanceDAOAddress() require.Nil(t, err) assert.Equal(t, &auxAddressConst, auxAddress) - currentBlockNum, _ := wdelayerClient.client.EthCurrentBlock() - wdelayerEvents, _, _ := wdelayerClient.WDelayerEventsByBlock(currentBlockNum) + currentBlockNum, _ := wdelayerClientTest.client.EthCurrentBlock() + wdelayerEvents, _, _ := wdelayerClientTest.WDelayerEventsByBlock(currentBlockNum) assert.Equal(t, auxAddressConst, wdelayerEvents.NewHermezGovernanceDAOAddress[0].NewHermezGovernanceDAOAddress) - wdelayerClientAux, err := NewWDelayerClient(ethereumClientAux, wdelayerAddressConst) + wdelayerClientAux, err := NewWDelayerClient(ethereumClientAux, wdelayerTestAddressConst) require.Nil(t, err) _, err = wdelayerClientAux.WDelayerSetHermezGovernanceDAOAddress(hermezGovernanceDAOAddressConst) require.Nil(t, err) } func TestWDelayerGetHermezKeeperAddress(t *testing.T) { - keeperAddress, err := wdelayerClient.WDelayerGetHermezKeeperAddress() + keeperAddress, err := wdelayerClientTest.WDelayerGetHermezKeeperAddress() require.Nil(t, err) assert.Equal(t, &hermezKeeperAddressConst, keeperAddress) } func TestWDelayerSetHermezKeeperAddress(t *testing.T) { - wdelayerClientKep, err := NewWDelayerClient(ethereumClientKep, wdelayerAddressConst) + wdelayerClientKep, err := NewWDelayerClient(ethereumClientKep, wdelayerTestAddressConst) require.Nil(t, err) _, err = wdelayerClientKep.WDelayerSetHermezKeeperAddress(auxAddressConst) require.Nil(t, err) - auxAddress, err := wdelayerClient.WDelayerGetHermezKeeperAddress() + auxAddress, err := wdelayerClientTest.WDelayerGetHermezKeeperAddress() require.Nil(t, err) assert.Equal(t, &auxAddressConst, auxAddress) - currentBlockNum, _ := wdelayerClient.client.EthCurrentBlock() - wdelayerEvents, _, _ := wdelayerClient.WDelayerEventsByBlock(currentBlockNum) + currentBlockNum, _ := wdelayerClientTest.client.EthCurrentBlock() + wdelayerEvents, _, _ := wdelayerClientTest.WDelayerEventsByBlock(currentBlockNum) assert.Equal(t, auxAddressConst, wdelayerEvents.NewHermezKeeperAddress[0].NewHermezKeeperAddress) - wdelayerClientAux, err := NewWDelayerClient(ethereumClientAux, wdelayerAddressConst) + wdelayerClientAux, err := NewWDelayerClient(ethereumClientAux, wdelayerTestAddressConst) require.Nil(t, err) _, err = wdelayerClientAux.WDelayerSetHermezKeeperAddress(hermezKeeperAddressConst) require.Nil(t, err) } func TestWDelayerGetWhiteHackGroupAddress(t *testing.T) { - whiteHackGroupAddress, err := wdelayerClient.WDelayerGetWhiteHackGroupAddress() + whiteHackGroupAddress, err := wdelayerClientTest.WDelayerGetWhiteHackGroupAddress() require.Nil(t, err) assert.Equal(t, &whiteHackGroupAddressConst, whiteHackGroupAddress) } func TestWDelayerSetWhiteHackGroupAddress(t *testing.T) { - wdelayerClientWhite, err := NewWDelayerClient(ethereumClientWhite, wdelayerAddressConst) + wdelayerClientWhite, err := NewWDelayerClient(ethereumClientWhite, wdelayerTestAddressConst) require.Nil(t, err) _, err = wdelayerClientWhite.WDelayerSetWhiteHackGroupAddress(auxAddressConst) require.Nil(t, err) - auxAddress, err := wdelayerClient.WDelayerGetWhiteHackGroupAddress() + auxAddress, err := wdelayerClientTest.WDelayerGetWhiteHackGroupAddress() require.Nil(t, err) assert.Equal(t, &auxAddressConst, auxAddress) - currentBlockNum, _ := wdelayerClient.client.EthCurrentBlock() - wdelayerEvents, _, _ := wdelayerClient.WDelayerEventsByBlock(currentBlockNum) + currentBlockNum, _ := wdelayerClientTest.client.EthCurrentBlock() + wdelayerEvents, _, _ := wdelayerClientTest.WDelayerEventsByBlock(currentBlockNum) assert.Equal(t, auxAddressConst, wdelayerEvents.NewWhiteHackGroupAddress[0].NewWhiteHackGroupAddress) - wdelayerClientAux, err := NewWDelayerClient(ethereumClientAux, wdelayerAddressConst) + wdelayerClientAux, err := NewWDelayerClient(ethereumClientAux, wdelayerTestAddressConst) require.Nil(t, err) _, err = wdelayerClientAux.WDelayerSetWhiteHackGroupAddress(whiteHackGroupAddressConst) require.Nil(t, err) } func TestWDelayerIsEmergencyMode(t *testing.T) { - emergencyMode, err := wdelayerClient.WDelayerIsEmergencyMode() + emergencyMode, err := wdelayerClientTest.WDelayerIsEmergencyMode() require.Nil(t, err) assert.Equal(t, false, emergencyMode) } func TestWDelayerGetWithdrawalDelay(t *testing.T) { - withdrawalDelay, err := wdelayerClient.WDelayerGetWithdrawalDelay() + withdrawalDelay, err := wdelayerClientTest.WDelayerGetWithdrawalDelay() require.Nil(t, err) assert.Equal(t, initWithdrawalDelay, withdrawalDelay) } func TestWDelayerChangeWithdrawalDelay(t *testing.T) { - wdelayerClientKep, err := NewWDelayerClient(ethereumClientKep, wdelayerAddressConst) + wdelayerClientKep, err := NewWDelayerClient(ethereumClientKep, wdelayerTestAddressConst) require.Nil(t, err) _, err = wdelayerClientKep.WDelayerChangeWithdrawalDelay(newWithdrawalDelay.Uint64()) require.Nil(t, err) - withdrawalDelay, err := wdelayerClient.WDelayerGetWithdrawalDelay() + withdrawalDelay, err := wdelayerClientTest.WDelayerGetWithdrawalDelay() require.Nil(t, err) assert.Equal(t, newWithdrawalDelay, withdrawalDelay) - currentBlockNum, _ := wdelayerClient.client.EthCurrentBlock() - wdelayerEvents, _, _ := wdelayerClient.WDelayerEventsByBlock(currentBlockNum) + currentBlockNum, _ := wdelayerClientTest.client.EthCurrentBlock() + wdelayerEvents, _, _ := wdelayerClientTest.WDelayerEventsByBlock(currentBlockNum) assert.Equal(t, newWithdrawalDelay.Uint64(), wdelayerEvents.NewWithdrawalDelay[0].WithdrawalDelay) } func TestWDelayerDeposit(t *testing.T) { amount := new(big.Int) amount.SetString("1100000000000000000", 10) - wdelayerClientHermez, err := NewWDelayerClient(ethereumClientHermez, wdelayerAddressConst) + wdelayerClientHermez, err := NewWDelayerClient(ethereumClientHermez, wdelayerTestAddressConst) require.Nil(t, err) - _, err = wdelayerClientHermez.WDelayerDeposit(auxAddressConst, tokenHezAddressConst, amount) + _, err = wdelayerClientHermez.WDelayerDeposit(auxAddressConst, tokenERC20AddressConst, amount) require.Nil(t, err) - currentBlockNum, _ := wdelayerClient.client.EthCurrentBlock() - wdelayerEvents, _, _ := wdelayerClient.WDelayerEventsByBlock(currentBlockNum) + currentBlockNum, _ := wdelayerClientTest.client.EthCurrentBlock() + wdelayerEvents, _, _ := wdelayerClientTest.WDelayerEventsByBlock(currentBlockNum) assert.Equal(t, amount, wdelayerEvents.Deposit[0].Amount) assert.Equal(t, auxAddressConst, wdelayerEvents.Deposit[0].Owner) - assert.Equal(t, tokenHezAddressConst, wdelayerEvents.Deposit[0].Token) + assert.Equal(t, tokenERC20AddressConst, wdelayerEvents.Deposit[0].Token) } func TestWDelayerDepositInfo(t *testing.T) { amount := new(big.Int) amount.SetString("1100000000000000000", 10) - state, err := wdelayerClient.WDelayerDepositInfo(auxAddressConst, tokenHezAddressConst) + state, err := wdelayerClientTest.WDelayerDepositInfo(auxAddressConst, tokenERC20AddressConst) require.Nil(t, err) assert.Equal(t, state.Amount, amount) } @@ -136,34 +137,48 @@ func TestWDelayerDepositInfo(t *testing.T) { func TestWDelayerWithdrawal(t *testing.T) { amount := new(big.Int) amount.SetString("1100000000000000000", 10) - _, err := wdelayerClient.WDelayerWithdrawal(auxAddressConst, tokenHezAddressConst) + _, err := wdelayerClientTest.WDelayerWithdrawal(auxAddressConst, tokenERC20AddressConst) require.Contains(t, err.Error(), "Withdrawal not allowed yet") addBlocks(newWithdrawalDelay.Int64(), ethClientDialURL) - _, err = wdelayerClient.WDelayerWithdrawal(auxAddressConst, tokenHezAddressConst) + _, err = wdelayerClientTest.WDelayerWithdrawal(auxAddressConst, tokenERC20AddressConst) require.Nil(t, err) - currentBlockNum, _ := wdelayerClient.client.EthCurrentBlock() - wdelayerEvents, _, _ := wdelayerClient.WDelayerEventsByBlock(currentBlockNum) + currentBlockNum, _ := wdelayerClientTest.client.EthCurrentBlock() + wdelayerEvents, _, _ := wdelayerClientTest.WDelayerEventsByBlock(currentBlockNum) assert.Equal(t, amount, wdelayerEvents.Withdraw[0].Amount) assert.Equal(t, auxAddressConst, wdelayerEvents.Withdraw[0].Owner) - assert.Equal(t, tokenHezAddressConst, wdelayerEvents.Withdraw[0].Token) + assert.Equal(t, tokenERC20AddressConst, wdelayerEvents.Withdraw[0].Token) +} + +func TestWDelayerSecondDeposit(t *testing.T) { + amount := new(big.Int) + amount.SetString("1100000000000000000", 10) + wdelayerClientHermez, err := NewWDelayerClient(ethereumClientHermez, wdelayerTestAddressConst) + require.Nil(t, err) + _, err = wdelayerClientHermez.WDelayerDeposit(auxAddressConst, tokenERC20AddressConst, amount) + require.Nil(t, err) + currentBlockNum, _ := wdelayerClientTest.client.EthCurrentBlock() + wdelayerEvents, _, _ := wdelayerClientTest.WDelayerEventsByBlock(currentBlockNum) + assert.Equal(t, amount, wdelayerEvents.Deposit[0].Amount) + assert.Equal(t, auxAddressConst, wdelayerEvents.Deposit[0].Owner) + assert.Equal(t, tokenERC20AddressConst, wdelayerEvents.Deposit[0].Token) } func TestWDelayerEnableEmergencyMode(t *testing.T) { - wdelayerClientKep, err := NewWDelayerClient(ethereumClientKep, wdelayerAddressConst) + wdelayerClientKep, err := NewWDelayerClient(ethereumClientKep, wdelayerTestAddressConst) require.Nil(t, err) _, err = wdelayerClientKep.WDelayerEnableEmergencyMode() require.Nil(t, err) - emergencyMode, err := wdelayerClient.WDelayerIsEmergencyMode() + emergencyMode, err := wdelayerClientTest.WDelayerIsEmergencyMode() require.Nil(t, err) assert.Equal(t, true, emergencyMode) - currentBlockNum, _ := wdelayerClient.client.EthCurrentBlock() - wdelayerEvents, _, _ := wdelayerClient.WDelayerEventsByBlock(currentBlockNum) + currentBlockNum, _ := wdelayerClientTest.client.EthCurrentBlock() + wdelayerEvents, _, _ := wdelayerClientTest.WDelayerEventsByBlock(currentBlockNum) auxEvent := new(WDelayerEventEmergencyModeEnabled) assert.Equal(t, auxEvent, &wdelayerEvents.EmergencyModeEnabled[0]) } func TestWDelayerGetEmergencyModeStartingTime(t *testing.T) { - emergencyModeStartingTime, err := wdelayerClient.WDelayerGetEmergencyModeStartingTime() + emergencyModeStartingTime, err := wdelayerClientTest.WDelayerGetEmergencyModeStartingTime() require.Nil(t, err) // `emergencyModeStartingTime` is initialized to 0 in the smart // contract construction. Since we called WDelayerEnableEmergencyMode @@ -173,17 +188,20 @@ func TestWDelayerGetEmergencyModeStartingTime(t *testing.T) { } func TestWDelayerEscapeHatchWithdrawal(t *testing.T) { - wdelayerClientWhite, err := NewWDelayerClient(ethereumClientWhite, wdelayerAddressConst) + amount := new(big.Int) + amount.SetString("10000000000000000", 10) + wdelayerClientWhite, err := NewWDelayerClient(ethereumClientWhite, wdelayerTestAddressConst) require.Nil(t, err) - _, err = wdelayerClientWhite.WDelayerEscapeHatchWithdrawal(governanceAddressConst, tokenHezAddressConst) + _, err = wdelayerClientWhite.WDelayerEscapeHatchWithdrawal(governanceAddressConst, tokenERC20AddressConst, amount) require.Contains(t, err.Error(), "NO MAX_EMERGENCY_MODE_TIME") seconds := maxEmergencyModeTime.Seconds() addTime(seconds, ethClientDialURL) - _, err = wdelayerClientWhite.WDelayerEscapeHatchWithdrawal(governanceAddressConst, tokenHezAddressConst) + _, err = wdelayerClientWhite.WDelayerEscapeHatchWithdrawal(governanceAddressConst, tokenERC20AddressConst, amount) require.Nil(t, err) - currentBlockNum, _ := wdelayerClient.client.EthCurrentBlock() - wdelayerEvents, _, _ := wdelayerClient.WDelayerEventsByBlock(currentBlockNum) - assert.Equal(t, tokenHezAddressConst, wdelayerEvents.EscapeHatchWithdrawal[0].Token) + currentBlockNum, _ := wdelayerClientTest.client.EthCurrentBlock() + wdelayerEvents, _, _ := wdelayerClientTest.WDelayerEventsByBlock(currentBlockNum) + assert.Equal(t, tokenERC20AddressConst, wdelayerEvents.EscapeHatchWithdrawal[0].Token) assert.Equal(t, governanceAddressConst, wdelayerEvents.EscapeHatchWithdrawal[0].To) assert.Equal(t, whiteHackGroupAddressConst, wdelayerEvents.EscapeHatchWithdrawal[0].Who) + assert.Equal(t, amount, wdelayerEvents.EscapeHatchWithdrawal[0].Amount) }