From d4753c7e1b39e936bd8a50a41057f129d809e784 Mon Sep 17 00:00:00 2001 From: laisolizq Date: Wed, 21 Oct 2020 20:58:40 +0200 Subject: [PATCH] Ethclient remove ERC777 --- eth/auction.go | 113 +- eth/auction_test.go | 16 +- eth/client.go | 14 +- eth/contracts/README.md | 12 +- .../auction/HermezAuctionProtocol.go | 85 +- eth/contracts/erc20.sol | 19 - eth/contracts/erc20/erc20.go | 274 --- eth/contracts/erc777/ERC777.go | 1696 ----------------- eth/contracts/hermez/Hermez.go | 70 +- eth/contracts/tokenHEZ/HEZ.go | 1163 +++++++++++ .../withdrawdelayer/WithdrawalDelayer.go | 25 +- eth/ethereum.go | 4 +- eth/ethereum_test.go | 6 +- eth/helpers.go | 98 + eth/main_test.go | 38 +- eth/rollup.go | 137 +- eth/rollup_test.go | 139 +- eth/wdelayer_test.go | 22 +- 18 files changed, 1566 insertions(+), 2365 deletions(-) delete mode 100644 eth/contracts/erc20.sol delete mode 100644 eth/contracts/erc20/erc20.go delete mode 100644 eth/contracts/erc777/ERC777.go create mode 100644 eth/contracts/tokenHEZ/HEZ.go diff --git a/eth/auction.go b/eth/auction.go index 72ad2bb..b8f2428 100644 --- a/eth/auction.go +++ b/eth/auction.go @@ -2,7 +2,6 @@ package eth import ( "context" - "encoding/binary" "fmt" "math/big" "strings" @@ -15,8 +14,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" HermezAuctionProtocol "github.com/hermeznetwork/hermez-node/eth/contracts/auction" - ERC777 "github.com/hermeznetwork/hermez-node/eth/contracts/erc777" - "golang.org/x/crypto/sha3" + HEZ "github.com/hermeznetwork/hermez-node/eth/contracts/tokenHEZ" ) // AuctionConstants are the constants of the Rollup Smart Contract @@ -237,8 +235,9 @@ type AuctionInterface interface { AuctionGetSlotSet(slot int64) (*big.Int, error) // Bidding - 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) + AuctionBid(amount *big.Int, slot int64, bidAmount *big.Int, deadline *big.Int) (tx *types.Transaction, err error) + AuctionMultiBid(amount *big.Int, startingSlot, endingSlot int64, slotSets [6]bool, + maxBid, minBid, deadline *big.Int) (tx *types.Transaction, err error) // Forge AuctionCanForge(forger ethCommon.Address, blockNum int64) (bool, error) @@ -262,15 +261,15 @@ type AuctionInterface interface { // AuctionClient is the implementation of the interface to the Auction Smart Contract in ethereum. type AuctionClient struct { - client *EthereumClient - address ethCommon.Address - tokenAddress ethCommon.Address - auction *HermezAuctionProtocol.HermezAuctionProtocol - contractAbi abi.ABI + client *EthereumClient + address ethCommon.Address + tokenHEZ TokenConfig + auction *HermezAuctionProtocol.HermezAuctionProtocol + contractAbi abi.ABI } // NewAuctionClient creates a new AuctionClient. `tokenAddress` is the address of the HEZ tokens. -func NewAuctionClient(client *EthereumClient, address, tokenAddress ethCommon.Address) (*AuctionClient, error) { +func NewAuctionClient(client *EthereumClient, address ethCommon.Address, tokenHEZ TokenConfig) (*AuctionClient, error) { contractAbi, err := abi.JSON(strings.NewReader(string(HermezAuctionProtocol.HermezAuctionProtocolABI))) if err != nil { return nil, err @@ -280,11 +279,11 @@ func NewAuctionClient(client *EthereumClient, address, tokenAddress ethCommon.Ad return nil, err } return &AuctionClient{ - client: client, - address: address, - tokenAddress: tokenAddress, - auction: auction, - contractAbi: contractAbi, + client: client, + address: address, + tokenHEZ: tokenHEZ, + auction: auction, + contractAbi: contractAbi, }, nil } @@ -558,78 +557,56 @@ func (c *AuctionClient) AuctionGetSlotNumber(blockNum int64) (slot int64, err er } // AuctionBid is the interface to call the smart contract function -func (c *AuctionClient) AuctionBid(slot int64, bidAmount *big.Int) (tx *types.Transaction, err error) { +func (c *AuctionClient) AuctionBid(amount *big.Int, slot int64, bidAmount *big.Int, deadline *big.Int) (tx *types.Transaction, err error) { if tx, err = c.client.CallAuth( 0, func(ec *ethclient.Client, auth *bind.TransactOpts) (*types.Transaction, error) { - tokens, err := ERC777.NewERC777(c.tokenAddress, ec) + tokenHEZcontract, err := HEZ.NewHEZ(c.tokenHEZ.Address, ec) if err != nil { return nil, err } - bidFnSignature := []byte("bid(uint128,uint128)") - hash := sha3.NewLegacyKeccak256() - _, err = hash.Write(bidFnSignature) - if err != nil { - return nil, err - } - methodID := hash.Sum(nil)[:4] - slotBytes := make([]byte, 8) - binary.BigEndian.PutUint64(slotBytes, uint64(slot)) - paddedSlot := ethCommon.LeftPadBytes(slotBytes, 32) - paddedAmount := ethCommon.LeftPadBytes(bidAmount.Bytes(), 32) - var userData []byte - userData = append(userData, methodID...) - userData = append(userData, paddedSlot...) - userData = append(userData, paddedAmount...) - return tokens.Send(auth, c.address, bidAmount, userData) + owner := c.client.account.Address + spender := c.address + nonce, err := tokenHEZcontract.Nonces(nil, owner) + tokenname := c.tokenHEZ.Name + tokenAddr := c.tokenHEZ.Address + chainid, _ := c.client.client.ChainID(context.Background()) + digest, _ := createPermitDigest(tokenAddr, owner, spender, chainid, amount, nonce, deadline, tokenname) + signature, _ := c.client.ks.SignHash(*c.client.account, digest) + permit := createPermit(owner, spender, amount, deadline, digest, signature) + _slot := big.NewInt(slot) + return c.auction.ProcessBid(auth, amount, _slot, bidAmount, permit) }, ); err != nil { return nil, fmt.Errorf("Failed bid: %w", err) } return tx, nil + } // 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) (tx *types.Transaction, err error) { +func (c *AuctionClient) AuctionMultiBid(amount *big.Int, startingSlot, endingSlot int64, slotSets [6]bool, + maxBid, minBid, deadline *big.Int) (tx *types.Transaction, err error) { if tx, err = c.client.CallAuth( 1000000, //nolint:gomnd func(ec *ethclient.Client, auth *bind.TransactOpts) (*types.Transaction, error) { - tokens, err := ERC777.NewERC777(c.tokenAddress, ec) + tokenHEZcontract, err := HEZ.NewHEZ(c.tokenHEZ.Address, ec) if err != nil { return nil, err } - multiBidFnSignature := []byte("multiBid(uint128,uint128,bool[6],uint128,uint128)") - hash := sha3.NewLegacyKeccak256() - _, err = hash.Write(multiBidFnSignature) - if err != nil { - return nil, err - } - methodID := hash.Sum(nil)[:4] - startingSlotBytes := make([]byte, 8) - binary.BigEndian.PutUint64(startingSlotBytes, uint64(startingSlot)) - paddedStartingSlot := ethCommon.LeftPadBytes(startingSlotBytes, 32) - endingSlotBytes := make([]byte, 8) - binary.BigEndian.PutUint64(endingSlotBytes, uint64(endingSlot)) - paddedEndingSlot := ethCommon.LeftPadBytes(endingSlotBytes, 32) - paddedMinBid := ethCommon.LeftPadBytes(closedMinBid.Bytes(), 32) - paddedMaxBid := ethCommon.LeftPadBytes(maxBid.Bytes(), 32) - var userData []byte - userData = append(userData, methodID...) - userData = append(userData, paddedStartingSlot...) - userData = append(userData, paddedEndingSlot...) - for i := 0; i < len(slotSet); i++ { - if slotSet[i] { - paddedSlotSet := ethCommon.LeftPadBytes([]byte{1}, 32) - userData = append(userData, paddedSlotSet...) - } else { - paddedSlotSet := ethCommon.LeftPadBytes([]byte{0}, 32) - userData = append(userData, paddedSlotSet...) - } - } - userData = append(userData, paddedMaxBid...) - userData = append(userData, paddedMinBid...) - return tokens.Send(auth, c.address, budget, userData) + owner := c.client.account.Address + spender := c.address + nonce, err := tokenHEZcontract.Nonces(nil, owner) + tokenname := c.tokenHEZ.Name + tokenAddr := c.tokenHEZ.Address + chainid, _ := c.client.client.ChainID(context.Background()) + + digest, _ := createPermitDigest(tokenAddr, owner, spender, chainid, amount, nonce, deadline, tokenname) + signature, _ := c.client.ks.SignHash(*c.client.account, digest) + permit := createPermit(owner, spender, amount, deadline, digest, signature) + _startingSlot := big.NewInt(startingSlot) + _endingSlot := big.NewInt(endingSlot) + return c.auction.ProcessMultiBid(auth, amount, _startingSlot, _endingSlot, slotSets, maxBid, minBid, permit) }, ); err != nil { return nil, fmt.Errorf("Failed multibid: %w", err) diff --git a/eth/auction_test.go b/eth/auction_test.go index 111abdb..9115cd3 100644 --- a/eth/auction_test.go +++ b/eth/auction_test.go @@ -19,7 +19,7 @@ var allocationRatioConst [3]uint16 = [3]uint16{4000, 4000, 2000} var auctionClientTest *AuctionClient //var genesisBlock = 93 -var genesisBlock = 100 +var genesisBlock = 97 var minBidStr = "10000000000000000000" var URL = "http://localhost:3000" @@ -270,8 +270,10 @@ func TestAuctionBid(t *testing.T) { require.Nil(t, err) bidAmount := new(big.Int) bidAmount.SetString("12000000000000000000", 10) + amount := new(big.Int) + amount.SetString("12000000000000000000", 10) bidderAddress := governanceAddressConst - _, err = auctionClientTest.AuctionBid(currentSlot+4, bidAmount) + _, err = auctionClientTest.AuctionBid(amount, currentSlot+4, bidAmount, deadline) require.Nil(t, err) currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) @@ -309,7 +311,7 @@ func TestAuctionMultiBid(t *testing.T) { budget := new(big.Int) budget.SetString("45200000000000000000", 10) bidderAddress := governanceAddressConst - _, err = auctionClientTest.AuctionMultiBid(currentSlot+4, currentSlot+10, slotSet, maxBid, minBid, budget) + _, err = auctionClientTest.AuctionMultiBid(budget, currentSlot+4, currentSlot+10, slotSet, maxBid, minBid, deadline) require.Nil(t, err) currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() auctionEvents, _, _ := auctionClientTest.AuctionEventsByBlock(currentBlockNum) @@ -346,17 +348,15 @@ func TestAuctionClaimHEZ(t *testing.T) { } func TestAuctionForge(t *testing.T) { - auctionClientTestHermez, err := NewAuctionClient(ethereumClientHermez, auctionTestAddressConst, tokenHEZAddressConst) + auctionClientTestHermez, err := NewAuctionClient(ethereumClientHermez, auctionTestAddressConst, tokenHEZ) require.Nil(t, err) slotConst := 4 blockNum := int64(int(BLOCKSPERSLOT)*slotConst + genesisBlock) - currentBlockNum, _ := auctionClientTest.client.EthCurrentBlock() + currentBlockNum, _ := auctionClientTestHermez.client.EthCurrentBlock() blocksToAdd := blockNum - currentBlockNum addBlocks(blocksToAdd, ethClientDialURL) - currentBlockNum, _ = auctionClientTest.client.EthCurrentBlock() + currentBlockNum, _ = auctionClientTestHermez.client.EthCurrentBlock() assert.Equal(t, currentBlockNum, blockNum) - _, err = auctionClientTestHermez.AuctionForge(bootCoordinatorAddressConst) - require.Contains(t, err.Error(), "Can't forge") _, err = auctionClientTestHermez.AuctionForge(governanceAddressConst) require.Nil(t, err) } diff --git a/eth/client.go b/eth/client.go index fe74fc0..5afe408 100644 --- a/eth/client.go +++ b/eth/client.go @@ -30,6 +30,12 @@ type Client struct { RollupClient } +// TokenConfig is used to define the information about token +type TokenConfig struct { + Address ethCommon.Address + Name string +} + // RollupConfig is the configuration for the Rollup smart contract interface type RollupConfig struct { Address ethCommon.Address @@ -37,8 +43,8 @@ type RollupConfig struct { // AuctionConfig is the configuration for the Auction smart contract interface type AuctionConfig struct { - Address ethCommon.Address - TokenHEZAddress ethCommon.Address + Address ethCommon.Address + TokenHEZ TokenConfig } // ClientConfig is the configuration of the Client @@ -51,11 +57,11 @@ type ClientConfig struct { // NewClient creates a new Client to interact with Ethereum and the Hermez smart contracts. func NewClient(client *ethclient.Client, account *accounts.Account, ks *ethKeystore.KeyStore, cfg *ClientConfig) (*Client, error) { ethereumClient := NewEthereumClient(client, account, ks, &cfg.Ethereum) - auctionClient, err := NewAuctionClient(ethereumClient, cfg.Auction.Address, cfg.Auction.TokenHEZAddress) + auctionClient, err := NewAuctionClient(ethereumClient, cfg.Auction.Address, cfg.Auction.TokenHEZ) if err != nil { return nil, err } - rollupCient, err := NewRollupClient(ethereumClient, cfg.Rollup.Address, cfg.Auction.TokenHEZAddress) + rollupCient, err := NewRollupClient(ethereumClient, cfg.Rollup.Address, cfg.Auction.TokenHEZ) if err != nil { return nil, err } diff --git a/eth/contracts/README.md b/eth/contracts/README.md index 2da8ccb..bbb2d6b 100644 --- a/eth/contracts/README.md +++ b/eth/contracts/README.md @@ -6,20 +6,12 @@ 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 +abigen --abi=HEZ.abi --bin=HEZ.bin --pkg=HEZ --out=HEZ.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 -Specifically they have been processed in the commit with hash: `60e03e981f1ce607c27d405952bfc98de376f0c5` +Specifically they have been processed in the commit with hash: `7574ba47fd3d7dab2653a22f57b15c69280350dc` -> abigen version 1.9.21 - ---- - -ERC20 go code was generated with the following command: -``` -abigen --sol erc20.sol --pkg erc20 --out erc20/erc20.go -``` Versions: ``` diff --git a/eth/contracts/auction/HermezAuctionProtocol.go b/eth/contracts/auction/HermezAuctionProtocol.go index 7863148..1f74ee7 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\":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\"}]" +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\":\"token\",\"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\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"slot\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"bidAmount\",\"type\":\"uint128\"},{\"internalType\":\"bytes\",\"name\":\"permit\",\"type\":\"bytes\"}],\"name\":\"processBid\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"startingSlot\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"endingSlot\",\"type\":\"uint128\"},{\"internalType\":\"bool[6]\",\"name\":\"slotSets\",\"type\":\"bool[6]\"},{\"internalType\":\"uint128\",\"name\":\"maxBid\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"minBid\",\"type\":\"uint128\"},{\"internalType\":\"bytes\",\"name\":\"permit\",\"type\":\"bytes\"}],\"name\":\"processMultiBid\",\"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\":\"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\":\"contractIHEZToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]" // HermezAuctionProtocolBin is the compiled bytecode used for deploying new contracts. -var HermezAuctionProtocolBin = "0x608060405234801561001057600080fd5b506136da806100206000396000f3fe608060405234801561001057600080fd5b50600436106102105760003560e01c806379a135e311610125578063b3dc7bb1116100ad578063d92bdda31161007c578063d92bdda314610803578063dfd5281b14610824578063e606591414610845578063ec29159b1461084d578063ecdae41b1461088d57610210565b8063b3dc7bb114610755578063b5f7f2f01461077b578063bc41556714610783578063c63de515146107e257610210565b806387e6b6bb116100f457806387e6b6bb14610651578063a48af09614610671578063ac4b90121461071f578063ac5f658b14610727578063aebd6d981461074d57610210565b806379a135e3146105895780637c643b701461059157806382787405146105bf57806383b1f6a01461061157610210565b80634e5a5178116101a85780635cca4903116101775780635cca4903146104ba5780636074db64146104e057806362945af2146105355780636dfe47c91461055b5780636f48e79b1461056357610210565b80634e5a51781461044857806354c03ab71461046e57806355b442e614610492578063564e6a711461049a57610210565b80632243de47116101e45780632243de47146103f357806337d1bd0b146103fb5780634cdc9c63146104215780634da9639d1461042957610210565b806223de29146102155780630c4da4f6146102fd5780630eeaf0801461032157806313de9af2146103d5575b600080fd5b6102fb600480360360c081101561022b57600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561026d57600080fd5b82018360208201111561027f57600080fd5b803590602001918460018302840111600160201b831117156102a057600080fd5b919390929091602081019035600160201b8111156102bd57600080fd5b8201836020820111156102cf57600080fd5b803590602001918460018302840111600160201b831117156102f057600080fd5b5090925090506108b3565b005b610305610baa565b604080516001600160801b039092168252519081900360200190f35b6102fb6004803603604081101561033757600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561036157600080fd5b82018360208201111561037357600080fd5b803590602001918460018302840111600160201b8311171561039457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610bba945050505050565b6103dd610cab565b6040805160ff9092168252519081900360200190f35b6103dd610cba565b6103056004803603602081101561041157600080fd5b50356001600160801b0316610cbf565b610305610e7a565b610431610e89565b6040805161ffff9092168252519081900360200190f35b6102fb6004803603602081101561045e57600080fd5b50356001600160a01b0316610e9a565b6104766113e1565b604080516001600160a01b039092168252519081900360200190f35b6104316113f0565b610305600480360360208110156104b057600080fd5b503560ff166113fa565b610305600480360360208110156104d057600080fd5b50356001600160a01b0316611432565b6102fb600480360360c08110156104f657600080fd5b506001600160a01b0381358116916001600160801b036020820135169160408201358116916060810135821691608082013581169160a0013516611456565b6102fb6004803603602081101561054b57600080fd5b50356001600160a01b0316611746565b6102fb6117e3565b6102fb6004803603602081101561057957600080fd5b50356001600160a01b0316611934565b6104766119d1565b6102fb600480360360408110156105a757600080fd5b506001600160801b03813581169160200135166119e0565b6102fb600480360360608110156105d557600080fd5b8101908080606001906003806020026040519081016040528092919082600360200280828437600092019190915250919450611c6a9350505050565b61063d6004803603604081101561062757600080fd5b506001600160a01b038135169060200135611d9b565b604080519115158252519081900360200190f35b6102fb6004803603602081101561066757600080fd5b503560ff1661208c565b6106976004803603602081101561068757600080fd5b50356001600160a01b031661218c565b60405180836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b838110156106e35781810151838201526020016106cb565b50505050905090810190601f1680156107105780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b610431612240565b6103056004803603602081101561073d57600080fd5b50356001600160801b0316612251565b610476612267565b6103056004803603602081101561076b57600080fd5b50356001600160801b0316612276565b6104766122b0565b6107a96004803603602081101561079957600080fd5b50356001600160801b03166122bf565b604080516001600160a01b03909516855292151560208501526001600160801b0391821684840152166060830152519081900360800190f35b6102fb600480360360208110156107f857600080fd5b503561ffff16612302565b6102fb6004803603602081101561081957600080fd5b503561ffff16612413565b6102fb6004803603602081101561083a57600080fd5b503561ffff16612524565b6103056125c1565b6108556125cd565b6040518082606080838360005b8381101561087a578181015183820152602001610862565b5050505090500191505060405180910390f35b610305600480360360208110156108a357600080fd5b50356001600160a01b031661262f565b60335460ff1661090a576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6033805460ff191690556065546001600160a01b0316331461096a576040805162461bcd60e51b815260206004820152601460248201527324b73b30b634b21022a9219b9b9b903a37b5b2b760611b604482015290519081900360640190fd5b826109b4576040805162461bcd60e51b815260206004820152601560248201527453656e742048455a20776974686f7574206461746160581b604482015290519081900360640190fd5b600160801b8510610a0c576040805162461bcd60e51b815260206004820152601e60248201527f416d6f756e74206d757374206265206c657373207468616e20325f3132380000604482015290519081900360640190fd5b86600085856020811015610a1f57600080fd5b50356001600160e01b031916905063dc22283b60e01b811415610a8557600080610a4c876004818b6135ec565b6040811015610a5a57600080fd5b506001600160801b03813581169350602090910135169050610a7e8983838761264a565b5050610b91565b6001600160e01b03198116639eec96f960e01b1415610b4d57600080610aa96133b1565b600080610ab98a6004818e6135ec565b610140811015610ac857600080fd5b6040805160c081810183526001600160801b038535811695602081013590911694810193909261010084019290918401906006908390839080828437600092019190915250969b5094995097506001600160801b03813581169750602090910135169450610b4393508f92508891508790508686868d6128e6565b5050505050610b91565b6040805162461bcd60e51b81526020600482015260146024820152734e6f7420612076616c69642063616c6c6461746160601b604482015290519081900360640190fd5b50506033805460ff191660011790555050505050505050565b6000610bb543612276565b905090565b33600090815260726020908152604090912080546001600160a01b0319166001600160a01b0385161781558251610bf9926001909201918401906133cf565b50816001600160a01b0316336001600160a01b03167f5246b2ac9ee77efe2e64af6df00055d97e2d6e1b277f5a8d17ba5bca1a573da0836040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c6d578181015183820152602001610c55565b50505050905090810190601f168015610c9a5780820380516001836020036101000a031916815260200191505b509250505060405180910390a35050565b606f5462010000900460ff1690565b602881565b606d54600090600160801b900461ffff16610cd8610baa565b016001600160801b0316826001600160801b03161015610d3f576040805162461bcd60e51b815260206004820152601f60248201527f41756374696f6e2068617320616c7265616479206265656e20636c6f73656400604482015290519081900360640190fd5b6000610d4a83612251565b6001600160801b038085166000908152607060205260409020600101549192501615610de457606f546001600160801b03808516600090815260706020526040902060010154610ddf92610dbb9261271092610dac9291169061ffff16612c6f565b6001600160801b031690612ce9565b6001600160801b038086166000908152607060205260409020600101541690612d2b565b610e73565b606f54610e7390610e379061271090610dac9061ffff16606a6001600160801b03871660068110610e1157fe5b60028104919091015460019091166010026101000a90046001600160801b031690612c6f565b606a836001600160801b031660068110610e4d57fe5b60028104919091015460019091166010026101000a90046001600160801b031690612d2b565b9392505050565b606d546001600160801b031681565b606d54600160801b900461ffff1690565b6066546001600160a01b03163314610ef9576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79204865726d657a20526f6c6c75702041646472657373000000000000604482015290519081900360640190fd5b610f038143611d9b565b610f42576040805162461bcd60e51b815260206004820152600b60248201526a43616e277420666f72676560a81b604482015290519081900360640190fd5b6000610f4c610baa565b6001600160801b0381811660009081526070602052604081208054600190910154939450600160a01b900460ff16929091600160801b9091041615610fb5576001600160801b03808416600090815260706020526040902060010154600160801b900416610ff3565b606a610fc084612251565b6001600160801b031660068110610fd357fe5b600291828204019190066010029054906101000a90046001600160801b03165b90508161139c576001600160801b0383166000908152607060205260409020805460ff60a01b1916600160a01b1790556069546001600160a01b0390811690851614801561105d57506001600160801b038084166000908152607060205260409020600101541615155b801561108857506001600160801b038381166000908152607060205260409020600101548183169116105b1561112d576001600160801b0383811660009081526070602090815260408083206001810180548616600160801b88881602179081905590546001600160a01b031684526071909252909120546110e3929081169116612d2b565b6001600160801b038481166000908152607060209081526040808320546001600160a01b031683526071909152902080546001600160801b0319169290911691909117905561139c565b6069546001600160a01b0385811691161461139c576001600160801b03838116600090815260706020526040812060010180548316600160801b81021790819055606e54919261118a9261271092610dac92169061ffff16612c6f565b606e546001600160801b03868116600090815260706020526040812060010154939450926111cb9261271092610dac92169062010000900461ffff16612c6f565b606e546001600160801b038781166000908152607060205260408120600101549394509261120d9261271092610dac921690600160201b900461ffff16612c6f565b6065546040805163fe9d930360e01b81526001600160801b03871660048201526024810182905260006044820181905291519394506001600160a01b039092169263fe9d930392608480820193929182900301818387803b15801561127157600080fd5b505af1158015611285573d6000803e3d6000fd5b50506068546001600160a01b03166000908152607160205260409020546112b892506001600160801b0316905083612d2b565b6068546001600160a01b0390811660009081526071602052604080822080546001600160801b0319166001600160801b0395861617905560675490921681522054611304911682612d2b565b6067546001600160a01b03908116600090815260716020908152604080832080546001600160801b0319166001600160801b039687161790558a85168084526070835292819020548151898716815288871693810193909352948616828201525191938b84169316917fd64ebb43f4c2b91022b97389834432f1027ef55586129ba05a3a3065b2304f05916060908290030190a45050505b6040516001600160801b038416906001600160a01b038616907f7cae662d4cfa9d9c5575c65f0cc41a858c51ca14ebcbd02a802a62376c3ad23890600090a350505050565b6068546001600160a01b031690565b606f5461ffff1690565b6000606a8260ff166006811061140c57fe5b600291828204019190066010029054906101000a90046001600160801b03169050919050565b6001600160a01b03166000908152607160205260409020546001600160801b031690565b600054610100900460ff168061146f575061146f612d91565b8061147d575060005460ff16155b6114b85760405162461bcd60e51b815260040180806020018281038252602e815260200180613677602e913960400191505060405180910390fd5b600054610100900460ff161580156114e3576000805460ff1961ff0019909116610100171660011790555b6114eb612d97565b606f80546103e861ffff199091161762ff0000191662140000179055606d805461ffff60801b1916600160811b1761ffff60901b1916608760951b17905560408051606081018252610fa080825260208201526107d09181019190915261155690606e90600361344d565b506040805160c081018252678ac7230489e8000080825260208201819052918101829052606081018290526080810182905260a081019190915261159e90606a9060066134df565b50606580546001600160a01b0319166001600160a01b038916179055604080516329965a1d60e01b815230600482018190527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b602483015260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad24916329965a1d91606480830192600092919082900301818387803b15801561163957600080fd5b505af115801561164d573d6000803e3d6000fd5b5050606d54600160801b900461ffff9081166028021643016001600160801b038916101591506116c69050576040805162461bcd60e51b815260206004820152601c60248201527f47656e6573697320736d616c6c6572207468616e206d696e696d616c00000000604482015290519081900360640190fd5b606d80546001600160801b0319166001600160801b038816179055606680546001600160a01b03199081166001600160a01b038881169190911790925560678054821687841617905560688054821686841617905560698054909116918416919091179055801561173d576000805461ff00191690555b50505050505050565b6067546001600160a01b03163314611793576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b606980546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f2161bd0f0e056d18046a81683e5bc845980367451cf4ca5148523a147c51be5590600090a250565b60335460ff1661183a576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6033805460ff19169055600061184f33611432565b90506000816001600160801b0316116118af576040805162461bcd60e51b815260206004820152601b60248201527f446f65736e2774206861766520656e6f7567682062616c616e63650000000000604482015290519081900360640190fd5b33600081815260716020526040902080546001600160801b03191690556065546118e5916001600160a01b039091169083612e46565b604080516001600160801b0383168152905133917f199ef0cb54d2b296ff6eaec2721bacf0ca3fd8344a43f5bdf4548b34dfa2594f919081900360200190a2506033805460ff19166001179055565b6067546001600160a01b03163314611981576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b606880546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fa62863cbad1647a2855e9cd39d04fa6dfd32e1b9cfaff1aaf6523f4aaafeccd790600090a250565b6065546001600160a01b031681565b6067546001600160a01b03163314611a2d576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b6006826001600160801b03161115611a82576040805162461bcd60e51b8152602060048201526013602482015272139bdd0818481d985b1a59081cdb1bdd14d95d606a1b604482015290519081900360640190fd5b606a826001600160801b031660068110611a9857fe5b60028104919091015460019091166010026101000a90046001600160801b0316611b09576040805162461bcd60e51b815260206004820152601e60248201527f5468697320736c6f742073657420697320646563656e7472616c697a65640000604482015290519081900360640190fd5b6000611b13610baa565b9050805b606d54600160801b900461ffff1682016001600160801b0390811690821611611bcd576001600160801b03808216600090815260706020526040902060010154600160801b900416611bc557606a611b6e82612251565b6001600160801b031660068110611b8157fe5b6002810491909101546001600160801b038381166000908152607060205260409020600190810180548316919094166010026101000a90920416600160801b021790555b600101611b17565b5081606a846001600160801b031660068110611be557fe5b600291828204019190066010026101000a8154816001600160801b0302191690836001600160801b031602179055507fa922aa010d1ff8e70b2aa9247d891836795c3d3ba2a543c37c91a44dc4a50172838360405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390a1505050565b6067546001600160a01b03163314611cb7576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b806002602002015181600160200201518260006020020151010161ffff1661271014611d145760405162461bcd60e51b81526004018080602001828103825260218152602001806136156021913960400191505060405180910390fd5b611d21606e82600361344d565b506040517f0bb59eceb12f1bdb63e4a7d57c70d6473fefd7c3f51af5a3604f7e97197073e490606e9060608101826000835b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411611d53579050505091505060405180910390a150565b6000600160801b8210611df5576040805162461bcd60e51b815260206004820152601d60248201527f626c6f636b4e756d62657220686967686572207468616e20325f313238000000604482015290519081900360640190fd5b606d546001600160801b0316821015611e55576040805162461bcd60e51b815260206004820152601b60248201527f41756374696f6e20686173206e6f742073746172746564207965740000000000604482015290519081900360640190fd5b6000611e6083612276565b606d54909150600090611ea990611e99906001600160801b0390811690611e8a9086166028612c6f565b6001600160801b031690612d2b565b6001600160801b03861690612ff0565b6001600160801b0380841660009081526070602052604081206001015492935091600160801b90041615611f01576001600160801b03808416600090815260706020526040902060010154600160801b900416611f3f565b606a611f0c84612251565b6001600160801b031660068110611f1f57fe5b600291828204019190066010029054906101000a90046001600160801b03165b6001600160801b038416600090815260706020526040902054909150600160a01b900460ff16158015611f865750606f5462010000900460ff166001600160801b03831610155b15611f975760019350505050612086565b6001600160801b0383166000908152607060209081526040808320546001600160a01b0390811684526072909252909120548116908716148015611ffb57506001600160801b03838116600090815260706020526040902060010154818316911610155b1561200c5760019350505050612086565b6069546001600160a01b03878116911614801561206d57506001600160801b038381166000908152607060205260409020600101548183169116108061206d57506001600160801b0380841660009081526070602052604090206001015416155b1561207e5760019350505050612086565b600093505050505b92915050565b6067546001600160a01b031633146120d9576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b602860ff82161115612132576040805162461bcd60e51b815260206004820152601c60248201527f47726561746572207468616e20424c4f434b535f5045525f534c4f5400000000604482015290519081900360640190fd5b606f805460ff8084166201000090810262ff0000199093169290921792839055604080519290930416815290517f4a0d90b611c15e02dbf23b10f35b936cf2c77665f8c77822d3eca131f9d986d39181900360200190a150565b6072602090815260009182526040918290208054600180830180548651600261010094831615949094026000190190911692909204601f81018690048602830186019096528582526001600160a01b039092169492939092908301828280156122365780601f1061220b57610100808354040283529160200191612236565b820191906000526020600020905b81548152906001019060200180831161221957829003601f168201915b5050505050905082565b606d54600160901b900461ffff1690565b60006120866001600160801b0383166006613032565b6066546001600160a01b031681565b606d546000906001600160801b039081169083161015612297576000612086565b50606d5460286001600160801b03918216909203160490565b6069546001600160a01b031690565b607060205260009081526040902080546001909101546001600160a01b03821691600160a01b900460ff16906001600160801b0380821691600160801b90041684565b6067546001600160a01b0316331461234f576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b606d5461ffff600160801b909104811690821610156123b5576040805162461bcd60e51b815260206004820152601f60248201527f536d616c6c6572207468616e20636c6f73656441756374696f6e536c6f747300604482015290519081900360640190fd5b606d805461ffff808416600160901b90810261ffff60901b199093169290921792839055604080519290930416815290517f3da0492dea7298351bc14d1c0699905fd0657c33487449751af50fc0c8b593f19181900360200190a150565b6067546001600160a01b03163314612460576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b606d5461ffff600160901b909104811690821611156124c6576040805162461bcd60e51b815260206004820152601f60248201527f47726561746572207468616e20636c6f73656441756374696f6e536c6f747300604482015290519081900360640190fd5b606d805461ffff808416600160801b90810261ffff60801b199093169290921792839055604080519290930416815290517fc78051d3757db196b1e445f3a9a1380944518c69b5d7922ec747c54f0340a4ea9181900360200190a150565b6067546001600160a01b03163314612571576040805162461bcd60e51b81526020600482018190526024820152600080516020613657833981519152604482015290519081900360640190fd5b606f805461ffff191661ffff838116919091179182905560408051929091168252517fd3748b8c326e93d12af934fbf87471e315a89bc3f7b8222343acf0210edf248e916020908290030190a150565b678ac7230489e8000081565b6125d5613580565b60408051606081019182905290606e90600390826000855b82829054906101000a900461ffff1661ffff16815260200190600201906020826001010492830192600103820291508084116125ed5790505050505050905090565b6071602052600090815260409020546001600160801b031681565b6001600160a01b03818116600090815260726020526040902054166126b6576040805162461bcd60e51b815260206004820152601a60248201527f436f6f7264696e61746f72206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b606d54600160801b900461ffff166126cc610baa565b016001600160801b0316836001600160801b03161015612733576040805162461bcd60e51b815260206004820152601f60248201527f41756374696f6e2068617320616c7265616479206265656e20636c6f73656400604482015290519081900360640190fd5b61273c83610cbf565b6001600160801b0316826001600160801b03161015612796576040805162461bcd60e51b81526020600482015260116024820152704269642062656c6f77206d696e696d756d60781b604482015290519081900360640190fd5b606d5461ffff600160901b8204811691600160801b9004166127b6610baa565b01016001600160801b0316836001600160801b03161061281d576040805162461bcd60e51b815260206004820152601b60248201527f42696420686173206e6f74206265656e206f70656e6564207965740000000000604482015290519081900360640190fd5b6001600160a01b038116600090815260716020526040902054612849906001600160801b031685612d2b565b6001600160a01b038216600090815260716020526040902080546001600160801b0319166001600160801b039283161790819055838216911610156128d5576040805162461bcd60e51b815260206004820152601a60248201527f446f206e6f74206861766520656e6f7567682062616c616e6365000000000000604482015290519081900360640190fd5b6128e0838383613074565b50505050565b606d54600160801b900461ffff166128fc610baa565b016001600160801b0316866001600160801b03161015612963576040805162461bcd60e51b815260206004820152601f60248201527f41756374696f6e2068617320616c7265616479206265656e20636c6f73656400604482015290519081900360640190fd5b606d5461ffff600160901b8204811691600160801b900416612983610baa565b01016001600160801b0316856001600160801b0316106129ea576040805162461bcd60e51b815260206004820152601b60248201527f42696420686173206e6f74206265656e206f70656e6564207965740000000000604482015290519081900360640190fd5b816001600160801b0316836001600160801b03161015612a51576040805162461bcd60e51b815260206004820152601a60248201527f6d61784269642073686f756c64206265203e3d206d696e426964000000000000604482015290519081900360640190fd5b6001600160a01b0381811660009081526072602052604090205416612abd576040805162461bcd60e51b815260206004820152601a60248201527f436f6f7264696e61746f72206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b6001600160a01b038116600090815260716020526040902054612ae9906001600160801b031688612d2b565b6001600160a01b038216600090815260716020526040812080546001600160801b0319166001600160801b039390931692909217909155865b866001600160801b0316816001600160801b031611612c64576000612b4682610cbf565b9050846001600160801b0316816001600160801b031611612b6957849250612baf565b846001600160801b0316816001600160801b0316118015612b9c5750856001600160801b0316816001600160801b031611155b15612ba957809250612baf565b50612c5c565b86612bb983612251565b6001600160801b031660068110612bcc57fe5b602002015115612c5a576001600160a01b0384166000908152607160205260409020546001600160801b0380851691161015612c4f576040805162461bcd60e51b815260206004820152601a60248201527f446f206e6f74206861766520656e6f7567682062616c616e6365000000000000604482015290519081900360640190fd5b612c5a828486613074565b505b600101612b22565b505050505050505050565b60006001600160801b038316612c8757506000612086565b8282026001600160801b038084169080861690831681612ca357fe5b046001600160801b031614610e735760405162461bcd60e51b81526004018080602001828103825260218152602001806136366021913960400191505060405180910390fd5b6000610e7383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061320a565b60008282016001600160801b038085169082161015610e73576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b303b1590565b600054610100900460ff1680612db05750612db0612d91565b80612dbe575060005460ff16155b612df95760405162461bcd60e51b815260040180806020018281038252602e815260200180613677602e913960400191505060405180910390fd5b600054610100900460ff16158015612e24576000805460ff1961ff0019909116610100171660011790555b6033805460ff191660011790558015612e43576000805461ff00191690555b50565b604080518082018252601b81527f73656e6428616464726573732c75696e743235362c627974657329000000000060209182015281516001600160a01b0385811660248301526001600160801b0385166044830152606060648301819052600060848401819052855180850360a401815260c4909401865293830180516001600160e01b0316634decdde360e11b17815294518351949591949289169392909182918083835b60208310612f0b5780518252601f199092019160209182019101612eec565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612f6d576040519150601f19603f3d011682016040523d82523d6000602084013e612f72565b606091505b5091509150818015612fa0575080511580612fa05750808060200190516020811015612f9d57600080fd5b50515b612fe9576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b5050505050565b6000610e7383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506132c7565b6000610e7383836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250613334565b6001600160801b03808416600090815260706020908152604080832080546001909101546001600160a01b038781168652607190945291909320549190921692918216916130c3911685612ff0565b6001600160a01b03848116600081815260716020908152604080832080546001600160801b03199081166001600160801b03988916179091558b87168452607090925290912080546001600160a01b031916909217825560019190910180549091169287169290921790915582161580159061314757506001600160801b03811615155b156131af576001600160a01b038216600090815260716020526040902054613178906001600160801b031682612d2b565b6001600160a01b038316600090815260716020526040902080546001600160801b0319166001600160801b03929092169190911790555b826001600160a01b0316856001600160801b03167fd48e8329cdb2fb109b4fe445d7b681a74b256bff16e6f7f33b9d4fbe9038e4338660405180826001600160801b0316815260200191505060405180910390a35050505050565b6000816001600160801b03841661329f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561326457818101518382015260200161324c565b50505050905090810190601f1680156132915780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000836001600160801b0316856001600160801b0316816132bd57fe5b0495945050505050565b6000836001600160801b0316836001600160801b03161115829061332c5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561326457818101518382015260200161324c565b505050900390565b6000816001600160801b03841661338c5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561326457818101518382015260200161324c565b50826001600160801b0316846001600160801b0316816133a857fe5b06949350505050565b6040518060c001604052806006906020820280368337509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061341057805160ff191683800117855561343d565b8280016001018555821561343d579182015b8281111561343d578251825591602001919060010190613422565b5061344992915061359e565b5090565b6001830191839082156134d35791602002820160005b838211156134a357835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302613463565b80156134d15782816101000a81549061ffff02191690556002016020816001010492830192600103026134a3565b505b506134499291506135b3565b6003830191839082156135745791602002820160005b8382111561353f57835183826101000a8154816001600160801b0302191690836001600160801b031602179055509260200192601001602081600f010492830192600103026134f5565b80156135725782816101000a8154906001600160801b030219169055601001602081600f0104928301926001030261353f565b505b506134499291506135cd565b60405180606001604052806003906020820280368337509192915050565b5b80821115613449576000815560010161359f565b5b8082111561344957805461ffff191681556001016135b4565b5b808211156134495780546001600160801b03191681556001016135ce565b600080858511156135fb578182fd5b83861115613607578182fd5b505082019391909203915056fe416c6c6f636174696f6e526174696f2068617320746f206265203130302e303025536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a26469706673582212202c466d8d4e52482a767ae41ddef468ac109833fb436225bb6bb0dcaf72fe83ca64736f6c634300060c0033" +var HermezAuctionProtocolBin = "0x608060405234801561001057600080fd5b50613725806100206000396000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c806379a135e311610125578063b3dc7bb1116100ad578063d92bdda31161007c578063d92bdda314610891578063dfd5281b146108b2578063e6065914146108d3578063ec29159b146108db578063ecdae41b1461091b5761021c565b8063b3dc7bb1146107e3578063b5f7f2f014610809578063bc41556714610811578063c63de515146108705761021c565b806387e6b6bb116100f457806387e6b6bb146106df578063a48af096146106ff578063ac4b9012146107ad578063ac5f658b146107b5578063aebd6d98146107db5761021c565b806379a135e3146106175780637c643b701461061f578063827874051461064d57806383b1f6a01461069f5761021c565b806354c03ab7116101a85780635cca4903116101775780635cca4903146105485780636074db641461056e57806362945af2146105c35780636dfe47c9146105e95780636f48e79b146105f15761021c565b806354c03ab71461042357806355b442e614610447578063564e6a711461044f578063583ad0dd1461046f5761021c565b806337d1bd0b116101ef57806337d1bd0b146103215780634b93b7fa146103475780634cdc9c63146103d65780634da9639d146103de5780634e5a5178146103fd5761021c565b80630c4da4f6146102215780630eeaf0801461024557806313de9af2146102fb5780632243de4714610319575b600080fd5b610229610941565b604080516001600160801b039092168252519081900360200190f35b6102f96004803603604081101561025b57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561028557600080fd5b82018360208201111561029757600080fd5b803590602001918460018302840111600160201b831117156102b857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610951945050505050565b005b610303610a42565b6040805160ff9092168252519081900360200190f35b610303610a51565b6102296004803603602081101561033757600080fd5b50356001600160801b0316610a56565b6102f96004803603608081101561035d57600080fd5b6001600160801b0382358116926020810135821692604082013590921691810190608081016060820135600160201b81111561039857600080fd5b8201836020820111156103aa57600080fd5b803590602001918460018302840111600160201b831117156103cb57600080fd5b509092509050610c11565b610229610f8b565b6103e6610f9a565b6040805161ffff9092168252519081900360200190f35b6102f96004803603602081101561041357600080fd5b50356001600160a01b0316610fab565b61042b6114fa565b604080516001600160a01b039092168252519081900360200190f35b6103e6611509565b6102296004803603602081101561046557600080fd5b503560ff16611513565b6102f9600480360361018081101561048657600080fd5b6040805160c081810183526001600160801b038535811695602081013582169594810135909116938101929091610120830191906060840190600690839083908082843760009201919091525091946001600160801b0384358116956020860135909116949193509150606081019060400135600160201b81111561050a57600080fd5b82018360208201111561051c57600080fd5b803590602001918460018302840111600160201b8311171561053d57600080fd5b50909250905061154b565b6102296004803603602081101561055e57600080fd5b50356001600160a01b03166119a9565b6102f9600480360360c081101561058457600080fd5b506001600160a01b0381358116916001600160801b036020820135169160408201358116916060810135821691608082013581169160a00135166119cd565b6102f9600480360360208110156105d957600080fd5b50356001600160a01b0316611c24565b6102f9611cc1565b6102f96004803603602081101561060757600080fd5b50356001600160a01b0316611ec9565b61042b611f66565b6102f96004803603604081101561063557600080fd5b506001600160801b0381358116916020013516611f75565b6102f96004803603606081101561066357600080fd5b81019080806060019060038060200260405190810160405280929190826003602002808284376000920191909152509194506121ff9350505050565b6106cb600480360360408110156106b557600080fd5b506001600160a01b038135169060200135612330565b604080519115158252519081900360200190f35b6102f9600480360360208110156106f557600080fd5b503560ff16612621565b6107256004803603602081101561071557600080fd5b50356001600160a01b0316612721565b60405180836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610771578181015183820152602001610759565b50505050905090810190601f16801561079e5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6103e66127d5565b610229600480360360208110156107cb57600080fd5b50356001600160801b03166127e6565b61042b6127fc565b610229600480360360208110156107f957600080fd5b50356001600160801b031661280b565b61042b612845565b6108376004803603602081101561082757600080fd5b50356001600160801b0316612854565b604080516001600160a01b03909516855292151560208501526001600160801b0391821684840152166060830152519081900360800190f35b6102f96004803603602081101561088657600080fd5b503561ffff16612897565b6102f9600480360360208110156108a757600080fd5b503561ffff166129a8565b6102f9600480360360208110156108c857600080fd5b503561ffff16612ab9565b610229612b56565b6108e3612b62565b6040518082606080838360005b838110156109085781810151838201526020016108f0565b5050505090500191505060405180910390f35b6102296004803603602081101561093157600080fd5b50356001600160a01b0316612bc4565b600061094c4361280b565b905090565b33600090815260726020908152604090912080546001600160a01b0319166001600160a01b03851617815582516109909260019092019184019061341a565b50816001600160a01b0316336001600160a01b03167f5246b2ac9ee77efe2e64af6df00055d97e2d6e1b277f5a8d17ba5bca1a573da0836040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a045781810151838201526020016109ec565b50505050905090810190601f168015610a315780820380516001836020036101000a031916815260200191505b509250505060405180910390a35050565b606f5462010000900460ff1690565b602881565b606d54600090600160801b900461ffff16610a6f610941565b016001600160801b0316826001600160801b03161015610ad6576040805162461bcd60e51b815260206004820152601f60248201527f41756374696f6e2068617320616c7265616479206265656e20636c6f73656400604482015290519081900360640190fd5b6000610ae1836127e6565b6001600160801b038085166000908152607060205260409020600101549192501615610b7b57606f546001600160801b03808516600090815260706020526040902060010154610b7692610b529261271092610b439291169061ffff16612bdf565b6001600160801b031690612c59565b6001600160801b038086166000908152607060205260409020600101541690612c9b565b610c0a565b606f54610c0a90610bce9061271090610b439061ffff16606a6001600160801b03871660068110610ba857fe5b60028104919091015460019091166010026101000a90046001600160801b031690612bdf565b606a836001600160801b031660068110610be457fe5b60028104919091015460019091166010026101000a90046001600160801b031690612c9b565b9392505050565b336000908152607260205260409020546001600160a01b0316610c7b576040805162461bcd60e51b815260206004820152601a60248201527f436f6f7264696e61746f72206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b606d54600160801b900461ffff16610c91610941565b016001600160801b0316846001600160801b03161015610cf8576040805162461bcd60e51b815260206004820152601f60248201527f41756374696f6e2068617320616c7265616479206265656e20636c6f73656400604482015290519081900360640190fd5b610d0184610a56565b6001600160801b0316836001600160801b03161015610d5b576040805162461bcd60e51b81526020600482015260116024820152704269642062656c6f77206d696e696d756d60781b604482015290519081900360640190fd5b606d5461ffff600160901b8204811691600160801b900416610d7b610941565b01016001600160801b0316846001600160801b031610610de2576040805162461bcd60e51b815260206004820152601b60248201527f42696420686173206e6f74206265656e206f70656e6564207965740000000000604482015290519081900360640190fd5b8015610dfc57610dfc856001600160801b03168383612d01565b606554604080516323b872dd60e01b81523360048201523060248201526001600160801b038816604482015290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610e5e57600080fd5b505af1158015610e72573d6000803e3d6000fd5b505050506040513d6020811015610e8857600080fd5b5051610ed3576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b33600090815260716020526040902054610ef6906001600160801b031686612c9b565b33600090815260716020526040902080546001600160801b0319166001600160801b03928316179081905584821691161015610f79576040805162461bcd60e51b815260206004820152601a60248201527f446f206e6f74206861766520656e6f7567682062616c616e6365000000000000604482015290519081900360640190fd5b610f84848433612fa4565b5050505050565b606d546001600160801b031681565b606d54600160801b900461ffff1690565b6066546001600160a01b0316331461100a576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79204865726d657a20526f6c6c75702041646472657373000000000000604482015290519081900360640190fd5b6110148143612330565b611053576040805162461bcd60e51b815260206004820152600b60248201526a43616e277420666f72676560a81b604482015290519081900360640190fd5b600061105d610941565b6001600160801b0381811660009081526070602052604081208054600190910154939450600160a01b900460ff16929091600160801b90910416156110c6576001600160801b03808416600090815260706020526040902060010154600160801b900416611104565b606a6110d1846127e6565b6001600160801b0316600681106110e457fe5b600291828204019190066010029054906101000a90046001600160801b03165b9050816114b5576001600160801b0383166000908152607060205260409020805460ff60a01b1916600160a01b1790556069546001600160a01b0390811690851614801561116e57506001600160801b038084166000908152607060205260409020600101541615155b801561119957506001600160801b038381166000908152607060205260409020600101548183169116105b1561123e576001600160801b0383811660009081526070602090815260408083206001810180548616600160801b88881602179081905590546001600160a01b031684526071909252909120546111f4929081169116612c9b565b6001600160801b038481166000908152607060209081526040808320546001600160a01b031683526071909152902080546001600160801b031916929091169190911790556114b5565b6069546001600160a01b038581169116146114b5576001600160801b03838116600090815260706020526040812060010180548316600160801b81021790819055606e54919261129b9261271092610b4392169061ffff16612bdf565b606e546001600160801b03868116600090815260706020526040812060010154939450926112dc9261271092610b4392169062010000900461ffff16612bdf565b606e546001600160801b038781166000908152607060205260408120600101549394509261131e9261271092610b43921690600160201b900461ffff16612bdf565b60655460408051630852cd8d60e31b81526001600160801b038716600482015290519293506001600160a01b03909116916342966c68916024808201926020929091908290030181600087803b15801561137757600080fd5b505af115801561138b573d6000803e3d6000fd5b505050506040513d60208110156113a157600080fd5b50506068546001600160a01b03166000908152607160205260409020546113d1906001600160801b031683612c9b565b6068546001600160a01b0390811660009081526071602052604080822080546001600160801b0319166001600160801b039586161790556067549092168152205461141d911682612c9b565b6067546001600160a01b03908116600090815260716020908152604080832080546001600160801b0319166001600160801b039687161790558a85168084526070835292819020548151898716815288871693810193909352948616828201525191938b84169316917fd64ebb43f4c2b91022b97389834432f1027ef55586129ba05a3a3065b2304f05916060908290030190a45050505b6040516001600160801b038416906001600160a01b038616907f7cae662d4cfa9d9c5575c65f0cc41a858c51ca14ebcbd02a802a62376c3ad23890600090a350505050565b6068546001600160a01b031690565b606f5461ffff1690565b6000606a8260ff166006811061152557fe5b600291828204019190066010029054906101000a90046001600160801b03169050919050565b606d54600160801b900461ffff16611561610941565b016001600160801b0316876001600160801b031610156115c8576040805162461bcd60e51b815260206004820152601f60248201527f41756374696f6e2068617320616c7265616479206265656e20636c6f73656400604482015290519081900360640190fd5b606d5461ffff600160901b8204811691600160801b9004166115e8610941565b01016001600160801b0316866001600160801b03161061164f576040805162461bcd60e51b815260206004820152601b60248201527f42696420686173206e6f74206265656e206f70656e6564207965740000000000604482015290519081900360640190fd5b826001600160801b0316846001600160801b031610156116b6576040805162461bcd60e51b815260206004820152601a60248201527f6d61784269642073686f756c64206265203e3d206d696e426964000000000000604482015290519081900360640190fd5b336000908152607260205260409020546001600160a01b0316611720576040805162461bcd60e51b815260206004820152601a60248201527f436f6f7264696e61746f72206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b801561173a5761173a886001600160801b03168383612d01565b606554604080516323b872dd60e01b81523360048201523060248201526001600160801b038b16604482015290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b15801561179c57600080fd5b505af11580156117b0573d6000803e3d6000fd5b505050506040513d60208110156117c657600080fd5b5051611811576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b33600090815260716020526040902054611834906001600160801b031689612c9b565b33600090815260716020526040812080546001600160801b0319166001600160801b039390931692909217909155875b876001600160801b0316816001600160801b03161161199d57600061188882610a56565b9050856001600160801b0316816001600160801b0316116118ab578592506118f1565b856001600160801b0316816001600160801b03161180156118de5750866001600160801b0316816001600160801b031611155b156118eb578092506118f1565b50611995565b876118fb836127e6565b6001600160801b03166006811061190e57fe5b60200201511561199357336000908152607160205260409020546001600160801b0380851691161015611988576040805162461bcd60e51b815260206004820152601a60248201527f446f206e6f74206861766520656e6f7567682062616c616e6365000000000000604482015290519081900360640190fd5b611993828433612fa4565b505b600101611864565b50505050505050505050565b6001600160a01b03166000908152607160205260409020546001600160801b031690565b600054610100900460ff16806119e657506119e661313a565b806119f4575060005460ff16155b611a2f5760405162461bcd60e51b815260040180806020018281038252602e8152602001806136c2602e913960400191505060405180910390fd5b600054610100900460ff16158015611a5a576000805460ff1961ff0019909116610100171660011790555b611a62613140565b606f80546103e861ffff199091161762ff0000191662140000179055606d805461ffff60801b1916600160811b1761ffff60901b1916608760951b17905560408051606081018252610fa080825260208201526107d091810191909152611acd90606e906003613498565b506040805160c081018252678ac7230489e8000080825260208201819052918101829052606081018290526080810182905260a0810191909152611b1590606a90600661352a565b50606580546001600160a01b0319166001600160a01b038916179055606d54600160801b900461ffff9081166028021643016001600160801b0387161015611ba4576040805162461bcd60e51b815260206004820152601c60248201527f47656e6573697320736d616c6c6572207468616e206d696e696d616c00000000604482015290519081900360640190fd5b606d80546001600160801b0319166001600160801b038816179055606680546001600160a01b03199081166001600160a01b0388811691909117909255606780548216878416179055606880548216868416179055606980549091169184169190911790558015611c1b576000805461ff00191690555b50505050505050565b6067546001600160a01b03163314611c71576040805162461bcd60e51b815260206004820181905260248201526000805160206136a2833981519152604482015290519081900360640190fd5b606980546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f2161bd0f0e056d18046a81683e5bc845980367451cf4ca5148523a147c51be5590600090a250565b60335460ff16611d18576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6033805460ff191690556000611d2d336119a9565b90506000816001600160801b031611611d8d576040805162461bcd60e51b815260206004820152601b60248201527f446f65736e2774206861766520656e6f7567682062616c616e63650000000000604482015290519081900360640190fd5b33600081815260716020908152604080832080546001600160801b0319169055606554815163a9059cbb60e01b815260048101959095526001600160801b038616602486015290516001600160a01b039091169363a9059cbb9360448083019493928390030190829087803b158015611e0557600080fd5b505af1158015611e19573d6000803e3d6000fd5b505050506040513d6020811015611e2f57600080fd5b5051611e7a576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b604080516001600160801b0383168152905133917f199ef0cb54d2b296ff6eaec2721bacf0ca3fd8344a43f5bdf4548b34dfa2594f919081900360200190a2506033805460ff19166001179055565b6067546001600160a01b03163314611f16576040805162461bcd60e51b815260206004820181905260248201526000805160206136a2833981519152604482015290519081900360640190fd5b606880546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fa62863cbad1647a2855e9cd39d04fa6dfd32e1b9cfaff1aaf6523f4aaafeccd790600090a250565b6065546001600160a01b031681565b6067546001600160a01b03163314611fc2576040805162461bcd60e51b815260206004820181905260248201526000805160206136a2833981519152604482015290519081900360640190fd5b6006826001600160801b03161115612017576040805162461bcd60e51b8152602060048201526013602482015272139bdd0818481d985b1a59081cdb1bdd14d95d606a1b604482015290519081900360640190fd5b606a826001600160801b03166006811061202d57fe5b60028104919091015460019091166010026101000a90046001600160801b031661209e576040805162461bcd60e51b815260206004820152601e60248201527f5468697320736c6f742073657420697320646563656e7472616c697a65640000604482015290519081900360640190fd5b60006120a8610941565b9050805b606d54600160801b900461ffff1682016001600160801b0390811690821611612162576001600160801b03808216600090815260706020526040902060010154600160801b90041661215a57606a612103826127e6565b6001600160801b03166006811061211657fe5b6002810491909101546001600160801b038381166000908152607060205260409020600190810180548316919094166010026101000a90920416600160801b021790555b6001016120ac565b5081606a846001600160801b03166006811061217a57fe5b600291828204019190066010026101000a8154816001600160801b0302191690836001600160801b031602179055507fa922aa010d1ff8e70b2aa9247d891836795c3d3ba2a543c37c91a44dc4a50172838360405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390a1505050565b6067546001600160a01b0316331461224c576040805162461bcd60e51b815260206004820181905260248201526000805160206136a2833981519152604482015290519081900360640190fd5b806002602002015181600160200201518260006020020151010161ffff16612710146122a95760405162461bcd60e51b81526004018080602001828103825260218152602001806136606021913960400191505060405180910390fd5b6122b6606e826003613498565b506040517f0bb59eceb12f1bdb63e4a7d57c70d6473fefd7c3f51af5a3604f7e97197073e490606e9060608101826000835b82829054906101000a900461ffff1661ffff16815260200190600201906020826001010492830192600103820291508084116122e8579050505091505060405180910390a150565b6000600160801b821061238a576040805162461bcd60e51b815260206004820152601d60248201527f626c6f636b4e756d62657220686967686572207468616e20325f313238000000604482015290519081900360640190fd5b606d546001600160801b03168210156123ea576040805162461bcd60e51b815260206004820152601b60248201527f41756374696f6e20686173206e6f742073746172746564207965740000000000604482015290519081900360640190fd5b60006123f58361280b565b606d5490915060009061243e9061242e906001600160801b039081169061241f9086166028612bdf565b6001600160801b031690612c9b565b6001600160801b038616906131ef565b6001600160801b0380841660009081526070602052604081206001015492935091600160801b90041615612496576001600160801b03808416600090815260706020526040902060010154600160801b9004166124d4565b606a6124a1846127e6565b6001600160801b0316600681106124b457fe5b600291828204019190066010029054906101000a90046001600160801b03165b6001600160801b038416600090815260706020526040902054909150600160a01b900460ff1615801561251b5750606f5462010000900460ff166001600160801b03831610155b1561252c576001935050505061261b565b6001600160801b0383166000908152607060209081526040808320546001600160a01b039081168452607290925290912054811690871614801561259057506001600160801b03838116600090815260706020526040902060010154818316911610155b156125a1576001935050505061261b565b6069546001600160a01b03878116911614801561260257506001600160801b038381166000908152607060205260409020600101548183169116108061260257506001600160801b0380841660009081526070602052604090206001015416155b15612613576001935050505061261b565b600093505050505b92915050565b6067546001600160a01b0316331461266e576040805162461bcd60e51b815260206004820181905260248201526000805160206136a2833981519152604482015290519081900360640190fd5b602860ff821611156126c7576040805162461bcd60e51b815260206004820152601c60248201527f47726561746572207468616e20424c4f434b535f5045525f534c4f5400000000604482015290519081900360640190fd5b606f805460ff8084166201000090810262ff0000199093169290921792839055604080519290930416815290517f4a0d90b611c15e02dbf23b10f35b936cf2c77665f8c77822d3eca131f9d986d39181900360200190a150565b6072602090815260009182526040918290208054600180830180548651600261010094831615949094026000190190911692909204601f81018690048602830186019096528582526001600160a01b039092169492939092908301828280156127cb5780601f106127a0576101008083540402835291602001916127cb565b820191906000526020600020905b8154815290600101906020018083116127ae57829003601f168201915b5050505050905082565b606d54600160901b900461ffff1690565b600061261b6001600160801b0383166006613231565b6066546001600160a01b031681565b606d546000906001600160801b03908116908316101561282c57600061261b565b50606d5460286001600160801b03918216909203160490565b6069546001600160a01b031690565b607060205260009081526040902080546001909101546001600160a01b03821691600160a01b900460ff16906001600160801b0380821691600160801b90041684565b6067546001600160a01b031633146128e4576040805162461bcd60e51b815260206004820181905260248201526000805160206136a2833981519152604482015290519081900360640190fd5b606d5461ffff600160801b9091048116908216101561294a576040805162461bcd60e51b815260206004820152601f60248201527f536d616c6c6572207468616e20636c6f73656441756374696f6e536c6f747300604482015290519081900360640190fd5b606d805461ffff808416600160901b90810261ffff60901b199093169290921792839055604080519290930416815290517f3da0492dea7298351bc14d1c0699905fd0657c33487449751af50fc0c8b593f19181900360200190a150565b6067546001600160a01b031633146129f5576040805162461bcd60e51b815260206004820181905260248201526000805160206136a2833981519152604482015290519081900360640190fd5b606d5461ffff600160901b90910481169082161115612a5b576040805162461bcd60e51b815260206004820152601f60248201527f47726561746572207468616e20636c6f73656441756374696f6e536c6f747300604482015290519081900360640190fd5b606d805461ffff808416600160801b90810261ffff60801b199093169290921792839055604080519290930416815290517fc78051d3757db196b1e445f3a9a1380944518c69b5d7922ec747c54f0340a4ea9181900360200190a150565b6067546001600160a01b03163314612b06576040805162461bcd60e51b815260206004820181905260248201526000805160206136a2833981519152604482015290519081900360640190fd5b606f805461ffff191661ffff838116919091179182905560408051929091168252517fd3748b8c326e93d12af934fbf87471e315a89bc3f7b8222343acf0210edf248e916020908290030190a150565b678ac7230489e8000081565b612b6a6135cb565b60408051606081019182905290606e90600390826000855b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411612b825790505050505050905090565b6071602052600090815260409020546001600160801b031681565b60006001600160801b038316612bf75750600061261b565b8282026001600160801b038084169080861690831681612c1357fe5b046001600160801b031614610c0a5760405162461bcd60e51b81526004018080602001828103825260218152602001806136816021913960400191505060405180910390fd5b6000610c0a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613273565b60008282016001600160801b038085169082161015610c0a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082826020811015612d1357600080fd5b50356001600160e01b031916905063d505accf60e01b811415612f9e576000808080808080612d45896004818d613637565b60e0811015612d5357600080fd5b506001600160a01b038135811698506020820135169650604081013595506060810135945060ff608082013516935060a0810135925060c001359050338714612de3576040805162461bcd60e51b815260206004820152601f60248201527f5065726d6974206f776e6572206d757374206265207468652073656e64657200604482015290519081900360640190fd5b6001600160a01b0386163014612e37576040805162461bcd60e51b81526020600482015260146024820152735370656e646572206d757374206265207468697360601b604482015290519081900360640190fd5b8a8514612e8b576040805162461bcd60e51b815260206004820152601c60248201527f5065726d697420616d6f756e7420646f6573206e6f74206d6174636800000000604482015290519081900360640190fd5b606554604080516001600160a01b038a811660248301528981166044830152606482018990526084820188905260ff871660a483015260c4820186905260e48083018690528351808403909101815261010490920183526020820180516001600160e01b031663d505accf60e01b178152925182519190941693919282918083835b60208310612f2c5780518252601f199092019160209182019101612f0d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612f8e576040519150601f19603f3d011682016040523d82523d6000602084013e612f93565b606091505b505050505050505050505b50505050565b6001600160801b03808416600090815260706020908152604080832080546001909101546001600160a01b03878116865260719094529190932054919092169291821691612ff39116856131ef565b6001600160a01b03848116600081815260716020908152604080832080546001600160801b03199081166001600160801b03988916179091558b87168452607090925290912080546001600160a01b031916909217825560019190910180549091169287169290921790915582161580159061307757506001600160801b03811615155b156130df576001600160a01b0382166000908152607160205260409020546130a8906001600160801b031682612c9b565b6001600160a01b038316600090815260716020526040902080546001600160801b0319166001600160801b03929092169190911790555b826001600160a01b0316856001600160801b03167fd48e8329cdb2fb109b4fe445d7b681a74b256bff16e6f7f33b9d4fbe9038e4338660405180826001600160801b0316815260200191505060405180910390a35050505050565b303b1590565b600054610100900460ff1680613159575061315961313a565b80613167575060005460ff16155b6131a25760405162461bcd60e51b815260040180806020018281038252602e8152602001806136c2602e913960400191505060405180910390fd5b600054610100900460ff161580156131cd576000805460ff1961ff0019909116610100171660011790555b6033805460ff1916600117905580156131ec576000805461ff00191690555b50565b6000610c0a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613330565b6000610c0a83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f000000000000000081525061339d565b6000816001600160801b0384166133085760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156132cd5781810151838201526020016132b5565b50505050905090810190601f1680156132fa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000836001600160801b0316856001600160801b03168161332657fe5b0495945050505050565b6000836001600160801b0316836001600160801b0316111582906133955760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156132cd5781810151838201526020016132b5565b505050900390565b6000816001600160801b0384166133f55760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156132cd5781810151838201526020016132b5565b50826001600160801b0316846001600160801b03168161341157fe5b06949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061345b57805160ff1916838001178555613488565b82800160010185558215613488579182015b8281111561348857825182559160200191906001019061346d565b506134949291506135e9565b5090565b60018301918390821561351e5791602002820160005b838211156134ee57835183826101000a81548161ffff021916908361ffff16021790555092602001926002016020816001010492830192600103026134ae565b801561351c5782816101000a81549061ffff02191690556002016020816001010492830192600103026134ee565b505b506134949291506135fe565b6003830191839082156135bf5791602002820160005b8382111561358a57835183826101000a8154816001600160801b0302191690836001600160801b031602179055509260200192601001602081600f01049283019260010302613540565b80156135bd5782816101000a8154906001600160801b030219169055601001602081600f0104928301926001030261358a565b505b50613494929150613618565b60405180606001604052806003906020820280368337509192915050565b5b8082111561349457600081556001016135ea565b5b8082111561349457805461ffff191681556001016135ff565b5b808211156134945780546001600160801b0319168155600101613619565b60008085851115613646578182fd5b83861115613652578182fd5b505082019391909203915056fe416c6c6f636174696f6e526174696f2068617320746f206265203130302e303025536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a26469706673582212203ec19e8b18e00c0dd42dec0d017c35861dc444b587421fd7b7a5bb85ec43aa5964736f6c634300060c0033" // 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) { @@ -853,23 +853,65 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) Forge(forg // HermezAuctionProtocolInitializer is a paid mutator transaction binding the contract method 0x6074db64. // -// Solidity: function hermezAuctionProtocolInitializer(address tokenERC777, uint128 genesis, address hermezRollupAddress, address governanceAddress, address donationAddress, address bootCoordinatorAddress) returns() -func (_HermezAuctionProtocol *HermezAuctionProtocolTransactor) HermezAuctionProtocolInitializer(opts *bind.TransactOpts, tokenERC777 common.Address, genesis *big.Int, hermezRollupAddress common.Address, governanceAddress common.Address, donationAddress common.Address, bootCoordinatorAddress common.Address) (*types.Transaction, error) { - return _HermezAuctionProtocol.contract.Transact(opts, "hermezAuctionProtocolInitializer", tokenERC777, genesis, hermezRollupAddress, governanceAddress, donationAddress, bootCoordinatorAddress) +// Solidity: function hermezAuctionProtocolInitializer(address token, uint128 genesis, address hermezRollupAddress, address governanceAddress, address donationAddress, address bootCoordinatorAddress) returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolTransactor) HermezAuctionProtocolInitializer(opts *bind.TransactOpts, token common.Address, genesis *big.Int, hermezRollupAddress common.Address, governanceAddress common.Address, donationAddress common.Address, bootCoordinatorAddress common.Address) (*types.Transaction, error) { + return _HermezAuctionProtocol.contract.Transact(opts, "hermezAuctionProtocolInitializer", token, genesis, hermezRollupAddress, governanceAddress, donationAddress, bootCoordinatorAddress) } // HermezAuctionProtocolInitializer is a paid mutator transaction binding the contract method 0x6074db64. // -// Solidity: function hermezAuctionProtocolInitializer(address tokenERC777, uint128 genesis, address hermezRollupAddress, address governanceAddress, address donationAddress, address bootCoordinatorAddress) returns() -func (_HermezAuctionProtocol *HermezAuctionProtocolSession) HermezAuctionProtocolInitializer(tokenERC777 common.Address, genesis *big.Int, hermezRollupAddress common.Address, governanceAddress common.Address, donationAddress common.Address, bootCoordinatorAddress common.Address) (*types.Transaction, error) { - return _HermezAuctionProtocol.Contract.HermezAuctionProtocolInitializer(&_HermezAuctionProtocol.TransactOpts, tokenERC777, genesis, hermezRollupAddress, governanceAddress, donationAddress, bootCoordinatorAddress) +// Solidity: function hermezAuctionProtocolInitializer(address token, uint128 genesis, address hermezRollupAddress, address governanceAddress, address donationAddress, address bootCoordinatorAddress) returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolSession) HermezAuctionProtocolInitializer(token common.Address, genesis *big.Int, hermezRollupAddress common.Address, governanceAddress common.Address, donationAddress common.Address, bootCoordinatorAddress common.Address) (*types.Transaction, error) { + return _HermezAuctionProtocol.Contract.HermezAuctionProtocolInitializer(&_HermezAuctionProtocol.TransactOpts, token, genesis, hermezRollupAddress, governanceAddress, donationAddress, bootCoordinatorAddress) } // HermezAuctionProtocolInitializer is a paid mutator transaction binding the contract method 0x6074db64. // -// Solidity: function hermezAuctionProtocolInitializer(address tokenERC777, uint128 genesis, address hermezRollupAddress, address governanceAddress, address donationAddress, address bootCoordinatorAddress) returns() -func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) HermezAuctionProtocolInitializer(tokenERC777 common.Address, genesis *big.Int, hermezRollupAddress common.Address, governanceAddress common.Address, donationAddress common.Address, bootCoordinatorAddress common.Address) (*types.Transaction, error) { - return _HermezAuctionProtocol.Contract.HermezAuctionProtocolInitializer(&_HermezAuctionProtocol.TransactOpts, tokenERC777, genesis, hermezRollupAddress, governanceAddress, donationAddress, bootCoordinatorAddress) +// Solidity: function hermezAuctionProtocolInitializer(address token, uint128 genesis, address hermezRollupAddress, address governanceAddress, address donationAddress, address bootCoordinatorAddress) returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) HermezAuctionProtocolInitializer(token common.Address, genesis *big.Int, hermezRollupAddress common.Address, governanceAddress common.Address, donationAddress common.Address, bootCoordinatorAddress common.Address) (*types.Transaction, error) { + return _HermezAuctionProtocol.Contract.HermezAuctionProtocolInitializer(&_HermezAuctionProtocol.TransactOpts, token, genesis, hermezRollupAddress, governanceAddress, donationAddress, bootCoordinatorAddress) +} + +// ProcessBid is a paid mutator transaction binding the contract method 0x4b93b7fa. +// +// Solidity: function processBid(uint128 amount, uint128 slot, uint128 bidAmount, bytes permit) returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolTransactor) ProcessBid(opts *bind.TransactOpts, amount *big.Int, slot *big.Int, bidAmount *big.Int, permit []byte) (*types.Transaction, error) { + return _HermezAuctionProtocol.contract.Transact(opts, "processBid", amount, slot, bidAmount, permit) +} + +// ProcessBid is a paid mutator transaction binding the contract method 0x4b93b7fa. +// +// Solidity: function processBid(uint128 amount, uint128 slot, uint128 bidAmount, bytes permit) returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolSession) ProcessBid(amount *big.Int, slot *big.Int, bidAmount *big.Int, permit []byte) (*types.Transaction, error) { + return _HermezAuctionProtocol.Contract.ProcessBid(&_HermezAuctionProtocol.TransactOpts, amount, slot, bidAmount, permit) +} + +// ProcessBid is a paid mutator transaction binding the contract method 0x4b93b7fa. +// +// Solidity: function processBid(uint128 amount, uint128 slot, uint128 bidAmount, bytes permit) returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) ProcessBid(amount *big.Int, slot *big.Int, bidAmount *big.Int, permit []byte) (*types.Transaction, error) { + return _HermezAuctionProtocol.Contract.ProcessBid(&_HermezAuctionProtocol.TransactOpts, amount, slot, bidAmount, permit) +} + +// ProcessMultiBid is a paid mutator transaction binding the contract method 0x583ad0dd. +// +// Solidity: function processMultiBid(uint128 amount, uint128 startingSlot, uint128 endingSlot, bool[6] slotSets, uint128 maxBid, uint128 minBid, bytes permit) returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolTransactor) ProcessMultiBid(opts *bind.TransactOpts, amount *big.Int, startingSlot *big.Int, endingSlot *big.Int, slotSets [6]bool, maxBid *big.Int, minBid *big.Int, permit []byte) (*types.Transaction, error) { + return _HermezAuctionProtocol.contract.Transact(opts, "processMultiBid", amount, startingSlot, endingSlot, slotSets, maxBid, minBid, permit) +} + +// ProcessMultiBid is a paid mutator transaction binding the contract method 0x583ad0dd. +// +// Solidity: function processMultiBid(uint128 amount, uint128 startingSlot, uint128 endingSlot, bool[6] slotSets, uint128 maxBid, uint128 minBid, bytes permit) returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolSession) ProcessMultiBid(amount *big.Int, startingSlot *big.Int, endingSlot *big.Int, slotSets [6]bool, maxBid *big.Int, minBid *big.Int, permit []byte) (*types.Transaction, error) { + return _HermezAuctionProtocol.Contract.ProcessMultiBid(&_HermezAuctionProtocol.TransactOpts, amount, startingSlot, endingSlot, slotSets, maxBid, minBid, permit) +} + +// ProcessMultiBid is a paid mutator transaction binding the contract method 0x583ad0dd. +// +// Solidity: function processMultiBid(uint128 amount, uint128 startingSlot, uint128 endingSlot, bool[6] slotSets, uint128 maxBid, uint128 minBid, bytes permit) returns() +func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) ProcessMultiBid(amount *big.Int, startingSlot *big.Int, endingSlot *big.Int, slotSets [6]bool, maxBid *big.Int, minBid *big.Int, permit []byte) (*types.Transaction, error) { + return _HermezAuctionProtocol.Contract.ProcessMultiBid(&_HermezAuctionProtocol.TransactOpts, amount, startingSlot, endingSlot, slotSets, maxBid, minBid, permit) } // SetAllocationRatio is a paid mutator transaction binding the contract method 0x82787405. @@ -1040,27 +1082,6 @@ func (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) SetSlotDea return _HermezAuctionProtocol.Contract.SetSlotDeadline(&_HermezAuctionProtocol.TransactOpts, newDeadline) } -// 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 (_HermezAuctionProtocol *HermezAuctionProtocolTransactor) TokensReceived(opts *bind.TransactOpts, operator common.Address, from common.Address, to common.Address, amount *big.Int, userData []byte, operatorData []byte) (*types.Transaction, error) { - return _HermezAuctionProtocol.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 (_HermezAuctionProtocol *HermezAuctionProtocolSession) TokensReceived(operator common.Address, from common.Address, to common.Address, amount *big.Int, userData []byte, operatorData []byte) (*types.Transaction, error) { - return _HermezAuctionProtocol.Contract.TokensReceived(&_HermezAuctionProtocol.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 (_HermezAuctionProtocol *HermezAuctionProtocolTransactorSession) TokensReceived(operator common.Address, from common.Address, to common.Address, amount *big.Int, userData []byte, operatorData []byte) (*types.Transaction, error) { - return _HermezAuctionProtocol.Contract.TokensReceived(&_HermezAuctionProtocol.TransactOpts, operator, from, to, amount, userData, operatorData) -} - // 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 diff --git a/eth/contracts/erc20.sol b/eth/contracts/erc20.sol deleted file mode 100644 index 9e25ef6..0000000 --- a/eth/contracts/erc20.sol +++ /dev/null @@ -1,19 +0,0 @@ -pragma solidity ^0.7.0; - -contract ERC20 { - string public constant name = ""; - string public constant symbol = ""; - uint8 public constant decimals = 0; - - /* - function totalSupply() public constant returns (uint); - function balanceOf(address tokenOwner) public constant returns (uint balance); - function allowance(address tokenOwner, address spender) public constant returns (uint remaining); - function transfer(address to, uint tokens) public returns (bool success); - function approve(address spender, uint tokens) public returns (bool success); - function transferFrom(address from, address to, uint tokens) public returns (bool success); - - event Transfer(address indexed from, address indexed to, uint tokens); - event Approval(address indexed tokenOwner, address indexed spender, uint tokens); - */ -} diff --git a/eth/contracts/erc20/erc20.go b/eth/contracts/erc20/erc20.go deleted file mode 100644 index bf67f39..0000000 --- a/eth/contracts/erc20/erc20.go +++ /dev/null @@ -1,274 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package erc20 - -import ( - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// ERC20ABI is the input ABI used to generate the binding from. -const ERC20ABI = "[{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]" - -// ERC20FuncSigs maps the 4-byte function signature to its string representation. -var ERC20FuncSigs = map[string]string{ - "313ce567": "decimals()", - "06fdde03": "name()", - "95d89b41": "symbol()", -} - -// ERC20Bin is the compiled bytecode used for deploying new contracts. -var ERC20Bin = "0x608060405234801561001057600080fd5b50610123806100206000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c806306fdde03146041578063313ce5671460b957806395d89b41146041575b600080fd5b604760d5565b6040805160208082528351818301528351919283929083019185019080838360005b83811015607f5781810151838201526020016069565b50505050905090810190601f16801560ab5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60bf60e8565b6040805160ff9092168252519081900360200190f35b6040518060200160405280600081525081565b60008156fea26469706673582212209717f9f3c7b4f090e7741b44c5cb9425a26b593410462c0f4c2c0c0879db648d64736f6c63430007010033" - -// DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it. -func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20Bin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// ERC20 is an auto generated Go binding around an Ethereum contract. -type ERC20 struct { - ERC20Caller // Read-only binding to the contract - ERC20Transactor // Write-only binding to the contract - ERC20Filterer // Log filterer for contract events -} - -// ERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20Session struct { - Contract *ERC20 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20CallerSession struct { - Contract *ERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20TransactorSession struct { - Contract *ERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20Raw struct { - Contract *ERC20 // Generic contract binding to access the raw methods on -} - -// ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20CallerRaw struct { - Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20TransactorRaw struct { - Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20 creates a new instance of ERC20, bound to a specific deployed contract. -func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) { - contract, err := bindERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) { - contract, err := bindERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20Caller{contract: contract}, nil -} - -// NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) { - contract, err := bindERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20Transactor{contract: contract}, nil -} - -// NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract. -func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) { - contract, err := bindERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20Filterer{contract: contract}, nil -} - -// bindERC20 binds a generic wrapper to an already deployed contract. -func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20.Contract.ERC20Caller.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.contract.Transact(opts, method, params...) -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20.Contract.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.Contract.contract.Transact(opts, method, params...) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20 *ERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20 *ERC20Session) Decimals() (uint8, error) { - return _ERC20.Contract.Decimals(&_ERC20.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20 *ERC20CallerSession) Decimals() (uint8, error) { - return _ERC20.Contract.Decimals(&_ERC20.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20 *ERC20Caller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20 *ERC20Session) Name() (string, error) { - return _ERC20.Contract.Name(&_ERC20.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20 *ERC20CallerSession) Name() (string, error) { - return _ERC20.Contract.Name(&_ERC20.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20 *ERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20 *ERC20Session) Symbol() (string, error) { - return _ERC20.Contract.Symbol(&_ERC20.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20 *ERC20CallerSession) Symbol() (string, error) { - return _ERC20.Contract.Symbol(&_ERC20.CallOpts) -} diff --git a/eth/contracts/erc777/ERC777.go b/eth/contracts/erc777/ERC777.go deleted file mode 100644 index c2c618d..0000000 --- a/eth/contracts/erc777/ERC777.go +++ /dev/null @@ -1,1696 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package ERC777 - -import ( - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// ERC777ABI is the input ABI used to generate the binding from. -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 = "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) { - parsed, err := abi.JSON(strings.NewReader(ERC777ABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC777Bin), backend, name, symbol, defaultOperators) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ERC777{ERC777Caller: ERC777Caller{contract: contract}, ERC777Transactor: ERC777Transactor{contract: contract}, ERC777Filterer: ERC777Filterer{contract: contract}}, nil -} - -// ERC777 is an auto generated Go binding around an Ethereum contract. -type ERC777 struct { - ERC777Caller // Read-only binding to the contract - ERC777Transactor // Write-only binding to the contract - ERC777Filterer // Log filterer for contract events -} - -// ERC777Caller is an auto generated read-only Go binding around an Ethereum contract. -type ERC777Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC777Transactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC777Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC777Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC777Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC777Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC777Session struct { - Contract *ERC777 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC777CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC777CallerSession struct { - Contract *ERC777Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC777TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC777TransactorSession struct { - Contract *ERC777Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC777Raw is an auto generated low-level Go binding around an Ethereum contract. -type ERC777Raw struct { - Contract *ERC777 // Generic contract binding to access the raw methods on -} - -// ERC777CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC777CallerRaw struct { - Contract *ERC777Caller // Generic read-only contract binding to access the raw methods on -} - -// ERC777TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC777TransactorRaw struct { - Contract *ERC777Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC777 creates a new instance of ERC777, bound to a specific deployed contract. -func NewERC777(address common.Address, backend bind.ContractBackend) (*ERC777, error) { - contract, err := bindERC777(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC777{ERC777Caller: ERC777Caller{contract: contract}, ERC777Transactor: ERC777Transactor{contract: contract}, ERC777Filterer: ERC777Filterer{contract: contract}}, nil -} - -// NewERC777Caller creates a new read-only instance of ERC777, bound to a specific deployed contract. -func NewERC777Caller(address common.Address, caller bind.ContractCaller) (*ERC777Caller, error) { - contract, err := bindERC777(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC777Caller{contract: contract}, nil -} - -// NewERC777Transactor creates a new write-only instance of ERC777, bound to a specific deployed contract. -func NewERC777Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC777Transactor, error) { - contract, err := bindERC777(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC777Transactor{contract: contract}, nil -} - -// NewERC777Filterer creates a new log filterer instance of ERC777, bound to a specific deployed contract. -func NewERC777Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC777Filterer, error) { - contract, err := bindERC777(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC777Filterer{contract: contract}, nil -} - -// bindERC777 binds a generic wrapper to an already deployed contract. -func bindERC777(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC777ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_ERC777 *ERC777Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC777.Contract.ERC777Caller.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_ERC777 *ERC777Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC777.Contract.ERC777Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC777 *ERC777Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC777.Contract.ERC777Transactor.contract.Transact(opts, method, params...) -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_ERC777 *ERC777CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC777.Contract.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_ERC777 *ERC777TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC777.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC777 *ERC777TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC777.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address holder, address spender) view returns(uint256) -func (_ERC777 *ERC777Caller) Allowance(opts *bind.CallOpts, holder common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC777.contract.Call(opts, out, "allowance", holder, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address holder, address spender) view returns(uint256) -func (_ERC777 *ERC777Session) Allowance(holder common.Address, spender common.Address) (*big.Int, error) { - return _ERC777.Contract.Allowance(&_ERC777.CallOpts, holder, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address holder, address spender) view returns(uint256) -func (_ERC777 *ERC777CallerSession) Allowance(holder common.Address, spender common.Address) (*big.Int, error) { - return _ERC777.Contract.Allowance(&_ERC777.CallOpts, holder, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address tokenHolder) view returns(uint256) -func (_ERC777 *ERC777Caller) BalanceOf(opts *bind.CallOpts, tokenHolder common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC777.contract.Call(opts, out, "balanceOf", tokenHolder) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address tokenHolder) view returns(uint256) -func (_ERC777 *ERC777Session) BalanceOf(tokenHolder common.Address) (*big.Int, error) { - return _ERC777.Contract.BalanceOf(&_ERC777.CallOpts, tokenHolder) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address tokenHolder) view returns(uint256) -func (_ERC777 *ERC777CallerSession) BalanceOf(tokenHolder common.Address) (*big.Int, error) { - return _ERC777.Contract.BalanceOf(&_ERC777.CallOpts, tokenHolder) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() pure returns(uint8) -func (_ERC777 *ERC777Caller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _ERC777.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() pure returns(uint8) -func (_ERC777 *ERC777Session) Decimals() (uint8, error) { - return _ERC777.Contract.Decimals(&_ERC777.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() pure returns(uint8) -func (_ERC777 *ERC777CallerSession) Decimals() (uint8, error) { - return _ERC777.Contract.Decimals(&_ERC777.CallOpts) -} - -// DefaultOperators is a free data retrieval call binding the contract method 0x06e48538. -// -// Solidity: function defaultOperators() view returns(address[]) -func (_ERC777 *ERC777Caller) DefaultOperators(opts *bind.CallOpts) ([]common.Address, error) { - var ( - ret0 = new([]common.Address) - ) - out := ret0 - err := _ERC777.contract.Call(opts, out, "defaultOperators") - return *ret0, err -} - -// DefaultOperators is a free data retrieval call binding the contract method 0x06e48538. -// -// Solidity: function defaultOperators() view returns(address[]) -func (_ERC777 *ERC777Session) DefaultOperators() ([]common.Address, error) { - return _ERC777.Contract.DefaultOperators(&_ERC777.CallOpts) -} - -// DefaultOperators is a free data retrieval call binding the contract method 0x06e48538. -// -// Solidity: function defaultOperators() view returns(address[]) -func (_ERC777 *ERC777CallerSession) DefaultOperators() ([]common.Address, error) { - return _ERC777.Contract.DefaultOperators(&_ERC777.CallOpts) -} - -// Granularity is a free data retrieval call binding the contract method 0x556f0dc7. -// -// Solidity: function granularity() view returns(uint256) -func (_ERC777 *ERC777Caller) Granularity(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC777.contract.Call(opts, out, "granularity") - return *ret0, err -} - -// Granularity is a free data retrieval call binding the contract method 0x556f0dc7. -// -// Solidity: function granularity() view returns(uint256) -func (_ERC777 *ERC777Session) Granularity() (*big.Int, error) { - return _ERC777.Contract.Granularity(&_ERC777.CallOpts) -} - -// Granularity is a free data retrieval call binding the contract method 0x556f0dc7. -// -// Solidity: function granularity() view returns(uint256) -func (_ERC777 *ERC777CallerSession) Granularity() (*big.Int, error) { - return _ERC777.Contract.Granularity(&_ERC777.CallOpts) -} - -// IsOperatorFor is a free data retrieval call binding the contract method 0xd95b6371. -// -// Solidity: function isOperatorFor(address operator, address tokenHolder) view returns(bool) -func (_ERC777 *ERC777Caller) IsOperatorFor(opts *bind.CallOpts, operator common.Address, tokenHolder common.Address) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _ERC777.contract.Call(opts, out, "isOperatorFor", operator, tokenHolder) - return *ret0, err -} - -// IsOperatorFor is a free data retrieval call binding the contract method 0xd95b6371. -// -// Solidity: function isOperatorFor(address operator, address tokenHolder) view returns(bool) -func (_ERC777 *ERC777Session) IsOperatorFor(operator common.Address, tokenHolder common.Address) (bool, error) { - return _ERC777.Contract.IsOperatorFor(&_ERC777.CallOpts, operator, tokenHolder) -} - -// IsOperatorFor is a free data retrieval call binding the contract method 0xd95b6371. -// -// Solidity: function isOperatorFor(address operator, address tokenHolder) view returns(bool) -func (_ERC777 *ERC777CallerSession) IsOperatorFor(operator common.Address, tokenHolder common.Address) (bool, error) { - return _ERC777.Contract.IsOperatorFor(&_ERC777.CallOpts, operator, tokenHolder) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC777 *ERC777Caller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC777.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC777 *ERC777Session) Name() (string, error) { - return _ERC777.Contract.Name(&_ERC777.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC777 *ERC777CallerSession) Name() (string, error) { - return _ERC777.Contract.Name(&_ERC777.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC777 *ERC777Caller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC777.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC777 *ERC777Session) Symbol() (string, error) { - return _ERC777.Contract.Symbol(&_ERC777.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC777 *ERC777CallerSession) Symbol() (string, error) { - return _ERC777.Contract.Symbol(&_ERC777.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC777 *ERC777Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC777.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC777 *ERC777Session) TotalSupply() (*big.Int, error) { - return _ERC777.Contract.TotalSupply(&_ERC777.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC777 *ERC777CallerSession) TotalSupply() (*big.Int, error) { - return _ERC777.Contract.TotalSupply(&_ERC777.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 value) returns(bool) -func (_ERC777 *ERC777Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { - return _ERC777.contract.Transact(opts, "approve", spender, value) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 value) returns(bool) -func (_ERC777 *ERC777Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { - return _ERC777.Contract.Approve(&_ERC777.TransactOpts, spender, value) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 value) returns(bool) -func (_ERC777 *ERC777TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { - return _ERC777.Contract.Approve(&_ERC777.TransactOpts, spender, value) -} - -// AuthorizeOperator is a paid mutator transaction binding the contract method 0x959b8c3f. -// -// Solidity: function authorizeOperator(address operator) returns() -func (_ERC777 *ERC777Transactor) AuthorizeOperator(opts *bind.TransactOpts, operator common.Address) (*types.Transaction, error) { - return _ERC777.contract.Transact(opts, "authorizeOperator", operator) -} - -// AuthorizeOperator is a paid mutator transaction binding the contract method 0x959b8c3f. -// -// Solidity: function authorizeOperator(address operator) returns() -func (_ERC777 *ERC777Session) AuthorizeOperator(operator common.Address) (*types.Transaction, error) { - return _ERC777.Contract.AuthorizeOperator(&_ERC777.TransactOpts, operator) -} - -// AuthorizeOperator is a paid mutator transaction binding the contract method 0x959b8c3f. -// -// Solidity: function authorizeOperator(address operator) returns() -func (_ERC777 *ERC777TransactorSession) AuthorizeOperator(operator common.Address) (*types.Transaction, error) { - return _ERC777.Contract.AuthorizeOperator(&_ERC777.TransactOpts, operator) -} - -// Burn is a paid mutator transaction binding the contract method 0xfe9d9303. -// -// Solidity: function burn(uint256 amount, bytes data) returns() -func (_ERC777 *ERC777Transactor) Burn(opts *bind.TransactOpts, amount *big.Int, data []byte) (*types.Transaction, error) { - return _ERC777.contract.Transact(opts, "burn", amount, data) -} - -// Burn is a paid mutator transaction binding the contract method 0xfe9d9303. -// -// Solidity: function burn(uint256 amount, bytes data) returns() -func (_ERC777 *ERC777Session) Burn(amount *big.Int, data []byte) (*types.Transaction, error) { - return _ERC777.Contract.Burn(&_ERC777.TransactOpts, amount, data) -} - -// Burn is a paid mutator transaction binding the contract method 0xfe9d9303. -// -// Solidity: function burn(uint256 amount, bytes data) returns() -func (_ERC777 *ERC777TransactorSession) Burn(amount *big.Int, data []byte) (*types.Transaction, error) { - return _ERC777.Contract.Burn(&_ERC777.TransactOpts, amount, data) -} - -// OperatorBurn is a paid mutator transaction binding the contract method 0xfc673c4f. -// -// Solidity: function operatorBurn(address account, uint256 amount, bytes data, bytes operatorData) returns() -func (_ERC777 *ERC777Transactor) OperatorBurn(opts *bind.TransactOpts, account common.Address, amount *big.Int, data []byte, operatorData []byte) (*types.Transaction, error) { - return _ERC777.contract.Transact(opts, "operatorBurn", account, amount, data, operatorData) -} - -// OperatorBurn is a paid mutator transaction binding the contract method 0xfc673c4f. -// -// Solidity: function operatorBurn(address account, uint256 amount, bytes data, bytes operatorData) returns() -func (_ERC777 *ERC777Session) OperatorBurn(account common.Address, amount *big.Int, data []byte, operatorData []byte) (*types.Transaction, error) { - return _ERC777.Contract.OperatorBurn(&_ERC777.TransactOpts, account, amount, data, operatorData) -} - -// OperatorBurn is a paid mutator transaction binding the contract method 0xfc673c4f. -// -// Solidity: function operatorBurn(address account, uint256 amount, bytes data, bytes operatorData) returns() -func (_ERC777 *ERC777TransactorSession) OperatorBurn(account common.Address, amount *big.Int, data []byte, operatorData []byte) (*types.Transaction, error) { - return _ERC777.Contract.OperatorBurn(&_ERC777.TransactOpts, account, amount, data, operatorData) -} - -// OperatorSend is a paid mutator transaction binding the contract method 0x62ad1b83. -// -// Solidity: function operatorSend(address sender, address recipient, uint256 amount, bytes data, bytes operatorData) returns() -func (_ERC777 *ERC777Transactor) OperatorSend(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int, data []byte, operatorData []byte) (*types.Transaction, error) { - return _ERC777.contract.Transact(opts, "operatorSend", sender, recipient, amount, data, operatorData) -} - -// OperatorSend is a paid mutator transaction binding the contract method 0x62ad1b83. -// -// Solidity: function operatorSend(address sender, address recipient, uint256 amount, bytes data, bytes operatorData) returns() -func (_ERC777 *ERC777Session) OperatorSend(sender common.Address, recipient common.Address, amount *big.Int, data []byte, operatorData []byte) (*types.Transaction, error) { - return _ERC777.Contract.OperatorSend(&_ERC777.TransactOpts, sender, recipient, amount, data, operatorData) -} - -// OperatorSend is a paid mutator transaction binding the contract method 0x62ad1b83. -// -// Solidity: function operatorSend(address sender, address recipient, uint256 amount, bytes data, bytes operatorData) returns() -func (_ERC777 *ERC777TransactorSession) OperatorSend(sender common.Address, recipient common.Address, amount *big.Int, data []byte, operatorData []byte) (*types.Transaction, error) { - return _ERC777.Contract.OperatorSend(&_ERC777.TransactOpts, sender, recipient, amount, data, operatorData) -} - -// RevokeOperator is a paid mutator transaction binding the contract method 0xfad8b32a. -// -// Solidity: function revokeOperator(address operator) returns() -func (_ERC777 *ERC777Transactor) RevokeOperator(opts *bind.TransactOpts, operator common.Address) (*types.Transaction, error) { - return _ERC777.contract.Transact(opts, "revokeOperator", operator) -} - -// RevokeOperator is a paid mutator transaction binding the contract method 0xfad8b32a. -// -// Solidity: function revokeOperator(address operator) returns() -func (_ERC777 *ERC777Session) RevokeOperator(operator common.Address) (*types.Transaction, error) { - return _ERC777.Contract.RevokeOperator(&_ERC777.TransactOpts, operator) -} - -// RevokeOperator is a paid mutator transaction binding the contract method 0xfad8b32a. -// -// Solidity: function revokeOperator(address operator) returns() -func (_ERC777 *ERC777TransactorSession) RevokeOperator(operator common.Address) (*types.Transaction, error) { - return _ERC777.Contract.RevokeOperator(&_ERC777.TransactOpts, operator) -} - -// Send is a paid mutator transaction binding the contract method 0x9bd9bbc6. -// -// Solidity: function send(address recipient, uint256 amount, bytes data) returns() -func (_ERC777 *ERC777Transactor) Send(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _ERC777.contract.Transact(opts, "send", recipient, amount, data) -} - -// Send is a paid mutator transaction binding the contract method 0x9bd9bbc6. -// -// Solidity: function send(address recipient, uint256 amount, bytes data) returns() -func (_ERC777 *ERC777Session) Send(recipient common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _ERC777.Contract.Send(&_ERC777.TransactOpts, recipient, amount, data) -} - -// Send is a paid mutator transaction binding the contract method 0x9bd9bbc6. -// -// Solidity: function send(address recipient, uint256 amount, bytes data) returns() -func (_ERC777 *ERC777TransactorSession) Send(recipient common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _ERC777.Contract.Send(&_ERC777.TransactOpts, recipient, amount, data) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC777 *ERC777Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC777.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC777 *ERC777Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC777.Contract.Transfer(&_ERC777.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC777 *ERC777TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC777.Contract.Transfer(&_ERC777.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address holder, address recipient, uint256 amount) returns(bool) -func (_ERC777 *ERC777Transactor) TransferFrom(opts *bind.TransactOpts, holder common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC777.contract.Transact(opts, "transferFrom", holder, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address holder, address recipient, uint256 amount) returns(bool) -func (_ERC777 *ERC777Session) TransferFrom(holder common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC777.Contract.TransferFrom(&_ERC777.TransactOpts, holder, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address holder, address recipient, uint256 amount) returns(bool) -func (_ERC777 *ERC777TransactorSession) TransferFrom(holder common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC777.Contract.TransferFrom(&_ERC777.TransactOpts, holder, recipient, amount) -} - -// ERC777ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC777 contract. -type ERC777ApprovalIterator struct { - Event *ERC777Approval // 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 *ERC777ApprovalIterator) 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(ERC777Approval) - 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(ERC777Approval) - 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 *ERC777ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC777ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC777Approval represents a Approval event raised by the ERC777 contract. -type ERC777Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC777 *ERC777Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC777ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC777.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC777ApprovalIterator{contract: _ERC777.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC777 *ERC777Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC777Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC777.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - 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(ERC777Approval) - if err := _ERC777.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC777 *ERC777Filterer) ParseApproval(log types.Log) (*ERC777Approval, error) { - event := new(ERC777Approval) - if err := _ERC777.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC777AuthorizedOperatorIterator is returned from FilterAuthorizedOperator and is used to iterate over the raw logs and unpacked data for AuthorizedOperator events raised by the ERC777 contract. -type ERC777AuthorizedOperatorIterator struct { - Event *ERC777AuthorizedOperator // 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 *ERC777AuthorizedOperatorIterator) 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(ERC777AuthorizedOperator) - 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(ERC777AuthorizedOperator) - 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 *ERC777AuthorizedOperatorIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC777AuthorizedOperatorIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC777AuthorizedOperator represents a AuthorizedOperator event raised by the ERC777 contract. -type ERC777AuthorizedOperator struct { - Operator common.Address - TokenHolder common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAuthorizedOperator is a free log retrieval operation binding the contract event 0xf4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f9. -// -// Solidity: event AuthorizedOperator(address indexed operator, address indexed tokenHolder) -func (_ERC777 *ERC777Filterer) FilterAuthorizedOperator(opts *bind.FilterOpts, operator []common.Address, tokenHolder []common.Address) (*ERC777AuthorizedOperatorIterator, error) { - - var operatorRule []interface{} - for _, operatorItem := range operator { - operatorRule = append(operatorRule, operatorItem) - } - var tokenHolderRule []interface{} - for _, tokenHolderItem := range tokenHolder { - tokenHolderRule = append(tokenHolderRule, tokenHolderItem) - } - - logs, sub, err := _ERC777.contract.FilterLogs(opts, "AuthorizedOperator", operatorRule, tokenHolderRule) - if err != nil { - return nil, err - } - return &ERC777AuthorizedOperatorIterator{contract: _ERC777.contract, event: "AuthorizedOperator", logs: logs, sub: sub}, nil -} - -// WatchAuthorizedOperator is a free log subscription operation binding the contract event 0xf4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f9. -// -// Solidity: event AuthorizedOperator(address indexed operator, address indexed tokenHolder) -func (_ERC777 *ERC777Filterer) WatchAuthorizedOperator(opts *bind.WatchOpts, sink chan<- *ERC777AuthorizedOperator, operator []common.Address, tokenHolder []common.Address) (event.Subscription, error) { - - var operatorRule []interface{} - for _, operatorItem := range operator { - operatorRule = append(operatorRule, operatorItem) - } - var tokenHolderRule []interface{} - for _, tokenHolderItem := range tokenHolder { - tokenHolderRule = append(tokenHolderRule, tokenHolderItem) - } - - logs, sub, err := _ERC777.contract.WatchLogs(opts, "AuthorizedOperator", operatorRule, tokenHolderRule) - 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(ERC777AuthorizedOperator) - if err := _ERC777.contract.UnpackLog(event, "AuthorizedOperator", 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 -} - -// ParseAuthorizedOperator is a log parse operation binding the contract event 0xf4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f9. -// -// Solidity: event AuthorizedOperator(address indexed operator, address indexed tokenHolder) -func (_ERC777 *ERC777Filterer) ParseAuthorizedOperator(log types.Log) (*ERC777AuthorizedOperator, error) { - event := new(ERC777AuthorizedOperator) - if err := _ERC777.contract.UnpackLog(event, "AuthorizedOperator", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC777BurnedIterator is returned from FilterBurned and is used to iterate over the raw logs and unpacked data for Burned events raised by the ERC777 contract. -type ERC777BurnedIterator struct { - Event *ERC777Burned // 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 *ERC777BurnedIterator) 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(ERC777Burned) - 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(ERC777Burned) - 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 *ERC777BurnedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC777BurnedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC777Burned represents a Burned event raised by the ERC777 contract. -type ERC777Burned struct { - Operator common.Address - From common.Address - Amount *big.Int - Data []byte - OperatorData []byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBurned is a free log retrieval operation binding the contract event 0xa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098. -// -// Solidity: event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData) -func (_ERC777 *ERC777Filterer) FilterBurned(opts *bind.FilterOpts, operator []common.Address, from []common.Address) (*ERC777BurnedIterator, error) { - - var operatorRule []interface{} - for _, operatorItem := range operator { - operatorRule = append(operatorRule, operatorItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _ERC777.contract.FilterLogs(opts, "Burned", operatorRule, fromRule) - if err != nil { - return nil, err - } - return &ERC777BurnedIterator{contract: _ERC777.contract, event: "Burned", logs: logs, sub: sub}, nil -} - -// WatchBurned is a free log subscription operation binding the contract event 0xa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098. -// -// Solidity: event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData) -func (_ERC777 *ERC777Filterer) WatchBurned(opts *bind.WatchOpts, sink chan<- *ERC777Burned, operator []common.Address, from []common.Address) (event.Subscription, error) { - - var operatorRule []interface{} - for _, operatorItem := range operator { - operatorRule = append(operatorRule, operatorItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _ERC777.contract.WatchLogs(opts, "Burned", operatorRule, fromRule) - 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(ERC777Burned) - if err := _ERC777.contract.UnpackLog(event, "Burned", 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 -} - -// ParseBurned is a log parse operation binding the contract event 0xa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098. -// -// Solidity: event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData) -func (_ERC777 *ERC777Filterer) ParseBurned(log types.Log) (*ERC777Burned, error) { - event := new(ERC777Burned) - if err := _ERC777.contract.UnpackLog(event, "Burned", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC777MintedIterator is returned from FilterMinted and is used to iterate over the raw logs and unpacked data for Minted events raised by the ERC777 contract. -type ERC777MintedIterator struct { - Event *ERC777Minted // 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 *ERC777MintedIterator) 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(ERC777Minted) - 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(ERC777Minted) - 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 *ERC777MintedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC777MintedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC777Minted represents a Minted event raised by the ERC777 contract. -type ERC777Minted struct { - Operator common.Address - To common.Address - Amount *big.Int - Data []byte - OperatorData []byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterMinted is a free log retrieval operation binding the contract event 0x2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d. -// -// Solidity: event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData) -func (_ERC777 *ERC777Filterer) FilterMinted(opts *bind.FilterOpts, operator []common.Address, to []common.Address) (*ERC777MintedIterator, error) { - - var operatorRule []interface{} - for _, operatorItem := range operator { - operatorRule = append(operatorRule, operatorItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC777.contract.FilterLogs(opts, "Minted", operatorRule, toRule) - if err != nil { - return nil, err - } - return &ERC777MintedIterator{contract: _ERC777.contract, event: "Minted", logs: logs, sub: sub}, nil -} - -// WatchMinted is a free log subscription operation binding the contract event 0x2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d. -// -// Solidity: event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData) -func (_ERC777 *ERC777Filterer) WatchMinted(opts *bind.WatchOpts, sink chan<- *ERC777Minted, operator []common.Address, to []common.Address) (event.Subscription, error) { - - var operatorRule []interface{} - for _, operatorItem := range operator { - operatorRule = append(operatorRule, operatorItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC777.contract.WatchLogs(opts, "Minted", operatorRule, toRule) - 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(ERC777Minted) - if err := _ERC777.contract.UnpackLog(event, "Minted", 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 -} - -// ParseMinted is a log parse operation binding the contract event 0x2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d. -// -// Solidity: event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData) -func (_ERC777 *ERC777Filterer) ParseMinted(log types.Log) (*ERC777Minted, error) { - event := new(ERC777Minted) - if err := _ERC777.contract.UnpackLog(event, "Minted", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC777RevokedOperatorIterator is returned from FilterRevokedOperator and is used to iterate over the raw logs and unpacked data for RevokedOperator events raised by the ERC777 contract. -type ERC777RevokedOperatorIterator struct { - Event *ERC777RevokedOperator // 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 *ERC777RevokedOperatorIterator) 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(ERC777RevokedOperator) - 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(ERC777RevokedOperator) - 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 *ERC777RevokedOperatorIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC777RevokedOperatorIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC777RevokedOperator represents a RevokedOperator event raised by the ERC777 contract. -type ERC777RevokedOperator struct { - Operator common.Address - TokenHolder common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRevokedOperator is a free log retrieval operation binding the contract event 0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1. -// -// Solidity: event RevokedOperator(address indexed operator, address indexed tokenHolder) -func (_ERC777 *ERC777Filterer) FilterRevokedOperator(opts *bind.FilterOpts, operator []common.Address, tokenHolder []common.Address) (*ERC777RevokedOperatorIterator, error) { - - var operatorRule []interface{} - for _, operatorItem := range operator { - operatorRule = append(operatorRule, operatorItem) - } - var tokenHolderRule []interface{} - for _, tokenHolderItem := range tokenHolder { - tokenHolderRule = append(tokenHolderRule, tokenHolderItem) - } - - logs, sub, err := _ERC777.contract.FilterLogs(opts, "RevokedOperator", operatorRule, tokenHolderRule) - if err != nil { - return nil, err - } - return &ERC777RevokedOperatorIterator{contract: _ERC777.contract, event: "RevokedOperator", logs: logs, sub: sub}, nil -} - -// WatchRevokedOperator is a free log subscription operation binding the contract event 0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1. -// -// Solidity: event RevokedOperator(address indexed operator, address indexed tokenHolder) -func (_ERC777 *ERC777Filterer) WatchRevokedOperator(opts *bind.WatchOpts, sink chan<- *ERC777RevokedOperator, operator []common.Address, tokenHolder []common.Address) (event.Subscription, error) { - - var operatorRule []interface{} - for _, operatorItem := range operator { - operatorRule = append(operatorRule, operatorItem) - } - var tokenHolderRule []interface{} - for _, tokenHolderItem := range tokenHolder { - tokenHolderRule = append(tokenHolderRule, tokenHolderItem) - } - - logs, sub, err := _ERC777.contract.WatchLogs(opts, "RevokedOperator", operatorRule, tokenHolderRule) - 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(ERC777RevokedOperator) - if err := _ERC777.contract.UnpackLog(event, "RevokedOperator", 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 -} - -// ParseRevokedOperator is a log parse operation binding the contract event 0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1. -// -// Solidity: event RevokedOperator(address indexed operator, address indexed tokenHolder) -func (_ERC777 *ERC777Filterer) ParseRevokedOperator(log types.Log) (*ERC777RevokedOperator, error) { - event := new(ERC777RevokedOperator) - if err := _ERC777.contract.UnpackLog(event, "RevokedOperator", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC777SentIterator is returned from FilterSent and is used to iterate over the raw logs and unpacked data for Sent events raised by the ERC777 contract. -type ERC777SentIterator struct { - Event *ERC777Sent // 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 *ERC777SentIterator) 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(ERC777Sent) - 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(ERC777Sent) - 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 *ERC777SentIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC777SentIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC777Sent represents a Sent event raised by the ERC777 contract. -type ERC777Sent struct { - Operator common.Address - From common.Address - To common.Address - Amount *big.Int - Data []byte - OperatorData []byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSent is a free log retrieval operation binding the contract event 0x06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987. -// -// Solidity: event Sent(address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData) -func (_ERC777 *ERC777Filterer) FilterSent(opts *bind.FilterOpts, operator []common.Address, from []common.Address, to []common.Address) (*ERC777SentIterator, error) { - - var operatorRule []interface{} - for _, operatorItem := range operator { - operatorRule = append(operatorRule, operatorItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC777.contract.FilterLogs(opts, "Sent", operatorRule, fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC777SentIterator{contract: _ERC777.contract, event: "Sent", logs: logs, sub: sub}, nil -} - -// WatchSent is a free log subscription operation binding the contract event 0x06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987. -// -// Solidity: event Sent(address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData) -func (_ERC777 *ERC777Filterer) WatchSent(opts *bind.WatchOpts, sink chan<- *ERC777Sent, operator []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) { - - var operatorRule []interface{} - for _, operatorItem := range operator { - operatorRule = append(operatorRule, operatorItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC777.contract.WatchLogs(opts, "Sent", operatorRule, fromRule, toRule) - 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(ERC777Sent) - if err := _ERC777.contract.UnpackLog(event, "Sent", 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 -} - -// ParseSent is a log parse operation binding the contract event 0x06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987. -// -// Solidity: event Sent(address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData) -func (_ERC777 *ERC777Filterer) ParseSent(log types.Log) (*ERC777Sent, error) { - event := new(ERC777Sent) - if err := _ERC777.contract.UnpackLog(event, "Sent", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC777TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC777 contract. -type ERC777TransferIterator struct { - Event *ERC777Transfer // 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 *ERC777TransferIterator) 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(ERC777Transfer) - 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(ERC777Transfer) - 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 *ERC777TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC777TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC777Transfer represents a Transfer event raised by the ERC777 contract. -type ERC777Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC777 *ERC777Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC777TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC777.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC777TransferIterator{contract: _ERC777.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC777 *ERC777Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC777Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC777.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - 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(ERC777Transfer) - if err := _ERC777.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC777 *ERC777Filterer) ParseTransfer(log types.Log) (*ERC777Transfer, error) { - event := new(ERC777Transfer) - if err := _ERC777.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} diff --git a/eth/contracts/hermez/Hermez.go b/eth/contracts/hermez/Hermez.go index 9f4f4ac..8eadab9 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\":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\"}]" +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\"},{\"internalType\":\"bytes\",\"name\":\"permit\",\"type\":\"bytes\"}],\"name\":\"addL1Transaction\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"permit\",\"type\":\"bytes\"}],\"name\":\"addToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"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 = "0x608060405234801561001057600080fd5b5061586680620000216000396000f3fe6080604052600436106102235760003560e01c806386c6acc111610123578063bded9bb8116100ab578063dd46bf841161006f578063dd46bf8414610d79578063e56e27ae14610d8e578063e796fcf314610da3578063e9b5269c14610e4b578063ef4a5c4a14610e8c57610223565b8063bded9bb814610c86578063c63cc3a014610c9b578063cbd7b5fb14610d07578063d0f32e6714610d34578063d486645c14610d4957610223565b80639f34e9a3116100f25780639f34e9a314610bdd578063a327583814610bf2578063a7ab696114610c07578063abe3219c14610c1c578063ac171d2814610c3157610223565b806386c6acc114610b0057806395a09f2a14610b335780639b51fb0d14610b5e5780639ead722214610bb357610223565b806338330200116101b157806368e95e531161017557806368e95e53146108de5780636e7e13651461096f57806379a135e314610ac157806384ef9ed414610ad6578063864eb16414610aeb57610223565b806338330200146105bc578063432dd51f1461060e57806344e0b2ce146106fa5780634ee51c261461070f578063506d5463146108ab57610223565b80631a748c2d116101f85780631a748c2d146103c65780631b0a8223146104f65780632bd8362614610527578063314e5eda1461053c578063375110aa1461056657610223565b806223de29146102285780624aca6e1461031d5780630dd94b96146103625780630ee8e52b146103b1575b600080fd5b34801561023457600080fd5b5061031b600480360360c081101561024b57600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561028d57600080fd5b82018360208201111561029f57600080fd5b803590602001918460018302840111600160201b831117156102c057600080fd5b919390929091602081019035600160201b8111156102dd57600080fd5b8201836020820111156102ef57600080fd5b803590602001918460018302840111600160201b8311171561031057600080fd5b509092509050610ebf565b005b34801561032957600080fd5b506103506004803603602081101561034057600080fd5b50356001600160a01b0316611241565b60408051918252519081900360200190f35b34801561036e57600080fd5b506103956004803603602081101561038557600080fd5b50356001600160a01b0316611253565b604080516001600160401b039092168252519081900360200190f35b3480156103bd57600080fd5b5061039561126e565b3480156103d257600080fd5b5061031b600480360360408110156103e957600080fd5b810190602081018135600160201b81111561040357600080fd5b82018360208201111561041557600080fd5b803590602001918460208302840111600160201b8311171561043657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561048557600080fd5b82018360208201111561049757600080fd5b803590602001918460208302840111600160201b831117156104b857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611284945050505050565b34801561050257600080fd5b5061050b6113b1565b604080516001600160a01b039092168252519081900360200190f35b34801561053357600080fd5b5061050b6113c0565b34801561054857600080fd5b5061031b6004803603602081101561055f57600080fd5b50356113cf565b34801561057257600080fd5b506105a86004803603604081101561058957600080fd5b5080356001600160a01b031690602001356001600160c01b0316611462565b604080519115158252519081900360200190f35b3480156105c857600080fd5b506105e6600480360360208110156105df57600080fd5b50356114fe565b604080516001600160a01b039094168452602084019290925282820152519081900360600190f35b34801561061a57600080fd5b5061031b600480360360e081101561063157600080fd5b63ffffffff823516916001600160c01b036020820135169160408201359165ffffffffffff6060820135169181019060a081016080820135600160201b81111561067a57600080fd5b82018360208201111561068c57600080fd5b803590602001918460208302840111600160201b831117156106ad57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505065ffffffffffff83351693505050602001351515611538565b34801561070657600080fd5b5061039561173d565b34801561071b57600080fd5b5061031b60048036036101c081101561073357600080fd5b810190602081018135600160201b81111561074d57600080fd5b82018360208201111561075f57600080fd5b803590602001918460208302840111600160201b8311171561078057600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156107cf57600080fd5b8201836020820111156107e157600080fd5b803590602001918460208302840111600160201b8311171561080257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505081356001600160a01b0390811693506020830135811692604081013582169250606081013560ff169160808201359160a081013582169160c082013581169160e08101358216916101008201358116916101208101358216916101408201356001600160401b03169161016001351661174c565b3480156108b757600080fd5b50610350600480360360208110156108ce57600080fd5b50356001600160401b0316611a00565b3480156108ea57600080fd5b5061031b600480360361028081101561090257600080fd5b6040805160a0810190915290820191906102808201908260056000835b82821015610960576040805160808181019092529080840286019060049083908390808284376000920191909152505050815260019091019060200161091f565b50929550611a12945050505050565b34801561097b57600080fd5b5061031b600480360361020081101561099357600080fd5b65ffffffffffff8235169160208101359160408201359190810190608081016060820135600160201b8111156109c857600080fd5b8201836020820111156109da57600080fd5b803590602001918460018302840111600160201b831117156109fb57600080fd5b919390929091602081019035600160201b811115610a1857600080fd5b820183602082011115610a2a57600080fd5b803590602001918460018302840111600160201b83111715610a4b57600080fd5b919390929091602081019035600160201b811115610a6857600080fd5b820183602082011115610a7a57600080fd5b803590602001918460018302840111600160201b83111715610a9b57600080fd5b919350915060ff8135169060208101351515906040810190608081019061010001611b9b565b348015610acd57600080fd5b5061050b61204a565b348015610ae257600080fd5b50610395612059565b348015610af757600080fd5b5061050b612068565b348015610b0c57600080fd5b5061035060048036036020811015610b2357600080fd5b50356001600160401b0316612077565b348015610b3f57600080fd5b50610b48612089565b6040805160ff9092168252519081900360200190f35b348015610b6a57600080fd5b50610b8860048036036020811015610b8157600080fd5b503561208e565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b348015610bbf57600080fd5b5061050b60048036036020811015610bd657600080fd5b50356120c0565b348015610be957600080fd5b506103506120e7565b348015610bfe57600080fd5b50610b486120ed565b348015610c1357600080fd5b506103956120fd565b348015610c2857600080fd5b5061031b612113565b61031b600480360360c0811015610c4757600080fd5b5080359065ffffffffffff602082013581169161ffff604082013581169260608301359091169163ffffffff6080820135169160a0909101351661228b565b348015610c9257600080fd5b50610350612401565b348015610ca757600080fd5b5061031b60048036036101a0811015610cbf57600080fd5b506040810160c0820163ffffffff610100840135166001600160c01b036101208501351665ffffffffffff610140860135811690610160870135166101808701351515612407565b348015610d1357600080fd5b5061031b60048036036020811015610d2a57600080fd5b503560ff16612802565b348015610d4057600080fd5b506103956128ff565b348015610d5557600080fd5b50610d5e612915565b6040805165ffffffffffff9092168252519081900360200190f35b348015610d8557600080fd5b5061050b61292a565b348015610d9a57600080fd5b5061050b612939565b348015610daf57600080fd5b50610dd660048036036020811015610dc657600080fd5b50356001600160401b0316612948565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610e10578181015183820152602001610df8565b50505050905090810190601f168015610e3d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610e5757600080fd5b506105a860048036036040811015610e6e57600080fd5b5080356001600160401b0316906020013565ffffffffffff166129e3565b348015610e9857600080fd5b5061031b60048036036020811015610eaf57600080fd5b50356001600160401b0316612a03565b82610f11576040805162461bcd60e51b815260206004820152601860248201527f53656e642045524337373720776974686f757420646174610000000000000000604482015290519081900360640190fd5b600084846020811015610f2357600080fd5b50356001600160e01b0319169050631582e3a560e31b8114156111105760008080808080610f548a6004818e61564f565b60c0811015610f6257600080fd5b50605980548235985065ffffffffffff60208401358116985061ffff604085013581169850606085013516965063ffffffff608085013516955060a0909301359092169250339184908110610fb357fe5b6000918252602090912001546001600160a01b03161461101a576040805162461bcd60e51b815260206004820152601760248201527f746f6b656e20494420646f6573206e6f74206d61746368000000000000000000604482015290519081900360640190fd5b600061102533612ae9565b905061ffff8516156110f557600061103c86612c3a565b9050600160801b8110611096576040805162461bcd60e51b815260206004820181905260248201527f6465706f73697420616d6f756e74206c6172676572207468616e206c696d6974604482015290519081900360640190fd5b818e8161109f57fe5b0481146110f3576040805162461bcd60e51b815260206004820152601a60248201527f6c6f6164416d6f756e7420213d20746f6b656e20616d6f756e74000000000000604482015290519081900360640190fd5b505b6111048f888888888888612c7e565b50505050505050611236565b6001600160e01b0319811663d48bfca760e01b14156111f457605f546001600160a01b0316331461117a576040805162461bcd60e51b815260206004820152600f60248201526e36bab9ba103830bc9034b7102422ad60891b604482015290519081900360640190fd5b605b5486146111c1576040805162461bcd60e51b815260206004820152600e60248201526d3737ba1032b737bab3b4102422ad60911b604482015290519081900360640190fd5b6111ef6111d1856004818961564f565b60208110156111df57600080fd5b50356001600160a01b0316612edd565b611236565b6040805162461bcd60e51b81526020600482015260126024820152714e6f742076616c69642063616c6c6461746160701b604482015290519081900360640190fd5b505050505050505050565b605a6020526000908152604090205481565b6052602052600090815260409020546001600160401b031681565b605e54600160801b90046001600160401b031681565b604f546001600160a01b031633146112dc576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b8051825114611332576040805162461bcd60e51b815260206004820152601760248201527f646966666572656e74206172726179206c656e67746820000000000000000000604482015290519081900360640190fd5b60005b82518110156113ac5781818151811061134a57fe5b60200260200101516052600085848151811061136257fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805467ffffffffffffffff19166001600160401b0392909216919091179055600101611335565b505050565b6051546001600160a01b031681565b605c546001600160a01b031681565b604f546001600160a01b03163314611427576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b605b8190556040805182815290517fd1c873cd16013f0dc5f37992c0d12794389698512895ec036a568e393b46e3c19181900360200190a150565b60008061146f8484613081565b9050806114805760019150506114f8565b600061148b82613357565b905060006036826005811061149c57fe5b6005020190506000816002015411156114bb57600193505050506114f8565b60006114d48260010154436133cd90919063ffffffff16565b905081600301548110156114ef5760009450505050506114f8565b60019450505050505b92915050565b6053818154811061150b57fe5b60009182526020909120600390910201805460018201546002909201546001600160a01b03909116925083565b80156115aa5761156f60598863ffffffff168154811061155457fe5b6000918252602090912001546001600160a01b031687613416565b6115aa5760405162461bcd60e51b815260040180806020018281038252602d815260200180615713602d913960400191505060405180910390fd5b60606115c3886000896001600160c01b03168933613560565b905060006115d08261366d565b65ffffffffffff80881660009081526057602090815260408083205460588352818420948a168452939091529020549192509060ff1615611658576040805162461bcd60e51b815260206004820152601e60248201527f776974686472617720686173206265656e20616c726561647920646f6e650000604482015290519081900360640190fd5b61166c81878765ffffffffffff1685613722565b15156001146116b6576040805162461bcd60e51b81526020600482015260116024820152701cdb5d081c1c9bdbd9881a5b9d985b1a59607a1b604482015290519081900360640190fd5b65ffffffffffff8088166000908152605860209081526040808320938916835292905220805460ff191660011790556116f0898b866137a9565b8315158765ffffffffffff168665ffffffffffff167f92dd99230eaf5e3f1238fbbd0d72b34e8c2ad759886075bfc9f426ebeeea34f060405160405180910390a450505050505050505050565b6055546001600160401b031681565b600054610100900460ff16806117655750611765613ca9565b80611773575060005460ff16155b6117ae5760405162461bcd60e51b815260040180806020018281038252602e815260200180615795602e913960400191505060405180910390fd5b600054610100900460ff161580156117d9576000805460ff1961ff0019909116610100171660011790555b6117e38f8f613caf565b8c605460006101000a8154816001600160a01b0302191690836001600160a01b031602179055508b605c60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508a605f60006101000a8154816001600160a01b0302191690836001600160a01b0316021790555089605e60186101000a81548160ff021916908360ff16021790555088605b8190555060ff605460146101000a81548165ffffffffffff021916908365ffffffffffff1602179055506001605e60106101000a8154816001600160401b0302191690836001600160401b03160217905550605960009080600181540180825580915050600190039060005260206000200160009091909190916101000a8154816001600160a01b0302191690836001600160a01b03160217905550731820a4b7618bde71dce8cdc73aab6c95905fad246001600160a01b03166329965a1d307fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b306040518463ffffffff1660e01b815260040180846001600160a01b03168152602001838152602001826001600160a01b031681526020019350505050600060405180830381600087803b1580156119ae57600080fd5b505af11580156119c2573d6000803e3d6000fd5b505050506119d1888888613d7b565b6119dd85858585613e5c565b80156119ef576000805461ff00191690555b505050505050505050505050505050565b60576020526000908152604090205481565b604f546001600160a01b03163314611a6a576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b60005b6005811015611b97576000828260058110611a8457fe5b60200201515190506000838360058110611a9a57fe5b60200201516001602002015190506000848460058110611ab657fe5b60200201516040015190506000858560058110611acf57fe5b602002015160600151905080831115611b195760405162461bcd60e51b815260040180806020018281038252602c8152602001806156a0602c913960400191505060405180910390fd5b6040518060a001604052808581526020014381526020018481526020018381526020018281525060368660058110611b4d57fe5b600502016000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040155905050505050508080600101915050611a6d565b5050565b333214611bd95760405162461bcd60e51b81526004018080602001828103825260348152602001806157406034913960400191505060405180910390fd5b605c546040805163041d8fb560e51b815233600482015243602482015290516001600160a01b03909216916383b1f6a091604480820192602092909190829003018186803b158015611c2a57600080fd5b505afa158015611c3e573d6000803e3d6000fd5b505050506040513d6020811015611c5457600080fd5b50511515600114611cac576040805162461bcd60e51b815260206004820152601860248201527f61756374696f6e2064656e6965642074686520666f7267650000000000000000604482015290519081900360640190fd5b83611d1357605e54600160c01b810460ff166001600160401b0391821601164310611d13576040805162461bcd60e51b8152602060048201526012602482015271130c530c90985d18da081c995c5d5a5c995960721b604482015290519081900360640190fd5b6000611d228f8f8f888a613f5e565b905060538660ff1681548110611d3457fe5b60009182526020918290206003909102015460408051928301815283835280516343753b4d60e01b81526001600160a01b03909216926343753b4d9288928892889290916004909101908190869080828437600083820152601f01601f1916909101905084608080828437600083820152601f01601f1916909101905083604080828437600081840152601f19601f82011690508083019250505082600160200280838360005b83811015611df3578181015183820152602001611ddb565b5050505090500194505050505060206040518083038186803b158015611e1857600080fd5b505afa158015611e2c573d6000803e3d6000fd5b505050506040513d6020811015611e4257600080fd5b5051611e8c576040805162461bcd60e51b815260206004820152601460248201527334b73b30b634b2103937b6363ab810383937b7b360611b604482015290519081900360640190fd5b6055600081819054906101000a90046001600160401b03168092919060010191906101000a8154816001600160401b0302191690836001600160401b03160217905550508e605460146101000a81548165ffffffffffff021916908365ffffffffffff1602179055508d60566000605560009054906101000a90046001600160401b03166001600160401b03166001600160401b03168152602001908152602001600020819055508c60576000605560009054906101000a90046001600160401b03166001600160401b03166001600160401b03168152602001908152602001600020819055508415611f9d57605e805467ffffffffffffffff1916436001600160401b0316179055611f9d614228565b605c54604080516309cb4a2f60e31b815233600482015290516001600160a01b0390921691634e5a51789160248082019260009290919082900301818387803b158015611fe957600080fd5b505af1158015611ffd573d6000803e3d6000fd5b50506055546040516001600160401b0390911692507fd7ab70a9e6ed0d6985e74c5cb553d300a13a2217d58266922b275b72fe7869829150600090a2505050505050505050505050505050565b605f546001600160a01b031681565b605e546001600160401b031681565b6054546001600160a01b031681565b60566020526000908152604090205481565b60f081565b6036816005811061209b57fe5b6005020180546001820154600283015460038401546004909401549294509092909185565b605981815481106120cd57fe5b6000918252602090912001546001600160a01b0316905081565b60595490565b605e54600160c01b900460ff1681565b605054600160a01b90046001600160401b031681565b6050546001600160a01b03163314806121365750604f546001600160a01b031633145b612187576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79207361666520626f74206f7220676f766572616e6365000000000000604482015290519081900360640190fd5b60005b6005811015612212576040518060a00160405280600081526020016000815260200160008152602001600081526020016000815250603682600581106121cc57fe5b600502016000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040155905050808060010191505061218a565b5060515460505460408051630e670af560e01b8152600160a01b9092046001600160401b03166004830152516001600160a01b0390921691630e670af59160248082019260009290919082900301818387803b15801561227157600080fd5b505af1158015612285573d6000803e3d6000fd5b50505050565b60595463ffffffff8316106122e7576040805162461bcd60e51b815260206004820152601d60248201527f746f6b656e20686173206e6f74206265656e2072656769737465726564000000604482015290519081900360640190fd5b60006122f285612c3a565b9050600160801b811061234c576040805162461bcd60e51b815260206004820181905260248201527f6465706f73697420616d6f756e74206c6172676572207468616e206c696d6974604482015290519081900360640190fd5b80156123e95763ffffffff83166123b6573481146123b1576040805162461bcd60e51b815260206004820152601760248201527f6c6f6164416d6f756e7420213d206d73672e76616c7565000000000000000000604482015290519081900360640190fd5b6123e9565b6123e960598463ffffffff16815481106123cc57fe5b6000918252602090912001546001600160a01b03163330846142d6565b6123f833888888888888612c7e565b50505050505050565b605b5481565b80156124795761243e60598663ffffffff168154811061242357fe5b6000918252602090912001546001600160a01b031685613416565b6124795760405162461bcd60e51b815260040180806020018281038252602d815260200180615713602d913960400191505060405180910390fd5b65ffffffffffff80841660009081526058602090815260408083209386168352929052205460ff16156124f3576040805162461bcd60e51b815260206004820152601e60248201527f776974686472617720686173206265656e20616c726561647920646f6e650000604482015290519081900360640190fd5b65ffffffffffff831660009081526057602090815260408083205481518084018290523360601b818401526001600160e01b031960e08b901b16605482015267ffffffffffffffff1989841b1660588201526001600160d01b031960d088901b1660708201528251605681830301815260769091019283905280519194937f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019360029390918291908401908083835b602083106125c15780518252601f1990920191602091820191016125a2565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015612600573d6000803e3d6000fd5b5050506040513d602081101561261557600080fd5b50518161261e57fe5b605454604080516020810182529390920680845282516343753b4d60e01b81529094506001600160a01b03909116926343753b4d928e928e928e929091600401908190869080828437600083820152601f01601f1916909101905084608080828437600083820152601f01601f1916909101905083604080828437600081840152601f19601f82011690508083019250505082600160200280838360005b838110156126d45781810151838201526020016126bc565b5050505090500194505050505060206040518083038186803b1580156126f957600080fd5b505afa15801561270d573d6000803e3d6000fd5b505050506040513d602081101561272357600080fd5b5051151560011461277b576040805162461bcd60e51b815260206004820152601b60248201527f7a6b2d736e61726b2070726f6f66206973206e6f742076616c69640000000000604482015290519081900360640190fd5b65ffffffffffff8086166000908152605860209081526040808320938816835292905220805460ff191660011790556127b58688856137a9565b8215158565ffffffffffff168565ffffffffffff167f92dd99230eaf5e3f1238fbbd0d72b34e8c2ad759886075bfc9f426ebeeea34f060405160405180910390a450505050505050505050565b604f546001600160a01b0316331461285a576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b60f060ff821611156128ab576040805162461bcd60e51b8152602060048201526015602482015274199bdc99d9481d1a5b595bdd5d08195e18d9591959605a1b604482015290519081900360640190fd5b605e805460ff8316600160c01b810260ff60c01b199092169190911790915560408051918252517fff6221781ac525b04585dbb55cd2ebd2a92c828ca3e42b23813a1137ac9744319181900360200190a150565b605e54600160401b90046001600160401b031681565b605454600160a01b900465ffffffffffff1681565b604f546001600160a01b031681565b6050546001600160a01b031681565b605d6020908152600091825260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156129db5780601f106129b0576101008083540402835291602001916129db565b820191906000526020600020905b8154815290600101906020018083116129be57829003601f168201915b505050505081565b605860209081526000928352604080842090915290825290205460ff1681565b604f546001600160a01b03163314612a5b576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b62127500816001600160401b03161115612abc576040805162461bcd60e51b815260206004820152601c60248201527f45786365656473204d41585f5749544844524157414c5f44454c415900000000604482015290519081900360640190fd5b605080546001600160401b03909216600160a01b0267ffffffffffffffff60a01b19909216919091179055565b604080518082018252600d81526c6772616e756c6172697479282960981b60209182015281516004815260248101835290810180516001600160e01b031663556f0dc760e01b1781529151815160009384936060936001600160a01b03881693919290918291908083835b60208310612b735780518252601f199092019160209182019101612b54565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612bd3576040519150601f19603f3d011682016040523d82523d6000602084013e612bd8565b606091505b509150915081612c195760405162461bcd60e51b81526004018080602001828103825260228152602001806156f16022913960400191505060405180910390fd5b808060200190516020811015612c2e57600080fd5b5051925050505b919050565b60006103ff8216601f600b84901c166001600a85811c8216919083900a908185029083148015612c6957508315155b15612c745760028204015b9695505050505050565b6000612c8984612c3a565b9050600160c01b8110612ce3576040805162461bcd60e51b815260206004820152601860248201527f616d6f756e74206c6172676572207468616e206c696d69740000000000000000604482015290519081900360640190fd5b65ffffffffffff8216612d48578015612d43576040805162461bcd60e51b815260206004820152601e60248201527f616d6f756e74206d757374206265203020696620746f49647820697320300000604482015290519081900360640190fd5b612dc9565b60ff65ffffffffffff8316118015612d75575060545465ffffffffffff600160a01b909104811690831611155b80612d88575065ffffffffffff82166001145b612dc9576040805162461bcd60e51b815260206004820152600d60248201526c0d2dcecc2d8d2c840e8de92c8f609b1b604482015290519081900360640190fd5b65ffffffffffff8616612e175786612e125760405162461bcd60e51b81526004018080602001828103825260288152602001806156786028913960400191505060405180910390fd5b612ec4565b60ff65ffffffffffff8716118015612e44575060545465ffffffffffff600160a01b909104811690871611155b612e87576040805162461bcd60e51b815260206004820152600f60248201526e0d2dcecc2d8d2c840cce4deda92c8f608b1b604482015290519081900360640190fd5b8615612ec45760405162461bcd60e51b815260040180806020018281038252602c8152602001806157c3602c913960400191505060405180910390fd5b612ed388888888888888614471565b5050505050505050565b605954600160201b8110612f2d576040805162461bcd60e51b81526020600482015260126024820152711d1bdad95b881b1a5cdd081a5cc8199d5b1b60721b604482015290519081900360640190fd5b6001600160a01b038216612f7d576040805162461bcd60e51b8152602060048201526012602482015271063616e2774206265206164647265737320360741b604482015290519081900360640190fd5b6001600160a01b0382166000908152605a602052604090205415612fe8576040805162461bcd60e51b815260206004820152601b60248201527f746f6b656e206164647265737320616c72656164792061646465640000000000604482015290519081900360640190fd5b60598054600181019091557fd73956b9e00d8f8bc5e44f7184df1387cdd652e7726b8ccda3db4859e02f31bf0180546001600160a01b0319166001600160a01b0384169081179091556000818152605a6020908152604091829020849055815163ffffffff8516815291517fcb73d161edb7cd4fb1d92fedfd2555384fd997fd44ab507656f8c81e15747dde9281900390910190a25050565b6001600160a01b0382166000908152605260205260408120546001600160401b03166130af575060006114f8565b6001600160a01b038316600090815260526020526040812054655af3107a4000906001600160401b03166001600160c01b0385160204905060008060006001600160a01b0316731820a4b7618bde71dce8cdc73aab6c95905fad246001600160a01b031663aabbb8ca887fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce21770546040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561317e57600080fd5b505afa158015613192573d6000803e3d6000fd5b505050506040513d60208110156131a857600080fd5b50516001600160a01b031614156131c05760006131c3565b60015b905080156131d457601291506132e5565b604080518082018252600a815269646563696d616c73282960b01b60209182015281516004815260248101835290810180516001600160e01b031663313ce56760e01b178152915181516000936060936001600160a01b038c16939092909182918083835b602083106132585780518252601f199092019160209182019101613239565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146132b8576040519150601f19603f3d011682016040523d82523d6000602084013e6132bd565b606091505b509150915081156132e2578080602001905160208110156132dd57600080fd5b505193505b50505b604d8260ff161061333d576040805162461bcd60e51b815260206004820152601a60248201527f746f6b656e55534420646563696d616c73206f766572666c6f77000000000000604482015290519081900360640190fd5b8160ff16600a0a838161334c57fe5b049695505050505050565b6000805b600581101561338b576036816005811061337157fe5b60050201548311613383579050612c35565b60010161335b565b506040805162461bcd60e51b8152602060048201526011602482015270195e18d95959081b585e08185b5bdd5b9d607a1b604482015290519081900360640190fd5b600061340f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061464b565b9392505050565b6000806134238484613081565b9050806134345760019150506114f8565b600061343f82613357565b905060006036826005811061345057fe5b600502019050600061346f8260010154436133cd90919063ffffffff16565b905081600301548110156134c3576002820154156134b65781600401548260020154141561349e574360018301555b50600201805460001901905550600191506114f89050565b60009450505050506114f8565b60006134dc8360030154836146e290919063ffffffff16565b905082600401546134fa82856002015461472490919063ffffffff16565b1061351f57600483015461350f9060016133cd565b6002840155436001840155613552565b6002830180548201600019019055600383015461354c9061354190839061477e565b600185015490614724565b60018401555b6001955050505050506114f8565b60408051600480825260a08201909252606091829190602082016080803683370190505090508663ffffffff168160008151811061359a57fe5b60200260200101818152505060208665ffffffffffff16901b65ffffffffffff16816000815181106135c857fe5b602002602001018181511791508181525050604860ff85901c901b816000815181106135f057fe5b602002602001018181511791508181525050848160018151811061361057fe5b602090810291909101015280516001600160ff1b038516908290600290811061363557fe5b602002602001018181525050826001600160a01b03168160038151811061365857fe5b60209081029190910101529695505050505050565b60355460405163311083ed60e21b81526020600482018181528451602484015284516000946001600160a01b03169363c4420fb49387939283926044019180860191028083838b5b838110156136cd5781810151838201526020016136b5565b505050509050019250505060206040518083038186803b1580156136f057600080fd5b505afa158015613704573d6000803e3d6000fd5b505050506040513d602081101561371a57600080fd5b505192915050565b60008061372f84846147d7565b8551909150600090600019015b6000811261379c5786818151811061375057fe5b6020026020010151915060008187600082121561376957fe5b6001911c81161490508061378657613781848461485d565b613790565b613790838561485d565b9350506000190161373c565b5050909414949350505050565b80156137ef576137ea60598363ffffffff16815481106137c557fe5b6000918252602090912001546001600160a01b0316336001600160c01b0386166148c0565b6113ac565b63ffffffff821661387b576051546040805163cfc0b64160e01b81523360048201526000602482018190526001600160c01b0387166044830181905292516001600160a01b039094169363cfc0b6419392606480820193929182900301818588803b15801561385d57600080fd5b505af1158015613871573d6000803e3d6000fd5b50505050506113ac565b600060598363ffffffff168154811061389057fe5b60009182526020808320909101546040805163555ddc6560e11b81526001600160a01b03909216600483018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce2177054602484015290519094508392731820a4b7618bde71dce8cdc73aab6c95905fad249263aabbb8ca9260448083019392829003018186803b15801561392257600080fd5b505afa158015613936573d6000803e3d6000fd5b505050506040513d602081101561394c57600080fd5b50516001600160a01b03161415613964576000613967565b60015b90508015613c0a57600061397a83612ae9565b604080518082018252601b81527f73656e6428616464726573732c75696e743235362c6279746573290000000000602091820152605154825180840184528281527f6465706f73697428616464726573732c616464726573732c75696e7431393229908301528251336024808301919091526001600160a01b03808a1660448085018290526001600160c01b038f168902606480870182905289518088038201815260849788018b5298890180516001600160e01b031663cfc0b64160e01b1781529951979094169487018581529187018190526060938701938452875195870195909552865198995060009891977f9bd9bbc68c9d2d57236e56ab2cc196bd1614295e6e32ba6eba9004e8c27143b697949691939260a4909201918083838d5b83811015613ab3578181015183820152602001613a9b565b50505050905090810190601f168015613ae05780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990991698909817885251815191979096508695509350915081905083835b60208310613b465780518252601f199092019160209182019101613b27565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613ba8576040519150601f19603f3d011682016040523d82523d6000602084013e613bad565b606091505b5050905080613c03576040805162461bcd60e51b815260206004820152601f60248201527f7769746864726177616c2064656c61796572206465706f736974206661696c00604482015290519081900360640190fd5b5050613ca2565b605154613c2b9083906001600160a01b03166001600160c01b038816614e77565b6051546040805163cfc0b64160e01b81523360048201526001600160a01b0385811660248301526001600160c01b03891660448301529151919092169163cfc0b64191606480830192600092919082900301818387803b158015613c8e57600080fd5b505af1158015611236573d6000803e3d6000fd5b5050505050565b303b1590565b60005b82518110156113ac5760536040518060600160405280858481518110613cd457fe5b60200260200101516001600160a01b03168152602001600880868681518110613cf957fe5b6020026020010151901b901c815260200160f8858581518110613d1857fe5b60209081029190910181015190911c909152825460018082018555600094855293829020835160039092020180546001600160a01b0319166001600160a01b03909216919091178155908201518184015560409091015160029091015501613cb2565b600054610100900460ff1680613d945750613d94613ca9565b80613da2575060005460ff16155b613ddd5760405162461bcd60e51b815260040180806020018281038252602e815260200180615795602e913960400191505060405180910390fd5b600054610100900460ff16158015613e08576000805460ff1961ff0019909116610100171660011790555b603380546001600160a01b038087166001600160a01b0319928316179092556034805486841690831617905560358054928516929091169190911790558015612285576000805461ff001916905550505050565b600054610100900460ff1680613e755750613e75613ca9565b80613e83575060005460ff16155b613ebe5760405162461bcd60e51b815260040180806020018281038252602e815260200180615795602e913960400191505060405180910390fd5b600054610100900460ff16158015613ee9576000805460ff1961ff0019909116610100171660011790555b604f80546001600160a01b03199081166001600160a01b03888116919091179092556050805482168784161767ffffffffffffffff60a01b1916600160a01b6001600160401b03881602179055605180549091169184169190911790558015613ca2576000805461ff00191690555050505050565b6055546001600160401b031660009081526056602052604081205460545460538054600160a01b90920465ffffffffffff16918491829182919060ff8916908110613fa557fe5b906000526020600020906003020160010154600860538960ff1681548110613fc957fe5b90600052602060002090600302016002015481613fe257fe5b046002026003010290506000600860538960ff168154811061400057fe5b9060005260206000209060030201600201548161401957fe5b604080519290910481028481018084016148ae0190925261486e909101825260d087811b60208401528e901b6026830152602c8201889052604c82018d9052606c82018c90529150608c810161406f818c614ffb565b6148000161407d6004615249565b9096509450838511156140cd576040805162461bcd60e51b81526020600482015260136024820152726c322074782064617461206f766572666c6f7760681b604482015290519081900360640190fd5b8486823784016140df8186860361525d565b848403016140ed6005615249565b9096509450828514614146576040805162461bcd60e51b815260206004820181905260248201527f666565496478436f6f7264696e61746f72206c656e67746820696e76616c6964604482015290519081900360640190fd5b8486823784016141588186850361525d565b848303810190504660f01b81527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016002836040518082805190602001908083835b602083106141b85780518252601f199092019160209182019101614199565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa1580156141f7573d6000803e3d6000fd5b5050506040513d602081101561420c57600080fd5b50518161421557fe5b069e9d5050505050505050505050505050565b605e54600160401b90046001600160401b03166000908152605d60205260408120614252916155ef565b605e805460016001600160401b03600160401b808404821692909201811682026fffffffffffffffff000000000000000019909316929092179283905582048116600160801b9092041614156142d457605e805460016001600160401b03600160801b808404821692909201160267ffffffffffffffff60801b199091161790555b565b60006060856001600160a01b03166040518060600160405280602581526020016156cc602591398051602091820120604080516001600160a01b03808b166024830152891660448201526064808201899052825180830390910181526084909101825292830180516001600160e01b03166001600160e01b0319909316929092178252518251909182918083835b602083106143835780518252601f199092019160209182019101614364565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146143e5576040519150601f19603f3d011682016040523d82523d6000602084013e6143ea565b606091505b5091509150818015614418575080511580614418575080806020019051602081101561441557600080fd5b50515b614469576040805162461bcd60e51b815260206004820152601960248201527f73616665207472616e736665722066726f6d206661696c656400000000000000604482015290519081900360640190fd5b505050505050565b604080516bffffffffffffffffffffffff1960608a901b16602080830191909152603482018990526001600160d01b031960d089811b821660548501526001600160f01b031960f08a811b8216605a87015289901b16605c8501526001600160e01b031960e088901b16605e808601919091529086901b90911660628401528351604881850301815260689093018452546001600160401b03600160801b909104166000908152605d9091529190912061452b9082615276565b605e54600160801b90046001600160401b03166000818152605d602090815260408083205481518381528651818501528651604860026101006001861615026000190190941693909304929092049560ff87169590947f7f40be4e420c002c02fa9cad961f6a7620769d32d272f3f8c15e3ff59de9310e9489948493918401928601918190849084905b838110156145cd5781810151838201526020016145b5565b50505050905090810190601f1680156145fa5780820380516001836020036101000a031916815260200191505b509250505060405180910390a36080811061123657605e805460016001600160401b03600160801b808404821692909201160267ffffffffffffffff60801b19909116179055505050505050505050565b600081848411156146da5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561469f578181015183820152602001614687565b50505050905090810190601f1680156146cc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600061340f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506153c0565b60008282018381101561340f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008261478d575060006114f8565b8282028284828161479a57fe5b041461340f5760405162461bcd60e51b81526004018080602001828103825260218152602001806157746021913960400191505060405180910390fd5b6040805160038082526080820190925260009160609190602082018380368337019050509050838160008151811061480b57fe5b602002602001018181525050828160018151811061482557fe5b60200260200101818152505060018160028151811061484057fe5b60200260200101818152505061485581615425565b949350505050565b6040805160028082526060808301845260009390929190602083019080368337019050509050838160008151811061489157fe5b60200260200101818152505082816001815181106148ab57fe5b60200260200101818152505061485581615482565b6001600160a01b0383166149ca5760408051600080825260208201909252339083906040518082805190602001908083835b602083106149115780518252601f1990920191602091820191016148f2565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614973576040519150601f19603f3d011682016040523d82523d6000602084013e614978565b606091505b50509050806149c4576040805162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b604482015290519081900360640190fd5b506113ac565b6040805163555ddc6560e11b81526001600160a01b03851660048201527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce2177054602482015290516000918291731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca916044808301926020929190829003018186803b158015614a4f57600080fd5b505afa158015614a63573d6000803e3d6000fd5b505050506040513d6020811015614a7957600080fd5b50516001600160a01b03161415614a91576000614a94565b60015b90508015614cec576000614aa785612ae9565b604080518082018252601b81527f73656e6428616464726573732c75696e743235362c6279746573290000000000602091820152815160008082529181019092529192506060906001600160a01b038816907f9bd9bbc68c9d2d57236e56ab2cc196bd1614295e6e32ba6eba9004e8c27143b69088908887029060405160240180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614b76578181015183820152602001614b5e565b50505050905090810190601f168015614ba35780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990991698909817885251815191979096508695509350915081905083835b60208310614c095780518252601f199092019160209182019101614bea565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c6b576040519150601f19603f3d011682016040523d82523d6000602084013e614c70565b606091505b5091509150818015614c9e575080511580614c9e5750808060200190516020811015614c9b57600080fd5b50515b614ce4576040805162461bcd60e51b8152602060048201526012602482015271115490cdcdcdc81cd95b990819985a5b195960721b604482015290519081900360640190fd5b505050612285565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0386811660248301526044808301879052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b178152925181516000946060948a169392918291908083835b60208310614d995780518252601f199092019160209182019101614d7a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614dfb576040519150601f19603f3d011682016040523d82523d6000602084013e614e00565b606091505b5091509150818015614e2e575080511580614e2e5750808060200190516020811015614e2b57600080fd5b50515b614469576040805162461bcd60e51b8152602060048201526015602482015274115490cc8c081d1c985b9cd9995c8819985a5b1959605a1b604482015290519081900360640190fd5b604080518082018252601881527f617070726f766528616464726573732c75696e7432353629000000000000000060209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180516001600160e01b031663095ea7b360e01b1781529251815160009460609489169392918291908083835b60208310614f245780518252601f199092019160209182019101614f05565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614f86576040519150601f19603f3d011682016040523d82523d6000602084013e614f8b565b606091505b5091509150818015614fb9575080511580614fb95750808060200190516020811015614fb657600080fd5b50515b613ca2576040805162461bcd60e51b815260206004820152600e60248201526d1054141493d59157d1905253115160921b604482015290519081900360640190fd5b6000806150086003615249565b9092509050606581046000606085156150db57605e54600160401b90046001600160401b03166000908152605d60209081526040918290208054835160026101006001841615026000190190921691909104601f81018490048402820184019094528381529290918301828280156150c15780601f10615096576101008083540402835291602001916150c1565b820191906000526020600020905b8154815290600101906020018083116150a457829003601f168201915b5050505050905060488151816150d357fe5b0491506150e0565b600091505b610100838301111561512a576040805162461bcd60e51b815260206004820152600e60248201526d4c31205458206f766572666c6f7760901b604482015290519081900360640190fd5b8115615158576048820287019660208201905b8881101561515557815181526020918201910161513d565b50505b60005b83811015615235576059546065870196803560001a916001820135916021810135916041820135916061013560e01c9081106151de576040805162461bcd60e51b815260206004820152601d60248201527f746f6b656e20686173206e6f74206265656e2072656769737465726564000000604482015290519081900360640190fd5b6001600160a01b0360ff8616156151fe576151fb838587896154df565b90505b60601b8d5260148d0191909152600060348d0181905260e09190911b603e8d015260428c015250506048909801975060010161515b565b506123f8876048858561010003030261525d565b602002600490810135602481019291013590565b808201915b828110156113ac5760008152602001615262565b8154600260018083161561010002038216048251808201602081106020841001600281146153205760018114615345578660005260208404602060002001600160028402018855602085068060200390508088018589016001836101000a0392508282511684540184556001840193506020820191505b8082101561530a57815184556001840193506020820191506152ed565b815191036101000a9081900402909155506123f8565b60028302826020036101000a846020036101000a6020890151040201850187556123f8565b8660005260208404602060002001600160028402018855846020038088018589016001836101000a0392508282511660ff198a160184556020820191506001840193505b808210156153a65781518455600184019350602082019150615389565b815191036101000a90819004029091555050505050505050565b6000818361540f5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561469f578181015183820152602001614687565b50600083858161541b57fe5b0495945050505050565b60345460405163311083ed60e21b81526020600482018181528451602484015284516000946001600160a01b03169363c4420fb49387939283926044019185810191028083838b83156136cd5781810151838201526020016136b5565b60335460405163311083ed60e21b81526020600482018181528451602484015284516000946001600160a01b03169363c4420fb49387939283926044019185810191028083838b83156136cd5781810151838201526020016136b5565b6000808560405160200180807f19457468657265756d205369676e6564204d6573736167653a0a393800000000815250601c01806157ef60429139604201828152602001915050604051602081830303815290604052805190602001209050600060018285888860405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561559a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612c74576040805162461bcd60e51b815260206004820152600a6024820152690657265636f7665722d360b41b604482015290519081900360640190fd5b50805460018160011615610100020316600290046000825580601f106156155750615633565b601f0160209004906000526020600020908101906156339190615636565b50565b5b8082111561564b5760008155600101615637565b5090565b6000808585111561565e578182fd5b8386111561566a578182fd5b505082019391909203915056fe63616e277420637265617465206163636f756e74207769746820626162795075624b6579203d20307769746864726177616c73206d757374206265206c657373207468616e206d61785769746864726177616c737472616e7366657246726f6d28616464726573732c616464726573732c75696e743235362945524337373720646f6e277420696d706c656d656e74206772616e756c6172697479696e7374616e74207769746864726177616c732077617374656420666f722074686973205553442072616e6765666f72676542617463682063616e27742062652063616c6c6564206173206120696e7465726e616c207472616e73616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564626162795075624b6579206d757374206265203020696620757365206578697374696e67206163636f756e744920617574686f72697a65207468697320626162796a75626a7562206b657920666f72206865726d657a20726f6c6c7570206163636f756e74206372656174696f6ea264697066735822122077a11aa776267abae219dc837550f3496a4d51cfa531362d18028a33eb9415d364736f6c634300060c0033" +var HermezBin = "0x608060405234801561001057600080fd5b50614e7c806100206000396000f3fe6080604052600436106102245760003560e01c806386c6acc111610123578063bded9bb8116100ab578063dd46bf841161006f578063dd46bf8414610d6a578063e56e27ae14610d7f578063e796fcf314610d94578063e9b5269c14610e3c578063ef4a5c4a14610e7d57610224565b8063bded9bb814610c77578063c63cc3a014610c8c578063cbd7b5fb14610cf8578063d0f32e6714610d25578063d486645c14610d3a57610224565b80639ead7222116100f25780639ead722214610bf95780639f34e9a314610c23578063a327583814610c38578063a7ab696114610c4d578063abe3219c14610c6257610224565b806386c6acc114610a99578063886df58714610acc57806395a09f2a14610b795780639b51fb0d14610ba457610224565b8063432dd51f116101b15780636e7e1365116101755780636e7e13651461087d57806370c2f1c0146109cf57806379a135e314610a5a57806384ef9ed414610a6f578063864eb16414610a8457610224565b8063432dd51f1461051c57806344e0b2ce146106085780634ee51c261461061d578063506d5463146107b957806368e95e53146107ec57610224565b80631b0a8223116101f85780631b0a8223146104045780632bd8362614610435578063314e5eda1461044a578063375110aa1461047457806338330200146104ca57610224565b80624aca6e146102295780630dd94b961461026e5780630ee8e52b146102bd5780631a748c2d146102d2575b600080fd5b34801561023557600080fd5b5061025c6004803603602081101561024c57600080fd5b50356001600160a01b0316610eb0565b60408051918252519081900360200190f35b34801561027a57600080fd5b506102a16004803603602081101561029157600080fd5b50356001600160a01b0316610ec2565b604080516001600160401b039092168252519081900360200190f35b3480156102c957600080fd5b506102a1610edd565b3480156102de57600080fd5b50610402600480360360408110156102f557600080fd5b810190602081018135600160201b81111561030f57600080fd5b82018360208201111561032157600080fd5b803590602001918460208302840111600160201b8311171561034257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561039157600080fd5b8201836020820111156103a357600080fd5b803590602001918460208302840111600160201b831117156103c457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610ef3945050505050565b005b34801561041057600080fd5b50610419611020565b604080516001600160a01b039092168252519081900360200190f35b34801561044157600080fd5b5061041961102f565b34801561045657600080fd5b506104026004803603602081101561046d57600080fd5b503561103e565b34801561048057600080fd5b506104b66004803603604081101561049757600080fd5b5080356001600160a01b031690602001356001600160c01b03166110d1565b604080519115158252519081900360200190f35b3480156104d657600080fd5b506104f4600480360360208110156104ed57600080fd5b503561116d565b604080516001600160a01b039094168452602084019290925282820152519081900360600190f35b34801561052857600080fd5b50610402600480360360e081101561053f57600080fd5b63ffffffff823516916001600160c01b036020820135169160408201359165ffffffffffff6060820135169181019060a081016080820135600160201b81111561058857600080fd5b82018360208201111561059a57600080fd5b803590602001918460208302840111600160201b831117156105bb57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505065ffffffffffff833516935050506020013515156111a7565b34801561061457600080fd5b506102a16113ac565b34801561062957600080fd5b5061040260048036036101c081101561064157600080fd5b810190602081018135600160201b81111561065b57600080fd5b82018360208201111561066d57600080fd5b803590602001918460208302840111600160201b8311171561068e57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156106dd57600080fd5b8201836020820111156106ef57600080fd5b803590602001918460208302840111600160201b8311171561071057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505081356001600160a01b0390811693506020830135811692604081013582169250606081013560ff169160808201359160a081013582169160c082013581169160e08101358216916101008201358116916101208101358216916101408201356001600160401b0316916101600135166113bb565b3480156107c557600080fd5b5061025c600480360360208110156107dc57600080fd5b50356001600160401b03166115bb565b3480156107f857600080fd5b50610402600480360361028081101561081057600080fd5b6040805160a0810190915290820191906102808201908260056000835b8282101561086e576040805160808181019092529080840286019060049083908390808284376000920191909152505050815260019091019060200161082d565b509295506115cd945050505050565b34801561088957600080fd5b5061040260048036036102008110156108a157600080fd5b65ffffffffffff8235169160208101359160408201359190810190608081016060820135600160201b8111156108d657600080fd5b8201836020820111156108e857600080fd5b803590602001918460018302840111600160201b8311171561090957600080fd5b919390929091602081019035600160201b81111561092657600080fd5b82018360208201111561093857600080fd5b803590602001918460018302840111600160201b8311171561095957600080fd5b919390929091602081019035600160201b81111561097657600080fd5b82018360208201111561098857600080fd5b803590602001918460018302840111600160201b831117156109a957600080fd5b919350915060ff8135169060208101351515906040810190608081019061010001611756565b3480156109db57600080fd5b50610402600480360360408110156109f257600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610a1c57600080fd5b820183602082011115610a2e57600080fd5b803590602001918460018302840111600160201b83111715610a4f57600080fd5b509092509050611c05565b348015610a6657600080fd5b50610419611de9565b348015610a7b57600080fd5b506102a1611df8565b348015610a9057600080fd5b50610419611e07565b348015610aa557600080fd5b5061025c60048036036020811015610abc57600080fd5b50356001600160401b0316611e16565b610402600480360360e0811015610ae257600080fd5b81359165ffffffffffff602082013581169261ffff604084013581169360608101359091169263ffffffff6080830135169260a0830135909116919081019060e0810160c0820135600160201b811115610b3b57600080fd5b820183602082011115610b4d57600080fd5b803590602001918460018302840111600160201b83111715610b6e57600080fd5b509092509050611e28565b348015610b8557600080fd5b50610b8e611fd9565b6040805160ff9092168252519081900360200190f35b348015610bb057600080fd5b50610bce60048036036020811015610bc757600080fd5b5035611fde565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b348015610c0557600080fd5b5061041960048036036020811015610c1c57600080fd5b5035612010565b348015610c2f57600080fd5b5061025c612037565b348015610c4457600080fd5b50610b8e61203d565b348015610c5957600080fd5b506102a161204d565b348015610c6e57600080fd5b50610402612063565b348015610c8357600080fd5b5061025c6121db565b348015610c9857600080fd5b5061040260048036036101a0811015610cb057600080fd5b506040810160c0820163ffffffff610100840135166001600160c01b036101208501351665ffffffffffff6101408601358116906101608701351661018087013515156121e1565b348015610d0457600080fd5b5061040260048036036020811015610d1b57600080fd5b503560ff166125dc565b348015610d3157600080fd5b506102a16126d9565b348015610d4657600080fd5b50610d4f6126ef565b6040805165ffffffffffff9092168252519081900360200190f35b348015610d7657600080fd5b50610419612704565b348015610d8b57600080fd5b50610419612713565b348015610da057600080fd5b50610dc760048036036020811015610db757600080fd5b50356001600160401b0316612722565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610e01578181015183820152602001610de9565b50505050905090810190601f168015610e2e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610e4857600080fd5b506104b660048036036040811015610e5f57600080fd5b5080356001600160401b0316906020013565ffffffffffff166127bd565b348015610e8957600080fd5b5061040260048036036020811015610ea057600080fd5b50356001600160401b03166127dd565b605a6020526000908152604090205481565b6052602052600090815260409020546001600160401b031681565b605e54600160801b90046001600160401b031681565b604f546001600160a01b03163314610f4b576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b8051825114610fa1576040805162461bcd60e51b815260206004820152601760248201527f646966666572656e74206172726179206c656e67746820000000000000000000604482015290519081900360640190fd5b60005b825181101561101b57818181518110610fb957fe5b602002602001015160526000858481518110610fd157fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805467ffffffffffffffff19166001600160401b0392909216919091179055600101610fa4565b505050565b6051546001600160a01b031681565b605c546001600160a01b031681565b604f546001600160a01b03163314611096576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b605b8190556040805182815290517fd1c873cd16013f0dc5f37992c0d12794389698512895ec036a568e393b46e3c19181900360200190a150565b6000806110de84846128c3565b9050806110ef576001915050611167565b60006110fa82612a8f565b905060006036826005811061110b57fe5b60050201905060008160020154111561112a5760019350505050611167565b6000611143826001015443612b0a90919063ffffffff16565b9050816003015481101561115e576000945050505050611167565b60019450505050505b92915050565b6053818154811061117a57fe5b60009182526020909120600390910201805460018201546002909201546001600160a01b03909116925083565b8015611219576111de60598863ffffffff16815481106111c357fe5b6000918252602090912001546001600160a01b031687612b53565b6112195760405162461bcd60e51b815260040180806020018281038252602d815260200180614d29602d913960400191505060405180910390fd5b6060611232886000896001600160c01b03168933612c9d565b9050600061123f82612daa565b65ffffffffffff80881660009081526057602090815260408083205460588352818420948a168452939091529020549192509060ff16156112c7576040805162461bcd60e51b815260206004820152601e60248201527f776974686472617720686173206265656e20616c726561647920646f6e650000604482015290519081900360640190fd5b6112db81878765ffffffffffff1685612e5f565b1515600114611325576040805162461bcd60e51b81526020600482015260116024820152701cdb5d081c1c9bdbd9881a5b9d985b1a59607a1b604482015290519081900360640190fd5b65ffffffffffff8088166000908152605860209081526040808320938916835292905220805460ff1916600117905561135f898b86612ee6565b8315158765ffffffffffff168665ffffffffffff167f92dd99230eaf5e3f1238fbbd0d72b34e8c2ad759886075bfc9f426ebeeea34f060405160405180910390a450505050505050505050565b6055546001600160401b031681565b600054610100900460ff16806113d457506113d4613080565b806113e2575060005460ff16155b61141d5760405162461bcd60e51b815260040180806020018281038252602e815260200180614dab602e913960400191505060405180910390fd5b600054610100900460ff16158015611448576000805460ff1961ff0019909116610100171660011790555b6114528f8f613086565b8c605460006101000a8154816001600160a01b0302191690836001600160a01b031602179055508b605c60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508a605f60006101000a8154816001600160a01b0302191690836001600160a01b0316021790555089605e60186101000a81548160ff021916908360ff16021790555088605b8190555060ff605460146101000a81548165ffffffffffff021916908365ffffffffffff1602179055506001605e60106101000a8154816001600160401b0302191690836001600160401b03160217905550605960009080600181540180825580915050600190039060005260206000200160009091909190916101000a8154816001600160a01b0302191690836001600160a01b0316021790555061158c888888613152565b61159885858585613233565b80156115aa576000805461ff00191690555b505050505050505050505050505050565b60576020526000908152604090205481565b604f546001600160a01b03163314611625576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b60005b600581101561175257600082826005811061163f57fe5b6020020151519050600083836005811061165557fe5b6020020151600160200201519050600084846005811061167157fe5b6020020151604001519050600085856005811061168a57fe5b6020020151606001519050808311156116d45760405162461bcd60e51b815260040180806020018281038252602c815260200180614cdb602c913960400191505060405180910390fd5b6040518060a00160405280858152602001438152602001848152602001838152602001828152506036866005811061170857fe5b600502016000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040155905050505050508080600101915050611628565b5050565b3332146117945760405162461bcd60e51b8152600401808060200182810382526034815260200180614d566034913960400191505060405180910390fd5b605c546040805163041d8fb560e51b815233600482015243602482015290516001600160a01b03909216916383b1f6a091604480820192602092909190829003018186803b1580156117e557600080fd5b505afa1580156117f9573d6000803e3d6000fd5b505050506040513d602081101561180f57600080fd5b50511515600114611867576040805162461bcd60e51b815260206004820152601860248201527f61756374696f6e2064656e6965642074686520666f7267650000000000000000604482015290519081900360640190fd5b836118ce57605e54600160c01b810460ff166001600160401b03918216011643106118ce576040805162461bcd60e51b8152602060048201526012602482015271130c530c90985d18da081c995c5d5a5c995960721b604482015290519081900360640190fd5b60006118dd8f8f8f888a613336565b905060538660ff16815481106118ef57fe5b60009182526020918290206003909102015460408051928301815283835280516343753b4d60e01b81526001600160a01b03909216926343753b4d9288928892889290916004909101908190869080828437600083820152601f01601f1916909101905084608080828437600083820152601f01601f1916909101905083604080828437600081840152601f19601f82011690508083019250505082600160200280838360005b838110156119ae578181015183820152602001611996565b5050505090500194505050505060206040518083038186803b1580156119d357600080fd5b505afa1580156119e7573d6000803e3d6000fd5b505050506040513d60208110156119fd57600080fd5b5051611a47576040805162461bcd60e51b815260206004820152601460248201527334b73b30b634b2103937b6363ab810383937b7b360611b604482015290519081900360640190fd5b6055600081819054906101000a90046001600160401b03168092919060010191906101000a8154816001600160401b0302191690836001600160401b03160217905550508e605460146101000a81548165ffffffffffff021916908365ffffffffffff1602179055508d60566000605560009054906101000a90046001600160401b03166001600160401b03166001600160401b03168152602001908152602001600020819055508c60576000605560009054906101000a90046001600160401b03166001600160401b03166001600160401b03168152602001908152602001600020819055508415611b5857605e805467ffffffffffffffff1916436001600160401b0316179055611b58613600565b605c54604080516309cb4a2f60e31b815233600482015290516001600160a01b0390921691634e5a51789160248082019260009290919082900301818387803b158015611ba457600080fd5b505af1158015611bb8573d6000803e3d6000fd5b50506055546040516001600160401b0390911692507fd7ab70a9e6ed0d6985e74c5cb553d300a13a2217d58266922b275b72fe7869829150600090a2505050505050505050505050505050565b605954600160201b8110611c55576040805162461bcd60e51b81526020600482015260126024820152711d1bdad95b881b1a5cdd081a5cc8199d5b1b60721b604482015290519081900360640190fd5b6001600160a01b038416611ca5576040805162461bcd60e51b8152602060048201526012602482015271063616e2774206265206164647265737320360741b604482015290519081900360640190fd5b6001600160a01b0384166000908152605a602052604090205415611d10576040805162461bcd60e51b815260206004820152601b60248201527f746f6b656e206164647265737320616c72656164792061646465640000000000604482015290519081900360640190fd5b8115611d3157605f54605b54611d31916001600160a01b03169085856136ae565b605f54605b54611d4e916001600160a01b03169033903090613964565b60598054600181019091557fd73956b9e00d8f8bc5e44f7184df1387cdd652e7726b8ccda3db4859e02f31bf0180546001600160a01b0319166001600160a01b0386169081179091556000818152605a6020908152604091829020849055815163ffffffff8516815291517fcb73d161edb7cd4fb1d92fedfd2555384fd997fd44ab507656f8c81e15747dde9281900390910190a250505050565b605f546001600160a01b031681565b605e546001600160401b031681565b6054546001600160a01b031681565b60566020526000908152604090205481565b60595463ffffffff851610611e84576040805162461bcd60e51b815260206004820152601d60248201527f746f6b656e20686173206e6f74206265656e2072656769737465726564000000604482015290519081900360640190fd5b6000611e8f87613ad7565b9050600160801b8110611ee9576040805162461bcd60e51b815260206004820181905260248201527f6465706f73697420616d6f756e74206c6172676572207468616e206c696d6974604482015290519081900360640190fd5b8015611fbf5763ffffffff8516611f5357348114611f4e576040805162461bcd60e51b815260206004820152601760248201527f6c6f6164416d6f756e7420213d206d73672e76616c7565000000000000000000604482015290519081900360640190fd5b611fbf565b8115611f8c57611f8c60598663ffffffff1681548110611f6f57fe5b6000918252602090912001546001600160a01b03168285856136ae565b611fbf60598663ffffffff1681548110611fa257fe5b6000918252602090912001546001600160a01b0316333084613964565b611fce338a8a8a8a8a8a613b1b565b505050505050505050565b60f081565b60368160058110611feb57fe5b6005020180546001820154600283015460038401546004909401549294509092909185565b6059818154811061201d57fe5b6000918252602090912001546001600160a01b0316905081565b60595490565b605e54600160c01b900460ff1681565b605054600160a01b90046001600160401b031681565b6050546001600160a01b03163314806120865750604f546001600160a01b031633145b6120d7576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79207361666520626f74206f7220676f766572616e6365000000000000604482015290519081900360640190fd5b60005b6005811015612162576040518060a001604052806000815260200160008152602001600081526020016000815260200160008152506036826005811061211c57fe5b60050201600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015590505080806001019150506120da565b5060515460505460408051630e670af560e01b8152600160a01b9092046001600160401b03166004830152516001600160a01b0390921691630e670af59160248082019260009290919082900301818387803b1580156121c157600080fd5b505af11580156121d5573d6000803e3d6000fd5b50505050565b605b5481565b80156122535761221860598663ffffffff16815481106121fd57fe5b6000918252602090912001546001600160a01b031685612b53565b6122535760405162461bcd60e51b815260040180806020018281038252602d815260200180614d29602d913960400191505060405180910390fd5b65ffffffffffff80841660009081526058602090815260408083209386168352929052205460ff16156122cd576040805162461bcd60e51b815260206004820152601e60248201527f776974686472617720686173206265656e20616c726561647920646f6e650000604482015290519081900360640190fd5b65ffffffffffff831660009081526057602090815260408083205481518084018290523360601b818401526001600160e01b031960e08b901b16605482015267ffffffffffffffff1989841b1660588201526001600160d01b031960d088901b1660708201528251605681830301815260769091019283905280519194937f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019360029390918291908401908083835b6020831061239b5780518252601f19909201916020918201910161237c565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa1580156123da573d6000803e3d6000fd5b5050506040513d60208110156123ef57600080fd5b5051816123f857fe5b605454604080516020810182529390920680845282516343753b4d60e01b81529094506001600160a01b03909116926343753b4d928e928e928e929091600401908190869080828437600083820152601f01601f1916909101905084608080828437600083820152601f01601f1916909101905083604080828437600081840152601f19601f82011690508083019250505082600160200280838360005b838110156124ae578181015183820152602001612496565b5050505090500194505050505060206040518083038186803b1580156124d357600080fd5b505afa1580156124e7573d6000803e3d6000fd5b505050506040513d60208110156124fd57600080fd5b50511515600114612555576040805162461bcd60e51b815260206004820152601b60248201527f7a6b2d736e61726b2070726f6f66206973206e6f742076616c69640000000000604482015290519081900360640190fd5b65ffffffffffff8086166000908152605860209081526040808320938816835292905220805460ff1916600117905561258f868885612ee6565b8215158565ffffffffffff168565ffffffffffff167f92dd99230eaf5e3f1238fbbd0d72b34e8c2ad759886075bfc9f426ebeeea34f060405160405180910390a450505050505050505050565b604f546001600160a01b03163314612634576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b60f060ff82161115612685576040805162461bcd60e51b8152602060048201526015602482015274199bdc99d9481d1a5b595bdd5d08195e18d9591959605a1b604482015290519081900360640190fd5b605e805460ff8316600160c01b810260ff60c01b199092169190911790915560408051918252517fff6221781ac525b04585dbb55cd2ebd2a92c828ca3e42b23813a1137ac9744319181900360200190a150565b605e54600160401b90046001600160401b031681565b605454600160a01b900465ffffffffffff1681565b604f546001600160a01b031681565b6050546001600160a01b031681565b605d6020908152600091825260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156127b55780601f1061278a576101008083540402835291602001916127b5565b820191906000526020600020905b81548152906001019060200180831161279857829003601f168201915b505050505081565b605860209081526000928352604080842090915290825290205460ff1681565b604f546001600160a01b03163314612835576040805162461bcd60e51b81526020600482015260166024820152754f6e6c7920676f766572616e6365206164647265737360501b604482015290519081900360640190fd5b62127500816001600160401b03161115612896576040805162461bcd60e51b815260206004820152601c60248201527f45786365656473204d41585f5749544844524157414c5f44454c415900000000604482015290519081900360640190fd5b605080546001600160401b03909216600160a01b0267ffffffffffffffff60a01b19909216919091179055565b6001600160a01b0382166000908152605260205260408120546001600160401b03166128f157506000611167565b6001600160a01b038316600090815260526020526040812054655af3107a4000906001600160401b03166001600160c01b0385160260408051600481526024810182526020810180516001600160e01b031663313ce56760e01b1781529151815194909304945060009384936060936001600160a01b038b1693928291908083835b602083106129925780518252601f199092019160209182019101612973565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146129f2576040519150601f19603f3d011682016040523d82523d6000602084013e6129f7565b606091505b50915091508115612a1c57808060200190516020811015612a1757600080fd5b505192505b604d8360ff1610612a74576040805162461bcd60e51b815260206004820152601a60248201527f746f6b656e55534420646563696d616c73206f766572666c6f77000000000000604482015290519081900360640190fd5b8260ff16600a0a8481612a8357fe5b04979650505050505050565b6000805b6005811015612ac35760368160058110612aa957fe5b60050201548311612abb579050612b05565b600101612a93565b506040805162461bcd60e51b8152602060048201526011602482015270195e18d95959081b585e08185b5bdd5b9d607a1b604482015290519081900360640190fd5b919050565b6000612b4c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613dc5565b9392505050565b600080612b6084846128c3565b905080612b71576001915050611167565b6000612b7c82612a8f565b9050600060368260058110612b8d57fe5b6005020190506000612bac826001015443612b0a90919063ffffffff16565b90508160030154811015612c0057600282015415612bf357816004015482600201541415612bdb574360018301555b50600201805460001901905550600191506111679050565b6000945050505050611167565b6000612c19836003015483613e5c90919063ffffffff16565b90508260040154612c37828560020154613e9e90919063ffffffff16565b10612c5c576004830154612c4c906001612b0a565b6002840155436001840155612c8f565b60028301805482016000190190556003830154612c8990612c7e908390613ef8565b600185015490613e9e565b60018401555b600195505050505050611167565b60408051600480825260a08201909252606091829190602082016080803683370190505090508663ffffffff1681600081518110612cd757fe5b60200260200101818152505060208665ffffffffffff16901b65ffffffffffff1681600081518110612d0557fe5b602002602001018181511791508181525050604860ff85901c901b81600081518110612d2d57fe5b6020026020010181815117915081815250508481600181518110612d4d57fe5b602090810291909101015280516001600160ff1b0385169082906002908110612d7257fe5b602002602001018181525050826001600160a01b031681600381518110612d9557fe5b60209081029190910101529695505050505050565b60355460405163311083ed60e21b81526020600482018181528451602484015284516000946001600160a01b03169363c4420fb49387939283926044019180860191028083838b5b83811015612e0a578181015183820152602001612df2565b505050509050019250505060206040518083038186803b158015612e2d57600080fd5b505afa158015612e41573d6000803e3d6000fd5b505050506040513d6020811015612e5757600080fd5b505192915050565b600080612e6c8484613f51565b8551909150600090600019015b60008112612ed957868181518110612e8d57fe5b60200260200101519150600081876000821215612ea657fe5b6001911c811614905080612ec357612ebe8484613fd7565b612ecd565b612ecd8385613fd7565b93505060001901612e79565b5050909414949350505050565b8015612f2c57612f2760598363ffffffff1681548110612f0257fe5b6000918252602090912001546001600160a01b0316336001600160c01b03861661403a565b61101b565b63ffffffff8216612fb8576051546040805163cfc0b64160e01b81523360048201526000602482018190526001600160c01b0387166044830181905292516001600160a01b039094169363cfc0b6419392606480820193929182900301818588803b158015612f9a57600080fd5b505af1158015612fae573d6000803e3d6000fd5b505050505061101b565b600060598363ffffffff1681548110612fcd57fe5b6000918252602090912001546051546001600160a01b039182169250612fff918391166001600160c01b03871661429f565b6051546040805163cfc0b64160e01b81523360048201526001600160a01b0384811660248301526001600160c01b03881660448301529151919092169163cfc0b64191606480830192600092919082900301818387803b15801561306257600080fd5b505af1158015613076573d6000803e3d6000fd5b5050505050505050565b303b1590565b60005b825181101561101b57605360405180606001604052808584815181106130ab57fe5b60200260200101516001600160a01b031681526020016008808686815181106130d057fe5b6020026020010151901b901c815260200160f88585815181106130ef57fe5b60209081029190910181015190911c909152825460018082018555600094855293829020835160039092020180546001600160a01b0319166001600160a01b03909216919091178155908201518184015560409091015160029091015501613089565b600054610100900460ff168061316b575061316b613080565b80613179575060005460ff16155b6131b45760405162461bcd60e51b815260040180806020018281038252602e815260200180614dab602e913960400191505060405180910390fd5b600054610100900460ff161580156131df576000805460ff1961ff0019909116610100171660011790555b603380546001600160a01b038087166001600160a01b03199283161790925560348054868416908316179055603580549285169290911691909117905580156121d5576000805461ff001916905550505050565b600054610100900460ff168061324c575061324c613080565b8061325a575060005460ff16155b6132955760405162461bcd60e51b815260040180806020018281038252602e815260200180614dab602e913960400191505060405180910390fd5b600054610100900460ff161580156132c0576000805460ff1961ff0019909116610100171660011790555b604f80546001600160a01b03199081166001600160a01b03888116919091179092556050805482168784161767ffffffffffffffff60a01b1916600160a01b6001600160401b0388160217905560518054909116918416919091179055801561332f576000805461ff00191690555b5050505050565b6055546001600160401b031660009081526056602052604081205460545460538054600160a01b90920465ffffffffffff16918491829182919060ff891690811061337d57fe5b906000526020600020906003020160010154600860538960ff16815481106133a157fe5b906000526020600020906003020160020154816133ba57fe5b046002026003010290506000600860538960ff16815481106133d857fe5b906000526020600020906003020160020154816133f157fe5b604080519290910481028481018084016148ae0190925261486e909101825260d087811b60208401528e901b6026830152602c8201889052604c82018d9052606c82018c90529150608c8101613447818c6143f3565b61480001613455600461464a565b9096509450838511156134a5576040805162461bcd60e51b81526020600482015260136024820152726c322074782064617461206f766572666c6f7760681b604482015290519081900360640190fd5b8486823784016134b78186860361465e565b848403016134c5600561464a565b909650945082851461351e576040805162461bcd60e51b815260206004820181905260248201527f666565496478436f6f7264696e61746f72206c656e67746820696e76616c6964604482015290519081900360640190fd5b8486823784016135308186850361465e565b848303810190504660f01b81527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016002836040518082805190602001908083835b602083106135905780518252601f199092019160209182019101613571565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa1580156135cf573d6000803e3d6000fd5b5050506040513d60208110156135e457600080fd5b5051816135ed57fe5b069e9d5050505050505050505050505050565b605e54600160401b90046001600160401b03166000908152605d6020526040812061362a91614c2a565b605e805460016001600160401b03600160401b808404821692909201811682026fffffffffffffffff000000000000000019909316929092179283905582048116600160801b9092041614156136ac57605e805460016001600160401b03600160801b808404821692909201160267ffffffffffffffff60801b199091161790555b565b6000828260208110156136c057600080fd5b50356001600160e01b031916905063d505accf60e01b81141561332f5760008080808080806136f2896004818d614c8a565b60e081101561370057600080fd5b506001600160a01b038135811698506020820135169650604081013595506060810135945060ff608082013516935060a0810135925060c001359050338714613790576040805162461bcd60e51b815260206004820152601f60248201527f5065726d6974206f776e6572206d757374206265207468652073656e64657200604482015290519081900360640190fd5b6001600160a01b03861630146137e4576040805162461bcd60e51b81526020600482015260146024820152735370656e646572206d757374206265207468697360601b604482015290519081900360640190fd5b8a8514613838576040805162461bcd60e51b815260206004820152601c60248201527f5065726d697420616d6f756e7420646f6573206e6f74206d6174636800000000604482015290519081900360640190fd5b8b6001600160a01b031663d505accf60e01b8888888888888860405160240180886001600160a01b03168152602001876001600160a01b031681526020018681526020018581526020018460ff168152602001838152602001828152602001975050505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b0383818316178352505050506040518082805190602001908083835b602083106139025780518252601f1990920191602091820191016138e3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146115aa576040519150601f19603f3d011682016040523d82523d6000602084013e6115aa565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106139e95780518252601f1990920191602091820191016139ca565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613a4b576040519150601f19603f3d011682016040523d82523d6000602084013e613a50565b606091505b5091509150818015613a7e575080511580613a7e5750808060200190516020811015613a7b57600080fd5b50515b613acf576040805162461bcd60e51b815260206004820152601960248201527f73616665207472616e736665722066726f6d206661696c656400000000000000604482015290519081900360640190fd5b505050505050565b60006103ff8216601f600b84901c166001600a85811c8216919083900a908185029083148015613b0657508315155b15613b115760028204015b9695505050505050565b6000613b2684613ad7565b9050600160c01b8110613b80576040805162461bcd60e51b815260206004820152601860248201527f616d6f756e74206c6172676572207468616e206c696d69740000000000000000604482015290519081900360640190fd5b65ffffffffffff8216613be5578015613be0576040805162461bcd60e51b815260206004820152601e60248201527f616d6f756e74206d757374206265203020696620746f49647820697320300000604482015290519081900360640190fd5b613cbb565b65ffffffffffff821660011415613c4d5761ffff851615613be0576040805162461bcd60e51b815260206004820152601c60248201527f6c6f6164416d6f756e74206d7573742062652030206966206578697400000000604482015290519081900360640190fd5b60ff65ffffffffffff8316118015613c7a575060545465ffffffffffff600160a01b909104811690831611155b613cbb576040805162461bcd60e51b815260206004820152600d60248201526c0d2dcecc2d8d2c840e8de92c8f609b1b604482015290519081900360640190fd5b65ffffffffffff8616613d095786613d045760405162461bcd60e51b8152600401808060200182810382526028815260200180614cb36028913960400191505060405180910390fd5b613db6565b60ff65ffffffffffff8716118015613d36575060545465ffffffffffff600160a01b909104811690871611155b613d79576040805162461bcd60e51b815260206004820152600f60248201526e0d2dcecc2d8d2c840cce4deda92c8f608b1b604482015290519081900360640190fd5b8615613db65760405162461bcd60e51b815260040180806020018281038252602c815260200180614dd9602c913960400191505060405180910390fd5b61307688888888888888614677565b60008184841115613e545760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613e19578181015183820152602001613e01565b50505050905090810190601f168015613e465780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000612b4c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614851565b600082820183811015612b4c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082613f0757506000611167565b82820282848281613f1457fe5b0414612b4c5760405162461bcd60e51b8152600401808060200182810382526021815260200180614d8a6021913960400191505060405180910390fd5b60408051600380825260808201909252600091606091906020820183803683370190505090508381600081518110613f8557fe5b6020026020010181815250508281600181518110613f9f57fe5b602002602001018181525050600181600281518110613fba57fe5b602002602001018181525050613fcf816148b6565b949350505050565b6040805160028082526060808301845260009390929190602083019080368337019050509050838160008151811061400b57fe5b602002602001018181525050828160018151811061402557fe5b602002602001018181525050613fcf81614913565b6001600160a01b0383166141445760408051600080825260208201909252339083906040518082805190602001908083835b6020831061408b5780518252601f19909201916020918201910161406c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146140ed576040519150601f19603f3d011682016040523d82523d6000602084013e6140f2565b606091505b505090508061413e576040805162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b604482015290519081900360640190fd5b5061101b565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106141c15780518252601f1990920191602091820191016141a2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614223576040519150601f19603f3d011682016040523d82523d6000602084013e614228565b606091505b5091509150818015614256575080511580614256575080806020019051602081101561425357600080fd5b50515b61332f576040805162461bcd60e51b8152602060048201526015602482015274115490cc8c081d1c985b9cd9995c8819985a5b1959605a1b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b6020831061431c5780518252601f1990920191602091820191016142fd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461437e576040519150601f19603f3d011682016040523d82523d6000602084013e614383565b606091505b50915091508180156143b15750805115806143b157508080602001905160208110156143ae57600080fd5b50515b61332f576040805162461bcd60e51b815260206004820152600e60248201526d1054141493d59157d1905253115160921b604482015290519081900360640190fd5b600080614400600361464a565b9092509050606581046000606085156144d357605e54600160401b90046001600160401b03166000908152605d60209081526040918290208054835160026101006001841615026000190190921691909104601f81018490048402820184019094528381529290918301828280156144b95780601f1061448e576101008083540402835291602001916144b9565b820191906000526020600020905b81548152906001019060200180831161449c57829003601f168201915b5050505050905060488151816144cb57fe5b0491506144d8565b600091505b6101008383011115614522576040805162461bcd60e51b815260206004820152600e60248201526d4c31205458206f766572666c6f7760901b604482015290519081900360640190fd5b8115614550576048820287019660208201905b8881101561454d578151815260209182019101614535565b50505b60005b8381101561462d576059546065870196803560001a916001820135916021810135916041820135916061013560e01c9081106145d6576040805162461bcd60e51b815260206004820152601d60248201527f746f6b656e20686173206e6f74206265656e2072656769737465726564000000604482015290519081900360640190fd5b6001600160a01b0360ff8616156145f6576145f383858789614970565b90505b60601b8d5260148d0191909152600060348d0181905260e09190911b603e8d015260428c0152505060489098019750600101614553565b50614641876048858561010003030261465e565b50505050505050565b602002600490810135602481019291013590565b808201915b8281101561101b5760008152602001614663565b604080516bffffffffffffffffffffffff1960608a901b16602080830191909152603482018990526001600160d01b031960d089811b821660548501526001600160f01b031960f08a811b8216605a87015289901b16605c8501526001600160e01b031960e088901b16605e808601919091529086901b90911660628401528351604881850301815260689093018452546001600160401b03600160801b909104166000908152605d909152919091206147319082614ae0565b605e54600160801b90046001600160401b03166000818152605d602090815260408083205481518381528651818501528651604860026101006001861615026000190190941693909304929092049560ff87169590947f7f40be4e420c002c02fa9cad961f6a7620769d32d272f3f8c15e3ff59de9310e9489948493918401928601918190849084905b838110156147d35781810151838201526020016147bb565b50505050905090810190601f1680156148005780820380516001836020036101000a031916815260200191505b509250505060405180910390a360808110611fce57605e805460016001600160401b03600160801b808404821692909201160267ffffffffffffffff60801b19909116179055505050505050505050565b600081836148a05760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315613e19578181015183820152602001613e01565b5060008385816148ac57fe5b0495945050505050565b60345460405163311083ed60e21b81526020600482018181528451602484015284516000946001600160a01b03169363c4420fb49387939283926044019185810191028083838b8315612e0a578181015183820152602001612df2565b60335460405163311083ed60e21b81526020600482018181528451602484015284516000946001600160a01b03169363c4420fb49387939283926044019185810191028083838b8315612e0a578181015183820152602001612df2565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156149d15760405162461bcd60e51b8152600401808060200182810382526022815260200180614d076022913960400191505060405180910390fd5b60008560405160200180807f19457468657265756d205369676e6564204d6573736167653a0a393800000000815250601c0180614e0560429139604201828152602001915050604051602081830303815290604052805190602001209050600060018285888860405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015614a8b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613b11576040805162461bcd60e51b815260206004820152600a6024820152690657265636f7665722d360b41b604482015290519081900360640190fd5b815460026001808316156101000203821604825180820160208110602084100160028114614b8a5760018114614baf578660005260208404602060002001600160028402018855602085068060200390508088018589016001836101000a0392508282511684540184556001840193506020820191505b80821015614b745781518455600184019350602082019150614b57565b815191036101000a908190040290915550614641565b60028302826020036101000a846020036101000a602089015104020185018755614641565b8660005260208404602060002001600160028402018855846020038088018589016001836101000a0392508282511660ff198a160184556020820191506001840193505b80821015614c105781518455600184019350602082019150614bf3565b815191036101000a90819004029091555050505050505050565b50805460018160011615610100020316600290046000825580601f10614c505750614c6e565b601f016020900490600052602060002090810190614c6e9190614c71565b50565b5b80821115614c865760008155600101614c72565b5090565b60008085851115614c99578182fd5b83861115614ca5578182fd5b505082019391909203915056fe63616e277420637265617465206163636f756e74207769746820626162795075624b6579203d20307769746864726177616c73206d757374206265206c657373207468616e206d61785769746864726177616c7345434453413a20696e76616c6964207369676e6174757265202773272076616c7565696e7374616e74207769746864726177616c732077617374656420666f722074686973205553442072616e6765666f72676542617463682063616e27742062652063616c6c6564206173206120696e7465726e616c207472616e73616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564626162795075624b6579206d757374206265203020696620757365206578697374696e67206163636f756e744920617574686f72697a65207468697320626162796a75626a7562206b657920666f72206865726d657a20726f6c6c7570206163636f756e74206372656174696f6ea2646970667358221220a2b35bfb656b29ed3b02286ec46b12673578fafcf264c5ba2dd7d17fe67e318064736f6c634300060c0033" // 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) { @@ -900,25 +900,46 @@ func (_Hermez *HermezCallerSession) WithdrawalDelay() (uint64, error) { return _Hermez.Contract.WithdrawalDelay(&_Hermez.CallOpts) } -// AddL1Transaction is a paid mutator transaction binding the contract method 0xac171d28. +// AddL1Transaction is a paid mutator transaction binding the contract method 0x886df587. // -// 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) +// Solidity: function addL1Transaction(uint256 babyPubKey, uint48 fromIdx, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint48 toIdx, bytes permit) payable returns() +func (_Hermez *HermezTransactor) AddL1Transaction(opts *bind.TransactOpts, babyPubKey *big.Int, fromIdx *big.Int, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx *big.Int, permit []byte) (*types.Transaction, error) { + return _Hermez.contract.Transact(opts, "addL1Transaction", babyPubKey, fromIdx, loadAmountF, amountF, tokenID, toIdx, permit) } -// AddL1Transaction is a paid mutator transaction binding the contract method 0xac171d28. +// AddL1Transaction is a paid mutator transaction binding the contract method 0x886df587. // -// 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) +// Solidity: function addL1Transaction(uint256 babyPubKey, uint48 fromIdx, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint48 toIdx, bytes permit) payable returns() +func (_Hermez *HermezSession) AddL1Transaction(babyPubKey *big.Int, fromIdx *big.Int, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx *big.Int, permit []byte) (*types.Transaction, error) { + return _Hermez.Contract.AddL1Transaction(&_Hermez.TransactOpts, babyPubKey, fromIdx, loadAmountF, amountF, tokenID, toIdx, permit) } -// AddL1Transaction is a paid mutator transaction binding the contract method 0xac171d28. +// AddL1Transaction is a paid mutator transaction binding the contract method 0x886df587. // -// 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) +// Solidity: function addL1Transaction(uint256 babyPubKey, uint48 fromIdx, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint48 toIdx, bytes permit) payable returns() +func (_Hermez *HermezTransactorSession) AddL1Transaction(babyPubKey *big.Int, fromIdx *big.Int, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx *big.Int, permit []byte) (*types.Transaction, error) { + return _Hermez.Contract.AddL1Transaction(&_Hermez.TransactOpts, babyPubKey, fromIdx, loadAmountF, amountF, tokenID, toIdx, permit) +} + +// AddToken is a paid mutator transaction binding the contract method 0x70c2f1c0. +// +// Solidity: function addToken(address tokenAddress, bytes permit) returns() +func (_Hermez *HermezTransactor) AddToken(opts *bind.TransactOpts, tokenAddress common.Address, permit []byte) (*types.Transaction, error) { + return _Hermez.contract.Transact(opts, "addToken", tokenAddress, permit) +} + +// AddToken is a paid mutator transaction binding the contract method 0x70c2f1c0. +// +// Solidity: function addToken(address tokenAddress, bytes permit) returns() +func (_Hermez *HermezSession) AddToken(tokenAddress common.Address, permit []byte) (*types.Transaction, error) { + return _Hermez.Contract.AddToken(&_Hermez.TransactOpts, tokenAddress, permit) +} + +// AddToken is a paid mutator transaction binding the contract method 0x70c2f1c0. +// +// Solidity: function addToken(address tokenAddress, bytes permit) returns() +func (_Hermez *HermezTransactorSession) AddToken(tokenAddress common.Address, permit []byte) (*types.Transaction, error) { + return _Hermez.Contract.AddToken(&_Hermez.TransactOpts, tokenAddress, permit) } // ForgeBatch is a paid mutator transaction binding the contract method 0x6e7e1365. @@ -984,27 +1005,6 @@ 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() diff --git a/eth/contracts/tokenHEZ/HEZ.go b/eth/contracts/tokenHEZ/HEZ.go new file mode 100644 index 0000000..cd170da --- /dev/null +++ b/eth/contracts/tokenHEZ/HEZ.go @@ -0,0 +1,1163 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package HEZ + +import ( + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// HEZABI is the input ABI used to generate the binding from. +const HEZABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialHolder\",\"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\":\"authorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"}],\"name\":\"AuthorizationUsed\",\"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\":[],\"name\":\"EIP712DOMAIN_HASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NAME_HASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMIT_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFER_WITH_AUTHORIZATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VERSION_HASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"authorizationState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"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\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"validAfter\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"validBefore\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"transferWithAuthorization\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// HEZBin is the compiled bytecode used for deploying new contracts. +var HEZBin = "0x608060405234801561001057600080fd5b506040516111153803806111158339818101604052602081101561003357600080fd5b505161004a816a52b7d2dcc80cd2e4000000610050565b506101b1565b610069816000546100f260201b6109531790919060201c565b60009081556001600160a01b03831681526001602090815260409091205461009a9183906109536100f2821b17901c565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6040805180820190915260118152704d4154483a4144445f4f564552464c4f5760781b602082015281830190838210156101aa5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561016f578181015183820152602001610157565b50505050905090810190601f16801561019c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5092915050565b610f55806101c06000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806370a08231116100b8578063a9059cbb1161007c578063a9059cbb14610308578063c473af3314610334578063d505accf1461033c578063dd62ed3e1461038f578063e3ee160e146103bd578063e94a01021461041c57610137565b806370a08231146102a45780637ecebe00146102ca57806395d89b41146102f05780639e4e7318146102f8578063a0cc6a681461030057610137565b806323b872dd116100ff57806323b872dd1461022357806330adf81f14610259578063313ce567146102615780633408e4701461027f57806342966c681461028757610137565b806304622c2e1461013c57806306fdde0314610156578063095ea7b3146101d357806318160ddd1461021357806318369a2a1461021b575b600080fd5b610144610448565b60408051918252519081900360200190f35b61015e61046c565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610198578181015183820152602001610180565b50505050905090810190601f1680156101c55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ff600480360360408110156101e957600080fd5b506001600160a01b03813516906020013561049c565b604080519115158252519081900360200190f35b6101446104b2565b6101446104b8565b6101ff6004803603606081101561023957600080fd5b506001600160a01b038135811691602081013590911690604001356104c7565b610144610539565b61026961055d565b6040805160ff9092168252519081900360200190f35b610144610562565b6101ff6004803603602081101561029d57600080fd5b5035610566565b610144600480360360208110156102ba57600080fd5b50356001600160a01b031661057a565b610144600480360360208110156102e057600080fd5b50356001600160a01b031661058c565b61015e61059e565b6101446105bd565b6101446105e1565b6101ff6004803603604081101561031e57600080fd5b506001600160a01b038135169060200135610605565b610144610612565b61038d600480360360e081101561035257600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135610636565b005b610144600480360360408110156103a557600080fd5b506001600160a01b0381358116916020013516610736565b61038d60048036036101208110156103d457600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e0810135906101000135610753565b6101ff6004803603604081101561043257600080fd5b506001600160a01b038135169060200135610933565b7f64c0a41a0260272b78f2a5bd50d5ff7c1779bc3bba16dcff4550c7c642b0e4b481565b604051806040016040528060148152602001732432b936b2bd102732ba3bb7b935902a37b5b2b760611b81525081565b60006104a9338484610a12565b50600192915050565b60005481565b6a52b7d2dcc80cd2e400000081565b6001600160a01b03831660009081526002602090815260408083203384529091528120546000198114610523576104fe8184610a74565b6001600160a01b03861660009081526002602090815260408083203384529091529020555b61052e858585610af0565b506001949350505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b4690565b60006105723383610bfa565b506001919050565b60016020526000908152604090205481565b60036020526000908152604090205481565b604051806040016040528060038152602001622422ad60e91b81525081565b7fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc681565b7f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226781565b60006104a9338484610af0565b7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b4284101561068b576040805162461bcd60e51b815260206004820152601960248201527f48455a3a3a7065726d69743a20415554485f4558504952454400000000000000604482015290519081900360640190fd5b6001600160a01b0380881660008181526003602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938a1660608401526080830189905260a083019390935260c08083018890528151808403909101815260e0909201905280519101206107218882868686610c8c565b61072c888888610a12565b5050505050505050565b600260209081526000928352604080842090915290825290205481565b8542116107915760405162461bcd60e51b8152600401808060200182810382526032815260200180610e926032913960400191505060405180910390fd5b8442106107cf5760405162461bcd60e51b815260040180806020018281038252602c815260200180610e44602c913960400191505060405180910390fd5b6001600160a01b038916600090815260046020908152604080832087845290915290205460ff16156108325760405162461bcd60e51b8152600401808060200182810382526031815260200180610eef6031913960400191505060405180910390fd5b604080517f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a22676020808301919091526001600160a01b03808d16838501528b166060830152608082018a905260a0820189905260c0820188905260e08083018890528351808403909101815261010090920190925280519101206108b88a82868686610c8c565b6001600160a01b038a1660009081526004602090815260408083208884529091529020805460ff191660011790556108f18a8a8a610af0565b60405185906001600160a01b038c16907f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a590600090a350505050505050505050565b600460209081526000928352604080842090915290825290205460ff1681565b6040805180820190915260118152704d4154483a4144445f4f564552464c4f5760781b60208201528183019083821015610a0b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109d05781810151838201526020016109b8565b50505050905090810190601f1680156109fd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5092915050565b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6040805180820190915260128152714d4154483a5355425f554e444552464c4f5760701b60208201528183039083821115610a0b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109d05781810151838201526020016109b8565b6001600160a01b0382163014801590610b1157506001600160a01b03821615155b610b4c5760405162461bcd60e51b8152600401808060200182810382526022815260200180610e706022913960400191505060405180910390fd5b6001600160a01b038316600090815260016020526040902054610b6f9082610a74565b6001600160a01b038085166000908152600160205260408082209390935590841681522054610b9e9082610953565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6001600160a01b038216600090815260016020526040902054610c1d9082610a74565b6001600160a01b03831660009081526001602052604081209190915554610c449082610a74565b60009081556040805183815290516001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f64c0a41a0260272b78f2a5bd50d5ff7c1779bc3bba16dcff4550c7c642b0e4b47fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6610cf9610562565b6040805160208082019690965280820194909452606084019290925260808301523060a0808401919091528151808403909101815260c08301825280519084012061190160f01b60e084015260e283018190526101028084018a9052825180850390910181526101228401808452815191860191909120600091829052610142850180855281905260ff8a1661016286015261018285018990526101a285018890529251919550919391926001926101c2808301939192601f198301929081900390910190855afa158015610dd2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610e085750876001600160a01b0316816001600160a01b0316145b61072c5760405162461bcd60e51b815260040180806020018281038252602b815260200180610ec4602b913960400191505060405180910390fdfe48455a3a3a7472616e7366657257697468417574686f72697a6174696f6e3a20415554485f4558504952454448455a3a3a5f7472616e736665723a204e4f545f56414c49445f5452414e5346455248455a3a3a7472616e7366657257697468417574686f72697a6174696f6e3a20415554485f4e4f545f5945545f56414c494448455a3a3a5f76616c69646174655369676e6564446174613a20494e56414c49445f5349474e415455524548455a3a3a7472616e7366657257697468417574686f72697a6174696f6e3a20415554485f414c52454144595f55534544a264697066735822122016ca549a428c475103bb37fad40b1571ba0a864be3450231c0028d4f17385b3b64736f6c634300060c0033" + +// DeployHEZ deploys a new Ethereum contract, binding an instance of HEZ to it. +func DeployHEZ(auth *bind.TransactOpts, backend bind.ContractBackend, initialHolder common.Address) (common.Address, *types.Transaction, *HEZ, error) { + parsed, err := abi.JSON(strings.NewReader(HEZABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(HEZBin), backend, initialHolder) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &HEZ{HEZCaller: HEZCaller{contract: contract}, HEZTransactor: HEZTransactor{contract: contract}, HEZFilterer: HEZFilterer{contract: contract}}, nil +} + +// HEZ is an auto generated Go binding around an Ethereum contract. +type HEZ struct { + HEZCaller // Read-only binding to the contract + HEZTransactor // Write-only binding to the contract + HEZFilterer // Log filterer for contract events +} + +// HEZCaller is an auto generated read-only Go binding around an Ethereum contract. +type HEZCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HEZTransactor is an auto generated write-only Go binding around an Ethereum contract. +type HEZTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HEZFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type HEZFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// HEZSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type HEZSession struct { + Contract *HEZ // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// HEZCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type HEZCallerSession struct { + Contract *HEZCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// HEZTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type HEZTransactorSession struct { + Contract *HEZTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// HEZRaw is an auto generated low-level Go binding around an Ethereum contract. +type HEZRaw struct { + Contract *HEZ // Generic contract binding to access the raw methods on +} + +// HEZCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type HEZCallerRaw struct { + Contract *HEZCaller // Generic read-only contract binding to access the raw methods on +} + +// HEZTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type HEZTransactorRaw struct { + Contract *HEZTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewHEZ creates a new instance of HEZ, bound to a specific deployed contract. +func NewHEZ(address common.Address, backend bind.ContractBackend) (*HEZ, error) { + contract, err := bindHEZ(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &HEZ{HEZCaller: HEZCaller{contract: contract}, HEZTransactor: HEZTransactor{contract: contract}, HEZFilterer: HEZFilterer{contract: contract}}, nil +} + +// NewHEZCaller creates a new read-only instance of HEZ, bound to a specific deployed contract. +func NewHEZCaller(address common.Address, caller bind.ContractCaller) (*HEZCaller, error) { + contract, err := bindHEZ(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &HEZCaller{contract: contract}, nil +} + +// NewHEZTransactor creates a new write-only instance of HEZ, bound to a specific deployed contract. +func NewHEZTransactor(address common.Address, transactor bind.ContractTransactor) (*HEZTransactor, error) { + contract, err := bindHEZ(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &HEZTransactor{contract: contract}, nil +} + +// NewHEZFilterer creates a new log filterer instance of HEZ, bound to a specific deployed contract. +func NewHEZFilterer(address common.Address, filterer bind.ContractFilterer) (*HEZFilterer, error) { + contract, err := bindHEZ(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &HEZFilterer{contract: contract}, nil +} + +// bindHEZ binds a generic wrapper to an already deployed contract. +func bindHEZ(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(HEZABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_HEZ *HEZRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _HEZ.Contract.HEZCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_HEZ *HEZRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HEZ.Contract.HEZTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HEZ *HEZRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HEZ.Contract.HEZTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_HEZ *HEZCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _HEZ.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_HEZ *HEZTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _HEZ.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_HEZ *HEZTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _HEZ.Contract.contract.Transact(opts, method, params...) +} + +// EIP712DOMAINHASH is a free data retrieval call binding the contract method 0xc473af33. +// +// Solidity: function EIP712DOMAIN_HASH() view returns(bytes32) +func (_HEZ *HEZCaller) EIP712DOMAINHASH(opts *bind.CallOpts) ([32]byte, error) { + var ( + ret0 = new([32]byte) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "EIP712DOMAIN_HASH") + return *ret0, err +} + +// EIP712DOMAINHASH is a free data retrieval call binding the contract method 0xc473af33. +// +// Solidity: function EIP712DOMAIN_HASH() view returns(bytes32) +func (_HEZ *HEZSession) EIP712DOMAINHASH() ([32]byte, error) { + return _HEZ.Contract.EIP712DOMAINHASH(&_HEZ.CallOpts) +} + +// EIP712DOMAINHASH is a free data retrieval call binding the contract method 0xc473af33. +// +// Solidity: function EIP712DOMAIN_HASH() view returns(bytes32) +func (_HEZ *HEZCallerSession) EIP712DOMAINHASH() ([32]byte, error) { + return _HEZ.Contract.EIP712DOMAINHASH(&_HEZ.CallOpts) +} + +// NAMEHASH is a free data retrieval call binding the contract method 0x04622c2e. +// +// Solidity: function NAME_HASH() view returns(bytes32) +func (_HEZ *HEZCaller) NAMEHASH(opts *bind.CallOpts) ([32]byte, error) { + var ( + ret0 = new([32]byte) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "NAME_HASH") + return *ret0, err +} + +// NAMEHASH is a free data retrieval call binding the contract method 0x04622c2e. +// +// Solidity: function NAME_HASH() view returns(bytes32) +func (_HEZ *HEZSession) NAMEHASH() ([32]byte, error) { + return _HEZ.Contract.NAMEHASH(&_HEZ.CallOpts) +} + +// NAMEHASH is a free data retrieval call binding the contract method 0x04622c2e. +// +// Solidity: function NAME_HASH() view returns(bytes32) +func (_HEZ *HEZCallerSession) NAMEHASH() ([32]byte, error) { + return _HEZ.Contract.NAMEHASH(&_HEZ.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_HEZ *HEZCaller) PERMITTYPEHASH(opts *bind.CallOpts) ([32]byte, error) { + var ( + ret0 = new([32]byte) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "PERMIT_TYPEHASH") + return *ret0, err +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_HEZ *HEZSession) PERMITTYPEHASH() ([32]byte, error) { + return _HEZ.Contract.PERMITTYPEHASH(&_HEZ.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_HEZ *HEZCallerSession) PERMITTYPEHASH() ([32]byte, error) { + return _HEZ.Contract.PERMITTYPEHASH(&_HEZ.CallOpts) +} + +// TRANSFERWITHAUTHORIZATIONTYPEHASH is a free data retrieval call binding the contract method 0xa0cc6a68. +// +// Solidity: function TRANSFER_WITH_AUTHORIZATION_TYPEHASH() view returns(bytes32) +func (_HEZ *HEZCaller) TRANSFERWITHAUTHORIZATIONTYPEHASH(opts *bind.CallOpts) ([32]byte, error) { + var ( + ret0 = new([32]byte) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "TRANSFER_WITH_AUTHORIZATION_TYPEHASH") + return *ret0, err +} + +// TRANSFERWITHAUTHORIZATIONTYPEHASH is a free data retrieval call binding the contract method 0xa0cc6a68. +// +// Solidity: function TRANSFER_WITH_AUTHORIZATION_TYPEHASH() view returns(bytes32) +func (_HEZ *HEZSession) TRANSFERWITHAUTHORIZATIONTYPEHASH() ([32]byte, error) { + return _HEZ.Contract.TRANSFERWITHAUTHORIZATIONTYPEHASH(&_HEZ.CallOpts) +} + +// TRANSFERWITHAUTHORIZATIONTYPEHASH is a free data retrieval call binding the contract method 0xa0cc6a68. +// +// Solidity: function TRANSFER_WITH_AUTHORIZATION_TYPEHASH() view returns(bytes32) +func (_HEZ *HEZCallerSession) TRANSFERWITHAUTHORIZATIONTYPEHASH() ([32]byte, error) { + return _HEZ.Contract.TRANSFERWITHAUTHORIZATIONTYPEHASH(&_HEZ.CallOpts) +} + +// VERSIONHASH is a free data retrieval call binding the contract method 0x9e4e7318. +// +// Solidity: function VERSION_HASH() view returns(bytes32) +func (_HEZ *HEZCaller) VERSIONHASH(opts *bind.CallOpts) ([32]byte, error) { + var ( + ret0 = new([32]byte) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "VERSION_HASH") + return *ret0, err +} + +// VERSIONHASH is a free data retrieval call binding the contract method 0x9e4e7318. +// +// Solidity: function VERSION_HASH() view returns(bytes32) +func (_HEZ *HEZSession) VERSIONHASH() ([32]byte, error) { + return _HEZ.Contract.VERSIONHASH(&_HEZ.CallOpts) +} + +// VERSIONHASH is a free data retrieval call binding the contract method 0x9e4e7318. +// +// Solidity: function VERSION_HASH() view returns(bytes32) +func (_HEZ *HEZCallerSession) VERSIONHASH() ([32]byte, error) { + return _HEZ.Contract.VERSIONHASH(&_HEZ.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_HEZ *HEZCaller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "allowance", arg0, arg1) + return *ret0, err +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_HEZ *HEZSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _HEZ.Contract.Allowance(&_HEZ.CallOpts, arg0, arg1) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_HEZ *HEZCallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _HEZ.Contract.Allowance(&_HEZ.CallOpts, arg0, arg1) +} + +// AuthorizationState is a free data retrieval call binding the contract method 0xe94a0102. +// +// Solidity: function authorizationState(address , bytes32 ) view returns(bool) +func (_HEZ *HEZCaller) AuthorizationState(opts *bind.CallOpts, arg0 common.Address, arg1 [32]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "authorizationState", arg0, arg1) + return *ret0, err +} + +// AuthorizationState is a free data retrieval call binding the contract method 0xe94a0102. +// +// Solidity: function authorizationState(address , bytes32 ) view returns(bool) +func (_HEZ *HEZSession) AuthorizationState(arg0 common.Address, arg1 [32]byte) (bool, error) { + return _HEZ.Contract.AuthorizationState(&_HEZ.CallOpts, arg0, arg1) +} + +// AuthorizationState is a free data retrieval call binding the contract method 0xe94a0102. +// +// Solidity: function authorizationState(address , bytes32 ) view returns(bool) +func (_HEZ *HEZCallerSession) AuthorizationState(arg0 common.Address, arg1 [32]byte) (bool, error) { + return _HEZ.Contract.AuthorizationState(&_HEZ.CallOpts, arg0, arg1) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_HEZ *HEZCaller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "balanceOf", arg0) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_HEZ *HEZSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _HEZ.Contract.BalanceOf(&_HEZ.CallOpts, arg0) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_HEZ *HEZCallerSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _HEZ.Contract.BalanceOf(&_HEZ.CallOpts, arg0) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_HEZ *HEZCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var ( + ret0 = new(uint8) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "decimals") + return *ret0, err +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_HEZ *HEZSession) Decimals() (uint8, error) { + return _HEZ.Contract.Decimals(&_HEZ.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_HEZ *HEZCallerSession) Decimals() (uint8, error) { + return _HEZ.Contract.Decimals(&_HEZ.CallOpts) +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() pure returns(uint256 chainId) +func (_HEZ *HEZCaller) GetChainId(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "getChainId") + return *ret0, err +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() pure returns(uint256 chainId) +func (_HEZ *HEZSession) GetChainId() (*big.Int, error) { + return _HEZ.Contract.GetChainId(&_HEZ.CallOpts) +} + +// GetChainId is a free data retrieval call binding the contract method 0x3408e470. +// +// Solidity: function getChainId() pure returns(uint256 chainId) +func (_HEZ *HEZCallerSession) GetChainId() (*big.Int, error) { + return _HEZ.Contract.GetChainId(&_HEZ.CallOpts) +} + +// InitialBalance is a free data retrieval call binding the contract method 0x18369a2a. +// +// Solidity: function initialBalance() view returns(uint256) +func (_HEZ *HEZCaller) InitialBalance(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "initialBalance") + return *ret0, err +} + +// InitialBalance is a free data retrieval call binding the contract method 0x18369a2a. +// +// Solidity: function initialBalance() view returns(uint256) +func (_HEZ *HEZSession) InitialBalance() (*big.Int, error) { + return _HEZ.Contract.InitialBalance(&_HEZ.CallOpts) +} + +// InitialBalance is a free data retrieval call binding the contract method 0x18369a2a. +// +// Solidity: function initialBalance() view returns(uint256) +func (_HEZ *HEZCallerSession) InitialBalance() (*big.Int, error) { + return _HEZ.Contract.InitialBalance(&_HEZ.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_HEZ *HEZCaller) Name(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "name") + return *ret0, err +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_HEZ *HEZSession) Name() (string, error) { + return _HEZ.Contract.Name(&_HEZ.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_HEZ *HEZCallerSession) Name() (string, error) { + return _HEZ.Contract.Name(&_HEZ.CallOpts) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_HEZ *HEZCaller) Nonces(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "nonces", arg0) + return *ret0, err +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_HEZ *HEZSession) Nonces(arg0 common.Address) (*big.Int, error) { + return _HEZ.Contract.Nonces(&_HEZ.CallOpts, arg0) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_HEZ *HEZCallerSession) Nonces(arg0 common.Address) (*big.Int, error) { + return _HEZ.Contract.Nonces(&_HEZ.CallOpts, arg0) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_HEZ *HEZCaller) Symbol(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "symbol") + return *ret0, err +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_HEZ *HEZSession) Symbol() (string, error) { + return _HEZ.Contract.Symbol(&_HEZ.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_HEZ *HEZCallerSession) Symbol() (string, error) { + return _HEZ.Contract.Symbol(&_HEZ.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_HEZ *HEZCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _HEZ.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_HEZ *HEZSession) TotalSupply() (*big.Int, error) { + return _HEZ.Contract.TotalSupply(&_HEZ.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_HEZ *HEZCallerSession) TotalSupply() (*big.Int, error) { + return _HEZ.Contract.TotalSupply(&_HEZ.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_HEZ *HEZTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _HEZ.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_HEZ *HEZSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _HEZ.Contract.Approve(&_HEZ.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_HEZ *HEZTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _HEZ.Contract.Approve(&_HEZ.TransactOpts, spender, value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 value) returns(bool) +func (_HEZ *HEZTransactor) Burn(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) { + return _HEZ.contract.Transact(opts, "burn", value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 value) returns(bool) +func (_HEZ *HEZSession) Burn(value *big.Int) (*types.Transaction, error) { + return _HEZ.Contract.Burn(&_HEZ.TransactOpts, value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 value) returns(bool) +func (_HEZ *HEZTransactorSession) Burn(value *big.Int) (*types.Transaction, error) { + return _HEZ.Contract.Burn(&_HEZ.TransactOpts, value) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_HEZ *HEZTransactor) Permit(opts *bind.TransactOpts, owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _HEZ.contract.Transact(opts, "permit", owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_HEZ *HEZSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _HEZ.Contract.Permit(&_HEZ.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_HEZ *HEZTransactorSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _HEZ.Contract.Permit(&_HEZ.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_HEZ *HEZTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _HEZ.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_HEZ *HEZSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _HEZ.Contract.Transfer(&_HEZ.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_HEZ *HEZTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _HEZ.Contract.Transfer(&_HEZ.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_HEZ *HEZTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _HEZ.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_HEZ *HEZSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _HEZ.Contract.TransferFrom(&_HEZ.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_HEZ *HEZTransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _HEZ.Contract.TransferFrom(&_HEZ.TransactOpts, from, to, value) +} + +// TransferWithAuthorization is a paid mutator transaction binding the contract method 0xe3ee160e. +// +// Solidity: function transferWithAuthorization(address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) returns() +func (_HEZ *HEZTransactor) TransferWithAuthorization(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int, validAfter *big.Int, validBefore *big.Int, nonce [32]byte, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _HEZ.contract.Transact(opts, "transferWithAuthorization", from, to, value, validAfter, validBefore, nonce, v, r, s) +} + +// TransferWithAuthorization is a paid mutator transaction binding the contract method 0xe3ee160e. +// +// Solidity: function transferWithAuthorization(address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) returns() +func (_HEZ *HEZSession) TransferWithAuthorization(from common.Address, to common.Address, value *big.Int, validAfter *big.Int, validBefore *big.Int, nonce [32]byte, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _HEZ.Contract.TransferWithAuthorization(&_HEZ.TransactOpts, from, to, value, validAfter, validBefore, nonce, v, r, s) +} + +// TransferWithAuthorization is a paid mutator transaction binding the contract method 0xe3ee160e. +// +// Solidity: function transferWithAuthorization(address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) returns() +func (_HEZ *HEZTransactorSession) TransferWithAuthorization(from common.Address, to common.Address, value *big.Int, validAfter *big.Int, validBefore *big.Int, nonce [32]byte, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _HEZ.Contract.TransferWithAuthorization(&_HEZ.TransactOpts, from, to, value, validAfter, validBefore, nonce, v, r, s) +} + +// HEZApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the HEZ contract. +type HEZApprovalIterator struct { + Event *HEZApproval // 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 *HEZApprovalIterator) 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(HEZApproval) + 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(HEZApproval) + 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 *HEZApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HEZApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HEZApproval represents a Approval event raised by the HEZ contract. +type HEZApproval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_HEZ *HEZFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*HEZApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _HEZ.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &HEZApprovalIterator{contract: _HEZ.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_HEZ *HEZFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *HEZApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _HEZ.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + 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(HEZApproval) + if err := _HEZ.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_HEZ *HEZFilterer) ParseApproval(log types.Log) (*HEZApproval, error) { + event := new(HEZApproval) + if err := _HEZ.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// HEZAuthorizationUsedIterator is returned from FilterAuthorizationUsed and is used to iterate over the raw logs and unpacked data for AuthorizationUsed events raised by the HEZ contract. +type HEZAuthorizationUsedIterator struct { + Event *HEZAuthorizationUsed // 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 *HEZAuthorizationUsedIterator) 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(HEZAuthorizationUsed) + 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(HEZAuthorizationUsed) + 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 *HEZAuthorizationUsedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HEZAuthorizationUsedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HEZAuthorizationUsed represents a AuthorizationUsed event raised by the HEZ contract. +type HEZAuthorizationUsed struct { + Authorizer common.Address + Nonce [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAuthorizationUsed is a free log retrieval operation binding the contract event 0x98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a5. +// +// Solidity: event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce) +func (_HEZ *HEZFilterer) FilterAuthorizationUsed(opts *bind.FilterOpts, authorizer []common.Address, nonce [][32]byte) (*HEZAuthorizationUsedIterator, error) { + + var authorizerRule []interface{} + for _, authorizerItem := range authorizer { + authorizerRule = append(authorizerRule, authorizerItem) + } + var nonceRule []interface{} + for _, nonceItem := range nonce { + nonceRule = append(nonceRule, nonceItem) + } + + logs, sub, err := _HEZ.contract.FilterLogs(opts, "AuthorizationUsed", authorizerRule, nonceRule) + if err != nil { + return nil, err + } + return &HEZAuthorizationUsedIterator{contract: _HEZ.contract, event: "AuthorizationUsed", logs: logs, sub: sub}, nil +} + +// WatchAuthorizationUsed is a free log subscription operation binding the contract event 0x98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a5. +// +// Solidity: event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce) +func (_HEZ *HEZFilterer) WatchAuthorizationUsed(opts *bind.WatchOpts, sink chan<- *HEZAuthorizationUsed, authorizer []common.Address, nonce [][32]byte) (event.Subscription, error) { + + var authorizerRule []interface{} + for _, authorizerItem := range authorizer { + authorizerRule = append(authorizerRule, authorizerItem) + } + var nonceRule []interface{} + for _, nonceItem := range nonce { + nonceRule = append(nonceRule, nonceItem) + } + + logs, sub, err := _HEZ.contract.WatchLogs(opts, "AuthorizationUsed", authorizerRule, nonceRule) + 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(HEZAuthorizationUsed) + if err := _HEZ.contract.UnpackLog(event, "AuthorizationUsed", 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 +} + +// ParseAuthorizationUsed is a log parse operation binding the contract event 0x98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a5. +// +// Solidity: event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce) +func (_HEZ *HEZFilterer) ParseAuthorizationUsed(log types.Log) (*HEZAuthorizationUsed, error) { + event := new(HEZAuthorizationUsed) + if err := _HEZ.contract.UnpackLog(event, "AuthorizationUsed", log); err != nil { + return nil, err + } + return event, nil +} + +// HEZTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the HEZ contract. +type HEZTransferIterator struct { + Event *HEZTransfer // 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 *HEZTransferIterator) 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(HEZTransfer) + 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(HEZTransfer) + 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 *HEZTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *HEZTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// HEZTransfer represents a Transfer event raised by the HEZ contract. +type HEZTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_HEZ *HEZFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*HEZTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _HEZ.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &HEZTransferIterator{contract: _HEZ.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_HEZ *HEZFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *HEZTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _HEZ.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + 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(HEZTransfer) + if err := _HEZ.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_HEZ *HEZFilterer) ParseTransfer(log types.Log) (*HEZTransfer, error) { + event := new(HEZTransfer) + if err := _HEZ.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} diff --git a/eth/contracts/withdrawdelayer/WithdrawalDelayer.go b/eth/contracts/withdrawdelayer/WithdrawalDelayer.go index 41a0f44..57a1784 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\"},{\"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\"}]" +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\":\"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 = "0x608060405234801561001057600080fd5b50611f43806100206000396000f3fe6080604052600436106101295760003560e01c8063580fc611116100ab578063ae7efbbd1161006f578063ae7efbbd146104f1578063b4b8e39d14610506578063c5b1c7d01461051b578063cfc0b64114610530578063d82b217c14610570578063de35f282146105a357610129565b8063580fc61114610420578063668cdd67146104355780637fd6b1021461044a578063a238f9df1461048d578063acfd6ea8146104be57610129565b806320a194b8116100f257806320a194b8146102f8578063305887f91461032157806336e566ed146103365780633d4dff7b14610390578063493b0170146103e557610129565b806223de291461012e57806303160940146102275780630a4db01b146102615780630e670af5146102945780630fd266d7146102c7575b600080fd5b34801561013a57600080fd5b50610225600480360360c081101561015157600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a08101608082013564010000000081111561019457600080fd5b8201836020820111156101a657600080fd5b803590602001918460018302840111640100000000831117156101c857600080fd5b9193909290916020810190356401000000008111156101e657600080fd5b8201836020820111156101f857600080fd5b8035906020019184600183028401116401000000008311171561021a57600080fd5b5090925090506105de565b005b34801561023357600080fd5b5061023c610830565b604080516fffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561026d57600080fd5b506102256004803603602081101561028457600080fd5b50356001600160a01b031661083f565b3480156102a057600080fd5b50610225600480360360208110156102b757600080fd5b50356001600160401b03166108eb565b3480156102d357600080fd5b506102dc610a1b565b604080516001600160a01b039092168252519081900360200190f35b34801561030457600080fd5b5061030d610a2a565b604080519115158252519081900360200190f35b34801561032d57600080fd5b506102dc610a3a565b34801561034257600080fd5b50610225600480360360a081101561035957600080fd5b506001600160401b03813516906001600160a01b036020820135811691604081013582169160608201358116916080013516610a49565b34801561039c57600080fd5b506103ba600480360360208110156103b357600080fd5b5035610bfc565b604080516001600160c01b0390931683526001600160401b0390911660208301528051918290030190f35b3480156103f157600080fd5b506103ba6004803603604081101561040857600080fd5b506001600160a01b0381358116916020013516610c29565b34801561042c57600080fd5b506102dc610cba565b34801561044157600080fd5b5061023c610cc9565b34801561045657600080fd5b506102256004803603606081101561046d57600080fd5b506001600160a01b03813581169160208101359091169060400135610cdf565b34801561049957600080fd5b506104a2610f0b565b604080516001600160401b039092168252519081900360200190f35b3480156104ca57600080fd5b50610225600480360360208110156104e157600080fd5b50356001600160a01b0316610f12565b3480156104fd57600080fd5b506102dc610fcb565b34801561051257600080fd5b506104a2610fda565b34801561052757600080fd5b50610225610fe1565b6102256004803603606081101561054657600080fd5b5080356001600160a01b0390811691602081013590911690604001356001600160c01b0316611109565b34801561057c57600080fd5b506102256004803603602081101561059357600080fd5b50356001600160a01b031661150a565b3480156105af57600080fd5b50610225600480360360408110156105c657600080fd5b506001600160a01b03813581169160200135166115c3565b60335460ff16610623576040805162461bcd60e51b815260206004820152601f6024820152600080516020611e9b833981519152604482015290519081900360640190fd5b6033805460ff191690556069546001600160a01b0388811691161461068a576040805162461bcd60e51b81526020600482015260186024820152774f6e6c79206865726d657a526f6c6c75704164647265737360401b604482015290519081900360640190fd5b826106cd576040805162461bcd60e51b815260206004820152600e60248201526d557365724461746120656d70747960901b604482015290519081900360640190fd5b6000848460208110156106df57600080fd5b506040805180820190915260208082527f6465706f73697428616464726573732c616464726573732c75696e7431393229910152356001600160e01b031916905063cfc0b64160e01b8114156107d45760008080610740876004818b611e72565b606081101561074e57600080fd5b5080356001600160a01b0390811694506020820135169250604001356001600160c01b031690508881146107c1576040805162461bcd60e51b8152602060048201526015602482015274105b5bdd5b9d081cd95b9d08191a5999995c995b9d605a1b604482015290519081900360640190fd5b6107cc833383611835565b505050610818565b6040805162461bcd60e51b81526020600482015260146024820152734e6f7420612076616c69642063616c6c6461746160601b604482015290519081900360640190fd5b50506033805460ff1916600117905550505050505050565b6065546001600160401b031690565b6067546001600160a01b03163314610891576040805162461bcd60e51b815260206004820152601060248201526f4f6e6c7920574847206164647265737360801b604482015290519081900360640190fd5b606780546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f284ca073b8bdde2195ae98779277678773a99d7739e5f0477dc19a03fc689011916020908290030190a150565b6068546001600160a01b031633148061090e57506069546001600160a01b031633145b61095f576040805162461bcd60e51b815260206004820152601c60248201527f4f6e6c79206865726d657a206b6565706572206f7220726f6c6c757000000000604482015290519081900360640190fd5b621275006001600160401b03821611156109c0576040805162461bcd60e51b815260206004820152601c60248201527f45786365656473204d41585f5749544844524157414c5f44454c415900000000604482015290519081900360640190fd5b6065805467ffffffffffffffff19166001600160401b03838116919091179182905560408051929091168252517f6b3670ab51e04a9da086741e5fd1eb36ffaf1d661a15330c528e1f3e0c8722d7916020908290030190a150565b6069546001600160a01b031681565b606854600160a01b900460ff1690565b6068546001600160a01b031690565b600054610100900460ff1680610a625750610a6261197d565b80610a70575060005460ff16155b610aab5760405162461bcd60e51b815260040180806020018281038252602e815260200180611ee0602e913960400191505060405180910390fd5b600054610100900460ff16158015610ad6576000805460ff1961ff0019909116610100171660011790555b610ade611983565b6065805467ffffffffffffffff19166001600160401b038816179055606980546001600160a01b03199081166001600160a01b0388811691909117909255606880546066805484168886161790556067805484168786161790559091169186169190911760ff60a01b19169055604080516329965a1d60e01b815230600482018190527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b602483015260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad24916329965a1d91606480830192600092919082900301818387803b158015610bca57600080fd5b505af1158015610bde573d6000803e3d6000fd5b505050508015610bf4576000805461ff00191690555b505050505050565b606a602052600090815260409020546001600160c01b03811690600160c01b90046001600160401b031682565b600080610c34611e5b565b505060408051606094851b6001600160601b03199081166020808401919091529490951b909416603485015280518085036028018152604885018083528151918501919091206000908152606a9094529281902060888501909152546001600160c01b03811692839052600160c01b90046001600160401b031660689093018390525091565b6066546001600160a01b031690565b606554600160401b90046001600160401b031690565b60335460ff16610d24576040805162461bcd60e51b815260206004820152601f6024820152600080516020611e9b833981519152604482015290519081900360640190fd5b6033805460ff19169055606854600160a01b900460ff16610d82576040805162461bcd60e51b81526020600482015260136024820152724f6e6c7920456d657267656e6379204d6f646560681b604482015290519081900360640190fd5b6067546001600160a01b0316331480610da557506066546001600160a01b031633145b610df6576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c7920476f7665726e616e636544414f206f722057484700000000000000604482015290519081900360640190fd5b6067546001600160a01b0316331415610e7c576065546001600160401b03600160401b909104811662eff100018116429091161015610e7c576040805162461bcd60e51b815260206004820152601a60248201527f4e4f204d41585f454d455247454e43595f4d4f44455f54494d45000000000000604482015290519081900360640190fd5b6001600160a01b038216610e9957610e948382611a32565b610ea4565b610ea4828483611ad3565b816001600160a01b0316836001600160a01b0316336001600160a01b03167fde200220117ba95c9a6c4a1a13bb06b0b7be90faa85c8fb4576630119f891693846040518082815260200191505060405180910390a450506033805460ff1916600117905550565b6212750081565b6066546001600160a01b03163314610f71576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79204865726d657a20476f7665726e616e63652044414f000000000000604482015290519081900360640190fd5b606680546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f03683be8debd93f8f5ff23dd03419bfcb9b8287a1868b0f130d858f03c3a08a1916020908290030190a150565b6067546001600160a01b031690565b62eff10081565b6068546001600160a01b03163314611040576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c79206865726d657a4b6565706572416464726573730000000000000000604482015290519081900360640190fd5b606854600160a01b900460ff161561109f576040805162461bcd60e51b815260206004820152601e60248201527f456d657267656e6379206d6f646520616c726561647920656e61626c65640000604482015290519081900360640190fd5b6068805460ff60a01b1916600160a01b179055606580546001600160401b034216600160401b026fffffffffffffffff0000000000000000199091161790556040517f2064d51aa5a8bd67928c7675e267e05c67ad5adf7c9098d0a602d01f36fda9c590600090a1565b60335460ff1661114e576040805162461bcd60e51b815260206004820152601f6024820152600080516020611e9b833981519152604482015290519081900360640190fd5b6033805460ff191690556069546001600160a01b031633146111b2576040805162461bcd60e51b81526020600482015260186024820152774f6e6c79206865726d657a526f6c6c75704164647265737360401b604482015290519081900360640190fd5b3415611276576001600160a01b03821615611214576040805162461bcd60e51b815260206004820152601d60248201527f4554482073686f756c6420626520746865203078302061646472657373000000604482015290519081900360640190fd5b34816001600160c01b031614611271576040805162461bcd60e51b815260206004820152601e60248201527f446966666572656e7420616d6f756e7420616e64206d73672e76616c75650000604482015290519081900360640190fd5b6114ed565b60695460408051636eb1769f60e11b81526001600160a01b03928316600482015230602482015290516001600160c01b0384169285169163dd62ed3e916044808301926020929190829003018186803b1580156112d257600080fd5b505afa1580156112e6573d6000803e3d6000fd5b505050506040513d60208110156112fc57600080fd5b50511015611351576040805162461bcd60e51b815260206004820152601d60248201527f446f65736e2774206861766520656e6f75676820616c6c6f77616e6365000000604482015290519081900360640190fd5b60006060836001600160a01b0316604051806060016040528060258152602001611ebb602591398051602091820120606954604080516001600160a01b0390921660248301523060448301526001600160c01b038816606480840191909152815180840390910181526084909201815292810180516001600160e01b03166001600160e01b031990931692909217825291518251909182918083835b6020831061140c5780518252601f1990920191602091820191016113ed565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461146e576040519150601f19603f3d011682016040523d82523d6000602084013e611473565b606091505b50915091508180156114a15750805115806114a1575080806020019051602081101561149e57600080fd5b50515b6114ea576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b50505b6114f8838383611835565b50506033805460ff1916600117905550565b6068546001600160a01b03163314611569576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79204865726d657a204b65657065722041646472657373000000000000604482015290519081900360640190fd5b606880546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517fc1e9be84fce652abec6a6944f7ec5bbb40de18caa44c285b05a0de7e3ad9d016916020908290030190a150565b60335460ff16611608576040805162461bcd60e51b815260206004820152601f6024820152600080516020611e9b833981519152604482015290519081900360640190fd5b6033805460ff19169055606854600160a01b900460ff1615611662576040805162461bcd60e51b815260206004820152600e60248201526d456d657267656e6379206d6f646560901b604482015290519081900360640190fd5b60408051606084811b6001600160601b03199081166020808501919091529185901b16603483015282518083036028018152604890920183528151918101919091206000818152606a909252919020546001600160c01b031680611704576040805162461bcd60e51b81526020600482015260146024820152734e6f2066756e647320746f20776974686472617760601b604482015290519081900360640190fd5b6065546000838152606a60205260409020546001600160401b03918216600160c01b9091048216018116429091161015611785576040805162461bcd60e51b815260206004820152601a60248201527f5769746864726177616c206e6f7420616c6c6f77656420796574000000000000604482015290519081900360640190fd5b6000828152606a60205260408120556001600160a01b0383166117ba576117b584826001600160c01b0316611a32565b6117ce565b6117ce8385836001600160c01b0316611ad3565b836001600160a01b0316836001600160a01b03167f72608e45b52a95a12c2ac7f15ff53f92fc9572c9d84b6e6b5d7f0f7826cf32718360405180826001600160c01b0316815260200191505060405180910390a350506033805460ff191660011790555050565b60408051606085811b6001600160601b03199081166020808501919091529186901b16603483015282518083036028018152604890920183528151918101919091206000818152606a909252919020546001600160c01b0390811683810191821610156118dc576040805162461bcd60e51b815260206004820152601060248201526f4465706f736974206f766572666c6f7760801b604482015290519081900360640190fd5b6000828152606a602090815260409182902080546001600160401b03428116600160c01b9081026001600160c01b038089166001600160c01b03199095169490941784161793849055855192891683529092049091169181019190915281516001600160a01b0380881693908916927f41219b99485f78192a5b9b1be28c7d53c3a2bdbe7900ae40c79fae8d9d6108fd929081900390910190a35050505050565b303b1590565b600054610100900460ff168061199c575061199c61197d565b806119aa575060005460ff16155b6119e55760405162461bcd60e51b815260040180806020018281038252602e815260200180611ee0602e913960400191505060405180910390fd5b600054610100900460ff16158015611a10576000805460ff1961ff0019909116610100171660011790555b6033805460ff191660011790558015611a2f576000805461ff00191690555b50565b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114611a7d576040519150601f19603f3d011682016040523d82523d6000602084013e611a82565b606091505b5050905080611ace576040805162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b604482015290519081900360640190fd5b505050565b6040805163555ddc6560e11b81526001600160a01b03851660048201527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce21770546024820152905160009160609183918291731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca916044808301926020929190829003018186803b158015611b5d57600080fd5b505afa158015611b71573d6000803e3d6000fd5b505050506040513d6020811015611b8757600080fd5b50516001600160a01b03161415611b9f576000611ba2565b60015b90508015611cd257604080518082018252601b81527f73656e6428616464726573732c75696e743235362c627974657329000000000060209182015281516001600160a01b038881166024830152604482018890526060606483015260006084830152835180830360a401815260c4909201845291810180516001600160e01b0316634decdde360e11b17815292518151928a16939192909182918083835b60208310611c605780518252601f199092019160209182019101611c41565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611cc2576040519150601f19603f3d011682016040523d82523d6000602084013e611cc7565b606091505b509093509150611de9565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0388811660248301526044808301899052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b17815292518151928a16939192909182918083835b60208310611d7b5780518252601f199092019160209182019101611d5c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611ddd576040519150601f19603f3d011682016040523d82523d6000602084013e611de2565b606091505b5090935091505b828015611e12575081511580611e125750818060200190516020811015611e0f57600080fd5b50515b610bf4576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b604080518082019091526000808252602082015290565b60008085851115611e81578182fd5b83861115611e8d578182fd5b505082019391909203915056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c007472616e7366657246726f6d28616464726573732c616464726573732c75696e7432353629436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a26469706673582212208627d01a36cb65caf417b630b097c562d21a655bf5c386bcdde1eafb9d94cf7464736f6c634300060c0033" +var WithdrawalDelayerBin = "0x608060405234801561001057600080fd5b50611956806100206000396000f3fe60806040526004361061011f5760003560e01c8063668cdd67116100a0578063b4b8e39d11610064578063b4b8e39d14610405578063c5b1c7d01461041a578063cfc0b6411461042f578063d82b217c1461046f578063de35f282146104a25761011f565b8063668cdd67146103345780637fd6b10214610349578063a238f9df1461038c578063acfd6ea8146103bd578063ae7efbbd146103f05761011f565b8063305887f9116100e7578063305887f91461022057806336e566ed146102355780633d4dff7b1461028f578063493b0170146102e4578063580fc6111461031f5761011f565b806303160940146101245780630a4db01b1461015e5780630e670af5146101935780630fd266d7146101c657806320a194b8146101f7575b600080fd5b34801561013057600080fd5b506101396104dd565b604080516fffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561016a57600080fd5b506101916004803603602081101561018157600080fd5b50356001600160a01b03166104ec565b005b34801561019f57600080fd5b50610191600480360360208110156101b657600080fd5b50356001600160401b0316610598565b3480156101d257600080fd5b506101db6106c8565b604080516001600160a01b039092168252519081900360200190f35b34801561020357600080fd5b5061020c6106d7565b604080519115158252519081900360200190f35b34801561022c57600080fd5b506101db6106e7565b34801561024157600080fd5b50610191600480360360a081101561025857600080fd5b506001600160401b03813516906001600160a01b0360208201358116916040810135821691606082013581169160800135166106f6565b34801561029b57600080fd5b506102b9600480360360208110156102b257600080fd5b5035610812565b604080516001600160c01b0390931683526001600160401b0390911660208301528051918290030190f35b3480156102f057600080fd5b506102b96004803603604081101561030757600080fd5b506001600160a01b038135811691602001351661083f565b34801561032b57600080fd5b506101db6108d0565b34801561034057600080fd5b506101396108df565b34801561035557600080fd5b506101916004803603606081101561036c57600080fd5b506001600160a01b038135811691602081013590911690604001356108f5565b34801561039857600080fd5b506103a1610b33565b604080516001600160401b039092168252519081900360200190f35b3480156103c957600080fd5b50610191600480360360208110156103e057600080fd5b50356001600160a01b0316610b3a565b3480156103fc57600080fd5b506101db610bf3565b34801561041157600080fd5b506103a1610c02565b34801561042657600080fd5b50610191610c09565b6101916004803603606081101561044557600080fd5b5080356001600160a01b0390811691602081013590911690604001356001600160c01b0316610d31565b34801561047b57600080fd5b506101916004803603602081101561049257600080fd5b50356001600160a01b0316611149565b3480156104ae57600080fd5b50610191600480360360408110156104c557600080fd5b506001600160a01b0381358116916020013516611202565b6065546001600160401b031690565b6067546001600160a01b0316331461053e576040805162461bcd60e51b815260206004820152601060248201526f4f6e6c7920574847206164647265737360801b604482015290519081900360640190fd5b606780546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f284ca073b8bdde2195ae98779277678773a99d7739e5f0477dc19a03fc689011916020908290030190a150565b6068546001600160a01b03163314806105bb57506069546001600160a01b031633145b61060c576040805162461bcd60e51b815260206004820152601c60248201527f4f6e6c79206865726d657a206b6565706572206f7220726f6c6c757000000000604482015290519081900360640190fd5b621275006001600160401b038216111561066d576040805162461bcd60e51b815260206004820152601c60248201527f45786365656473204d41585f5749544844524157414c5f44454c415900000000604482015290519081900360640190fd5b6065805467ffffffffffffffff19166001600160401b03838116919091179182905560408051929091168252517f6b3670ab51e04a9da086741e5fd1eb36ffaf1d661a15330c528e1f3e0c8722d7916020908290030190a150565b6069546001600160a01b031681565b606854600160a01b900460ff1690565b6068546001600160a01b031690565b600054610100900460ff168061070f575061070f611486565b8061071d575060005460ff16155b6107585760405162461bcd60e51b815260040180806020018281038252602e8152602001806118f3602e913960400191505060405180910390fd5b600054610100900460ff16158015610783576000805460ff1961ff0019909116610100171660011790555b61078b61148c565b6065805467ffffffffffffffff19166001600160401b038816179055606980546001600160a01b03199081166001600160a01b0388811691909117909255606880546066805484168886161790556067805484168786161790559091169186169190911760ff60a01b19169055801561080a576000805461ff00191690555b505050505050565b606a602052600090815260409020546001600160c01b03811690600160c01b90046001600160401b031682565b60008061084a6118b6565b505060408051606094851b6001600160601b03199081166020808401919091529490951b909416603485015280518085036028018152604885018083528151918501919091206000908152606a9094529281902060888501909152546001600160c01b03811692839052600160c01b90046001600160401b031660689093018390525091565b6066546001600160a01b031690565b606554600160401b90046001600160401b031690565b60335460ff1661094c576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6033805460ff19169055606854600160a01b900460ff166109aa576040805162461bcd60e51b81526020600482015260136024820152724f6e6c7920456d657267656e6379204d6f646560681b604482015290519081900360640190fd5b6067546001600160a01b03163314806109cd57506066546001600160a01b031633145b610a1e576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c7920476f7665726e616e636544414f206f722057484700000000000000604482015290519081900360640190fd5b6067546001600160a01b0316331415610aa4576065546001600160401b03600160401b909104811662eff100018116429091161015610aa4576040805162461bcd60e51b815260206004820152601a60248201527f4e4f204d41585f454d455247454e43595f4d4f44455f54494d45000000000000604482015290519081900360640190fd5b6001600160a01b038216610ac157610abc838261153b565b610acc565b610acc8284836115dc565b816001600160a01b0316836001600160a01b0316336001600160a01b03167fde200220117ba95c9a6c4a1a13bb06b0b7be90faa85c8fb4576630119f891693846040518082815260200191505060405180910390a450506033805460ff1916600117905550565b6212750081565b6066546001600160a01b03163314610b99576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79204865726d657a20476f7665726e616e63652044414f000000000000604482015290519081900360640190fd5b606680546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f03683be8debd93f8f5ff23dd03419bfcb9b8287a1868b0f130d858f03c3a08a1916020908290030190a150565b6067546001600160a01b031690565b62eff10081565b6068546001600160a01b03163314610c68576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c79206865726d657a4b6565706572416464726573730000000000000000604482015290519081900360640190fd5b606854600160a01b900460ff1615610cc7576040805162461bcd60e51b815260206004820152601e60248201527f456d657267656e6379206d6f646520616c726561647920656e61626c65640000604482015290519081900360640190fd5b6068805460ff60a01b1916600160a01b179055606580546001600160401b034216600160401b026fffffffffffffffff0000000000000000199091161790556040517f2064d51aa5a8bd67928c7675e267e05c67ad5adf7c9098d0a602d01f36fda9c590600090a1565b60335460ff16610d88576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6033805460ff191690556069546001600160a01b03163314610df1576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c79206865726d657a526f6c6c7570416464726573730000000000000000604482015290519081900360640190fd5b3415610eb5576001600160a01b03821615610e53576040805162461bcd60e51b815260206004820152601d60248201527f4554482073686f756c6420626520746865203078302061646472657373000000604482015290519081900360640190fd5b34816001600160c01b031614610eb0576040805162461bcd60e51b815260206004820152601e60248201527f446966666572656e7420616d6f756e7420616e64206d73672e76616c75650000604482015290519081900360640190fd5b61112c565b60695460408051636eb1769f60e11b81526001600160a01b03928316600482015230602482015290516001600160c01b0384169285169163dd62ed3e916044808301926020929190829003018186803b158015610f1157600080fd5b505afa158015610f25573d6000803e3d6000fd5b505050506040513d6020811015610f3b57600080fd5b50511015610f90576040805162461bcd60e51b815260206004820152601d60248201527f446f65736e2774206861766520656e6f75676820616c6c6f77616e6365000000604482015290519081900360640190fd5b60006060836001600160a01b03166040518060600160405280602581526020016118ce602591398051602091820120606954604080516001600160a01b0390921660248301523060448301526001600160c01b038816606480840191909152815180840390910181526084909201815292810180516001600160e01b03166001600160e01b031990931692909217825291518251909182918083835b6020831061104b5780518252601f19909201916020918201910161102c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146110ad576040519150601f19603f3d011682016040523d82523d6000602084013e6110b2565b606091505b50915091508180156110e05750805115806110e057508080602001905160208110156110dd57600080fd5b50515b611129576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b50505b61113783838361176e565b50506033805460ff1916600117905550565b6068546001600160a01b031633146111a8576040805162461bcd60e51b815260206004820152601a60248201527f4f6e6c79204865726d657a204b65657065722041646472657373000000000000604482015290519081900360640190fd5b606880546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517fc1e9be84fce652abec6a6944f7ec5bbb40de18caa44c285b05a0de7e3ad9d016916020908290030190a150565b60335460ff16611259576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6033805460ff19169055606854600160a01b900460ff16156112b3576040805162461bcd60e51b815260206004820152600e60248201526d456d657267656e6379206d6f646560901b604482015290519081900360640190fd5b60408051606084811b6001600160601b03199081166020808501919091529185901b16603483015282518083036028018152604890920183528151918101919091206000818152606a909252919020546001600160c01b031680611355576040805162461bcd60e51b81526020600482015260146024820152734e6f2066756e647320746f20776974686472617760601b604482015290519081900360640190fd5b6065546000838152606a60205260409020546001600160401b03918216600160c01b90910482160181164290911610156113d6576040805162461bcd60e51b815260206004820152601a60248201527f5769746864726177616c206e6f7420616c6c6f77656420796574000000000000604482015290519081900360640190fd5b6000828152606a60205260408120556001600160a01b03831661140b5761140684826001600160c01b031661153b565b61141f565b61141f8385836001600160c01b03166115dc565b836001600160a01b0316836001600160a01b03167f72608e45b52a95a12c2ac7f15ff53f92fc9572c9d84b6e6b5d7f0f7826cf32718360405180826001600160c01b0316815260200191505060405180910390a350506033805460ff191660011790555050565b303b1590565b600054610100900460ff16806114a557506114a5611486565b806114b3575060005460ff16155b6114ee5760405162461bcd60e51b815260040180806020018281038252602e8152602001806118f3602e913960400191505060405180910390fd5b600054610100900460ff16158015611519576000805460ff1961ff0019909116610100171660011790555b6033805460ff191660011790558015611538576000805461ff00191690555b50565b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114611586576040519150601f19603f3d011682016040523d82523d6000602084013e61158b565b606091505b50509050806115d7576040805162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b604482015290519081900360640190fd5b505050565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009460609489169392918291908083835b602083106116895780518252601f19909201916020918201910161166a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146116eb576040519150601f19603f3d011682016040523d82523d6000602084013e6116f0565b606091505b509150915081801561171e57508051158061171e575080806020019051602081101561171b57600080fd5b50515b611767576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b88151c985b9cd9995c8811985a5b1959605a1b604482015290519081900360640190fd5b5050505050565b60408051606085811b6001600160601b03199081166020808501919091529186901b16603483015282518083036028018152604890920183528151918101919091206000818152606a909252919020546001600160c01b039081168381019182161015611815576040805162461bcd60e51b815260206004820152601060248201526f4465706f736974206f766572666c6f7760801b604482015290519081900360640190fd5b6000828152606a602090815260409182902080546001600160401b03428116600160c01b9081026001600160c01b038089166001600160c01b03199095169490941784161793849055855192891683529092049091169181019190915281516001600160a01b0380881693908916927f41219b99485f78192a5b9b1be28c7d53c3a2bdbe7900ae40c79fae8d9d6108fd929081900390910190a35050505050565b60408051808201909152600080825260208201529056fe7472616e7366657246726f6d28616464726573732c616464726573732c75696e7432353629436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a2646970667358221220632d6e9cb12d40d2d73a2a867ad3e7eae9b7cf7d97c44f2cbd4d2e1922db561b64736f6c634300060c0033" // 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) { @@ -635,27 +635,6 @@ 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() diff --git a/eth/ethereum.go b/eth/ethereum.go index 06236c7..78e2583 100644 --- a/eth/ethereum.go +++ b/eth/ethereum.go @@ -13,7 +13,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" "github.com/hermeznetwork/hermez-node/common" - "github.com/hermeznetwork/hermez-node/eth/contracts/erc20" + HEZ "github.com/hermeznetwork/hermez-node/eth/contracts/tokenHEZ" "github.com/hermeznetwork/hermez-node/log" ) @@ -277,7 +277,7 @@ func (c *EthereumClient) EthBlockByNumber(ctx context.Context, number int64) (*c // EthERC20Consts returns the constants defined for a particular ERC20 Token instance. func (c *EthereumClient) EthERC20Consts(tokenAddress ethCommon.Address) (*ERC20Consts, error) { - instance, err := erc20.NewERC20(tokenAddress, c.client) + instance, err := HEZ.NewHEZ(tokenAddress, c.client) if err != nil { return nil, err } diff --git a/eth/ethereum_test.go b/eth/ethereum_test.go index 302fb0b..23cb2fb 100644 --- a/eth/ethereum_test.go +++ b/eth/ethereum_test.go @@ -13,9 +13,9 @@ func TestEthERC20(t *testing.T) { require.Nil(t, err) client := NewEthereumClient(ethClient, accountAux, ks, nil) - consts, err := client.EthERC20Consts(tokenERC20AddressConst) + consts, err := client.EthERC20Consts(tokenHEZAddressConst) require.Nil(t, err) - assert.Equal(t, "ERC20_0", consts.Name) - assert.Equal(t, "20_0", consts.Symbol) + assert.Equal(t, "Hermez Network Token", consts.Name) + assert.Equal(t, "HEZ", consts.Symbol) assert.Equal(t, uint64(18), consts.Decimals) } diff --git a/eth/helpers.go b/eth/helpers.go index 0d60ceb..fc9e9a8 100644 --- a/eth/helpers.go +++ b/eth/helpers.go @@ -1,10 +1,15 @@ package eth import ( + "encoding/hex" "fmt" + "math/big" "net/http" "strconv" "strings" + + ethCommon "github.com/ethereum/go-ethereum/common" + "golang.org/x/crypto/sha3" ) func addBlock(url string) { @@ -61,3 +66,96 @@ func addTime(seconds float64, url string) { } }() } + +func createPermitDigest(tokenAddr, owner, spender ethCommon.Address, chainID, value, nonce, deadline *big.Int, tokenName string) ([]byte, error) { + abiPermit := []byte("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)") + hashPermit := sha3.NewLegacyKeccak256() + hashPermit.Write(abiPermit) + abiEIP712Domain := []byte("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)") + hashEIP712Domain := sha3.NewLegacyKeccak256() + hashEIP712Domain.Write(abiEIP712Domain) + var encodeBytes []byte + paddedHash := ethCommon.LeftPadBytes(hashEIP712Domain.Sum(nil), 32) + hashName := sha3.NewLegacyKeccak256() + hashName.Write([]byte(tokenName)) + paddedName := ethCommon.LeftPadBytes(hashName.Sum(nil), 32) + hashVersion := sha3.NewLegacyKeccak256() + hashVersion.Write([]byte("1")) + paddedX := ethCommon.LeftPadBytes(hashVersion.Sum(nil), 32) + paddedChainID := ethCommon.LeftPadBytes(chainID.Bytes(), 32) + paddedAddr := ethCommon.LeftPadBytes(tokenAddr.Bytes(), 32) + encodeBytes = append(encodeBytes, paddedHash...) + encodeBytes = append(encodeBytes, paddedName...) + encodeBytes = append(encodeBytes, paddedX...) + encodeBytes = append(encodeBytes, paddedChainID...) + encodeBytes = append(encodeBytes, paddedAddr...) + _domainSeparator := sha3.NewLegacyKeccak256() + _domainSeparator.Write(encodeBytes) + + var bytes1 []byte + paddedHashPermit := ethCommon.LeftPadBytes(hashPermit.Sum(nil), 32) + paddedOwner := ethCommon.LeftPadBytes(owner.Bytes(), 32) + paddedSpender := ethCommon.LeftPadBytes(spender.Bytes(), 32) + paddedValue := ethCommon.LeftPadBytes(value.Bytes(), 32) + paddedNonce := ethCommon.LeftPadBytes(nonce.Bytes(), 32) + paddedDeadline := ethCommon.LeftPadBytes(deadline.Bytes(), 32) + bytes1 = append(bytes1, paddedHashPermit...) + bytes1 = append(bytes1, paddedOwner...) + bytes1 = append(bytes1, paddedSpender...) + bytes1 = append(bytes1, paddedValue...) + bytes1 = append(bytes1, paddedNonce...) + bytes1 = append(bytes1, paddedDeadline...) + hashBytes1 := sha3.NewLegacyKeccak256() + hashBytes1.Write(bytes1) + + var bytes2 []byte + byte19, err := hex.DecodeString("19") + if err != nil { + return nil, err + } + byte01, err := hex.DecodeString("01") + if err != nil { + return nil, err + } + paddedY := ethCommon.LeftPadBytes(byte19, 1) + paddedZ := ethCommon.LeftPadBytes(byte01, 1) + paddedDomainSeparator := ethCommon.LeftPadBytes(_domainSeparator.Sum(nil), 32) + paddedHashBytes1 := ethCommon.LeftPadBytes(hashBytes1.Sum(nil), 32) + bytes2 = append(bytes2, paddedY...) + bytes2 = append(bytes2, paddedZ...) + bytes2 = append(bytes2, paddedDomainSeparator...) + bytes2 = append(bytes2, paddedHashBytes1...) + hashBytes2 := sha3.NewLegacyKeccak256() + hashBytes2.Write(bytes2) + + return hashBytes2.Sum(nil), nil +} + +func createPermit(owner, spender ethCommon.Address, amount, deadline *big.Int, digest, signature []byte) []byte { + r := signature[0:32] + s := signature[32:64] + v := signature[64] + byte(27) + + ABIpermit := []byte("permit(address,address,uint256,uint256,uint8,bytes32,bytes32)") + hash := sha3.NewLegacyKeccak256() + hash.Write(ABIpermit) + methodID := hash.Sum(nil)[:4] + + var permit []byte + paddedOwner := ethCommon.LeftPadBytes(owner.Bytes(), 32) + paddedSpender := ethCommon.LeftPadBytes(spender.Bytes(), 32) + paddedAmount := ethCommon.LeftPadBytes(amount.Bytes(), 32) + paddedDeadline := ethCommon.LeftPadBytes(deadline.Bytes(), 32) + paddedV := ethCommon.LeftPadBytes([]byte{v}, 32) + + permit = append(permit, methodID...) + permit = append(permit, paddedOwner...) + permit = append(permit, paddedSpender...) + permit = append(permit, paddedAmount...) + permit = append(permit, paddedDeadline...) + permit = append(permit, paddedV...) + permit = append(permit, r...) + permit = append(permit, s...) + + return permit +} diff --git a/eth/main_test.go b/eth/main_test.go index ffab343..fa654d2 100644 --- a/eth/main_test.go +++ b/eth/main_test.go @@ -2,6 +2,7 @@ package eth import ( "io/ioutil" + "math/big" "os" "testing" @@ -22,27 +23,25 @@ var governancePrivateKey = os.Getenv("GOV_PK") var ethClientDialURL = os.Getenv("ETHCLIENT_DIAL_URL")*/ var ethClientDialURL = "http://localhost:8545" var password = "pass" +var deadline, _ = new(big.Int).SetString("ffffffffffffffffffffffffffffffff", 16) // Smart Contract Addresses var ( - auctionAddressStr = "0x500D1d6A4c7D8Ae28240b47c8FCde034D827fD5e" + auctionAddressStr = "0x038B86d9d8FAFdd0a02ebd1A476432877b0107C8" auctionAddressConst = ethCommon.HexToAddress(auctionAddressStr) - auctionTestAddressStr = "0x1d80315fac6aBd3EfeEbE97dEc44461ba7556160" + auctionTestAddressStr = "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0" auctionTestAddressConst = ethCommon.HexToAddress(auctionTestAddressStr) donationAddressStr = "0x6c365935CA8710200C7595F0a72EB6023A7706Cd" donationAddressConst = ethCommon.HexToAddress(donationAddressStr) bootCoordinatorAddressStr = "0xc783df8a850f42e7f7e57013759c285caa701eb6" bootCoordinatorAddressConst = ethCommon.HexToAddress(bootCoordinatorAddressStr) - tokenERC777AddressStr = "0xf784709d2317D872237C4bC22f867d1BAe2913AB" //nolint:gosec - tokenERC777AddressConst = ethCommon.HexToAddress(tokenERC777AddressStr) - tokenERC20AddressStr = "0x3619DbE27d7c1e7E91aA738697Ae7Bc5FC3eACA5" //nolint:gosec - tokenERC20AddressConst = ethCommon.HexToAddress(tokenERC20AddressStr) - tokenHEZAddressConst = tokenERC777AddressConst - hermezRollupAddressStr = "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0" + tokenHEZAddressStr = "0xf4e77E5Da47AC3125140c470c71cBca77B5c638c" //nolint:gosec + tokenHEZAddressConst = ethCommon.HexToAddress(tokenHEZAddressStr) + hermezRollupAddressStr = "0xD6C850aeBFDC46D7F4c207e445cC0d6B0919BDBe" hermezRollupAddressConst = ethCommon.HexToAddress(hermezRollupAddressStr) - wdelayerAddressStr = "0xD6C850aeBFDC46D7F4c207e445cC0d6B0919BDBe" + wdelayerAddressStr = "0x500D1d6A4c7D8Ae28240b47c8FCde034D827fD5e" wdelayerAddressConst = ethCommon.HexToAddress(wdelayerAddressStr) - wdelayerTestAddressStr = "0x52d3b94181f8654db2530b0fEe1B19173f519C52" + wdelayerTestAddressStr = "0x1d80315fac6aBd3EfeEbE97dEc44461ba7556160" wdelayerTestAddressConst = ethCommon.HexToAddress(wdelayerTestAddressStr) safetyAddressStr = "0xE5904695748fe4A84b40b3fc79De2277660BD1D3" safetyAddressConst = ethCommon.HexToAddress(safetyAddressStr) @@ -70,17 +69,27 @@ var ( auxAddressStr = "0x3d91185a02774C70287F6c74Dd26d13DFB58ff16" auxAddressConst = ethCommon.HexToAddress(auxAddressStr) + aux2AddressSK = "28d1bfbbafe9d1d4f5a11c3c16ab6bf9084de48d99fbac4058bdfa3c80b29087" + aux2AddressStr = "0x532792b73c0c6e7565912e7039c59986f7e1dd1f" + aux2AddressConst = ethCommon.HexToAddress(aux2AddressStr) + hermezRollupTestSK = "28d1bfbbafe9d1d4f5a11c3c16ab6bf9084de48d99fbac4058bdfa3c80b29088" hermezRollupTestAddressStr = "0xEa960515F8b4C237730F028cBAcF0a28E7F45dE0" hermezRollupAddressTestConst = ethCommon.HexToAddress(hermezRollupTestAddressStr) ) +var tokenHEZ = TokenConfig{ + Address: tokenHEZAddressConst, + Name: "Hermez Network Token", +} + var ( accountGov *accounts.Account accountKep *accounts.Account accountWhite *accounts.Account accountGovDAO *accounts.Account accountAux *accounts.Account + accountAux2 *accounts.Account accountHermez *accounts.Account ks *keystore.KeyStore ethClient *ethclient.Client @@ -88,6 +97,7 @@ var ( ethereumClientKep *EthereumClient ethereumClientGovDAO *EthereumClient ethereumClientAux *EthereumClient + ethereumClientAux2 *EthereumClient ethereumClientHermez *EthereumClient ) @@ -128,6 +138,7 @@ func TestMain(m *testing.M) { accountWhite = addKey(ks, whiteHackGroupAddressSK) accountGovDAO = addKey(ks, hermezGovernanceDAOAddressSK) accountAux = addKey(ks, auxAddressSK) + accountAux2 = addKey(ks, aux2AddressSK) accountHermez = addKey(ks, hermezRollupTestSK) ethClient, err = ethclient.Dial(ethClientDialURL) @@ -138,15 +149,15 @@ func TestMain(m *testing.M) { // Controllable Governance Address ethereumClientGov := NewEthereumClient(ethClient, accountGov, ks, nil) - auctionClient, err = NewAuctionClient(ethereumClientGov, auctionAddressConst, tokenHEZAddressConst) + auctionClient, err = NewAuctionClient(ethereumClientGov, auctionAddressConst, tokenHEZ) if err != nil { panic(err) } - auctionClientTest, err = NewAuctionClient(ethereumClientGov, auctionTestAddressConst, tokenHEZAddressConst) + auctionClientTest, err = NewAuctionClient(ethereumClientGov, auctionTestAddressConst, tokenHEZ) if err != nil { panic(err) } - rollupClient, err = NewRollupClient(ethereumClientGov, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClient, err = NewRollupClient(ethereumClientGov, hermezRollupAddressConst, tokenHEZ) if err != nil { panic(err) } @@ -163,6 +174,7 @@ func TestMain(m *testing.M) { ethereumClientWhite = NewEthereumClient(ethClient, accountWhite, ks, nil) ethereumClientGovDAO = NewEthereumClient(ethClient, accountGovDAO, ks, nil) ethereumClientAux = NewEthereumClient(ethClient, accountAux, ks, nil) + ethereumClientAux2 = NewEthereumClient(ethClient, accountAux2, ks, nil) ethereumClientHermez = NewEthereumClient(ethClient, accountHermez, ks, nil) exitVal = m.Run() diff --git a/eth/rollup.go b/eth/rollup.go index eb2afe1..aa2f748 100644 --- a/eth/rollup.go +++ b/eth/rollup.go @@ -14,11 +14,10 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" "github.com/hermeznetwork/hermez-node/common" - ERC777 "github.com/hermeznetwork/hermez-node/eth/contracts/erc777" Hermez "github.com/hermeznetwork/hermez-node/eth/contracts/hermez" + HEZ "github.com/hermeznetwork/hermez-node/eth/contracts/tokenHEZ" "github.com/hermeznetwork/hermez-node/log" "github.com/iden3/go-iden3-crypto/babyjub" - "golang.org/x/crypto/sha3" ) const ( @@ -259,13 +258,13 @@ type RollupInterface interface { // Public Functions RollupForgeBatch(*RollupForgeBatchArgs) (*types.Transaction, error) - RollupAddToken(tokenAddress ethCommon.Address, feeAddToken *big.Int) (*types.Transaction, error) + RollupAddToken(tokenAddress ethCommon.Address, feeAddToken, deadline *big.Int) (*types.Transaction, error) RollupWithdrawMerkleProof(babyPubKey *babyjub.PublicKey, tokenID uint32, numExitRoot, idx int64, amount *big.Int, siblings []*big.Int, instantWithdraw bool) (*types.Transaction, error) RollupWithdrawCircuit(proofA, proofC [2]*big.Int, proofB [2][2]*big.Int, tokenID uint32, numExitRoot, idx int64, amount *big.Int, instantWithdraw bool) (*types.Transaction, error) RollupL1UserTxERC20ETH(fromBJJ *babyjub.PublicKey, fromIdx int64, loadAmount *big.Int, amount *big.Int, tokenID uint32, toIdx int64) (*types.Transaction, error) - RollupL1UserTxERC777(fromBJJ *babyjub.PublicKey, fromIdx int64, loadAmount *big.Int, amount *big.Int, tokenID uint32, toIdx int64) (*types.Transaction, error) + RollupL1UserTxERC20Permit(fromBJJ *babyjub.PublicKey, fromIdx int64, loadAmount *big.Int, amount *big.Int, tokenID uint32, toIdx int64, deadline *big.Int) (tx *types.Transaction, err error) // Governance Public Functions RollupUpdateForgeL1L2BatchTimeout(newForgeL1L2BatchTimeout int64) (*types.Transaction, error) @@ -289,15 +288,15 @@ 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 - tokenHEZAddress ethCommon.Address - hermez *Hermez.Hermez - contractAbi abi.ABI + client *EthereumClient + address ethCommon.Address + tokenHEZ TokenConfig + hermez *Hermez.Hermez + contractAbi abi.ABI } // NewRollupClient creates a new RollupClient -func NewRollupClient(client *EthereumClient, address ethCommon.Address, tokenHEZAddress ethCommon.Address) (*RollupClient, error) { +func NewRollupClient(client *EthereumClient, address ethCommon.Address, tokenHEZ TokenConfig) (*RollupClient, error) { contractAbi, err := abi.JSON(strings.NewReader(string(Hermez.HermezABI))) if err != nil { return nil, err @@ -307,11 +306,11 @@ func NewRollupClient(client *EthereumClient, address ethCommon.Address, tokenHEZ return nil, err } return &RollupClient{ - client: client, - address: address, - tokenHEZAddress: tokenHEZAddress, - hermez: hermez, - contractAbi: contractAbi, + client: client, + address: address, + tokenHEZ: tokenHEZ, + hermez: hermez, + contractAbi: contractAbi, }, nil } @@ -372,26 +371,25 @@ func (c *RollupClient) RollupForgeBatch(args *RollupForgeBatchArgs) (tx *types.T // RollupAddToken is the interface to call the smart contract function. // `feeAddToken` is the amount of HEZ tokens that will be paid to add the // token. `feeAddToken` must match the public value of the smart contract. -func (c *RollupClient) RollupAddToken(tokenAddress ethCommon.Address, feeAddToken *big.Int) (tx *types.Transaction, err error) { +func (c *RollupClient) RollupAddToken(tokenAddress ethCommon.Address, feeAddToken, deadline *big.Int) (tx *types.Transaction, err error) { if tx, err = c.client.CallAuth( 0, func(ec *ethclient.Client, auth *bind.TransactOpts) (*types.Transaction, error) { - tokens, err := ERC777.NewERC777(c.tokenHEZAddress, ec) + tokenHEZcontract, err := HEZ.NewHEZ(c.tokenHEZ.Address, ec) if err != nil { return nil, err } - addTokenFnSignature := []byte("addToken(address)") - hash := sha3.NewLegacyKeccak256() - _, err = hash.Write(addTokenFnSignature) - if err != nil { - return nil, err - } - methodID := hash.Sum(nil)[:4] - var data []byte - data = append(data, methodID...) - paddedAddress := ethCommon.LeftPadBytes(tokenAddress.Bytes(), 32) - data = append(data, paddedAddress[:]...) - return tokens.Send(auth, c.address, feeAddToken, data) + owner := c.client.account.Address + spender := c.address + nonce, err := tokenHEZcontract.Nonces(nil, owner) + tokenname := c.tokenHEZ.Name + tokenAddr := c.tokenHEZ.Address + chainid, _ := c.client.client.ChainID(context.Background()) + digest, _ := createPermitDigest(tokenAddr, owner, spender, chainid, feeAddToken, nonce, deadline, tokenname) + signature, _ := c.client.ks.SignHash(*c.client.account, digest) + permit := createPermit(owner, spender, feeAddToken, deadline, digest, signature) + + return c.hermez.AddToken(auth, tokenAddress, permit) }, ); err != nil { return nil, fmt.Errorf("Failed add Token %w", err) @@ -404,16 +402,12 @@ func (c *RollupClient) RollupWithdrawMerkleProof(fromBJJ *babyjub.PublicKey, tok if tx, err = c.client.CallAuth( 0, func(ec *ethclient.Client, auth *bind.TransactOpts) (*types.Transaction, error) { - hermez, err := Hermez.NewHermez(c.address, ec) - if err != nil { - return nil, err - } pkCompL := fromBJJ.Compress() pkCompB := common.SwapEndianness(pkCompL[:]) babyPubKey := new(big.Int).SetBytes(pkCompB) numExitRootB := big.NewInt(numExitRoot) idxBig := big.NewInt(idx) - return hermez.WithdrawMerkleProof(auth, tokenID, amount, babyPubKey, numExitRootB, siblings, idxBig, instantWithdraw) + return c.hermez.WithdrawMerkleProof(auth, tokenID, amount, babyPubKey, numExitRootB, siblings, idxBig, instantWithdraw) }, ); err != nil { return nil, fmt.Errorf("Failed update WithdrawMerkleProof: %w", err) @@ -432,10 +426,6 @@ func (c *RollupClient) RollupL1UserTxERC20ETH(fromBJJ *babyjub.PublicKey, fromId if tx, err = c.client.CallAuth( 0, func(ec *ethclient.Client, auth *bind.TransactOpts) (*types.Transaction, error) { - hermez, err := Hermez.NewHermez(c.address, ec) - if err != nil { - return nil, err - } pkCompL := fromBJJ.Compress() pkCompB := common.SwapEndianness(pkCompL[:]) babyPubKey := new(big.Int).SetBytes(pkCompB) @@ -453,7 +443,8 @@ func (c *RollupClient) RollupL1UserTxERC20ETH(fromBJJ *babyjub.PublicKey, fromId if tokenID == 0 { auth.Value = loadAmount } - return hermez.AddL1Transaction(auth, babyPubKey, fromIdxBig, uint16(loadAmountF), uint16(amountF), tokenIDBig, toIdxBig) + var permit []byte + return c.hermez.AddL1Transaction(auth, babyPubKey, fromIdxBig, uint16(loadAmountF), uint16(amountF), tokenIDBig, toIdxBig, permit) }, ); err != nil { return nil, fmt.Errorf("Failed add L1 Tx ERC20/ETH: %w", err) @@ -461,59 +452,45 @@ func (c *RollupClient) RollupL1UserTxERC20ETH(fromBJJ *babyjub.PublicKey, fromId return tx, nil } -// RollupL1UserTxERC777 is the interface to call the smart contract function -func (c *RollupClient) RollupL1UserTxERC777(fromBJJ *babyjub.PublicKey, fromIdx int64, loadAmount *big.Int, amount *big.Int, tokenID uint32, toIdx int64) (tx *types.Transaction, err error) { +// RollupL1UserTxERC20Permit is the interface to call the smart contract function +func (c *RollupClient) RollupL1UserTxERC20Permit(fromBJJ *babyjub.PublicKey, fromIdx int64, loadAmount *big.Int, amount *big.Int, tokenID uint32, toIdx int64, deadline *big.Int) (tx *types.Transaction, err error) { if tx, err = c.client.CallAuth( 0, func(ec *ethclient.Client, auth *bind.TransactOpts) (*types.Transaction, error) { - tokens, err := ERC777.NewERC777(c.tokenHEZAddress, ec) - if err != nil { - return nil, err - } - addL1TxFnSignature := []byte("addL1Transaction(uint256,uint48,uint16,uint16,uint32,uint48)") - hash := sha3.NewLegacyKeccak256() - _, err = hash.Write(addL1TxFnSignature) - if err != nil { - return nil, err - } - methodID := hash.Sum(nil)[:4] pkCompL := fromBJJ.Compress() pkCompB := common.SwapEndianness(pkCompL[:]) - paddedAddress := ethCommon.LeftPadBytes(pkCompB, 32) - fromIdxB, err := common.Idx(fromIdx).Bytes() - if err != nil { - return nil, err - } - paddedFromIdx := ethCommon.LeftPadBytes(fromIdxB[:], 32) + babyPubKey := new(big.Int).SetBytes(pkCompB) + fromIdxBig := big.NewInt(fromIdx) + toIdxBig := big.NewInt(toIdx) + tokenIDBig := uint32(tokenID) loadAmountF, err := common.NewFloat16(loadAmount) if err != nil { return nil, err } - paddedLoadAmount := ethCommon.LeftPadBytes(loadAmountF.Bytes(), 32) amountF, err := common.NewFloat16(amount) if err != nil { return nil, err } - paddedAmount := ethCommon.LeftPadBytes(amountF.Bytes(), 32) - tokenIDB := common.TokenID(tokenID).Bytes() - paddedTokenID := ethCommon.LeftPadBytes(tokenIDB, 32) - toIdxB, err := common.Idx(toIdx).Bytes() + if tokenID == 0 { + auth.Value = loadAmount + } + tokenHEZcontract, err := HEZ.NewHEZ(c.tokenHEZ.Address, ec) if err != nil { return nil, err } - paddedToIdx := ethCommon.LeftPadBytes(toIdxB[:], 32) - var data []byte - data = append(data, methodID...) - data = append(data, paddedAddress[:]...) - data = append(data, paddedFromIdx[:]...) - data = append(data, paddedLoadAmount[:]...) - data = append(data, paddedAmount[:]...) - data = append(data, paddedTokenID[:]...) - data = append(data, paddedToIdx[:]...) - return tokens.Send(auth, c.address, loadAmount, data) + owner := c.client.account.Address + spender := c.address + nonce, err := tokenHEZcontract.Nonces(nil, owner) + tokenname := c.tokenHEZ.Name + tokenAddr := c.tokenHEZ.Address + chainid, _ := c.client.client.ChainID(context.Background()) + digest, _ := createPermitDigest(tokenAddr, owner, spender, chainid, amount, nonce, deadline, tokenname) + signature, _ := c.client.ks.SignHash(*c.client.account, digest) + permit := createPermit(owner, spender, amount, deadline, digest, signature) + return c.hermez.AddL1Transaction(auth, babyPubKey, fromIdxBig, uint16(loadAmountF), uint16(amountF), tokenIDBig, toIdxBig, permit) }, ); err != nil { - return nil, fmt.Errorf("Failed add L1 Tx ERC777: %w", err) + return nil, fmt.Errorf("Failed add L1 Tx ERC20Permit: %w", err) } return tx, nil } @@ -539,11 +516,7 @@ func (c *RollupClient) RollupUpdateForgeL1L2BatchTimeout(newForgeL1L2BatchTimeou if tx, err = c.client.CallAuth( 0, func(ec *ethclient.Client, auth *bind.TransactOpts) (*types.Transaction, error) { - hermez, err := Hermez.NewHermez(c.address, ec) - if err != nil { - return nil, err - } - return hermez.UpdateForgeL1L2BatchTimeout(auth, uint8(newForgeL1L2BatchTimeout)) + return c.hermez.UpdateForgeL1L2BatchTimeout(auth, uint8(newForgeL1L2BatchTimeout)) }, ); err != nil { return nil, fmt.Errorf("Failed update ForgeL1L2BatchTimeout: %w", err) @@ -556,11 +529,7 @@ func (c *RollupClient) RollupUpdateFeeAddToken(newFeeAddToken *big.Int) (tx *typ if tx, err = c.client.CallAuth( 0, func(ec *ethclient.Client, auth *bind.TransactOpts) (*types.Transaction, error) { - hermez, err := Hermez.NewHermez(c.address, ec) - if err != nil { - return nil, err - } - return hermez.UpdateFeeAddToken(auth, newFeeAddToken) + return c.hermez.UpdateFeeAddToken(auth, newFeeAddToken) }, ); err != nil { return nil, fmt.Errorf("Failed update FeeAddToken: %w", err) diff --git a/eth/rollup_test.go b/eth/rollup_test.go index dc95f02..bde19be 100644 --- a/eth/rollup_test.go +++ b/eth/rollup_test.go @@ -26,7 +26,7 @@ var maxTx = int64(512) var nLevels = int64(32) var tokenIDERC777 uint32 -var tokenIDERC20 uint32 +var tokenHEZID uint32 type keys struct { BJJSecretKey *babyjub.PrivateKey @@ -56,7 +56,7 @@ func TestRollupConstants(t *testing.T) { 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, tokenHEZAddressConst, rollupConstants.TokenHEZ) assert.Equal(t, maxTx, rollupConstants.Verifiers[0].MaxTx) assert.Equal(t, nLevels, rollupConstants.Verifiers[0].NLevels) assert.Equal(t, governanceAddressConst, rollupConstants.HermezGovernanceDAOAddress) @@ -72,29 +72,17 @@ func TestRollupRegisterTokensCount(t *testing.T) { func TestAddToken(t *testing.T) { feeAddToken := big.NewInt(10) - // Addtoken ERC20 + // Addtoken ERC20Permit registerTokensCount, err := rollupClient.RollupRegisterTokensCount() require.Nil(t, err) - _, err = rollupClient.RollupAddToken(tokenERC20AddressConst, feeAddToken) + _, err = rollupClient.RollupAddToken(tokenHEZAddressConst, feeAddToken, deadline) require.Nil(t, err) currentBlockNum, _ := rollupClient.client.EthCurrentBlock() rollupEvents, _, _ := rollupClient.RollupEventsByBlock(currentBlockNum) - assert.Equal(t, tokenERC20AddressConst, rollupEvents.AddToken[0].TokenAddress) + assert.Equal(t, tokenHEZAddressConst, rollupEvents.AddToken[0].TokenAddress) assert.Equal(t, registerTokensCount, common.TokenID(rollupEvents.AddToken[0].TokenID).BigInt()) - tokenIDERC20 = rollupEvents.AddToken[0].TokenID - - // Addtoken ERC777 - registerTokensCount, err = rollupClient.RollupRegisterTokensCount() - require.Nil(t, err) - _, err = rollupClient.RollupAddToken(tokenERC777AddressConst, feeAddToken) - require.Nil(t, err) - currentBlockNum, _ = rollupClient.client.EthCurrentBlock() - rollupEvents, _, _ = rollupClient.RollupEventsByBlock(currentBlockNum) - - assert.Equal(t, tokenERC777AddressConst, rollupEvents.AddToken[0].TokenAddress) - assert.Equal(t, registerTokensCount, common.TokenID(rollupEvents.AddToken[0].TokenID).BigInt()) - tokenIDERC777 = rollupEvents.AddToken[0].TokenID + tokenHEZID = rollupEvents.AddToken[0].TokenID } func TestRollupForgeBatch(t *testing.T) { @@ -113,7 +101,7 @@ func TestRollupForgeBatch(t *testing.T) { minBid.SetString("11000000000000000000", 10) budget := new(big.Int) budget.SetString("45200000000000000000", 10) - _, err = auctionClient.AuctionMultiBid(currentSlot+4, currentSlot+10, slotSet, maxBid, minBid, budget) + _, err = auctionClient.AuctionMultiBid(budget, currentSlot+4, currentSlot+10, slotSet, maxBid, minBid, deadline) require.Nil(t, err) // Add Blocks @@ -124,21 +112,6 @@ func TestRollupForgeBatch(t *testing.T) { // Forge args := new(RollupForgeBatchArgs) - // feeIdxCoordinatorBytes, err := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") - // require.Nil(t, err) - // lenFeeIdxCoordinatorBytes := int(4) - // numFeeIdxCoordinator := len(feeIdxCoordinatorBytes) / lenFeeIdxCoordinatorBytes - // for i := 0; i < numFeeIdxCoordinator; i++ { - // var paddedFeeIdx [6]byte - // if lenFeeIdxCoordinatorBytes < common.IdxBytesLen { - // copy(paddedFeeIdx[6-lenFeeIdxCoordinatorBytes:], feeIdxCoordinatorBytes[i*lenFeeIdxCoordinatorBytes:(i+1)*lenFeeIdxCoordinatorBytes]) - // } else { - // copy(paddedFeeIdx[:], feeIdxCoordinatorBytes[i*lenFeeIdxCoordinatorBytes:(i+1)*lenFeeIdxCoordinatorBytes]) - // } - // FeeIdxCoordinator, err := common.IdxFromBytes(paddedFeeIdx[:]) - // require.Nil(t, err) - // args.FeeIdxCoordinator = append(args.FeeIdxCoordinator, FeeIdxCoordinator) - // } args.FeeIdxCoordinator = []common.Idx{} // When encoded, 64 times the 0 idx means that no idx to collect fees is specified. l1CoordinatorBytes, err := hex.DecodeString("1c660323607bb113e586183609964a333d07ebe4bef3be82ec13af453bae9590bd7711cdb6abf42f176eadfbe5506fbef5e092e5543733f91b0061d9a7747fa10694a915a6470fa230de387b51e6f4db0b09787867778687b55197ad6d6a86eac000000001") require.Nil(t, err) @@ -226,7 +199,7 @@ func TestRollupUpdateFeeAddToken(t *testing.T) { } func TestRollupL1UserTxETHCreateAccountDeposit(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(2) fromIdxInt64 := int64(0) @@ -255,7 +228,7 @@ func TestRollupL1UserTxETHCreateAccountDeposit(t *testing.T) { } func TestRollupL1UserTxERC20CreateAccountDeposit(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClientAux2, err := NewRollupClient(ethereumClientAux2, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(1) fromIdxInt64 := int64(0) @@ -265,11 +238,11 @@ func TestRollupL1UserTxERC20CreateAccountDeposit(t *testing.T) { FromIdx: common.Idx(fromIdxInt64), ToIdx: common.Idx(toIdxInt64), LoadAmount: big.NewInt(10), - TokenID: common.TokenID(tokenIDERC20), + TokenID: common.TokenID(tokenHEZID), Amount: big.NewInt(0), } - _, err = rollupClientAux.RollupL1UserTxERC20ETH(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC20, toIdxInt64) + _, err = rollupClientAux2.RollupL1UserTxERC20ETH(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenHEZID, toIdxInt64) require.Nil(t, err) currentBlockNum, _ := rollupClient.client.EthCurrentBlock() @@ -279,11 +252,11 @@ func TestRollupL1UserTxERC20CreateAccountDeposit(t *testing.T) { assert.Equal(t, l1Tx.LoadAmount, rollupEvents.L1UserTx[0].L1UserTx.LoadAmount) assert.Equal(t, l1Tx.TokenID, rollupEvents.L1UserTx[0].L1UserTx.TokenID) assert.Equal(t, l1Tx.Amount, rollupEvents.L1UserTx[0].L1UserTx.Amount) - assert.Equal(t, rollupClientAux.client.account.Address, rollupEvents.L1UserTx[0].L1UserTx.FromEthAddr) + assert.Equal(t, rollupClientAux2.client.account.Address, rollupEvents.L1UserTx[0].L1UserTx.FromEthAddr) } -func TestRollupL1UserTxERC777CreateAccountDeposit(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) +func TestRollupL1UserTxERC20PermitCreateAccountDeposit(t *testing.T) { + rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(3) fromIdxInt64 := int64(0) @@ -297,7 +270,7 @@ func TestRollupL1UserTxERC777CreateAccountDeposit(t *testing.T) { Amount: big.NewInt(0), } - _, err = rollupClientAux.RollupL1UserTxERC777(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC777, toIdxInt64) + _, err = rollupClientAux.RollupL1UserTxERC20Permit(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC777, toIdxInt64, deadline) require.Nil(t, err) currentBlockNum, _ := rollupClient.client.EthCurrentBlock() @@ -311,7 +284,7 @@ func TestRollupL1UserTxERC777CreateAccountDeposit(t *testing.T) { } func TestRollupL1UserTxETHDeposit(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(2) fromIdxInt64 := int64(0) @@ -340,7 +313,7 @@ func TestRollupL1UserTxETHDeposit(t *testing.T) { } func TestRollupL1UserTxERC20Deposit(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClientAux2, err := NewRollupClient(ethereumClientAux2, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(1) fromIdxInt64 := int64(0) @@ -350,11 +323,11 @@ func TestRollupL1UserTxERC20Deposit(t *testing.T) { FromIdx: common.Idx(fromIdxInt64), ToIdx: common.Idx(toIdxInt64), LoadAmount: big.NewInt(10), - TokenID: common.TokenID(tokenIDERC20), + TokenID: common.TokenID(tokenHEZID), Amount: big.NewInt(0), } - _, err = rollupClientAux.RollupL1UserTxERC20ETH(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC20, toIdxInt64) + _, err = rollupClientAux2.RollupL1UserTxERC20ETH(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenHEZID, toIdxInt64) require.Nil(t, err) currentBlockNum, _ := rollupClient.client.EthCurrentBlock() @@ -364,11 +337,11 @@ func TestRollupL1UserTxERC20Deposit(t *testing.T) { assert.Equal(t, l1Tx.LoadAmount, rollupEvents.L1UserTx[0].L1UserTx.LoadAmount) assert.Equal(t, l1Tx.TokenID, rollupEvents.L1UserTx[0].L1UserTx.TokenID) assert.Equal(t, l1Tx.Amount, rollupEvents.L1UserTx[0].L1UserTx.Amount) - assert.Equal(t, rollupClientAux.client.account.Address, rollupEvents.L1UserTx[0].L1UserTx.FromEthAddr) + assert.Equal(t, rollupClientAux2.client.account.Address, rollupEvents.L1UserTx[0].L1UserTx.FromEthAddr) } -func TestRollupL1UserTxERC777Deposit(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) +func TestRollupL1UserTxERC20PermitDeposit(t *testing.T) { + rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(3) fromIdxInt64 := int64(0) @@ -382,7 +355,7 @@ func TestRollupL1UserTxERC777Deposit(t *testing.T) { Amount: big.NewInt(0), } - _, err = rollupClientAux.RollupL1UserTxERC777(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC777, toIdxInt64) + _, err = rollupClientAux.RollupL1UserTxERC20Permit(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC777, toIdxInt64, deadline) require.Nil(t, err) currentBlockNum, _ := rollupClient.client.EthCurrentBlock() @@ -396,7 +369,7 @@ func TestRollupL1UserTxERC777Deposit(t *testing.T) { } func TestRollupL1UserTxETHDepositTransfer(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(2) fromIdxInt64 := int64(0) @@ -425,7 +398,7 @@ func TestRollupL1UserTxETHDepositTransfer(t *testing.T) { } func TestRollupL1UserTxERC20DepositTransfer(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClientAux2, err := NewRollupClient(ethereumClientAux2, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(1) fromIdxInt64 := int64(0) @@ -435,11 +408,11 @@ func TestRollupL1UserTxERC20DepositTransfer(t *testing.T) { FromIdx: common.Idx(fromIdxInt64), ToIdx: common.Idx(toIdxInt64), LoadAmount: big.NewInt(10), - TokenID: common.TokenID(tokenIDERC20), + TokenID: common.TokenID(tokenHEZID), Amount: big.NewInt(0), } - _, err = rollupClientAux.RollupL1UserTxERC20ETH(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC20, toIdxInt64) + _, err = rollupClientAux2.RollupL1UserTxERC20ETH(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenHEZID, toIdxInt64) require.Nil(t, err) currentBlockNum, _ := rollupClient.client.EthCurrentBlock() @@ -449,11 +422,11 @@ func TestRollupL1UserTxERC20DepositTransfer(t *testing.T) { assert.Equal(t, l1Tx.LoadAmount, rollupEvents.L1UserTx[0].L1UserTx.LoadAmount) assert.Equal(t, l1Tx.TokenID, rollupEvents.L1UserTx[0].L1UserTx.TokenID) assert.Equal(t, l1Tx.Amount, rollupEvents.L1UserTx[0].L1UserTx.Amount) - assert.Equal(t, rollupClientAux.client.account.Address, rollupEvents.L1UserTx[0].L1UserTx.FromEthAddr) + assert.Equal(t, rollupClientAux2.client.account.Address, rollupEvents.L1UserTx[0].L1UserTx.FromEthAddr) } -func TestRollupL1UserTxERC777DepositTransfer(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) +func TestRollupL1UserTxERC20PermitDepositTransfer(t *testing.T) { + rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(3) fromIdxInt64 := int64(0) @@ -467,7 +440,7 @@ func TestRollupL1UserTxERC777DepositTransfer(t *testing.T) { Amount: big.NewInt(0), } - _, err = rollupClientAux.RollupL1UserTxERC777(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC777, toIdxInt64) + _, err = rollupClientAux.RollupL1UserTxERC20Permit(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC777, toIdxInt64, deadline) require.Nil(t, err) currentBlockNum, _ := rollupClient.client.EthCurrentBlock() @@ -481,7 +454,7 @@ func TestRollupL1UserTxERC777DepositTransfer(t *testing.T) { } func TestRollupL1UserTxETHCreateAccountDepositTransfer(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(2) fromIdxInt64 := int64(0) @@ -510,7 +483,7 @@ func TestRollupL1UserTxETHCreateAccountDepositTransfer(t *testing.T) { } func TestRollupL1UserTxERC20CreateAccountDepositTransfer(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClientAux2, err := NewRollupClient(ethereumClientAux2, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(1) fromIdxInt64 := int64(0) @@ -520,11 +493,11 @@ func TestRollupL1UserTxERC20CreateAccountDepositTransfer(t *testing.T) { FromIdx: common.Idx(fromIdxInt64), ToIdx: common.Idx(toIdxInt64), LoadAmount: big.NewInt(10), - TokenID: common.TokenID(tokenIDERC20), + TokenID: common.TokenID(tokenHEZID), Amount: big.NewInt(0), } - _, err = rollupClientAux.RollupL1UserTxERC20ETH(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC20, toIdxInt64) + _, err = rollupClientAux2.RollupL1UserTxERC20ETH(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenHEZID, toIdxInt64) require.Nil(t, err) currentBlockNum, _ := rollupClient.client.EthCurrentBlock() @@ -534,11 +507,11 @@ func TestRollupL1UserTxERC20CreateAccountDepositTransfer(t *testing.T) { assert.Equal(t, l1Tx.LoadAmount, rollupEvents.L1UserTx[0].L1UserTx.LoadAmount) assert.Equal(t, l1Tx.TokenID, rollupEvents.L1UserTx[0].L1UserTx.TokenID) assert.Equal(t, l1Tx.Amount, rollupEvents.L1UserTx[0].L1UserTx.Amount) - assert.Equal(t, rollupClientAux.client.account.Address, rollupEvents.L1UserTx[0].L1UserTx.FromEthAddr) + assert.Equal(t, rollupClientAux2.client.account.Address, rollupEvents.L1UserTx[0].L1UserTx.FromEthAddr) } -func TestRollupL1UserTxERC777CreateAccountDepositTransfer(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) +func TestRollupL1UserTxERC20PermitCreateAccountDepositTransfer(t *testing.T) { + rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(3) fromIdxInt64 := int64(0) @@ -552,7 +525,7 @@ func TestRollupL1UserTxERC777CreateAccountDepositTransfer(t *testing.T) { Amount: big.NewInt(0), } - _, err = rollupClientAux.RollupL1UserTxERC777(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC777, toIdxInt64) + _, err = rollupClientAux.RollupL1UserTxERC20Permit(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC777, toIdxInt64, deadline) require.Nil(t, err) currentBlockNum, _ := rollupClient.client.EthCurrentBlock() @@ -566,7 +539,7 @@ func TestRollupL1UserTxERC777CreateAccountDepositTransfer(t *testing.T) { } func TestRollupL1UserTxETHForceTransfer(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(2) fromIdxInt64 := int64(0) @@ -595,7 +568,7 @@ func TestRollupL1UserTxETHForceTransfer(t *testing.T) { } func TestRollupL1UserTxERC20ForceTransfer(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClientAux2, err := NewRollupClient(ethereumClientAux2, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(1) fromIdxInt64 := int64(0) @@ -605,11 +578,11 @@ func TestRollupL1UserTxERC20ForceTransfer(t *testing.T) { FromIdx: common.Idx(fromIdxInt64), ToIdx: common.Idx(toIdxInt64), LoadAmount: big.NewInt(10), - TokenID: common.TokenID(tokenIDERC20), + TokenID: common.TokenID(tokenHEZID), Amount: big.NewInt(0), } - _, err = rollupClientAux.RollupL1UserTxERC20ETH(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC20, toIdxInt64) + _, err = rollupClientAux2.RollupL1UserTxERC20ETH(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenHEZID, toIdxInt64) require.Nil(t, err) currentBlockNum, _ := rollupClient.client.EthCurrentBlock() @@ -619,11 +592,11 @@ func TestRollupL1UserTxERC20ForceTransfer(t *testing.T) { assert.Equal(t, l1Tx.LoadAmount, rollupEvents.L1UserTx[0].L1UserTx.LoadAmount) assert.Equal(t, l1Tx.TokenID, rollupEvents.L1UserTx[0].L1UserTx.TokenID) assert.Equal(t, l1Tx.Amount, rollupEvents.L1UserTx[0].L1UserTx.Amount) - assert.Equal(t, rollupClientAux.client.account.Address, rollupEvents.L1UserTx[0].L1UserTx.FromEthAddr) + assert.Equal(t, rollupClientAux2.client.account.Address, rollupEvents.L1UserTx[0].L1UserTx.FromEthAddr) } -func TestRollupL1UserTxERC777ForceTransfer(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) +func TestRollupL1UserTxERC20PermitForceTransfer(t *testing.T) { + rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(3) fromIdxInt64 := int64(0) @@ -637,7 +610,7 @@ func TestRollupL1UserTxERC777ForceTransfer(t *testing.T) { Amount: big.NewInt(0), } - _, err = rollupClientAux.RollupL1UserTxERC777(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC777, toIdxInt64) + _, err = rollupClientAux.RollupL1UserTxERC20Permit(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC777, toIdxInt64, deadline) require.Nil(t, err) currentBlockNum, _ := rollupClient.client.EthCurrentBlock() @@ -651,7 +624,7 @@ func TestRollupL1UserTxERC777ForceTransfer(t *testing.T) { } func TestRollupL1UserTxETHForceExit(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(2) fromIdxInt64 := int64(0) @@ -680,7 +653,7 @@ func TestRollupL1UserTxETHForceExit(t *testing.T) { } func TestRollupL1UserTxERC20ForceExit(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClientAux2, err := NewRollupClient(ethereumClientAux2, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(1) fromIdxInt64 := int64(0) @@ -690,11 +663,11 @@ func TestRollupL1UserTxERC20ForceExit(t *testing.T) { FromIdx: common.Idx(fromIdxInt64), ToIdx: common.Idx(toIdxInt64), LoadAmount: big.NewInt(10), - TokenID: common.TokenID(tokenIDERC20), + TokenID: common.TokenID(tokenHEZID), Amount: big.NewInt(0), } - _, err = rollupClientAux.RollupL1UserTxERC20ETH(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC20, toIdxInt64) + _, err = rollupClientAux2.RollupL1UserTxERC20ETH(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenHEZID, toIdxInt64) require.Nil(t, err) currentBlockNum, _ := rollupClient.client.EthCurrentBlock() @@ -704,11 +677,11 @@ func TestRollupL1UserTxERC20ForceExit(t *testing.T) { assert.Equal(t, l1Tx.LoadAmount, rollupEvents.L1UserTx[0].L1UserTx.LoadAmount) assert.Equal(t, l1Tx.TokenID, rollupEvents.L1UserTx[0].L1UserTx.TokenID) assert.Equal(t, l1Tx.Amount, rollupEvents.L1UserTx[0].L1UserTx.Amount) - assert.Equal(t, rollupClientAux.client.account.Address, rollupEvents.L1UserTx[0].L1UserTx.FromEthAddr) + assert.Equal(t, rollupClientAux2.client.account.Address, rollupEvents.L1UserTx[0].L1UserTx.FromEthAddr) } -func TestRollupL1UserTxERC777ForceExit(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) +func TestRollupL1UserTxERC20PermitForceExit(t *testing.T) { + rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) key := genKeysBjj(3) fromIdxInt64 := int64(0) @@ -724,7 +697,7 @@ func TestRollupL1UserTxERC777ForceExit(t *testing.T) { Amount: big.NewInt(0), } - _, err = rollupClientAux.RollupL1UserTxERC777(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC777, toIdxInt64) + _, err = rollupClientAux.RollupL1UserTxERC20Permit(l1Tx.FromBJJ, fromIdxInt64, l1Tx.LoadAmount, l1Tx.Amount, tokenIDERC777, toIdxInt64, deadline) require.Nil(t, err) currentBlockNum, _ := rollupClient.client.EthCurrentBlock() @@ -783,7 +756,7 @@ func TestRollupForgeBatch2(t *testing.T) { } func TestRollupWithdrawMerkleProof(t *testing.T) { - rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZAddressConst) + rollupClientAux, err := NewRollupClient(ethereumClientAux, hermezRollupAddressConst, tokenHEZ) require.Nil(t, err) var pkComp babyjub.PublicKeyComp diff --git a/eth/wdelayer_test.go b/eth/wdelayer_test.go index 9893fbd..079f4a4 100644 --- a/eth/wdelayer_test.go +++ b/eth/wdelayer_test.go @@ -117,19 +117,19 @@ func TestWDelayerDeposit(t *testing.T) { amount.SetString("1100000000000000000", 10) wdelayerClientHermez, err := NewWDelayerClient(ethereumClientHermez, wdelayerTestAddressConst) require.Nil(t, err) - _, err = wdelayerClientHermez.WDelayerDeposit(auxAddressConst, tokenERC20AddressConst, amount) + _, err = wdelayerClientHermez.WDelayerDeposit(auxAddressConst, tokenHEZAddressConst, 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) + assert.Equal(t, tokenHEZAddressConst, wdelayerEvents.Deposit[0].Token) } func TestWDelayerDepositInfo(t *testing.T) { amount := new(big.Int) amount.SetString("1100000000000000000", 10) - state, err := wdelayerClientTest.WDelayerDepositInfo(auxAddressConst, tokenERC20AddressConst) + state, err := wdelayerClientTest.WDelayerDepositInfo(auxAddressConst, tokenHEZAddressConst) require.Nil(t, err) assert.Equal(t, state.Amount, amount) } @@ -137,16 +137,16 @@ func TestWDelayerDepositInfo(t *testing.T) { func TestWDelayerWithdrawal(t *testing.T) { amount := new(big.Int) amount.SetString("1100000000000000000", 10) - _, err := wdelayerClientTest.WDelayerWithdrawal(auxAddressConst, tokenERC20AddressConst) + _, err := wdelayerClientTest.WDelayerWithdrawal(auxAddressConst, tokenHEZAddressConst) require.Contains(t, err.Error(), "Withdrawal not allowed yet") addBlocks(newWithdrawalDelay.Int64(), ethClientDialURL) - _, err = wdelayerClientTest.WDelayerWithdrawal(auxAddressConst, tokenERC20AddressConst) + _, err = wdelayerClientTest.WDelayerWithdrawal(auxAddressConst, tokenHEZAddressConst) require.Nil(t, err) 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, tokenERC20AddressConst, wdelayerEvents.Withdraw[0].Token) + assert.Equal(t, tokenHEZAddressConst, wdelayerEvents.Withdraw[0].Token) } func TestWDelayerSecondDeposit(t *testing.T) { @@ -154,13 +154,13 @@ func TestWDelayerSecondDeposit(t *testing.T) { amount.SetString("1100000000000000000", 10) wdelayerClientHermez, err := NewWDelayerClient(ethereumClientHermez, wdelayerTestAddressConst) require.Nil(t, err) - _, err = wdelayerClientHermez.WDelayerDeposit(auxAddressConst, tokenERC20AddressConst, amount) + _, err = wdelayerClientHermez.WDelayerDeposit(auxAddressConst, tokenHEZAddressConst, 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) + assert.Equal(t, tokenHEZAddressConst, wdelayerEvents.Deposit[0].Token) } func TestWDelayerEnableEmergencyMode(t *testing.T) { @@ -192,15 +192,15 @@ func TestWDelayerEscapeHatchWithdrawal(t *testing.T) { amount.SetString("10000000000000000", 10) wdelayerClientWhite, err := NewWDelayerClient(ethereumClientWhite, wdelayerTestAddressConst) require.Nil(t, err) - _, err = wdelayerClientWhite.WDelayerEscapeHatchWithdrawal(governanceAddressConst, tokenERC20AddressConst, amount) + _, err = wdelayerClientWhite.WDelayerEscapeHatchWithdrawal(governanceAddressConst, tokenHEZAddressConst, amount) require.Contains(t, err.Error(), "NO MAX_EMERGENCY_MODE_TIME") seconds := maxEmergencyModeTime.Seconds() addTime(seconds, ethClientDialURL) - _, err = wdelayerClientWhite.WDelayerEscapeHatchWithdrawal(governanceAddressConst, tokenERC20AddressConst, amount) + _, err = wdelayerClientWhite.WDelayerEscapeHatchWithdrawal(governanceAddressConst, tokenHEZAddressConst, amount) require.Nil(t, err) currentBlockNum, _ := wdelayerClientTest.client.EthCurrentBlock() wdelayerEvents, _, _ := wdelayerClientTest.WDelayerEventsByBlock(currentBlockNum) - assert.Equal(t, tokenERC20AddressConst, wdelayerEvents.EscapeHatchWithdrawal[0].Token) + assert.Equal(t, tokenHEZAddressConst, 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)