diff --git a/op-bindings/Makefile b/op-bindings/Makefile index 97b26890bc41..2d30322b8577 100644 --- a/op-bindings/Makefile +++ b/op-bindings/Makefile @@ -13,7 +13,7 @@ version: compile: cd $(contracts-dir) && \ forge clean && \ - pnpm build + pnpm build:linkedLibraries bindings: compile bindings-build diff --git a/op-bindings/artifacts.json b/op-bindings/artifacts.json index f7cf761e98f1..e5e8b5389ceb 100644 --- a/op-bindings/artifacts.json +++ b/op-bindings/artifacts.json @@ -42,5 +42,11 @@ "DelayedVetoable", "ISemver", "CeloRegistry", - "GoldToken" + "GoldToken", + "FeeHandler", + "FeeCurrencyWhitelist", + "MentoFeeHandlerSeller", + "UniswapFeeHandlerSeller", + "SortedOracles", + "AddressSortedLinkedListWithMedian" ] diff --git a/op-bindings/bindings/addresssortedlinkedlistwithmedian.go b/op-bindings/bindings/addresssortedlinkedlistwithmedian.go new file mode 100644 index 000000000000..77d5d12abc72 --- /dev/null +++ b/op-bindings/bindings/addresssortedlinkedlistwithmedian.go @@ -0,0 +1,264 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "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 ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// AddressSortedLinkedListWithMedianMetaData contains all meta data concerning the AddressSortedLinkedListWithMedian contract. +var AddressSortedLinkedListWithMedianMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"b\",\"type\":\"bytes32\"}],\"name\":\"toAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"a\",\"type\":\"address\"}],\"name\":\"toBytes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", + Bin: "0x611a3961003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100e95760003560e01c80636eafa6c31161009657806395073a791161007057806395073a7914610213578063c1e728e914610236578063d4a0927214610256578063d938ec7b1461027657600080fd5b80636eafa6c3146101cb5780637c6bb862146101de578063832a2147146101f157600080fd5b8063593b79fe116100c7578063593b79fe1461015257806359d556a8146101965780636cfa3873146101a957600080fd5b80630944c594146100ee5780633118159e1461012b578063341f66231461013e575b600080fd5b6101016100fc3660046116e0565b610289565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101016101393660046116e0565b61029c565b61010161014c3660046116e0565b60601c90565b610188610160366004611722565b60601b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690565b604051908152602001610122565b6101886101a43660046116e0565b6102ac565b6101bc6101b73660046116e0565b6102c5565b604051610122939291906117df565b6101886101d93660046116e0565b610512565b6101886101ec366004611883565b61051f565b8180156101fd57600080fd5b5061021161020c3660046118af565b61055f565b005b610226610221366004611883565b6105a5565b6040519015158152602001610122565b81801561024257600080fd5b50610211610251366004611883565b6105d7565b81801561026257600080fd5b506102116102713660046118af565b61060b565b6101016102843660046116e0565b61064a565b600061029661014c835490565b92915050565b600061029661014c836005015490565b600061029682600501548361065a90919063ffffffff16565b606080606060006102d585610670565b90506000815167ffffffffffffffff8111156102f3576102f3611906565b60405190808252806020026020018201604052801561031c578160200160208202803683370190505b5090506000825167ffffffffffffffff81111561033b5761033b611906565b604051908082528060200260200182016040528015610364578160200160208202803683370190505b5090506000825167ffffffffffffffff81111561038357610383611906565b6040519080825280602002602001820160405280156103ac578160200160208202803683370190505b50905060005b8451811015610503576103de8582815181106103d0576103d0611935565b602002602001015160601c90565b8482815181106103f0576103f0611935565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061045685828151811061043f5761043f611935565b60200260200101518a61065a90919063ffffffff16565b83828151811061046857610468611935565b60200260200101818152505088600601600086838151811061048c5761048c611935565b6020026020010151815260200190815260200160002060009054906101000a900460ff168282815181106104c2576104c2611935565b602002602001019060038111156104db576104db61173d565b908160038111156104ee576104ee61173d565b905250806104fb81611993565b9150506103b2565b50919790965090945092505050565b6000610296826002015490565b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606082901b1660009081526004830160205260408120545b9392505050565b61059e857fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087811b821691879187811b8216919087901b1661067b565b5050505050565b6000610558837fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606085901b16610692565b610607827fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606084901b1661069e565b5050565b61059e857fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087811b821691879187811b8216919087901b166107ad565b600061029661014c836001015490565b6000908152600491909101602052604090205490565b6060610296826109c5565b610685858561069e565b61059e85858585856107ad565b600061055883836109d0565b600282015460009081036106b85760006005840155610794565b6002838101546106c891906119cb565b600003610734576002600083815260068501602052604090205460ff1660038111156106f6576106f661173d565b148061072657506003600083815260068501602052604090205460ff1660038111156107245761072461173d565b145b1561072f575060015b610794565b6001600083815260068501602052604090205460ff16600381111561075b5761075b61173d565b148061078b57506003600083815260068501602052604090205460ff1660038111156107895761078961173d565b145b15610794575060025b61079e83826109ec565b6107a88383610b06565b505050565b6107ba8585858585610b24565b6000848152600386016020526040812060028701549091906001036108265760058701869055600086815260068801602052604090208054600391907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001835b02179055506109b2565b60028781015461083691906119cb565b6001036108f75781541580610871575060018254600090815260068901602052604090205460ff16600381111561086f5761086f61173d565b145b156108b7575060008581526006870160205260409020805460019182917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016828061081c565b600086815260068801602052604090208054600291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018361081c565b60018201541580610931575060026001830154600090815260068901602052604090205460ff16600381111561092f5761092f61173d565b145b15610978575060008581526006870160205260409020805460029182917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018361081c565b6000868152600688016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b6109bc87826109ec565b50505050505050565b606061029682610d62565b600081815260038301602052604081206002015460ff16610558565b6005820154600090815260038301602052604090206001826002811115610a1557610a1561173d565b03610a62576005830180546000908152600685016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600217905581549055610ac3565b6002826002811115610a7657610a7661173d565b03610ac3576005830180546000908152600685016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915582015490555b50506005810154600090815260069091016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166003179055565b610b108282610d72565b600090815260049091016020526040812055565b8315801590610b335750818414155b8015610b3f5750808414155b8015610b525750610b5085856109d0565b155b610bbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f696e76616c6964206b657900000000000000000000000000000000000000000060448201526064015b60405180910390fd5b81151580610bca57508015155b80610bd757506002850154155b610c3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6772656174657220616e64206c6573736572206b6579207a65726f00000000006044820152606401610bb4565b610c4785836109d0565b80610c50575081155b610cb6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c6964206c6573736572206b657900000000000000000000000000006044820152606401610bb4565b610cc085826109d0565b80610cc9575080155b610d2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c69642067726561746572206b6579000000000000000000000000006044820152606401610bb4565b610d3b85848484610eca565b9092509050610d4c85858484611025565b5050600091825260049092016020526040902055565b6060610296828360020154611573565b600081815260038301602052604090208115801590610da45750600082815260038401602052604090206002015460ff165b610e0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6b6579206e6f7420696e206c69737400000000000000000000000000000000006044820152606401610bb4565b805415610e3157805460009081526003840160205260409020600180830154910155610e3c565b600180820154908401555b600181015415610e645760018101546000908152600384016020526040902081549055610e69565b805483555b60008281526003840160205260408120818155600180820192909255600290810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055840154610ebd9190611a06565b8360020181905550505050565b60008083158015610ee95750610ee98686868960000160010154611688565b15610efc5750506001840154829061101c565b82158015610f1557508554610f15908790879086611688565b15610f2457505083548161101c565b8315801590610f5157506000848152600387016020526040902060010154610f5190879087908790611688565b15610f735750506000828152600385016020526040902060010154829061101c565b8215801590610f9c57506000838152600387016020526040902054610f9c908790879086611688565b15610fba57505060008181526003850160205260409020548161101c565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f676574206c657373657220616e642067726561746572206661696c75726500006044820152606401610bb4565b94509492505050565b8261108c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4b6579206d75737420626520646566696e6564000000000000000000000000006044820152606401610bb4565b600083815260038501602052604090206002015460ff161561110a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f43616e277420696e7365727420616e206578697374696e6720656c656d656e746044820152606401610bb4565b82821415801561111a5750828114155b6111a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4b65792063616e6e6f74206265207468652073616d652061732070726576696f60448201527f75734b6579206f72206e6578744b6579000000000000000000000000000000006064820152608401610bb4565b60008381526003850160205260408120600280820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558601549091036111fd5760018501849055838555611554565b8215158061120a57508115155b611296576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4569746865722070726576696f75734b6579206f72206e6578744b6579206d7560448201527f737420626520646566696e6564000000000000000000000000000000000000006064820152608401610bb4565b8281556001810182905582156113f757600083815260038601602052604090206002015460ff16611349576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f49662070726576696f75734b657920697320646566696e65642c206974206d7560448201527f737420657869737420696e20746865206c6973740000000000000000000000006064820152608401610bb4565b60008381526003860160205260409020600181015483146113ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f70726576696f75734b6579206d7573742062652061646a6163656e7420746f2060448201527f6e6578744b6579000000000000000000000000000000000000000000000000006064820152608401610bb4565b6001018490556113ff565b600185018490555b811561155057600082815260038601602052604090206002015460ff166114a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4966206e6578744b657920697320646566696e65642c206974206d757374206560448201527f7869737420696e20746865206c697374000000000000000000000000000000006064820152608401610bb4565b6000828152600386016020526040902080548414611548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f70726576696f75734b6579206d7573742062652061646a6163656e7420746f2060448201527f6e6578744b6579000000000000000000000000000000000000000000000000006064820152608401610bb4565b849055611554565b8385555b6002850154611564906001611a19565b85600201819055505050505050565b606082600201548211156115e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6e6f7420656e6f75676820656c656d656e7473000000000000000000000000006044820152606401610bb4565b60008267ffffffffffffffff8111156115fe576115fe611906565b604051908082528060200260200182016040528015611627578160200160208202803683370190505b50845490915060005b8481101561167e578183828151811061164b5761164b611935565b602090810291909101810191909152600092835260038701905260409091205490611677816001611a19565b9050611630565b5090949350505050565b6000808315806116a8575060008481526004870160205260409020548510155b905060008315806116c9575060008481526004880160205260409020548611155b90508180156116d55750805b979650505050505050565b6000602082840312156116f257600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461171d57600080fd5b919050565b60006020828403121561173457600080fd5b610558826116f9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60008151808452602080850194508084016000805b848110156117d357825160048082106117c0577f4e487b7100000000000000000000000000000000000000000000000000000000845260218152602484fd5b5088529683019691830191600101611781565b50959695505050505050565b606080825284519082018190526000906020906080840190828801845b8281101561182e57815173ffffffffffffffffffffffffffffffffffffffff16845292840192908401906001016117fc565b5050508381038285015285518082528683019183019060005b8181101561186357835183529284019291840191600101611847565b50508481036040860152611877818761176c565b98975050505050505050565b6000806040838503121561189657600080fd5b823591506118a6602084016116f9565b90509250929050565b600080600080600060a086880312156118c757600080fd5b853594506118d7602087016116f9565b9350604086013592506118ec606087016116f9565b91506118fa608087016116f9565b90509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036119c4576119c4611964565b5060010190565b600082611a01577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500690565b8181038181111561029657610296611964565b808201808211156102965761029661196456fea164736f6c6343000813000a", +} + +// AddressSortedLinkedListWithMedianABI is the input ABI used to generate the binding from. +// Deprecated: Use AddressSortedLinkedListWithMedianMetaData.ABI instead. +var AddressSortedLinkedListWithMedianABI = AddressSortedLinkedListWithMedianMetaData.ABI + +// AddressSortedLinkedListWithMedianBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use AddressSortedLinkedListWithMedianMetaData.Bin instead. +var AddressSortedLinkedListWithMedianBin = AddressSortedLinkedListWithMedianMetaData.Bin + +// DeployAddressSortedLinkedListWithMedian deploys a new Ethereum contract, binding an instance of AddressSortedLinkedListWithMedian to it. +func DeployAddressSortedLinkedListWithMedian(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *AddressSortedLinkedListWithMedian, error) { + parsed, err := AddressSortedLinkedListWithMedianMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(AddressSortedLinkedListWithMedianBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &AddressSortedLinkedListWithMedian{AddressSortedLinkedListWithMedianCaller: AddressSortedLinkedListWithMedianCaller{contract: contract}, AddressSortedLinkedListWithMedianTransactor: AddressSortedLinkedListWithMedianTransactor{contract: contract}, AddressSortedLinkedListWithMedianFilterer: AddressSortedLinkedListWithMedianFilterer{contract: contract}}, nil +} + +// AddressSortedLinkedListWithMedian is an auto generated Go binding around an Ethereum contract. +type AddressSortedLinkedListWithMedian struct { + AddressSortedLinkedListWithMedianCaller // Read-only binding to the contract + AddressSortedLinkedListWithMedianTransactor // Write-only binding to the contract + AddressSortedLinkedListWithMedianFilterer // Log filterer for contract events +} + +// AddressSortedLinkedListWithMedianCaller is an auto generated read-only Go binding around an Ethereum contract. +type AddressSortedLinkedListWithMedianCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressSortedLinkedListWithMedianTransactor is an auto generated write-only Go binding around an Ethereum contract. +type AddressSortedLinkedListWithMedianTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressSortedLinkedListWithMedianFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type AddressSortedLinkedListWithMedianFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressSortedLinkedListWithMedianSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type AddressSortedLinkedListWithMedianSession struct { + Contract *AddressSortedLinkedListWithMedian // 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 +} + +// AddressSortedLinkedListWithMedianCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type AddressSortedLinkedListWithMedianCallerSession struct { + Contract *AddressSortedLinkedListWithMedianCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// AddressSortedLinkedListWithMedianTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type AddressSortedLinkedListWithMedianTransactorSession struct { + Contract *AddressSortedLinkedListWithMedianTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// AddressSortedLinkedListWithMedianRaw is an auto generated low-level Go binding around an Ethereum contract. +type AddressSortedLinkedListWithMedianRaw struct { + Contract *AddressSortedLinkedListWithMedian // Generic contract binding to access the raw methods on +} + +// AddressSortedLinkedListWithMedianCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type AddressSortedLinkedListWithMedianCallerRaw struct { + Contract *AddressSortedLinkedListWithMedianCaller // Generic read-only contract binding to access the raw methods on +} + +// AddressSortedLinkedListWithMedianTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type AddressSortedLinkedListWithMedianTransactorRaw struct { + Contract *AddressSortedLinkedListWithMedianTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewAddressSortedLinkedListWithMedian creates a new instance of AddressSortedLinkedListWithMedian, bound to a specific deployed contract. +func NewAddressSortedLinkedListWithMedian(address common.Address, backend bind.ContractBackend) (*AddressSortedLinkedListWithMedian, error) { + contract, err := bindAddressSortedLinkedListWithMedian(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &AddressSortedLinkedListWithMedian{AddressSortedLinkedListWithMedianCaller: AddressSortedLinkedListWithMedianCaller{contract: contract}, AddressSortedLinkedListWithMedianTransactor: AddressSortedLinkedListWithMedianTransactor{contract: contract}, AddressSortedLinkedListWithMedianFilterer: AddressSortedLinkedListWithMedianFilterer{contract: contract}}, nil +} + +// NewAddressSortedLinkedListWithMedianCaller creates a new read-only instance of AddressSortedLinkedListWithMedian, bound to a specific deployed contract. +func NewAddressSortedLinkedListWithMedianCaller(address common.Address, caller bind.ContractCaller) (*AddressSortedLinkedListWithMedianCaller, error) { + contract, err := bindAddressSortedLinkedListWithMedian(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &AddressSortedLinkedListWithMedianCaller{contract: contract}, nil +} + +// NewAddressSortedLinkedListWithMedianTransactor creates a new write-only instance of AddressSortedLinkedListWithMedian, bound to a specific deployed contract. +func NewAddressSortedLinkedListWithMedianTransactor(address common.Address, transactor bind.ContractTransactor) (*AddressSortedLinkedListWithMedianTransactor, error) { + contract, err := bindAddressSortedLinkedListWithMedian(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &AddressSortedLinkedListWithMedianTransactor{contract: contract}, nil +} + +// NewAddressSortedLinkedListWithMedianFilterer creates a new log filterer instance of AddressSortedLinkedListWithMedian, bound to a specific deployed contract. +func NewAddressSortedLinkedListWithMedianFilterer(address common.Address, filterer bind.ContractFilterer) (*AddressSortedLinkedListWithMedianFilterer, error) { + contract, err := bindAddressSortedLinkedListWithMedian(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &AddressSortedLinkedListWithMedianFilterer{contract: contract}, nil +} + +// bindAddressSortedLinkedListWithMedian binds a generic wrapper to an already deployed contract. +func bindAddressSortedLinkedListWithMedian(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(AddressSortedLinkedListWithMedianABI)) + 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 (_AddressSortedLinkedListWithMedian *AddressSortedLinkedListWithMedianRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _AddressSortedLinkedListWithMedian.Contract.AddressSortedLinkedListWithMedianCaller.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 (_AddressSortedLinkedListWithMedian *AddressSortedLinkedListWithMedianRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AddressSortedLinkedListWithMedian.Contract.AddressSortedLinkedListWithMedianTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_AddressSortedLinkedListWithMedian *AddressSortedLinkedListWithMedianRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _AddressSortedLinkedListWithMedian.Contract.AddressSortedLinkedListWithMedianTransactor.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 (_AddressSortedLinkedListWithMedian *AddressSortedLinkedListWithMedianCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _AddressSortedLinkedListWithMedian.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 (_AddressSortedLinkedListWithMedian *AddressSortedLinkedListWithMedianTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AddressSortedLinkedListWithMedian.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_AddressSortedLinkedListWithMedian *AddressSortedLinkedListWithMedianTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _AddressSortedLinkedListWithMedian.Contract.contract.Transact(opts, method, params...) +} + +// ToAddress is a free data retrieval call binding the contract method 0x341f6623. +// +// Solidity: function toAddress(bytes32 b) pure returns(address) +func (_AddressSortedLinkedListWithMedian *AddressSortedLinkedListWithMedianCaller) ToAddress(opts *bind.CallOpts, b [32]byte) (common.Address, error) { + var out []interface{} + err := _AddressSortedLinkedListWithMedian.contract.Call(opts, &out, "toAddress", b) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ToAddress is a free data retrieval call binding the contract method 0x341f6623. +// +// Solidity: function toAddress(bytes32 b) pure returns(address) +func (_AddressSortedLinkedListWithMedian *AddressSortedLinkedListWithMedianSession) ToAddress(b [32]byte) (common.Address, error) { + return _AddressSortedLinkedListWithMedian.Contract.ToAddress(&_AddressSortedLinkedListWithMedian.CallOpts, b) +} + +// ToAddress is a free data retrieval call binding the contract method 0x341f6623. +// +// Solidity: function toAddress(bytes32 b) pure returns(address) +func (_AddressSortedLinkedListWithMedian *AddressSortedLinkedListWithMedianCallerSession) ToAddress(b [32]byte) (common.Address, error) { + return _AddressSortedLinkedListWithMedian.Contract.ToAddress(&_AddressSortedLinkedListWithMedian.CallOpts, b) +} + +// ToBytes is a free data retrieval call binding the contract method 0x593b79fe. +// +// Solidity: function toBytes(address a) pure returns(bytes32) +func (_AddressSortedLinkedListWithMedian *AddressSortedLinkedListWithMedianCaller) ToBytes(opts *bind.CallOpts, a common.Address) ([32]byte, error) { + var out []interface{} + err := _AddressSortedLinkedListWithMedian.contract.Call(opts, &out, "toBytes", a) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ToBytes is a free data retrieval call binding the contract method 0x593b79fe. +// +// Solidity: function toBytes(address a) pure returns(bytes32) +func (_AddressSortedLinkedListWithMedian *AddressSortedLinkedListWithMedianSession) ToBytes(a common.Address) ([32]byte, error) { + return _AddressSortedLinkedListWithMedian.Contract.ToBytes(&_AddressSortedLinkedListWithMedian.CallOpts, a) +} + +// ToBytes is a free data retrieval call binding the contract method 0x593b79fe. +// +// Solidity: function toBytes(address a) pure returns(bytes32) +func (_AddressSortedLinkedListWithMedian *AddressSortedLinkedListWithMedianCallerSession) ToBytes(a common.Address) ([32]byte, error) { + return _AddressSortedLinkedListWithMedian.Contract.ToBytes(&_AddressSortedLinkedListWithMedian.CallOpts, a) +} diff --git a/op-bindings/bindings/addresssortedlinkedlistwithmedian_more.go b/op-bindings/bindings/addresssortedlinkedlistwithmedian_more.go new file mode 100644 index 000000000000..7ffd22a867bc --- /dev/null +++ b/op-bindings/bindings/addresssortedlinkedlistwithmedian_more.go @@ -0,0 +1,25 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "encoding/json" + + "github.com/ethereum-optimism/optimism/op-bindings/solc" +) + +const AddressSortedLinkedListWithMedianStorageLayoutJSON = "{\"storage\":null,\"types\":{}}" + +var AddressSortedLinkedListWithMedianStorageLayout = new(solc.StorageLayout) + +var AddressSortedLinkedListWithMedianDeployedBin = "0x73000000000000000000000000000000000000000030146080604052600436106100e95760003560e01c80636eafa6c31161009657806395073a791161007057806395073a7914610213578063c1e728e914610236578063d4a0927214610256578063d938ec7b1461027657600080fd5b80636eafa6c3146101cb5780637c6bb862146101de578063832a2147146101f157600080fd5b8063593b79fe116100c7578063593b79fe1461015257806359d556a8146101965780636cfa3873146101a957600080fd5b80630944c594146100ee5780633118159e1461012b578063341f66231461013e575b600080fd5b6101016100fc3660046116e0565b610289565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101016101393660046116e0565b61029c565b61010161014c3660046116e0565b60601c90565b610188610160366004611722565b60601b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690565b604051908152602001610122565b6101886101a43660046116e0565b6102ac565b6101bc6101b73660046116e0565b6102c5565b604051610122939291906117df565b6101886101d93660046116e0565b610512565b6101886101ec366004611883565b61051f565b8180156101fd57600080fd5b5061021161020c3660046118af565b61055f565b005b610226610221366004611883565b6105a5565b6040519015158152602001610122565b81801561024257600080fd5b50610211610251366004611883565b6105d7565b81801561026257600080fd5b506102116102713660046118af565b61060b565b6101016102843660046116e0565b61064a565b600061029661014c835490565b92915050565b600061029661014c836005015490565b600061029682600501548361065a90919063ffffffff16565b606080606060006102d585610670565b90506000815167ffffffffffffffff8111156102f3576102f3611906565b60405190808252806020026020018201604052801561031c578160200160208202803683370190505b5090506000825167ffffffffffffffff81111561033b5761033b611906565b604051908082528060200260200182016040528015610364578160200160208202803683370190505b5090506000825167ffffffffffffffff81111561038357610383611906565b6040519080825280602002602001820160405280156103ac578160200160208202803683370190505b50905060005b8451811015610503576103de8582815181106103d0576103d0611935565b602002602001015160601c90565b8482815181106103f0576103f0611935565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061045685828151811061043f5761043f611935565b60200260200101518a61065a90919063ffffffff16565b83828151811061046857610468611935565b60200260200101818152505088600601600086838151811061048c5761048c611935565b6020026020010151815260200190815260200160002060009054906101000a900460ff168282815181106104c2576104c2611935565b602002602001019060038111156104db576104db61173d565b908160038111156104ee576104ee61173d565b905250806104fb81611993565b9150506103b2565b50919790965090945092505050565b6000610296826002015490565b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606082901b1660009081526004830160205260408120545b9392505050565b61059e857fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087811b821691879187811b8216919087901b1661067b565b5050505050565b6000610558837fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606085901b16610692565b610607827fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606084901b1661069e565b5050565b61059e857fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087811b821691879187811b8216919087901b166107ad565b600061029661014c836001015490565b6000908152600491909101602052604090205490565b6060610296826109c5565b610685858561069e565b61059e85858585856107ad565b600061055883836109d0565b600282015460009081036106b85760006005840155610794565b6002838101546106c891906119cb565b600003610734576002600083815260068501602052604090205460ff1660038111156106f6576106f661173d565b148061072657506003600083815260068501602052604090205460ff1660038111156107245761072461173d565b145b1561072f575060015b610794565b6001600083815260068501602052604090205460ff16600381111561075b5761075b61173d565b148061078b57506003600083815260068501602052604090205460ff1660038111156107895761078961173d565b145b15610794575060025b61079e83826109ec565b6107a88383610b06565b505050565b6107ba8585858585610b24565b6000848152600386016020526040812060028701549091906001036108265760058701869055600086815260068801602052604090208054600391907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001835b02179055506109b2565b60028781015461083691906119cb565b6001036108f75781541580610871575060018254600090815260068901602052604090205460ff16600381111561086f5761086f61173d565b145b156108b7575060008581526006870160205260409020805460019182917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016828061081c565b600086815260068801602052604090208054600291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018361081c565b60018201541580610931575060026001830154600090815260068901602052604090205460ff16600381111561092f5761092f61173d565b145b15610978575060008581526006870160205260409020805460029182917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018361081c565b6000868152600688016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b6109bc87826109ec565b50505050505050565b606061029682610d62565b600081815260038301602052604081206002015460ff16610558565b6005820154600090815260038301602052604090206001826002811115610a1557610a1561173d565b03610a62576005830180546000908152600685016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600217905581549055610ac3565b6002826002811115610a7657610a7661173d565b03610ac3576005830180546000908152600685016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915582015490555b50506005810154600090815260069091016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166003179055565b610b108282610d72565b600090815260049091016020526040812055565b8315801590610b335750818414155b8015610b3f5750808414155b8015610b525750610b5085856109d0565b155b610bbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f696e76616c6964206b657900000000000000000000000000000000000000000060448201526064015b60405180910390fd5b81151580610bca57508015155b80610bd757506002850154155b610c3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6772656174657220616e64206c6573736572206b6579207a65726f00000000006044820152606401610bb4565b610c4785836109d0565b80610c50575081155b610cb6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c6964206c6573736572206b657900000000000000000000000000006044820152606401610bb4565b610cc085826109d0565b80610cc9575080155b610d2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c69642067726561746572206b6579000000000000000000000000006044820152606401610bb4565b610d3b85848484610eca565b9092509050610d4c85858484611025565b5050600091825260049092016020526040902055565b6060610296828360020154611573565b600081815260038301602052604090208115801590610da45750600082815260038401602052604090206002015460ff165b610e0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6b6579206e6f7420696e206c69737400000000000000000000000000000000006044820152606401610bb4565b805415610e3157805460009081526003840160205260409020600180830154910155610e3c565b600180820154908401555b600181015415610e645760018101546000908152600384016020526040902081549055610e69565b805483555b60008281526003840160205260408120818155600180820192909255600290810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055840154610ebd9190611a06565b8360020181905550505050565b60008083158015610ee95750610ee98686868960000160010154611688565b15610efc5750506001840154829061101c565b82158015610f1557508554610f15908790879086611688565b15610f2457505083548161101c565b8315801590610f5157506000848152600387016020526040902060010154610f5190879087908790611688565b15610f735750506000828152600385016020526040902060010154829061101c565b8215801590610f9c57506000838152600387016020526040902054610f9c908790879086611688565b15610fba57505060008181526003850160205260409020548161101c565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f676574206c657373657220616e642067726561746572206661696c75726500006044820152606401610bb4565b94509492505050565b8261108c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4b6579206d75737420626520646566696e6564000000000000000000000000006044820152606401610bb4565b600083815260038501602052604090206002015460ff161561110a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f43616e277420696e7365727420616e206578697374696e6720656c656d656e746044820152606401610bb4565b82821415801561111a5750828114155b6111a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4b65792063616e6e6f74206265207468652073616d652061732070726576696f60448201527f75734b6579206f72206e6578744b6579000000000000000000000000000000006064820152608401610bb4565b60008381526003850160205260408120600280820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558601549091036111fd5760018501849055838555611554565b8215158061120a57508115155b611296576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4569746865722070726576696f75734b6579206f72206e6578744b6579206d7560448201527f737420626520646566696e6564000000000000000000000000000000000000006064820152608401610bb4565b8281556001810182905582156113f757600083815260038601602052604090206002015460ff16611349576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f49662070726576696f75734b657920697320646566696e65642c206974206d7560448201527f737420657869737420696e20746865206c6973740000000000000000000000006064820152608401610bb4565b60008381526003860160205260409020600181015483146113ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f70726576696f75734b6579206d7573742062652061646a6163656e7420746f2060448201527f6e6578744b6579000000000000000000000000000000000000000000000000006064820152608401610bb4565b6001018490556113ff565b600185018490555b811561155057600082815260038601602052604090206002015460ff166114a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4966206e6578744b657920697320646566696e65642c206974206d757374206560448201527f7869737420696e20746865206c697374000000000000000000000000000000006064820152608401610bb4565b6000828152600386016020526040902080548414611548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f70726576696f75734b6579206d7573742062652061646a6163656e7420746f2060448201527f6e6578744b6579000000000000000000000000000000000000000000000000006064820152608401610bb4565b849055611554565b8385555b6002850154611564906001611a19565b85600201819055505050505050565b606082600201548211156115e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6e6f7420656e6f75676820656c656d656e7473000000000000000000000000006044820152606401610bb4565b60008267ffffffffffffffff8111156115fe576115fe611906565b604051908082528060200260200182016040528015611627578160200160208202803683370190505b50845490915060005b8481101561167e578183828151811061164b5761164b611935565b602090810291909101810191909152600092835260038701905260409091205490611677816001611a19565b9050611630565b5090949350505050565b6000808315806116a8575060008481526004870160205260409020548510155b905060008315806116c9575060008481526004880160205260409020548611155b90508180156116d55750805b979650505050505050565b6000602082840312156116f257600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461171d57600080fd5b919050565b60006020828403121561173457600080fd5b610558826116f9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60008151808452602080850194508084016000805b848110156117d357825160048082106117c0577f4e487b7100000000000000000000000000000000000000000000000000000000845260218152602484fd5b5088529683019691830191600101611781565b50959695505050505050565b606080825284519082018190526000906020906080840190828801845b8281101561182e57815173ffffffffffffffffffffffffffffffffffffffff16845292840192908401906001016117fc565b5050508381038285015285518082528683019183019060005b8181101561186357835183529284019291840191600101611847565b50508481036040860152611877818761176c565b98975050505050505050565b6000806040838503121561189657600080fd5b823591506118a6602084016116f9565b90509250929050565b600080600080600060a086880312156118c757600080fd5b853594506118d7602087016116f9565b9350604086013592506118ec606087016116f9565b91506118fa608087016116f9565b90509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036119c4576119c4611964565b5060010190565b600082611a01577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500690565b8181038181111561029657610296611964565b808201808211156102965761029661196456fea164736f6c6343000813000a" + +func init() { + if err := json.Unmarshal([]byte(AddressSortedLinkedListWithMedianStorageLayoutJSON), AddressSortedLinkedListWithMedianStorageLayout); err != nil { + panic(err) + } + + layouts["AddressSortedLinkedListWithMedian"] = AddressSortedLinkedListWithMedianStorageLayout + deployedBytecodes["AddressSortedLinkedListWithMedian"] = AddressSortedLinkedListWithMedianDeployedBin +} diff --git a/op-bindings/bindings/feecurrencywhitelist.go b/op-bindings/bindings/feecurrencywhitelist.go new file mode 100644 index 000000000000..b26d8fae68df --- /dev/null +++ b/op-bindings/bindings/feecurrencywhitelist.go @@ -0,0 +1,886 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "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 ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// FeeCurrencyWhitelistMetaData contains all meta data concerning the FeeCurrencyWhitelist contract. +var FeeCurrencyWhitelistMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"test\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"FeeCurrencyWhitelistRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"FeeCurrencyWhitelisted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"addToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVersionNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWhitelist\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"removeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"whitelist\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50604051610a4b380380610a4b83398101604081905261002f916100a9565b8061003933610059565b80610052576000805460ff60a01b1916600160a01b1790555b50506100d2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100bb57600080fd5b815180151581146100cb57600080fd5b9392505050565b61096a806100e16000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638129fc1c11610076578063d01f63f51161005b578063d01f63f51461019e578063d48bfca7146101b3578063f2fde38b146101c657600080fd5b80638129fc1c146101785780638da5cb5b1461018057600080fd5b806354255be0116100a757806354255be014610112578063715018a6146101385780637ebd1b301461014057600080fd5b806313baf1e6146100c3578063158ef93e146100d8575b600080fd5b6100d66100d1366004610800565b6101d9565b005b6000546100fd9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020015b60405180910390f35b600180806000604080519485526020850193909352918301526060820152608001610109565b6100d66103f3565b61015361014e36600461082a565b610407565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610109565b6100d661043e565b60005473ffffffffffffffffffffffffffffffffffffffff16610153565b6101a661050b565b6040516101099190610843565b6100d66101c136600461089d565b61057a565b6100d66101d436600461089d565b61062a565b6101e16106e1565b8173ffffffffffffffffffffffffffffffffffffffff166001828154811061020b5761020b6108bf565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614610299576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e64657820646f6573206e6f74206d6174636800000000000000000000000060448201526064015b60405180910390fd5b60018054906102a881836108ee565b815481106102b8576102b86108bf565b6000918252602090912001546001805473ffffffffffffffffffffffffffffffffffffffff90921691849081106102f1576102f16108bf565b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600180548061034a5761034a61092e565b60008281526020908190207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff908301810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905590910190915560405173ffffffffffffffffffffffffffffffffffffffff851681527fc1f06ffbe5c19d22daa982fd4b3886ced05d83e2bfe7de3b67222728f5234e28910160405180910390a1505050565b6103fb6106e1565b6104056000610762565b565b6001818154811061041757600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60005474010000000000000000000000000000000000000000900460ff16156104c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f636f6e747261637420616c726561647920696e697469616c697a6564000000006044820152606401610290565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000017905561040533610762565b6060600180548060200260200160405190810160405280929190818152602001828054801561057057602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610545575b5050505050905090565b6105826106e1565b6001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fcf4fe1d1989a39011040b0c33ba1165fdeeca971a1ab2b0340b23550f93727e09060200160405180910390a150565b6106326106e1565b73ffffffffffffffffffffffffffffffffffffffff81166106d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610290565b6106de81610762565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610405576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610290565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b803573ffffffffffffffffffffffffffffffffffffffff811681146107fb57600080fd5b919050565b6000806040838503121561081357600080fd5b61081c836107d7565b946020939093013593505050565b60006020828403121561083c57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561089157835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161085f565b50909695505050505050565b6000602082840312156108af57600080fd5b6108b8826107d7565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610928577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a", +} + +// FeeCurrencyWhitelistABI is the input ABI used to generate the binding from. +// Deprecated: Use FeeCurrencyWhitelistMetaData.ABI instead. +var FeeCurrencyWhitelistABI = FeeCurrencyWhitelistMetaData.ABI + +// FeeCurrencyWhitelistBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use FeeCurrencyWhitelistMetaData.Bin instead. +var FeeCurrencyWhitelistBin = FeeCurrencyWhitelistMetaData.Bin + +// DeployFeeCurrencyWhitelist deploys a new Ethereum contract, binding an instance of FeeCurrencyWhitelist to it. +func DeployFeeCurrencyWhitelist(auth *bind.TransactOpts, backend bind.ContractBackend, test bool) (common.Address, *types.Transaction, *FeeCurrencyWhitelist, error) { + parsed, err := FeeCurrencyWhitelistMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(FeeCurrencyWhitelistBin), backend, test) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &FeeCurrencyWhitelist{FeeCurrencyWhitelistCaller: FeeCurrencyWhitelistCaller{contract: contract}, FeeCurrencyWhitelistTransactor: FeeCurrencyWhitelistTransactor{contract: contract}, FeeCurrencyWhitelistFilterer: FeeCurrencyWhitelistFilterer{contract: contract}}, nil +} + +// FeeCurrencyWhitelist is an auto generated Go binding around an Ethereum contract. +type FeeCurrencyWhitelist struct { + FeeCurrencyWhitelistCaller // Read-only binding to the contract + FeeCurrencyWhitelistTransactor // Write-only binding to the contract + FeeCurrencyWhitelistFilterer // Log filterer for contract events +} + +// FeeCurrencyWhitelistCaller is an auto generated read-only Go binding around an Ethereum contract. +type FeeCurrencyWhitelistCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// FeeCurrencyWhitelistTransactor is an auto generated write-only Go binding around an Ethereum contract. +type FeeCurrencyWhitelistTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// FeeCurrencyWhitelistFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type FeeCurrencyWhitelistFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// FeeCurrencyWhitelistSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type FeeCurrencyWhitelistSession struct { + Contract *FeeCurrencyWhitelist // 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 +} + +// FeeCurrencyWhitelistCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type FeeCurrencyWhitelistCallerSession struct { + Contract *FeeCurrencyWhitelistCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// FeeCurrencyWhitelistTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type FeeCurrencyWhitelistTransactorSession struct { + Contract *FeeCurrencyWhitelistTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// FeeCurrencyWhitelistRaw is an auto generated low-level Go binding around an Ethereum contract. +type FeeCurrencyWhitelistRaw struct { + Contract *FeeCurrencyWhitelist // Generic contract binding to access the raw methods on +} + +// FeeCurrencyWhitelistCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type FeeCurrencyWhitelistCallerRaw struct { + Contract *FeeCurrencyWhitelistCaller // Generic read-only contract binding to access the raw methods on +} + +// FeeCurrencyWhitelistTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type FeeCurrencyWhitelistTransactorRaw struct { + Contract *FeeCurrencyWhitelistTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewFeeCurrencyWhitelist creates a new instance of FeeCurrencyWhitelist, bound to a specific deployed contract. +func NewFeeCurrencyWhitelist(address common.Address, backend bind.ContractBackend) (*FeeCurrencyWhitelist, error) { + contract, err := bindFeeCurrencyWhitelist(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &FeeCurrencyWhitelist{FeeCurrencyWhitelistCaller: FeeCurrencyWhitelistCaller{contract: contract}, FeeCurrencyWhitelistTransactor: FeeCurrencyWhitelistTransactor{contract: contract}, FeeCurrencyWhitelistFilterer: FeeCurrencyWhitelistFilterer{contract: contract}}, nil +} + +// NewFeeCurrencyWhitelistCaller creates a new read-only instance of FeeCurrencyWhitelist, bound to a specific deployed contract. +func NewFeeCurrencyWhitelistCaller(address common.Address, caller bind.ContractCaller) (*FeeCurrencyWhitelistCaller, error) { + contract, err := bindFeeCurrencyWhitelist(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &FeeCurrencyWhitelistCaller{contract: contract}, nil +} + +// NewFeeCurrencyWhitelistTransactor creates a new write-only instance of FeeCurrencyWhitelist, bound to a specific deployed contract. +func NewFeeCurrencyWhitelistTransactor(address common.Address, transactor bind.ContractTransactor) (*FeeCurrencyWhitelistTransactor, error) { + contract, err := bindFeeCurrencyWhitelist(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &FeeCurrencyWhitelistTransactor{contract: contract}, nil +} + +// NewFeeCurrencyWhitelistFilterer creates a new log filterer instance of FeeCurrencyWhitelist, bound to a specific deployed contract. +func NewFeeCurrencyWhitelistFilterer(address common.Address, filterer bind.ContractFilterer) (*FeeCurrencyWhitelistFilterer, error) { + contract, err := bindFeeCurrencyWhitelist(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &FeeCurrencyWhitelistFilterer{contract: contract}, nil +} + +// bindFeeCurrencyWhitelist binds a generic wrapper to an already deployed contract. +func bindFeeCurrencyWhitelist(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(FeeCurrencyWhitelistABI)) + 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 (_FeeCurrencyWhitelist *FeeCurrencyWhitelistRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _FeeCurrencyWhitelist.Contract.FeeCurrencyWhitelistCaller.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 (_FeeCurrencyWhitelist *FeeCurrencyWhitelistRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.FeeCurrencyWhitelistTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.FeeCurrencyWhitelistTransactor.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 (_FeeCurrencyWhitelist *FeeCurrencyWhitelistCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _FeeCurrencyWhitelist.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 (_FeeCurrencyWhitelist *FeeCurrencyWhitelistTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.contract.Transact(opts, method, params...) +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistCaller) GetVersionNumber(opts *bind.CallOpts) (*big.Int, *big.Int, *big.Int, *big.Int, error) { + var out []interface{} + err := _FeeCurrencyWhitelist.contract.Call(opts, &out, "getVersionNumber") + + if err != nil { + return *new(*big.Int), *new(*big.Int), *new(*big.Int), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + out2 := *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + out3 := *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + + return out0, out1, out2, out3, err + +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistSession) GetVersionNumber() (*big.Int, *big.Int, *big.Int, *big.Int, error) { + return _FeeCurrencyWhitelist.Contract.GetVersionNumber(&_FeeCurrencyWhitelist.CallOpts) +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistCallerSession) GetVersionNumber() (*big.Int, *big.Int, *big.Int, *big.Int, error) { + return _FeeCurrencyWhitelist.Contract.GetVersionNumber(&_FeeCurrencyWhitelist.CallOpts) +} + +// GetWhitelist is a free data retrieval call binding the contract method 0xd01f63f5. +// +// Solidity: function getWhitelist() view returns(address[]) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistCaller) GetWhitelist(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _FeeCurrencyWhitelist.contract.Call(opts, &out, "getWhitelist") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetWhitelist is a free data retrieval call binding the contract method 0xd01f63f5. +// +// Solidity: function getWhitelist() view returns(address[]) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistSession) GetWhitelist() ([]common.Address, error) { + return _FeeCurrencyWhitelist.Contract.GetWhitelist(&_FeeCurrencyWhitelist.CallOpts) +} + +// GetWhitelist is a free data retrieval call binding the contract method 0xd01f63f5. +// +// Solidity: function getWhitelist() view returns(address[]) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistCallerSession) GetWhitelist() ([]common.Address, error) { + return _FeeCurrencyWhitelist.Contract.GetWhitelist(&_FeeCurrencyWhitelist.CallOpts) +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistCaller) Initialized(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _FeeCurrencyWhitelist.contract.Call(opts, &out, "initialized") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistSession) Initialized() (bool, error) { + return _FeeCurrencyWhitelist.Contract.Initialized(&_FeeCurrencyWhitelist.CallOpts) +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistCallerSession) Initialized() (bool, error) { + return _FeeCurrencyWhitelist.Contract.Initialized(&_FeeCurrencyWhitelist.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _FeeCurrencyWhitelist.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistSession) Owner() (common.Address, error) { + return _FeeCurrencyWhitelist.Contract.Owner(&_FeeCurrencyWhitelist.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistCallerSession) Owner() (common.Address, error) { + return _FeeCurrencyWhitelist.Contract.Owner(&_FeeCurrencyWhitelist.CallOpts) +} + +// Whitelist is a free data retrieval call binding the contract method 0x7ebd1b30. +// +// Solidity: function whitelist(uint256 ) view returns(address) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistCaller) Whitelist(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { + var out []interface{} + err := _FeeCurrencyWhitelist.contract.Call(opts, &out, "whitelist", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Whitelist is a free data retrieval call binding the contract method 0x7ebd1b30. +// +// Solidity: function whitelist(uint256 ) view returns(address) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistSession) Whitelist(arg0 *big.Int) (common.Address, error) { + return _FeeCurrencyWhitelist.Contract.Whitelist(&_FeeCurrencyWhitelist.CallOpts, arg0) +} + +// Whitelist is a free data retrieval call binding the contract method 0x7ebd1b30. +// +// Solidity: function whitelist(uint256 ) view returns(address) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistCallerSession) Whitelist(arg0 *big.Int) (common.Address, error) { + return _FeeCurrencyWhitelist.Contract.Whitelist(&_FeeCurrencyWhitelist.CallOpts, arg0) +} + +// AddToken is a paid mutator transaction binding the contract method 0xd48bfca7. +// +// Solidity: function addToken(address tokenAddress) returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistTransactor) AddToken(opts *bind.TransactOpts, tokenAddress common.Address) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.contract.Transact(opts, "addToken", tokenAddress) +} + +// AddToken is a paid mutator transaction binding the contract method 0xd48bfca7. +// +// Solidity: function addToken(address tokenAddress) returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistSession) AddToken(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.AddToken(&_FeeCurrencyWhitelist.TransactOpts, tokenAddress) +} + +// AddToken is a paid mutator transaction binding the contract method 0xd48bfca7. +// +// Solidity: function addToken(address tokenAddress) returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistTransactorSession) AddToken(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.AddToken(&_FeeCurrencyWhitelist.TransactOpts, tokenAddress) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistTransactor) Initialize(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.contract.Transact(opts, "initialize") +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistSession) Initialize() (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.Initialize(&_FeeCurrencyWhitelist.TransactOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistTransactorSession) Initialize() (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.Initialize(&_FeeCurrencyWhitelist.TransactOpts) +} + +// RemoveToken is a paid mutator transaction binding the contract method 0x13baf1e6. +// +// Solidity: function removeToken(address tokenAddress, uint256 index) returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistTransactor) RemoveToken(opts *bind.TransactOpts, tokenAddress common.Address, index *big.Int) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.contract.Transact(opts, "removeToken", tokenAddress, index) +} + +// RemoveToken is a paid mutator transaction binding the contract method 0x13baf1e6. +// +// Solidity: function removeToken(address tokenAddress, uint256 index) returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistSession) RemoveToken(tokenAddress common.Address, index *big.Int) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.RemoveToken(&_FeeCurrencyWhitelist.TransactOpts, tokenAddress, index) +} + +// RemoveToken is a paid mutator transaction binding the contract method 0x13baf1e6. +// +// Solidity: function removeToken(address tokenAddress, uint256 index) returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistTransactorSession) RemoveToken(tokenAddress common.Address, index *big.Int) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.RemoveToken(&_FeeCurrencyWhitelist.TransactOpts, tokenAddress, index) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistSession) RenounceOwnership() (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.RenounceOwnership(&_FeeCurrencyWhitelist.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.RenounceOwnership(&_FeeCurrencyWhitelist.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.TransferOwnership(&_FeeCurrencyWhitelist.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _FeeCurrencyWhitelist.Contract.TransferOwnership(&_FeeCurrencyWhitelist.TransactOpts, newOwner) +} + +// FeeCurrencyWhitelistFeeCurrencyWhitelistRemovedIterator is returned from FilterFeeCurrencyWhitelistRemoved and is used to iterate over the raw logs and unpacked data for FeeCurrencyWhitelistRemoved events raised by the FeeCurrencyWhitelist contract. +type FeeCurrencyWhitelistFeeCurrencyWhitelistRemovedIterator struct { + Event *FeeCurrencyWhitelistFeeCurrencyWhitelistRemoved // 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 *FeeCurrencyWhitelistFeeCurrencyWhitelistRemovedIterator) 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(FeeCurrencyWhitelistFeeCurrencyWhitelistRemoved) + 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(FeeCurrencyWhitelistFeeCurrencyWhitelistRemoved) + 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 *FeeCurrencyWhitelistFeeCurrencyWhitelistRemovedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeCurrencyWhitelistFeeCurrencyWhitelistRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeCurrencyWhitelistFeeCurrencyWhitelistRemoved represents a FeeCurrencyWhitelistRemoved event raised by the FeeCurrencyWhitelist contract. +type FeeCurrencyWhitelistFeeCurrencyWhitelistRemoved struct { + Token common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeCurrencyWhitelistRemoved is a free log retrieval operation binding the contract event 0xc1f06ffbe5c19d22daa982fd4b3886ced05d83e2bfe7de3b67222728f5234e28. +// +// Solidity: event FeeCurrencyWhitelistRemoved(address token) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistFilterer) FilterFeeCurrencyWhitelistRemoved(opts *bind.FilterOpts) (*FeeCurrencyWhitelistFeeCurrencyWhitelistRemovedIterator, error) { + + logs, sub, err := _FeeCurrencyWhitelist.contract.FilterLogs(opts, "FeeCurrencyWhitelistRemoved") + if err != nil { + return nil, err + } + return &FeeCurrencyWhitelistFeeCurrencyWhitelistRemovedIterator{contract: _FeeCurrencyWhitelist.contract, event: "FeeCurrencyWhitelistRemoved", logs: logs, sub: sub}, nil +} + +// WatchFeeCurrencyWhitelistRemoved is a free log subscription operation binding the contract event 0xc1f06ffbe5c19d22daa982fd4b3886ced05d83e2bfe7de3b67222728f5234e28. +// +// Solidity: event FeeCurrencyWhitelistRemoved(address token) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistFilterer) WatchFeeCurrencyWhitelistRemoved(opts *bind.WatchOpts, sink chan<- *FeeCurrencyWhitelistFeeCurrencyWhitelistRemoved) (event.Subscription, error) { + + logs, sub, err := _FeeCurrencyWhitelist.contract.WatchLogs(opts, "FeeCurrencyWhitelistRemoved") + 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(FeeCurrencyWhitelistFeeCurrencyWhitelistRemoved) + if err := _FeeCurrencyWhitelist.contract.UnpackLog(event, "FeeCurrencyWhitelistRemoved", 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 +} + +// ParseFeeCurrencyWhitelistRemoved is a log parse operation binding the contract event 0xc1f06ffbe5c19d22daa982fd4b3886ced05d83e2bfe7de3b67222728f5234e28. +// +// Solidity: event FeeCurrencyWhitelistRemoved(address token) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistFilterer) ParseFeeCurrencyWhitelistRemoved(log types.Log) (*FeeCurrencyWhitelistFeeCurrencyWhitelistRemoved, error) { + event := new(FeeCurrencyWhitelistFeeCurrencyWhitelistRemoved) + if err := _FeeCurrencyWhitelist.contract.UnpackLog(event, "FeeCurrencyWhitelistRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FeeCurrencyWhitelistFeeCurrencyWhitelistedIterator is returned from FilterFeeCurrencyWhitelisted and is used to iterate over the raw logs and unpacked data for FeeCurrencyWhitelisted events raised by the FeeCurrencyWhitelist contract. +type FeeCurrencyWhitelistFeeCurrencyWhitelistedIterator struct { + Event *FeeCurrencyWhitelistFeeCurrencyWhitelisted // 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 *FeeCurrencyWhitelistFeeCurrencyWhitelistedIterator) 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(FeeCurrencyWhitelistFeeCurrencyWhitelisted) + 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(FeeCurrencyWhitelistFeeCurrencyWhitelisted) + 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 *FeeCurrencyWhitelistFeeCurrencyWhitelistedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeCurrencyWhitelistFeeCurrencyWhitelistedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeCurrencyWhitelistFeeCurrencyWhitelisted represents a FeeCurrencyWhitelisted event raised by the FeeCurrencyWhitelist contract. +type FeeCurrencyWhitelistFeeCurrencyWhitelisted struct { + Token common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeCurrencyWhitelisted is a free log retrieval operation binding the contract event 0xcf4fe1d1989a39011040b0c33ba1165fdeeca971a1ab2b0340b23550f93727e0. +// +// Solidity: event FeeCurrencyWhitelisted(address token) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistFilterer) FilterFeeCurrencyWhitelisted(opts *bind.FilterOpts) (*FeeCurrencyWhitelistFeeCurrencyWhitelistedIterator, error) { + + logs, sub, err := _FeeCurrencyWhitelist.contract.FilterLogs(opts, "FeeCurrencyWhitelisted") + if err != nil { + return nil, err + } + return &FeeCurrencyWhitelistFeeCurrencyWhitelistedIterator{contract: _FeeCurrencyWhitelist.contract, event: "FeeCurrencyWhitelisted", logs: logs, sub: sub}, nil +} + +// WatchFeeCurrencyWhitelisted is a free log subscription operation binding the contract event 0xcf4fe1d1989a39011040b0c33ba1165fdeeca971a1ab2b0340b23550f93727e0. +// +// Solidity: event FeeCurrencyWhitelisted(address token) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistFilterer) WatchFeeCurrencyWhitelisted(opts *bind.WatchOpts, sink chan<- *FeeCurrencyWhitelistFeeCurrencyWhitelisted) (event.Subscription, error) { + + logs, sub, err := _FeeCurrencyWhitelist.contract.WatchLogs(opts, "FeeCurrencyWhitelisted") + 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(FeeCurrencyWhitelistFeeCurrencyWhitelisted) + if err := _FeeCurrencyWhitelist.contract.UnpackLog(event, "FeeCurrencyWhitelisted", 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 +} + +// ParseFeeCurrencyWhitelisted is a log parse operation binding the contract event 0xcf4fe1d1989a39011040b0c33ba1165fdeeca971a1ab2b0340b23550f93727e0. +// +// Solidity: event FeeCurrencyWhitelisted(address token) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistFilterer) ParseFeeCurrencyWhitelisted(log types.Log) (*FeeCurrencyWhitelistFeeCurrencyWhitelisted, error) { + event := new(FeeCurrencyWhitelistFeeCurrencyWhitelisted) + if err := _FeeCurrencyWhitelist.contract.UnpackLog(event, "FeeCurrencyWhitelisted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FeeCurrencyWhitelistOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the FeeCurrencyWhitelist contract. +type FeeCurrencyWhitelistOwnershipTransferredIterator struct { + Event *FeeCurrencyWhitelistOwnershipTransferred // 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 *FeeCurrencyWhitelistOwnershipTransferredIterator) 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(FeeCurrencyWhitelistOwnershipTransferred) + 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(FeeCurrencyWhitelistOwnershipTransferred) + 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 *FeeCurrencyWhitelistOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeCurrencyWhitelistOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeCurrencyWhitelistOwnershipTransferred represents a OwnershipTransferred event raised by the FeeCurrencyWhitelist contract. +type FeeCurrencyWhitelistOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*FeeCurrencyWhitelistOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _FeeCurrencyWhitelist.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &FeeCurrencyWhitelistOwnershipTransferredIterator{contract: _FeeCurrencyWhitelist.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *FeeCurrencyWhitelistOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _FeeCurrencyWhitelist.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + 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(FeeCurrencyWhitelistOwnershipTransferred) + if err := _FeeCurrencyWhitelist.contract.UnpackLog(event, "OwnershipTransferred", 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 +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_FeeCurrencyWhitelist *FeeCurrencyWhitelistFilterer) ParseOwnershipTransferred(log types.Log) (*FeeCurrencyWhitelistOwnershipTransferred, error) { + event := new(FeeCurrencyWhitelistOwnershipTransferred) + if err := _FeeCurrencyWhitelist.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-bindings/bindings/feecurrencywhitelist_more.go b/op-bindings/bindings/feecurrencywhitelist_more.go new file mode 100644 index 000000000000..f0ed3047ea27 --- /dev/null +++ b/op-bindings/bindings/feecurrencywhitelist_more.go @@ -0,0 +1,25 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "encoding/json" + + "github.com/ethereum-optimism/optimism/op-bindings/solc" +) + +const FeeCurrencyWhitelistStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src/celo/FeeCurrencyWhitelist.sol:FeeCurrencyWhitelist\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1001,\"contract\":\"src/celo/FeeCurrencyWhitelist.sol:FeeCurrencyWhitelist\",\"label\":\"initialized\",\"offset\":20,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"src/celo/FeeCurrencyWhitelist.sol:FeeCurrencyWhitelist\",\"label\":\"whitelist\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_address)dyn_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_address)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"address[]\",\"numberOfBytes\":\"32\",\"base\":\"t_address\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"}}}" + +var FeeCurrencyWhitelistStorageLayout = new(solc.StorageLayout) + +var FeeCurrencyWhitelistDeployedBin = "0x608060405234801561001057600080fd5b50600436106100be5760003560e01c80638129fc1c11610076578063d01f63f51161005b578063d01f63f51461019e578063d48bfca7146101b3578063f2fde38b146101c657600080fd5b80638129fc1c146101785780638da5cb5b1461018057600080fd5b806354255be0116100a757806354255be014610112578063715018a6146101385780637ebd1b301461014057600080fd5b806313baf1e6146100c3578063158ef93e146100d8575b600080fd5b6100d66100d1366004610800565b6101d9565b005b6000546100fd9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020015b60405180910390f35b600180806000604080519485526020850193909352918301526060820152608001610109565b6100d66103f3565b61015361014e36600461082a565b610407565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610109565b6100d661043e565b60005473ffffffffffffffffffffffffffffffffffffffff16610153565b6101a661050b565b6040516101099190610843565b6100d66101c136600461089d565b61057a565b6100d66101d436600461089d565b61062a565b6101e16106e1565b8173ffffffffffffffffffffffffffffffffffffffff166001828154811061020b5761020b6108bf565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614610299576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e64657820646f6573206e6f74206d6174636800000000000000000000000060448201526064015b60405180910390fd5b60018054906102a881836108ee565b815481106102b8576102b86108bf565b6000918252602090912001546001805473ffffffffffffffffffffffffffffffffffffffff90921691849081106102f1576102f16108bf565b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600180548061034a5761034a61092e565b60008281526020908190207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff908301810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905590910190915560405173ffffffffffffffffffffffffffffffffffffffff851681527fc1f06ffbe5c19d22daa982fd4b3886ced05d83e2bfe7de3b67222728f5234e28910160405180910390a1505050565b6103fb6106e1565b6104056000610762565b565b6001818154811061041757600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60005474010000000000000000000000000000000000000000900460ff16156104c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f636f6e747261637420616c726561647920696e697469616c697a6564000000006044820152606401610290565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000017905561040533610762565b6060600180548060200260200160405190810160405280929190818152602001828054801561057057602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610545575b5050505050905090565b6105826106e1565b6001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fcf4fe1d1989a39011040b0c33ba1165fdeeca971a1ab2b0340b23550f93727e09060200160405180910390a150565b6106326106e1565b73ffffffffffffffffffffffffffffffffffffffff81166106d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610290565b6106de81610762565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610405576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610290565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b803573ffffffffffffffffffffffffffffffffffffffff811681146107fb57600080fd5b919050565b6000806040838503121561081357600080fd5b61081c836107d7565b946020939093013593505050565b60006020828403121561083c57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561089157835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161085f565b50909695505050505050565b6000602082840312156108af57600080fd5b6108b8826107d7565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610928577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a" + +func init() { + if err := json.Unmarshal([]byte(FeeCurrencyWhitelistStorageLayoutJSON), FeeCurrencyWhitelistStorageLayout); err != nil { + panic(err) + } + + layouts["FeeCurrencyWhitelist"] = FeeCurrencyWhitelistStorageLayout + deployedBytecodes["FeeCurrencyWhitelist"] = FeeCurrencyWhitelistDeployedBin +} diff --git a/op-bindings/bindings/feehandler.go b/op-bindings/bindings/feehandler.go new file mode 100644 index 000000000000..218b5eb192d5 --- /dev/null +++ b/op-bindings/bindings/feehandler.go @@ -0,0 +1,2733 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "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 ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// FeeHandlerMetaData contains all meta data concerning the FeeHandler contract. +var FeeHandlerMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"test\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fraction\",\"type\":\"uint256\"}],\"name\":\"BurnFractionSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"burning\",\"type\":\"uint256\"}],\"name\":\"DailyLimitHit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newLimit\",\"type\":\"uint256\"}],\"name\":\"DailyLimitSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DailySellLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newBeneficiary\",\"type\":\"address\"}],\"name\":\"FeeBeneficiarySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxSlippage\",\"type\":\"uint256\"}],\"name\":\"MaxSlippageSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"registryAddress\",\"type\":\"address\"}],\"name\":\"RegistrySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SoldAndBurnedToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"handlerAddress\",\"type\":\"address\"}],\"name\":\"TokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenRemoved\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"FIXED1_UINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_BURN\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"activateToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"handlerAddress\",\"type\":\"address\"}],\"name\":\"addToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burnCelo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burnFraction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"celoToBeBurned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountToBurn\",\"type\":\"uint256\"}],\"name\":\"dailySellLimitHit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"deactivateToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"distribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"distributeAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeBeneficiary\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getActiveTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPastBurnForToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenCurrentDaySellLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenDailySellLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenHandler\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenMaxSlippage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenToDistribute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVersionNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"handle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"handleAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_registryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newFeeBeneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"newBurnFraction\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"handlers\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newLimits\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newMaxSlippages\",\"type\":\"uint256[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastLimitDay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contractICeloRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"removeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"sell\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"fraction\",\"type\":\"uint256\"}],\"name\":\"setBurnFraction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"newLimit\",\"type\":\"uint256\"}],\"name\":\"setDailySellLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"}],\"name\":\"setFeeBeneficiary\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"handlerAddress\",\"type\":\"address\"}],\"name\":\"setHandler\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"newMax\",\"type\":\"uint256\"}],\"name\":\"setMaxSplippage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registryAddress\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60806040523480156200001157600080fd5b5060405162003b2738038062003b278339810160408190526200003491620000b7565b80620000403362000067565b806200005a576000805460ff60a01b1916600160a01b1790555b50506001600255620000e2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000ca57600080fd5b81518015158114620000db57600080fd5b9392505050565b613a3580620000f26000396000f3fe6080604052600436106102a45760003560e01c80636654f4351161016e578063a91ee0dc116100cb578063df3712e41161007f578063ec4bd8ae11610064578063ec4bd8ae14610813578063ee8df72d14610859578063f2fde38b1461086e57600080fd5b8063df3712e4146107dd578063e9f1bbde146107f357600080fd5b8063beabacc8116100b0578063beabacc814610757578063c558df3814610777578063ce4773d31461079757600080fd5b8063a91ee0dc14610722578063b8b99e4d1461074257600080fd5b80637b763140116101225780638de065b6116101075780638de065b6146106cb57806392f8bce3146106e257806394b6f9d41461070257600080fd5b80637b763140146106805780638da5cb5b146106a057600080fd5b80636c6c65ad116101535780636c6c65ad1461061e578063715018a61461063e5780637b1039991461065357600080fd5b80636654f435146105b857806368173bcf146105fe57600080fd5b8063492fb3431161021c5780635a0a3d82116101d05780635fa7b584116101b55780635fa7b5841461055857806363453ae114610578578063650a16051461059857600080fd5b80635a0a3d82146105165780635f5817e31461053657600080fd5b80634e73db99116102015780634e73db99146104a357806354255be0146104c35780635476bd72146104f657600080fd5b8063492fb3431461046157806349844b1c1461048e57600080fd5b8063158ef93e11610273578063384995cd11610258578063384995cd146103c15780633b9e3ad6146103e1578063436596c41461044c57600080fd5b8063158ef93e1461035f57806331828a5b146103a157600080fd5b8063036235a6146102b057806308906111146102e15780630d1ce2d2146102f757806313e33cea1461031957600080fd5b366102ab57005b600080fd5b3480156102bc57600080fd5b506102ce69d3c21bcecceda100000081565b6040519081526020015b60405180910390f35b3480156102ed57600080fd5b506102ce60065481565b34801561030357600080fd5b5061031761031236600461361b565b61088e565b005b34801561032557600080fd5b506102ce61033436600461361b565b73ffffffffffffffffffffffffffffffffffffffff1660009081526007602052604090206003015490565b34801561036b57600080fd5b506000546103919074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016102d8565b3480156103ad57600080fd5b506103916103bc366004613638565b6108a2565b3480156103cd57600080fd5b506103176103dc366004613664565b610917565b3480156103ed57600080fd5b506104276103fc36600461361b565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102d8565b34801561045857600080fd5b50610317610928565b34801561046d57600080fd5b506005546104279073ffffffffffffffffffffffffffffffffffffffff1681565b34801561049a57600080fd5b506102ce60c881565b3480156104af57600080fd5b506103176104be366004613638565b610932565b3480156104cf57600080fd5b506001806000806040805194855260208501939093529183015260608201526080016102d8565b34801561050257600080fd5b5061031761051136600461367d565b610948565b34801561052257600080fd5b5061031761053136600461361b565b61095a565b34801561054257600080fd5b5061054b61096b565b6040516102d891906136b6565b34801561056457600080fd5b5061031761057336600461361b565b61097c565b34801561058457600080fd5b5061031761059336600461361b565b61098d565b3480156105a457600080fd5b506103176105b336600461375c565b610996565b3480156105c457600080fd5b506102ce6105d336600461361b565b73ffffffffffffffffffffffffffffffffffffffff1660009081526007602052604090206004015490565b34801561060a57600080fd5b5061031761061936600461361b565b610d41565b34801561062a57600080fd5b5061039161063936600461361b565b610d52565b34801561064a57600080fd5b50610317610d5f565b34801561065f57600080fd5b506001546104279073ffffffffffffffffffffffffffffffffffffffff1681565b34801561068c57600080fd5b5061031761069b36600461361b565b610d71565b3480156106ac57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610427565b3480156106d757600080fd5b506004546102ce9081565b3480156106ee57600080fd5b506102ce6106fd36600461361b565b610d7a565b34801561070e57600080fd5b5061031761071d36600461361b565b610db7565b34801561072e57600080fd5b5061031761073d36600461361b565b610dc0565b34801561074e57600080fd5b50610317610eb4565b34801561076357600080fd5b50610391610772366004613852565b610ebc565b34801561078357600080fd5b50610317610792366004613638565b610f67565b3480156107a357600080fd5b506102ce6107b236600461361b565b73ffffffffffffffffffffffffffffffffffffffff1660009081526007602052604090206002015490565b3480156107e957600080fd5b506102ce60035481565b3480156107ff57600080fd5b5061031761080e36600461367d565b610f79565b34801561081f57600080fd5b506102ce61082e36600461361b565b73ffffffffffffffffffffffffffffffffffffffff1660009081526007602052604090206005015490565b34801561086557600080fd5b50610317610f8b565b34801561087a57600080fd5b5061031761088936600461361b565b610f93565b610896611047565b61089f816110c8565b50565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760205260408120600281015482036108dc576000915050610911565b60006108eb62015180426138c2565b90506003548111156109065760038181556002830154908301555b506003015482101590505b92915050565b61091f611047565b61089f81611289565b61093061139d565b565b61093a611047565b61094482826114a8565b5050565b610950611047565b610944828261166d565b610962611047565b61089f81611796565b6060610977600861180f565b905090565b610984611047565b61089f81611823565b61089f816118aa565b60005474010000000000000000000000000000000000000000900460ff1615610a20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f636f6e747261637420616c726561647920696e697469616c697a65640000000060448201526064015b60405180910390fd5b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055868514610aee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f68616e646c657273206c656e6774682073686f756c64206d6174636820746f6b60448201527f656e73206c656e677468000000000000000000000000000000000000000000006064820152608401610a17565b868314610b7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f6c696d697473206c656e6774682073686f756c64206d6174636820746f6b656e60448201527f73206c656e6774680000000000000000000000000000000000000000000000006064820152608401610a17565b868114610c0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f6d6178536c697070616765206c656e6774682073686f756c64206d617463682060448201527f746f6b656e73206c656e677468000000000000000000000000000000000000006064820152608401610a17565b610c1533611e1d565b610c1e8b610dc0565b610c278a611796565b610c3089611289565b60005b87811015610d3357610c91898983818110610c5057610c506138fd565b9050602002016020810190610c65919061361b565b888884818110610c7757610c776138fd565b9050602002016020810190610c8c919061361b565b61166d565b610cd9898983818110610ca657610ca66138fd565b9050602002016020810190610cbb919061361b565b868684818110610ccd57610ccd6138fd565b90506020020135611e92565b610d21898983818110610cee57610cee6138fd565b9050602002016020810190610d03919061361b565b848484818110610d1557610d156138fd565b905060200201356114a8565b80610d2b8161392c565b915050610c33565b505050505050505050505050565b610d49611047565b61089f81611ef6565b6000610911600883611f01565b610d67611047565b6109306000611e1d565b61089f81611f30565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260076020908152604080832081519283019091526001015490819052610911565b61089f81612094565b610dc8611047565b73ffffffffffffffffffffffffffffffffffffffff8116610e45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f43616e6e6f7420726567697374657220746865206e756c6c20616464726573736044820152606401610a17565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b90600090a250565b6109306127c0565b6000610ec6611047565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905285169063a9059cbb906044016020604051808303816000875af1158015610f3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5f9190613964565b949350505050565b610f6f611047565b6109448282611e92565b610f81611047565b6109448282612ad8565b610930612bce565b610f9b611047565b73ffffffffffffffffffffffffffffffffffffffff811661103e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a17565b61089f81611e1d565b60005473ffffffffffffffffffffffffffffffffffffffff163314610930576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a17565b73ffffffffffffffffffffffffffffffffffffffff808216600090815260076020526040902080549091161515806111ed57506001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9091169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161117d91815260200190565b602060405180830381865afa15801561119a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111be9190613986565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b611279576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f48616e646c65722068617320746f2062652073657420746f206163746976617460448201527f6520746f6b656e000000000000000000000000000000000000000000000000006064820152608401610a17565b611284600883612c16565b505050565b6040805160208082018352600091829052825180820184528481528351808301855292909252825190810190925269d3c21bcecceda10000008252906112d49082905b519051111590565b611360576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4275726e206672616374696f6e206d757374206265206c657373207468616e2060448201527f6f7220657175616c20746f2031000000000000000000000000000000000000006064820152608401610a17565b80516004556040518281527f41c679f4bcdc2c95f79a3647e2237162d9763d86685ef6c667781230c8ba9157906020015b60405180910390a15050565b60005b6113aa6008612c38565b8110156113dc5760006113be600883612c42565b90506113c9816118aa565b50806113d48161392c565b9150506113a0565b506001546040517f476f6c64546f6b656e000000000000000000000000000000000000000000000060208201526109309173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed906029015b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161146291815260200190565b602060405180830381865afa15801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a39190613986565b6118aa565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260076020526040812090829003611537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f43616e6e6f7420736574206d617820736c69707061676520746f207a65726f006044820152606401610a17565b60408051602080820183526000918290528251808201845285905260018401859055825180820184528581528351808301855292909252825190810190925269d3c21bcecceda1000000825261158c916112cc565b611618576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f53706c697070616765206d757374206265206c657373207468616e206f72206560448201527f7175616c20746f203100000000000000000000000000000000000000000000006064820152608401610a17565b6040805173ffffffffffffffffffffffffffffffffffffffff85168152602081018490527fd8df93d785f3d0d4294fd7b61e5d749c20eec95a2fed5b6b502a4cad09199ca691015b60405180910390a1505050565b73ffffffffffffffffffffffffffffffffffffffff81166116ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f43616e2774207365742068616e646c657220746f207a65726f000000000000006044820152606401610a17565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260076020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016918316919091178155611748600884612c16565b506040805173ffffffffffffffffffffffffffffffffffffffff8086168252841660208201527fdffbd9ded1c09446f09377de547142dcce7dc541c8b0b028142b1eba7026b9e79101611660565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ff7015098f8d6fa48f0560725ffd5f81bf687ee5ac45153b590bdcb04648bbdd39060200160405180910390a150565b6060600061181c83612c4e565b9392505050565b61182c81611ef6565b73ffffffffffffffffffffffffffffffffffffffff811660008181526007602090815260409182902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155915192835290917f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd39101611391565b6118b2612caa565b6040517fe583983600000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff919091169063e583983690602401602060405180830381865afa15801561191e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119429190613964565b156119cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f63616e27742063616c6c207768656e20636f6e74726163742069732066726f7a60448201527f656e0000000000000000000000000000000000000000000000000000000000006064820152608401610a17565b6001600260008282546119e291906139a3565b909155505060025460055473ffffffffffffffffffffffffffffffffffffffff16611a8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f43616e2774206469737472696275746520746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610a17565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152829060009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015611afd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b2191906139b6565b73ffffffffffffffffffffffffffffffffffffffff808616600090815260076020526040902080549293509116151580611c4857506001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9091169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611bd891815260200190565b602060405180830381865afa158015611bf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c199190613986565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b611cd4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f48616e646c65722068617320746f2062652073657420746f2073656c6c20746f60448201527f6b656e00000000000000000000000000000000000000000000000000000000006064820152608401610a17565b6000611ce4838360040154612d6e565b905080600003611cf75750505050611db2565b6005546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9182166004820152602481018390529085169063a9059cbb906044016020604051808303816000875af1158015611d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d949190613964565b50808260040154611da591906139cf565b8260040181905550505050505b6002548114610944576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7265656e7472616e742063616c6c0000000000000000000000000000000000006044820152606401610a17565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260076020908152604091829020600281018590558251938452908301849052917fd3d22ffd28b02735cf411bd7f925bd8da01212c7028153e0d632e2953ac3088e9101611660565b610944600882612d84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561181c565b6001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9091169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611fb291815260200190565b602060405180830381865afa158015611fcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff39190613986565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461202e5761202e81612094565b6120366127c0565b61203f816118aa565b6001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015261089f9173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed9060290161142e565b61209c612caa565b6040517fe583983600000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff919091169063e583983690602401602060405180830381865afa158015612108573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061212c9190613964565b156121b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f63616e27742063616c6c207768656e20636f6e74726163742069732066726f7a60448201527f656e0000000000000000000000000000000000000000000000000000000000006064820152608401610a17565b6001600260008282546121cc91906139a3565b909155505060025473ffffffffffffffffffffffffffffffffffffffff8083166000908152600760205260409020805484921661228b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f48616e646c65722068617320746f2062652073657420746f2073656c6c20746f60448201527f6b656e00000000000000000000000000000000000000000000000000000000006064820152608401610a17565b604080516020810190915260018201549081905260000361232e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4d617820736c6970706167652068617320746f2062652073657420746f20736560448201527f6c6c20746f6b656e0000000000000000000000000000000000000000000000006064820152608401610a17565b6004808201546040517f70a0823100000000000000000000000000000000000000000000000000000000815230928101929092526000916123db919073ffffffffffffffffffffffffffffffffffffffff8616906370a0823190602401602060405180830381865afa1580156123a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123cc91906139b6565b6123d691906139cf565b612da6565b60408051602081019091526004548152909150600090612404906123ff9084612e85565b6132bc565b905080612410836132bc565b846004015461241f91906139a3565b61242991906139cf565b600484015560c88110156124405750505050611db2565b61244a86826108a2565b156124a5575060038201546040805173ffffffffffffffffffffffffffffffffffffffff88168152602081018390527fb1a68b0b66260ca392f760fd4dda4a94818d69c89a4eeb6610eb41db7bab8c37910160405180910390a15b82546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9182166004820152602481018390529085169063a9059cbb906044016020604051808303816000875af115801561251d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125419190613964565b5082546001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9283169260009284926331de7d15928c92169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016125d591815260200190565b602060405180830381865afa1580156125f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126169190613986565b604080516020810190915260018a01549081905287906040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b16815273ffffffffffffffffffffffffffffffffffffffff9485166004820152939092166024840152604483015260648201526084016020604051808303816000875af11580156126aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ce91906139b6565b9050806006546126de91906139a3565b60065560058501546126f19084906139a3565b600586015561270088846132d6565b6040805173ffffffffffffffffffffffffffffffffffffffff8a168152602081018590527fac094032b4e9dccb3a000eedb94cf30146ca0d7c39be85229f478413fa21d1d8910160405180910390a15050505050506002548114610944576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7265656e7472616e742063616c6c0000000000000000000000000000000000006044820152606401610a17565b6001546040517f476f6c64546f6b656e00000000000000000000000000000000000000000000006020820152600091600791839173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161284891815260200190565b602060405180830381865afa158015612865573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128899190613986565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed604051602001612938907f476f6c64546f6b656e0000000000000000000000000000000000000000000000815260090190565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161296c91815260200190565b602060405180830381865afa158015612989573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ad9190613986565b9050600047905060006006548460040154836129c991906139cf565b6129d391906139cf565b60408051602081019091526004548152909150600090612a00906123ff906129fa85612da6565b90612e85565b9050600060065482612a1291906139a3565b6040517f42966c680000000000000000000000000000000000000000000000000000000081526004810182905290915073ffffffffffffffffffffffffffffffffffffffff8616906342966c68906024016020604051808303816000875af1158015612a82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aa69190613964565b50600060065560048601548290612abe9085906139a3565b612ac891906139cf565b8660040181905550505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116612b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43616e2774207365742068616e646c657220746f207a65726f2c20757365206460448201527f656163746976617465546f6b656e0000000000000000000000000000000000006064820152608401610a17565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260076020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60005b612bdb6008612c38565b811015612c0d576000612bef600883612c42565b9050612bfa81612094565b5080612c058161392c565b915050612bd1565b50610eb461139d565b600061181c8373ffffffffffffffffffffffffffffffffffffffff8416613351565b6000610911825490565b600061181c83836133a0565b606081600001805480602002602001604051908101604052809291908181526020018280548015612c9e57602002820191906000526020600020905b815481526020019060010190808311612c8a575b50505050509050919050565b6001546040517f467265657a657200000000000000000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed90602701604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401612d2d91815260200190565b602060405180830381865afa158015612d4a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109779190613986565b6000818310612d7d578161181c565b5090919050565b600061181c8373ffffffffffffffffffffffffffffffffffffffff84166133ca565b6040805160208101909152600081527601357c299a88ea76a58924d52ce4f26a85af186c2b9e74821115612e5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f63616e277420637265617465206669786964697479206e756d626572206c617260448201527f676572207468616e206d61784e657746697865642829000000000000000000006064820152608401610a17565b604051806020016040528069d3c21bcecceda100000084612e7d91906139e2565b905292915050565b60408051602081019091526000815282511580612ea157508151155b15612ebb5750604080516020810190915260008152610911565b81517fffffffffffffffffffffffffffffffffffffffffffff2c3de43133125f00000001612eea575081610911565b82517fffffffffffffffffffffffffffffffffffffffffffff2c3de43133125f00000001612f19575080610911565b600069d3c21bcecceda1000000612f2f856134bd565b51612f3a91906138c2565b90506000612f47856134fc565b519050600069d3c21bcecceda1000000612f60866134bd565b51612f6b91906138c2565b90506000612f78866134fc565b5190506000612f8783866139e2565b905084156130015782612f9a86836138c2565b14613001576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078317931206465746563746564000000000000000000006044820152606401610a17565b600061301769d3c21bcecceda1000000836139e2565b9050811561309b5769d3c21bcecceda100000061303483836138c2565b1461309b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6f766572666c6f772078317931202a20666978656431206465746563746564006044820152606401610a17565b90508060006130aa85876139e2565b9050851561312457846130bd87836138c2565b14613124576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078327931206465746563746564000000000000000000006044820152606401610a17565b600061313085896139e2565b905087156131aa578461314389836138c2565b146131aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078317932206465746563746564000000000000000000006044820152606401610a17565b6131b964e8d4a51000886138c2565b96506131ca64e8d4a51000866138c2565b945060006131d886896139e2565b9050871561325257856131eb89836138c2565b14613252576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078327932206465746563746564000000000000000000006044820152606401610a17565b6040805160208082018352878252825190810190925284825290613277908290613547565b905061329181604051806020016040528086815250613547565b90506132ab81604051806020016040528085815250613547565b9d9c50505050505050505050505050565b80516000906109119069d3c21bcecceda1000000906138c2565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760205260408120600281015490910361330c57505050565b81816003015461331c91906139cf565b60038201556040518281527fcdcea7139bd245b1c7468bc1cfb59ad732b3b0909bafa9f9436ad74c81d0aafb90602001611660565b600081815260018301602052604081205461339857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610911565b506000610911565b60008260000182815481106133b7576133b76138fd565b9060005260206000200154905092915050565b600081815260018301602052604081205480156134b35760006133ee6001836139cf565b8554909150600090613402906001906139cf565b9050818114613467576000866000018281548110613422576134226138fd565b9060005260206000200154905080876000018481548110613445576134456138fd565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613478576134786139f9565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610911565b6000915050610911565b604080516020810190915260008152604051806020016040528069d3c21bcecceda10000008085600001516134f291906138c2565b612e7d91906139e2565b604080516020810190915260008152604051806020016040528069d3c21bcecceda100000080856000015161353191906138c2565b61353b91906139e2565b8451612e7d91906139cf565b60408051602081019091526000815281518351600091613566916139a3565b84519091508110156135d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f616464206f766572666c6f7720646574656374656400000000000000000000006044820152606401610a17565b60408051602081019091529081529392505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461089f57600080fd5b8035613616816135e9565b919050565b60006020828403121561362d57600080fd5b813561181c816135e9565b6000806040838503121561364b57600080fd5b8235613656816135e9565b946020939093013593505050565b60006020828403121561367657600080fd5b5035919050565b6000806040838503121561369057600080fd5b823561369b816135e9565b915060208301356136ab816135e9565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561370457835173ffffffffffffffffffffffffffffffffffffffff16835292840192918401916001016136d2565b50909695505050505050565b60008083601f84011261372257600080fd5b50813567ffffffffffffffff81111561373a57600080fd5b6020830191508360208260051b850101111561375557600080fd5b9250929050565b600080600080600080600080600080600060e08c8e03121561377d57600080fd5b6137868c61360b565b9a5061379460208d0161360b565b995060408c0135985067ffffffffffffffff8060608e013511156137b757600080fd5b6137c78e60608f01358f01613710565b909950975060808d01358110156137dd57600080fd5b6137ed8e60808f01358f01613710565b909750955060a08d013581101561380357600080fd5b6138138e60a08f01358f01613710565b909550935060c08d013581101561382957600080fd5b5061383a8d60c08e01358e01613710565b81935080925050509295989b509295989b9093969950565b60008060006060848603121561386757600080fd5b8335613872816135e9565b92506020840135613882816135e9565b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000826138f8577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361395d5761395d613893565b5060010190565b60006020828403121561397657600080fd5b8151801515811461181c57600080fd5b60006020828403121561399857600080fd5b815161181c816135e9565b8082018082111561091157610911613893565b6000602082840312156139c857600080fd5b5051919050565b8181038181111561091157610911613893565b808202811582820484141761091157610911613893565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a", +} + +// FeeHandlerABI is the input ABI used to generate the binding from. +// Deprecated: Use FeeHandlerMetaData.ABI instead. +var FeeHandlerABI = FeeHandlerMetaData.ABI + +// FeeHandlerBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use FeeHandlerMetaData.Bin instead. +var FeeHandlerBin = FeeHandlerMetaData.Bin + +// DeployFeeHandler deploys a new Ethereum contract, binding an instance of FeeHandler to it. +func DeployFeeHandler(auth *bind.TransactOpts, backend bind.ContractBackend, test bool) (common.Address, *types.Transaction, *FeeHandler, error) { + parsed, err := FeeHandlerMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(FeeHandlerBin), backend, test) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &FeeHandler{FeeHandlerCaller: FeeHandlerCaller{contract: contract}, FeeHandlerTransactor: FeeHandlerTransactor{contract: contract}, FeeHandlerFilterer: FeeHandlerFilterer{contract: contract}}, nil +} + +// FeeHandler is an auto generated Go binding around an Ethereum contract. +type FeeHandler struct { + FeeHandlerCaller // Read-only binding to the contract + FeeHandlerTransactor // Write-only binding to the contract + FeeHandlerFilterer // Log filterer for contract events +} + +// FeeHandlerCaller is an auto generated read-only Go binding around an Ethereum contract. +type FeeHandlerCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// FeeHandlerTransactor is an auto generated write-only Go binding around an Ethereum contract. +type FeeHandlerTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// FeeHandlerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type FeeHandlerFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// FeeHandlerSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type FeeHandlerSession struct { + Contract *FeeHandler // 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 +} + +// FeeHandlerCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type FeeHandlerCallerSession struct { + Contract *FeeHandlerCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// FeeHandlerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type FeeHandlerTransactorSession struct { + Contract *FeeHandlerTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// FeeHandlerRaw is an auto generated low-level Go binding around an Ethereum contract. +type FeeHandlerRaw struct { + Contract *FeeHandler // Generic contract binding to access the raw methods on +} + +// FeeHandlerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type FeeHandlerCallerRaw struct { + Contract *FeeHandlerCaller // Generic read-only contract binding to access the raw methods on +} + +// FeeHandlerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type FeeHandlerTransactorRaw struct { + Contract *FeeHandlerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewFeeHandler creates a new instance of FeeHandler, bound to a specific deployed contract. +func NewFeeHandler(address common.Address, backend bind.ContractBackend) (*FeeHandler, error) { + contract, err := bindFeeHandler(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &FeeHandler{FeeHandlerCaller: FeeHandlerCaller{contract: contract}, FeeHandlerTransactor: FeeHandlerTransactor{contract: contract}, FeeHandlerFilterer: FeeHandlerFilterer{contract: contract}}, nil +} + +// NewFeeHandlerCaller creates a new read-only instance of FeeHandler, bound to a specific deployed contract. +func NewFeeHandlerCaller(address common.Address, caller bind.ContractCaller) (*FeeHandlerCaller, error) { + contract, err := bindFeeHandler(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &FeeHandlerCaller{contract: contract}, nil +} + +// NewFeeHandlerTransactor creates a new write-only instance of FeeHandler, bound to a specific deployed contract. +func NewFeeHandlerTransactor(address common.Address, transactor bind.ContractTransactor) (*FeeHandlerTransactor, error) { + contract, err := bindFeeHandler(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &FeeHandlerTransactor{contract: contract}, nil +} + +// NewFeeHandlerFilterer creates a new log filterer instance of FeeHandler, bound to a specific deployed contract. +func NewFeeHandlerFilterer(address common.Address, filterer bind.ContractFilterer) (*FeeHandlerFilterer, error) { + contract, err := bindFeeHandler(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &FeeHandlerFilterer{contract: contract}, nil +} + +// bindFeeHandler binds a generic wrapper to an already deployed contract. +func bindFeeHandler(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(FeeHandlerABI)) + 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 (_FeeHandler *FeeHandlerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _FeeHandler.Contract.FeeHandlerCaller.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 (_FeeHandler *FeeHandlerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FeeHandler.Contract.FeeHandlerTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_FeeHandler *FeeHandlerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _FeeHandler.Contract.FeeHandlerTransactor.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 (_FeeHandler *FeeHandlerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _FeeHandler.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 (_FeeHandler *FeeHandlerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FeeHandler.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_FeeHandler *FeeHandlerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _FeeHandler.Contract.contract.Transact(opts, method, params...) +} + +// FIXED1UINT is a free data retrieval call binding the contract method 0x036235a6. +// +// Solidity: function FIXED1_UINT() view returns(uint256) +func (_FeeHandler *FeeHandlerCaller) FIXED1UINT(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "FIXED1_UINT") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// FIXED1UINT is a free data retrieval call binding the contract method 0x036235a6. +// +// Solidity: function FIXED1_UINT() view returns(uint256) +func (_FeeHandler *FeeHandlerSession) FIXED1UINT() (*big.Int, error) { + return _FeeHandler.Contract.FIXED1UINT(&_FeeHandler.CallOpts) +} + +// FIXED1UINT is a free data retrieval call binding the contract method 0x036235a6. +// +// Solidity: function FIXED1_UINT() view returns(uint256) +func (_FeeHandler *FeeHandlerCallerSession) FIXED1UINT() (*big.Int, error) { + return _FeeHandler.Contract.FIXED1UINT(&_FeeHandler.CallOpts) +} + +// MINBURN is a free data retrieval call binding the contract method 0x49844b1c. +// +// Solidity: function MIN_BURN() view returns(uint256) +func (_FeeHandler *FeeHandlerCaller) MINBURN(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "MIN_BURN") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MINBURN is a free data retrieval call binding the contract method 0x49844b1c. +// +// Solidity: function MIN_BURN() view returns(uint256) +func (_FeeHandler *FeeHandlerSession) MINBURN() (*big.Int, error) { + return _FeeHandler.Contract.MINBURN(&_FeeHandler.CallOpts) +} + +// MINBURN is a free data retrieval call binding the contract method 0x49844b1c. +// +// Solidity: function MIN_BURN() view returns(uint256) +func (_FeeHandler *FeeHandlerCallerSession) MINBURN() (*big.Int, error) { + return _FeeHandler.Contract.MINBURN(&_FeeHandler.CallOpts) +} + +// BurnFraction is a free data retrieval call binding the contract method 0x8de065b6. +// +// Solidity: function burnFraction() view returns(uint256 value) +func (_FeeHandler *FeeHandlerCaller) BurnFraction(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "burnFraction") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BurnFraction is a free data retrieval call binding the contract method 0x8de065b6. +// +// Solidity: function burnFraction() view returns(uint256 value) +func (_FeeHandler *FeeHandlerSession) BurnFraction() (*big.Int, error) { + return _FeeHandler.Contract.BurnFraction(&_FeeHandler.CallOpts) +} + +// BurnFraction is a free data retrieval call binding the contract method 0x8de065b6. +// +// Solidity: function burnFraction() view returns(uint256 value) +func (_FeeHandler *FeeHandlerCallerSession) BurnFraction() (*big.Int, error) { + return _FeeHandler.Contract.BurnFraction(&_FeeHandler.CallOpts) +} + +// CeloToBeBurned is a free data retrieval call binding the contract method 0x08906111. +// +// Solidity: function celoToBeBurned() view returns(uint256) +func (_FeeHandler *FeeHandlerCaller) CeloToBeBurned(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "celoToBeBurned") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CeloToBeBurned is a free data retrieval call binding the contract method 0x08906111. +// +// Solidity: function celoToBeBurned() view returns(uint256) +func (_FeeHandler *FeeHandlerSession) CeloToBeBurned() (*big.Int, error) { + return _FeeHandler.Contract.CeloToBeBurned(&_FeeHandler.CallOpts) +} + +// CeloToBeBurned is a free data retrieval call binding the contract method 0x08906111. +// +// Solidity: function celoToBeBurned() view returns(uint256) +func (_FeeHandler *FeeHandlerCallerSession) CeloToBeBurned() (*big.Int, error) { + return _FeeHandler.Contract.CeloToBeBurned(&_FeeHandler.CallOpts) +} + +// FeeBeneficiary is a free data retrieval call binding the contract method 0x492fb343. +// +// Solidity: function feeBeneficiary() view returns(address) +func (_FeeHandler *FeeHandlerCaller) FeeBeneficiary(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "feeBeneficiary") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// FeeBeneficiary is a free data retrieval call binding the contract method 0x492fb343. +// +// Solidity: function feeBeneficiary() view returns(address) +func (_FeeHandler *FeeHandlerSession) FeeBeneficiary() (common.Address, error) { + return _FeeHandler.Contract.FeeBeneficiary(&_FeeHandler.CallOpts) +} + +// FeeBeneficiary is a free data retrieval call binding the contract method 0x492fb343. +// +// Solidity: function feeBeneficiary() view returns(address) +func (_FeeHandler *FeeHandlerCallerSession) FeeBeneficiary() (common.Address, error) { + return _FeeHandler.Contract.FeeBeneficiary(&_FeeHandler.CallOpts) +} + +// GetActiveTokens is a free data retrieval call binding the contract method 0x5f5817e3. +// +// Solidity: function getActiveTokens() view returns(address[]) +func (_FeeHandler *FeeHandlerCaller) GetActiveTokens(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "getActiveTokens") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetActiveTokens is a free data retrieval call binding the contract method 0x5f5817e3. +// +// Solidity: function getActiveTokens() view returns(address[]) +func (_FeeHandler *FeeHandlerSession) GetActiveTokens() ([]common.Address, error) { + return _FeeHandler.Contract.GetActiveTokens(&_FeeHandler.CallOpts) +} + +// GetActiveTokens is a free data retrieval call binding the contract method 0x5f5817e3. +// +// Solidity: function getActiveTokens() view returns(address[]) +func (_FeeHandler *FeeHandlerCallerSession) GetActiveTokens() ([]common.Address, error) { + return _FeeHandler.Contract.GetActiveTokens(&_FeeHandler.CallOpts) +} + +// GetPastBurnForToken is a free data retrieval call binding the contract method 0xec4bd8ae. +// +// Solidity: function getPastBurnForToken(address token) view returns(uint256) +func (_FeeHandler *FeeHandlerCaller) GetPastBurnForToken(opts *bind.CallOpts, token common.Address) (*big.Int, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "getPastBurnForToken", token) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetPastBurnForToken is a free data retrieval call binding the contract method 0xec4bd8ae. +// +// Solidity: function getPastBurnForToken(address token) view returns(uint256) +func (_FeeHandler *FeeHandlerSession) GetPastBurnForToken(token common.Address) (*big.Int, error) { + return _FeeHandler.Contract.GetPastBurnForToken(&_FeeHandler.CallOpts, token) +} + +// GetPastBurnForToken is a free data retrieval call binding the contract method 0xec4bd8ae. +// +// Solidity: function getPastBurnForToken(address token) view returns(uint256) +func (_FeeHandler *FeeHandlerCallerSession) GetPastBurnForToken(token common.Address) (*big.Int, error) { + return _FeeHandler.Contract.GetPastBurnForToken(&_FeeHandler.CallOpts, token) +} + +// GetTokenActive is a free data retrieval call binding the contract method 0x6c6c65ad. +// +// Solidity: function getTokenActive(address tokenAddress) view returns(bool) +func (_FeeHandler *FeeHandlerCaller) GetTokenActive(opts *bind.CallOpts, tokenAddress common.Address) (bool, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "getTokenActive", tokenAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetTokenActive is a free data retrieval call binding the contract method 0x6c6c65ad. +// +// Solidity: function getTokenActive(address tokenAddress) view returns(bool) +func (_FeeHandler *FeeHandlerSession) GetTokenActive(tokenAddress common.Address) (bool, error) { + return _FeeHandler.Contract.GetTokenActive(&_FeeHandler.CallOpts, tokenAddress) +} + +// GetTokenActive is a free data retrieval call binding the contract method 0x6c6c65ad. +// +// Solidity: function getTokenActive(address tokenAddress) view returns(bool) +func (_FeeHandler *FeeHandlerCallerSession) GetTokenActive(tokenAddress common.Address) (bool, error) { + return _FeeHandler.Contract.GetTokenActive(&_FeeHandler.CallOpts, tokenAddress) +} + +// GetTokenCurrentDaySellLimit is a free data retrieval call binding the contract method 0x13e33cea. +// +// Solidity: function getTokenCurrentDaySellLimit(address tokenAddress) view returns(uint256) +func (_FeeHandler *FeeHandlerCaller) GetTokenCurrentDaySellLimit(opts *bind.CallOpts, tokenAddress common.Address) (*big.Int, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "getTokenCurrentDaySellLimit", tokenAddress) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenCurrentDaySellLimit is a free data retrieval call binding the contract method 0x13e33cea. +// +// Solidity: function getTokenCurrentDaySellLimit(address tokenAddress) view returns(uint256) +func (_FeeHandler *FeeHandlerSession) GetTokenCurrentDaySellLimit(tokenAddress common.Address) (*big.Int, error) { + return _FeeHandler.Contract.GetTokenCurrentDaySellLimit(&_FeeHandler.CallOpts, tokenAddress) +} + +// GetTokenCurrentDaySellLimit is a free data retrieval call binding the contract method 0x13e33cea. +// +// Solidity: function getTokenCurrentDaySellLimit(address tokenAddress) view returns(uint256) +func (_FeeHandler *FeeHandlerCallerSession) GetTokenCurrentDaySellLimit(tokenAddress common.Address) (*big.Int, error) { + return _FeeHandler.Contract.GetTokenCurrentDaySellLimit(&_FeeHandler.CallOpts, tokenAddress) +} + +// GetTokenDailySellLimit is a free data retrieval call binding the contract method 0xce4773d3. +// +// Solidity: function getTokenDailySellLimit(address tokenAddress) view returns(uint256) +func (_FeeHandler *FeeHandlerCaller) GetTokenDailySellLimit(opts *bind.CallOpts, tokenAddress common.Address) (*big.Int, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "getTokenDailySellLimit", tokenAddress) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenDailySellLimit is a free data retrieval call binding the contract method 0xce4773d3. +// +// Solidity: function getTokenDailySellLimit(address tokenAddress) view returns(uint256) +func (_FeeHandler *FeeHandlerSession) GetTokenDailySellLimit(tokenAddress common.Address) (*big.Int, error) { + return _FeeHandler.Contract.GetTokenDailySellLimit(&_FeeHandler.CallOpts, tokenAddress) +} + +// GetTokenDailySellLimit is a free data retrieval call binding the contract method 0xce4773d3. +// +// Solidity: function getTokenDailySellLimit(address tokenAddress) view returns(uint256) +func (_FeeHandler *FeeHandlerCallerSession) GetTokenDailySellLimit(tokenAddress common.Address) (*big.Int, error) { + return _FeeHandler.Contract.GetTokenDailySellLimit(&_FeeHandler.CallOpts, tokenAddress) +} + +// GetTokenHandler is a free data retrieval call binding the contract method 0x3b9e3ad6. +// +// Solidity: function getTokenHandler(address tokenAddress) view returns(address) +func (_FeeHandler *FeeHandlerCaller) GetTokenHandler(opts *bind.CallOpts, tokenAddress common.Address) (common.Address, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "getTokenHandler", tokenAddress) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetTokenHandler is a free data retrieval call binding the contract method 0x3b9e3ad6. +// +// Solidity: function getTokenHandler(address tokenAddress) view returns(address) +func (_FeeHandler *FeeHandlerSession) GetTokenHandler(tokenAddress common.Address) (common.Address, error) { + return _FeeHandler.Contract.GetTokenHandler(&_FeeHandler.CallOpts, tokenAddress) +} + +// GetTokenHandler is a free data retrieval call binding the contract method 0x3b9e3ad6. +// +// Solidity: function getTokenHandler(address tokenAddress) view returns(address) +func (_FeeHandler *FeeHandlerCallerSession) GetTokenHandler(tokenAddress common.Address) (common.Address, error) { + return _FeeHandler.Contract.GetTokenHandler(&_FeeHandler.CallOpts, tokenAddress) +} + +// GetTokenMaxSlippage is a free data retrieval call binding the contract method 0x92f8bce3. +// +// Solidity: function getTokenMaxSlippage(address tokenAddress) view returns(uint256) +func (_FeeHandler *FeeHandlerCaller) GetTokenMaxSlippage(opts *bind.CallOpts, tokenAddress common.Address) (*big.Int, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "getTokenMaxSlippage", tokenAddress) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenMaxSlippage is a free data retrieval call binding the contract method 0x92f8bce3. +// +// Solidity: function getTokenMaxSlippage(address tokenAddress) view returns(uint256) +func (_FeeHandler *FeeHandlerSession) GetTokenMaxSlippage(tokenAddress common.Address) (*big.Int, error) { + return _FeeHandler.Contract.GetTokenMaxSlippage(&_FeeHandler.CallOpts, tokenAddress) +} + +// GetTokenMaxSlippage is a free data retrieval call binding the contract method 0x92f8bce3. +// +// Solidity: function getTokenMaxSlippage(address tokenAddress) view returns(uint256) +func (_FeeHandler *FeeHandlerCallerSession) GetTokenMaxSlippage(tokenAddress common.Address) (*big.Int, error) { + return _FeeHandler.Contract.GetTokenMaxSlippage(&_FeeHandler.CallOpts, tokenAddress) +} + +// GetTokenToDistribute is a free data retrieval call binding the contract method 0x6654f435. +// +// Solidity: function getTokenToDistribute(address tokenAddress) view returns(uint256) +func (_FeeHandler *FeeHandlerCaller) GetTokenToDistribute(opts *bind.CallOpts, tokenAddress common.Address) (*big.Int, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "getTokenToDistribute", tokenAddress) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenToDistribute is a free data retrieval call binding the contract method 0x6654f435. +// +// Solidity: function getTokenToDistribute(address tokenAddress) view returns(uint256) +func (_FeeHandler *FeeHandlerSession) GetTokenToDistribute(tokenAddress common.Address) (*big.Int, error) { + return _FeeHandler.Contract.GetTokenToDistribute(&_FeeHandler.CallOpts, tokenAddress) +} + +// GetTokenToDistribute is a free data retrieval call binding the contract method 0x6654f435. +// +// Solidity: function getTokenToDistribute(address tokenAddress) view returns(uint256) +func (_FeeHandler *FeeHandlerCallerSession) GetTokenToDistribute(tokenAddress common.Address) (*big.Int, error) { + return _FeeHandler.Contract.GetTokenToDistribute(&_FeeHandler.CallOpts, tokenAddress) +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_FeeHandler *FeeHandlerCaller) GetVersionNumber(opts *bind.CallOpts) (*big.Int, *big.Int, *big.Int, *big.Int, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "getVersionNumber") + + if err != nil { + return *new(*big.Int), *new(*big.Int), *new(*big.Int), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + out2 := *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + out3 := *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + + return out0, out1, out2, out3, err + +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_FeeHandler *FeeHandlerSession) GetVersionNumber() (*big.Int, *big.Int, *big.Int, *big.Int, error) { + return _FeeHandler.Contract.GetVersionNumber(&_FeeHandler.CallOpts) +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_FeeHandler *FeeHandlerCallerSession) GetVersionNumber() (*big.Int, *big.Int, *big.Int, *big.Int, error) { + return _FeeHandler.Contract.GetVersionNumber(&_FeeHandler.CallOpts) +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_FeeHandler *FeeHandlerCaller) Initialized(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "initialized") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_FeeHandler *FeeHandlerSession) Initialized() (bool, error) { + return _FeeHandler.Contract.Initialized(&_FeeHandler.CallOpts) +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_FeeHandler *FeeHandlerCallerSession) Initialized() (bool, error) { + return _FeeHandler.Contract.Initialized(&_FeeHandler.CallOpts) +} + +// LastLimitDay is a free data retrieval call binding the contract method 0xdf3712e4. +// +// Solidity: function lastLimitDay() view returns(uint256) +func (_FeeHandler *FeeHandlerCaller) LastLimitDay(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "lastLimitDay") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// LastLimitDay is a free data retrieval call binding the contract method 0xdf3712e4. +// +// Solidity: function lastLimitDay() view returns(uint256) +func (_FeeHandler *FeeHandlerSession) LastLimitDay() (*big.Int, error) { + return _FeeHandler.Contract.LastLimitDay(&_FeeHandler.CallOpts) +} + +// LastLimitDay is a free data retrieval call binding the contract method 0xdf3712e4. +// +// Solidity: function lastLimitDay() view returns(uint256) +func (_FeeHandler *FeeHandlerCallerSession) LastLimitDay() (*big.Int, error) { + return _FeeHandler.Contract.LastLimitDay(&_FeeHandler.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_FeeHandler *FeeHandlerCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_FeeHandler *FeeHandlerSession) Owner() (common.Address, error) { + return _FeeHandler.Contract.Owner(&_FeeHandler.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_FeeHandler *FeeHandlerCallerSession) Owner() (common.Address, error) { + return _FeeHandler.Contract.Owner(&_FeeHandler.CallOpts) +} + +// Registry is a free data retrieval call binding the contract method 0x7b103999. +// +// Solidity: function registry() view returns(address) +func (_FeeHandler *FeeHandlerCaller) Registry(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _FeeHandler.contract.Call(opts, &out, "registry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Registry is a free data retrieval call binding the contract method 0x7b103999. +// +// Solidity: function registry() view returns(address) +func (_FeeHandler *FeeHandlerSession) Registry() (common.Address, error) { + return _FeeHandler.Contract.Registry(&_FeeHandler.CallOpts) +} + +// Registry is a free data retrieval call binding the contract method 0x7b103999. +// +// Solidity: function registry() view returns(address) +func (_FeeHandler *FeeHandlerCallerSession) Registry() (common.Address, error) { + return _FeeHandler.Contract.Registry(&_FeeHandler.CallOpts) +} + +// ActivateToken is a paid mutator transaction binding the contract method 0x0d1ce2d2. +// +// Solidity: function activateToken(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerTransactor) ActivateToken(opts *bind.TransactOpts, tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "activateToken", tokenAddress) +} + +// ActivateToken is a paid mutator transaction binding the contract method 0x0d1ce2d2. +// +// Solidity: function activateToken(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerSession) ActivateToken(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.ActivateToken(&_FeeHandler.TransactOpts, tokenAddress) +} + +// ActivateToken is a paid mutator transaction binding the contract method 0x0d1ce2d2. +// +// Solidity: function activateToken(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerTransactorSession) ActivateToken(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.ActivateToken(&_FeeHandler.TransactOpts, tokenAddress) +} + +// AddToken is a paid mutator transaction binding the contract method 0x5476bd72. +// +// Solidity: function addToken(address tokenAddress, address handlerAddress) returns() +func (_FeeHandler *FeeHandlerTransactor) AddToken(opts *bind.TransactOpts, tokenAddress common.Address, handlerAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "addToken", tokenAddress, handlerAddress) +} + +// AddToken is a paid mutator transaction binding the contract method 0x5476bd72. +// +// Solidity: function addToken(address tokenAddress, address handlerAddress) returns() +func (_FeeHandler *FeeHandlerSession) AddToken(tokenAddress common.Address, handlerAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.AddToken(&_FeeHandler.TransactOpts, tokenAddress, handlerAddress) +} + +// AddToken is a paid mutator transaction binding the contract method 0x5476bd72. +// +// Solidity: function addToken(address tokenAddress, address handlerAddress) returns() +func (_FeeHandler *FeeHandlerTransactorSession) AddToken(tokenAddress common.Address, handlerAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.AddToken(&_FeeHandler.TransactOpts, tokenAddress, handlerAddress) +} + +// BurnCelo is a paid mutator transaction binding the contract method 0xb8b99e4d. +// +// Solidity: function burnCelo() returns() +func (_FeeHandler *FeeHandlerTransactor) BurnCelo(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "burnCelo") +} + +// BurnCelo is a paid mutator transaction binding the contract method 0xb8b99e4d. +// +// Solidity: function burnCelo() returns() +func (_FeeHandler *FeeHandlerSession) BurnCelo() (*types.Transaction, error) { + return _FeeHandler.Contract.BurnCelo(&_FeeHandler.TransactOpts) +} + +// BurnCelo is a paid mutator transaction binding the contract method 0xb8b99e4d. +// +// Solidity: function burnCelo() returns() +func (_FeeHandler *FeeHandlerTransactorSession) BurnCelo() (*types.Transaction, error) { + return _FeeHandler.Contract.BurnCelo(&_FeeHandler.TransactOpts) +} + +// DailySellLimitHit is a paid mutator transaction binding the contract method 0x31828a5b. +// +// Solidity: function dailySellLimitHit(address token, uint256 amountToBurn) returns(bool) +func (_FeeHandler *FeeHandlerTransactor) DailySellLimitHit(opts *bind.TransactOpts, token common.Address, amountToBurn *big.Int) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "dailySellLimitHit", token, amountToBurn) +} + +// DailySellLimitHit is a paid mutator transaction binding the contract method 0x31828a5b. +// +// Solidity: function dailySellLimitHit(address token, uint256 amountToBurn) returns(bool) +func (_FeeHandler *FeeHandlerSession) DailySellLimitHit(token common.Address, amountToBurn *big.Int) (*types.Transaction, error) { + return _FeeHandler.Contract.DailySellLimitHit(&_FeeHandler.TransactOpts, token, amountToBurn) +} + +// DailySellLimitHit is a paid mutator transaction binding the contract method 0x31828a5b. +// +// Solidity: function dailySellLimitHit(address token, uint256 amountToBurn) returns(bool) +func (_FeeHandler *FeeHandlerTransactorSession) DailySellLimitHit(token common.Address, amountToBurn *big.Int) (*types.Transaction, error) { + return _FeeHandler.Contract.DailySellLimitHit(&_FeeHandler.TransactOpts, token, amountToBurn) +} + +// DeactivateToken is a paid mutator transaction binding the contract method 0x68173bcf. +// +// Solidity: function deactivateToken(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerTransactor) DeactivateToken(opts *bind.TransactOpts, tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "deactivateToken", tokenAddress) +} + +// DeactivateToken is a paid mutator transaction binding the contract method 0x68173bcf. +// +// Solidity: function deactivateToken(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerSession) DeactivateToken(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.DeactivateToken(&_FeeHandler.TransactOpts, tokenAddress) +} + +// DeactivateToken is a paid mutator transaction binding the contract method 0x68173bcf. +// +// Solidity: function deactivateToken(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerTransactorSession) DeactivateToken(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.DeactivateToken(&_FeeHandler.TransactOpts, tokenAddress) +} + +// Distribute is a paid mutator transaction binding the contract method 0x63453ae1. +// +// Solidity: function distribute(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerTransactor) Distribute(opts *bind.TransactOpts, tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "distribute", tokenAddress) +} + +// Distribute is a paid mutator transaction binding the contract method 0x63453ae1. +// +// Solidity: function distribute(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerSession) Distribute(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.Distribute(&_FeeHandler.TransactOpts, tokenAddress) +} + +// Distribute is a paid mutator transaction binding the contract method 0x63453ae1. +// +// Solidity: function distribute(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerTransactorSession) Distribute(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.Distribute(&_FeeHandler.TransactOpts, tokenAddress) +} + +// DistributeAll is a paid mutator transaction binding the contract method 0x436596c4. +// +// Solidity: function distributeAll() returns() +func (_FeeHandler *FeeHandlerTransactor) DistributeAll(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "distributeAll") +} + +// DistributeAll is a paid mutator transaction binding the contract method 0x436596c4. +// +// Solidity: function distributeAll() returns() +func (_FeeHandler *FeeHandlerSession) DistributeAll() (*types.Transaction, error) { + return _FeeHandler.Contract.DistributeAll(&_FeeHandler.TransactOpts) +} + +// DistributeAll is a paid mutator transaction binding the contract method 0x436596c4. +// +// Solidity: function distributeAll() returns() +func (_FeeHandler *FeeHandlerTransactorSession) DistributeAll() (*types.Transaction, error) { + return _FeeHandler.Contract.DistributeAll(&_FeeHandler.TransactOpts) +} + +// Handle is a paid mutator transaction binding the contract method 0x7b763140. +// +// Solidity: function handle(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerTransactor) Handle(opts *bind.TransactOpts, tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "handle", tokenAddress) +} + +// Handle is a paid mutator transaction binding the contract method 0x7b763140. +// +// Solidity: function handle(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerSession) Handle(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.Handle(&_FeeHandler.TransactOpts, tokenAddress) +} + +// Handle is a paid mutator transaction binding the contract method 0x7b763140. +// +// Solidity: function handle(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerTransactorSession) Handle(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.Handle(&_FeeHandler.TransactOpts, tokenAddress) +} + +// HandleAll is a paid mutator transaction binding the contract method 0xee8df72d. +// +// Solidity: function handleAll() returns() +func (_FeeHandler *FeeHandlerTransactor) HandleAll(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "handleAll") +} + +// HandleAll is a paid mutator transaction binding the contract method 0xee8df72d. +// +// Solidity: function handleAll() returns() +func (_FeeHandler *FeeHandlerSession) HandleAll() (*types.Transaction, error) { + return _FeeHandler.Contract.HandleAll(&_FeeHandler.TransactOpts) +} + +// HandleAll is a paid mutator transaction binding the contract method 0xee8df72d. +// +// Solidity: function handleAll() returns() +func (_FeeHandler *FeeHandlerTransactorSession) HandleAll() (*types.Transaction, error) { + return _FeeHandler.Contract.HandleAll(&_FeeHandler.TransactOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0x650a1605. +// +// Solidity: function initialize(address _registryAddress, address newFeeBeneficiary, uint256 newBurnFraction, address[] tokens, address[] handlers, uint256[] newLimits, uint256[] newMaxSlippages) returns() +func (_FeeHandler *FeeHandlerTransactor) Initialize(opts *bind.TransactOpts, _registryAddress common.Address, newFeeBeneficiary common.Address, newBurnFraction *big.Int, tokens []common.Address, handlers []common.Address, newLimits []*big.Int, newMaxSlippages []*big.Int) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "initialize", _registryAddress, newFeeBeneficiary, newBurnFraction, tokens, handlers, newLimits, newMaxSlippages) +} + +// Initialize is a paid mutator transaction binding the contract method 0x650a1605. +// +// Solidity: function initialize(address _registryAddress, address newFeeBeneficiary, uint256 newBurnFraction, address[] tokens, address[] handlers, uint256[] newLimits, uint256[] newMaxSlippages) returns() +func (_FeeHandler *FeeHandlerSession) Initialize(_registryAddress common.Address, newFeeBeneficiary common.Address, newBurnFraction *big.Int, tokens []common.Address, handlers []common.Address, newLimits []*big.Int, newMaxSlippages []*big.Int) (*types.Transaction, error) { + return _FeeHandler.Contract.Initialize(&_FeeHandler.TransactOpts, _registryAddress, newFeeBeneficiary, newBurnFraction, tokens, handlers, newLimits, newMaxSlippages) +} + +// Initialize is a paid mutator transaction binding the contract method 0x650a1605. +// +// Solidity: function initialize(address _registryAddress, address newFeeBeneficiary, uint256 newBurnFraction, address[] tokens, address[] handlers, uint256[] newLimits, uint256[] newMaxSlippages) returns() +func (_FeeHandler *FeeHandlerTransactorSession) Initialize(_registryAddress common.Address, newFeeBeneficiary common.Address, newBurnFraction *big.Int, tokens []common.Address, handlers []common.Address, newLimits []*big.Int, newMaxSlippages []*big.Int) (*types.Transaction, error) { + return _FeeHandler.Contract.Initialize(&_FeeHandler.TransactOpts, _registryAddress, newFeeBeneficiary, newBurnFraction, tokens, handlers, newLimits, newMaxSlippages) +} + +// RemoveToken is a paid mutator transaction binding the contract method 0x5fa7b584. +// +// Solidity: function removeToken(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerTransactor) RemoveToken(opts *bind.TransactOpts, tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "removeToken", tokenAddress) +} + +// RemoveToken is a paid mutator transaction binding the contract method 0x5fa7b584. +// +// Solidity: function removeToken(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerSession) RemoveToken(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.RemoveToken(&_FeeHandler.TransactOpts, tokenAddress) +} + +// RemoveToken is a paid mutator transaction binding the contract method 0x5fa7b584. +// +// Solidity: function removeToken(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerTransactorSession) RemoveToken(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.RemoveToken(&_FeeHandler.TransactOpts, tokenAddress) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_FeeHandler *FeeHandlerTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_FeeHandler *FeeHandlerSession) RenounceOwnership() (*types.Transaction, error) { + return _FeeHandler.Contract.RenounceOwnership(&_FeeHandler.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_FeeHandler *FeeHandlerTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _FeeHandler.Contract.RenounceOwnership(&_FeeHandler.TransactOpts) +} + +// Sell is a paid mutator transaction binding the contract method 0x94b6f9d4. +// +// Solidity: function sell(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerTransactor) Sell(opts *bind.TransactOpts, tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "sell", tokenAddress) +} + +// Sell is a paid mutator transaction binding the contract method 0x94b6f9d4. +// +// Solidity: function sell(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerSession) Sell(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.Sell(&_FeeHandler.TransactOpts, tokenAddress) +} + +// Sell is a paid mutator transaction binding the contract method 0x94b6f9d4. +// +// Solidity: function sell(address tokenAddress) returns() +func (_FeeHandler *FeeHandlerTransactorSession) Sell(tokenAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.Sell(&_FeeHandler.TransactOpts, tokenAddress) +} + +// SetBurnFraction is a paid mutator transaction binding the contract method 0x384995cd. +// +// Solidity: function setBurnFraction(uint256 fraction) returns() +func (_FeeHandler *FeeHandlerTransactor) SetBurnFraction(opts *bind.TransactOpts, fraction *big.Int) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "setBurnFraction", fraction) +} + +// SetBurnFraction is a paid mutator transaction binding the contract method 0x384995cd. +// +// Solidity: function setBurnFraction(uint256 fraction) returns() +func (_FeeHandler *FeeHandlerSession) SetBurnFraction(fraction *big.Int) (*types.Transaction, error) { + return _FeeHandler.Contract.SetBurnFraction(&_FeeHandler.TransactOpts, fraction) +} + +// SetBurnFraction is a paid mutator transaction binding the contract method 0x384995cd. +// +// Solidity: function setBurnFraction(uint256 fraction) returns() +func (_FeeHandler *FeeHandlerTransactorSession) SetBurnFraction(fraction *big.Int) (*types.Transaction, error) { + return _FeeHandler.Contract.SetBurnFraction(&_FeeHandler.TransactOpts, fraction) +} + +// SetDailySellLimit is a paid mutator transaction binding the contract method 0xc558df38. +// +// Solidity: function setDailySellLimit(address token, uint256 newLimit) returns() +func (_FeeHandler *FeeHandlerTransactor) SetDailySellLimit(opts *bind.TransactOpts, token common.Address, newLimit *big.Int) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "setDailySellLimit", token, newLimit) +} + +// SetDailySellLimit is a paid mutator transaction binding the contract method 0xc558df38. +// +// Solidity: function setDailySellLimit(address token, uint256 newLimit) returns() +func (_FeeHandler *FeeHandlerSession) SetDailySellLimit(token common.Address, newLimit *big.Int) (*types.Transaction, error) { + return _FeeHandler.Contract.SetDailySellLimit(&_FeeHandler.TransactOpts, token, newLimit) +} + +// SetDailySellLimit is a paid mutator transaction binding the contract method 0xc558df38. +// +// Solidity: function setDailySellLimit(address token, uint256 newLimit) returns() +func (_FeeHandler *FeeHandlerTransactorSession) SetDailySellLimit(token common.Address, newLimit *big.Int) (*types.Transaction, error) { + return _FeeHandler.Contract.SetDailySellLimit(&_FeeHandler.TransactOpts, token, newLimit) +} + +// SetFeeBeneficiary is a paid mutator transaction binding the contract method 0x5a0a3d82. +// +// Solidity: function setFeeBeneficiary(address beneficiary) returns() +func (_FeeHandler *FeeHandlerTransactor) SetFeeBeneficiary(opts *bind.TransactOpts, beneficiary common.Address) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "setFeeBeneficiary", beneficiary) +} + +// SetFeeBeneficiary is a paid mutator transaction binding the contract method 0x5a0a3d82. +// +// Solidity: function setFeeBeneficiary(address beneficiary) returns() +func (_FeeHandler *FeeHandlerSession) SetFeeBeneficiary(beneficiary common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.SetFeeBeneficiary(&_FeeHandler.TransactOpts, beneficiary) +} + +// SetFeeBeneficiary is a paid mutator transaction binding the contract method 0x5a0a3d82. +// +// Solidity: function setFeeBeneficiary(address beneficiary) returns() +func (_FeeHandler *FeeHandlerTransactorSession) SetFeeBeneficiary(beneficiary common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.SetFeeBeneficiary(&_FeeHandler.TransactOpts, beneficiary) +} + +// SetHandler is a paid mutator transaction binding the contract method 0xe9f1bbde. +// +// Solidity: function setHandler(address tokenAddress, address handlerAddress) returns() +func (_FeeHandler *FeeHandlerTransactor) SetHandler(opts *bind.TransactOpts, tokenAddress common.Address, handlerAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "setHandler", tokenAddress, handlerAddress) +} + +// SetHandler is a paid mutator transaction binding the contract method 0xe9f1bbde. +// +// Solidity: function setHandler(address tokenAddress, address handlerAddress) returns() +func (_FeeHandler *FeeHandlerSession) SetHandler(tokenAddress common.Address, handlerAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.SetHandler(&_FeeHandler.TransactOpts, tokenAddress, handlerAddress) +} + +// SetHandler is a paid mutator transaction binding the contract method 0xe9f1bbde. +// +// Solidity: function setHandler(address tokenAddress, address handlerAddress) returns() +func (_FeeHandler *FeeHandlerTransactorSession) SetHandler(tokenAddress common.Address, handlerAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.SetHandler(&_FeeHandler.TransactOpts, tokenAddress, handlerAddress) +} + +// SetMaxSplippage is a paid mutator transaction binding the contract method 0x4e73db99. +// +// Solidity: function setMaxSplippage(address token, uint256 newMax) returns() +func (_FeeHandler *FeeHandlerTransactor) SetMaxSplippage(opts *bind.TransactOpts, token common.Address, newMax *big.Int) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "setMaxSplippage", token, newMax) +} + +// SetMaxSplippage is a paid mutator transaction binding the contract method 0x4e73db99. +// +// Solidity: function setMaxSplippage(address token, uint256 newMax) returns() +func (_FeeHandler *FeeHandlerSession) SetMaxSplippage(token common.Address, newMax *big.Int) (*types.Transaction, error) { + return _FeeHandler.Contract.SetMaxSplippage(&_FeeHandler.TransactOpts, token, newMax) +} + +// SetMaxSplippage is a paid mutator transaction binding the contract method 0x4e73db99. +// +// Solidity: function setMaxSplippage(address token, uint256 newMax) returns() +func (_FeeHandler *FeeHandlerTransactorSession) SetMaxSplippage(token common.Address, newMax *big.Int) (*types.Transaction, error) { + return _FeeHandler.Contract.SetMaxSplippage(&_FeeHandler.TransactOpts, token, newMax) +} + +// SetRegistry is a paid mutator transaction binding the contract method 0xa91ee0dc. +// +// Solidity: function setRegistry(address registryAddress) returns() +func (_FeeHandler *FeeHandlerTransactor) SetRegistry(opts *bind.TransactOpts, registryAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "setRegistry", registryAddress) +} + +// SetRegistry is a paid mutator transaction binding the contract method 0xa91ee0dc. +// +// Solidity: function setRegistry(address registryAddress) returns() +func (_FeeHandler *FeeHandlerSession) SetRegistry(registryAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.SetRegistry(&_FeeHandler.TransactOpts, registryAddress) +} + +// SetRegistry is a paid mutator transaction binding the contract method 0xa91ee0dc. +// +// Solidity: function setRegistry(address registryAddress) returns() +func (_FeeHandler *FeeHandlerTransactorSession) SetRegistry(registryAddress common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.SetRegistry(&_FeeHandler.TransactOpts, registryAddress) +} + +// Transfer is a paid mutator transaction binding the contract method 0xbeabacc8. +// +// Solidity: function transfer(address token, address recipient, uint256 value) returns(bool) +func (_FeeHandler *FeeHandlerTransactor) Transfer(opts *bind.TransactOpts, token common.Address, recipient common.Address, value *big.Int) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "transfer", token, recipient, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xbeabacc8. +// +// Solidity: function transfer(address token, address recipient, uint256 value) returns(bool) +func (_FeeHandler *FeeHandlerSession) Transfer(token common.Address, recipient common.Address, value *big.Int) (*types.Transaction, error) { + return _FeeHandler.Contract.Transfer(&_FeeHandler.TransactOpts, token, recipient, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xbeabacc8. +// +// Solidity: function transfer(address token, address recipient, uint256 value) returns(bool) +func (_FeeHandler *FeeHandlerTransactorSession) Transfer(token common.Address, recipient common.Address, value *big.Int) (*types.Transaction, error) { + return _FeeHandler.Contract.Transfer(&_FeeHandler.TransactOpts, token, recipient, value) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_FeeHandler *FeeHandlerTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _FeeHandler.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_FeeHandler *FeeHandlerSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.TransferOwnership(&_FeeHandler.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_FeeHandler *FeeHandlerTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _FeeHandler.Contract.TransferOwnership(&_FeeHandler.TransactOpts, newOwner) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_FeeHandler *FeeHandlerTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FeeHandler.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_FeeHandler *FeeHandlerSession) Receive() (*types.Transaction, error) { + return _FeeHandler.Contract.Receive(&_FeeHandler.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_FeeHandler *FeeHandlerTransactorSession) Receive() (*types.Transaction, error) { + return _FeeHandler.Contract.Receive(&_FeeHandler.TransactOpts) +} + +// FeeHandlerBurnFractionSetIterator is returned from FilterBurnFractionSet and is used to iterate over the raw logs and unpacked data for BurnFractionSet events raised by the FeeHandler contract. +type FeeHandlerBurnFractionSetIterator struct { + Event *FeeHandlerBurnFractionSet // 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 *FeeHandlerBurnFractionSetIterator) 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(FeeHandlerBurnFractionSet) + 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(FeeHandlerBurnFractionSet) + 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 *FeeHandlerBurnFractionSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeHandlerBurnFractionSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeHandlerBurnFractionSet represents a BurnFractionSet event raised by the FeeHandler contract. +type FeeHandlerBurnFractionSet struct { + Fraction *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBurnFractionSet is a free log retrieval operation binding the contract event 0x41c679f4bcdc2c95f79a3647e2237162d9763d86685ef6c667781230c8ba9157. +// +// Solidity: event BurnFractionSet(uint256 fraction) +func (_FeeHandler *FeeHandlerFilterer) FilterBurnFractionSet(opts *bind.FilterOpts) (*FeeHandlerBurnFractionSetIterator, error) { + + logs, sub, err := _FeeHandler.contract.FilterLogs(opts, "BurnFractionSet") + if err != nil { + return nil, err + } + return &FeeHandlerBurnFractionSetIterator{contract: _FeeHandler.contract, event: "BurnFractionSet", logs: logs, sub: sub}, nil +} + +// WatchBurnFractionSet is a free log subscription operation binding the contract event 0x41c679f4bcdc2c95f79a3647e2237162d9763d86685ef6c667781230c8ba9157. +// +// Solidity: event BurnFractionSet(uint256 fraction) +func (_FeeHandler *FeeHandlerFilterer) WatchBurnFractionSet(opts *bind.WatchOpts, sink chan<- *FeeHandlerBurnFractionSet) (event.Subscription, error) { + + logs, sub, err := _FeeHandler.contract.WatchLogs(opts, "BurnFractionSet") + 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(FeeHandlerBurnFractionSet) + if err := _FeeHandler.contract.UnpackLog(event, "BurnFractionSet", 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 +} + +// ParseBurnFractionSet is a log parse operation binding the contract event 0x41c679f4bcdc2c95f79a3647e2237162d9763d86685ef6c667781230c8ba9157. +// +// Solidity: event BurnFractionSet(uint256 fraction) +func (_FeeHandler *FeeHandlerFilterer) ParseBurnFractionSet(log types.Log) (*FeeHandlerBurnFractionSet, error) { + event := new(FeeHandlerBurnFractionSet) + if err := _FeeHandler.contract.UnpackLog(event, "BurnFractionSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FeeHandlerDailyLimitHitIterator is returned from FilterDailyLimitHit and is used to iterate over the raw logs and unpacked data for DailyLimitHit events raised by the FeeHandler contract. +type FeeHandlerDailyLimitHitIterator struct { + Event *FeeHandlerDailyLimitHit // 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 *FeeHandlerDailyLimitHitIterator) 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(FeeHandlerDailyLimitHit) + 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(FeeHandlerDailyLimitHit) + 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 *FeeHandlerDailyLimitHitIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeHandlerDailyLimitHitIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeHandlerDailyLimitHit represents a DailyLimitHit event raised by the FeeHandler contract. +type FeeHandlerDailyLimitHit struct { + Token common.Address + Burning *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDailyLimitHit is a free log retrieval operation binding the contract event 0xb1a68b0b66260ca392f760fd4dda4a94818d69c89a4eeb6610eb41db7bab8c37. +// +// Solidity: event DailyLimitHit(address token, uint256 burning) +func (_FeeHandler *FeeHandlerFilterer) FilterDailyLimitHit(opts *bind.FilterOpts) (*FeeHandlerDailyLimitHitIterator, error) { + + logs, sub, err := _FeeHandler.contract.FilterLogs(opts, "DailyLimitHit") + if err != nil { + return nil, err + } + return &FeeHandlerDailyLimitHitIterator{contract: _FeeHandler.contract, event: "DailyLimitHit", logs: logs, sub: sub}, nil +} + +// WatchDailyLimitHit is a free log subscription operation binding the contract event 0xb1a68b0b66260ca392f760fd4dda4a94818d69c89a4eeb6610eb41db7bab8c37. +// +// Solidity: event DailyLimitHit(address token, uint256 burning) +func (_FeeHandler *FeeHandlerFilterer) WatchDailyLimitHit(opts *bind.WatchOpts, sink chan<- *FeeHandlerDailyLimitHit) (event.Subscription, error) { + + logs, sub, err := _FeeHandler.contract.WatchLogs(opts, "DailyLimitHit") + 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(FeeHandlerDailyLimitHit) + if err := _FeeHandler.contract.UnpackLog(event, "DailyLimitHit", 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 +} + +// ParseDailyLimitHit is a log parse operation binding the contract event 0xb1a68b0b66260ca392f760fd4dda4a94818d69c89a4eeb6610eb41db7bab8c37. +// +// Solidity: event DailyLimitHit(address token, uint256 burning) +func (_FeeHandler *FeeHandlerFilterer) ParseDailyLimitHit(log types.Log) (*FeeHandlerDailyLimitHit, error) { + event := new(FeeHandlerDailyLimitHit) + if err := _FeeHandler.contract.UnpackLog(event, "DailyLimitHit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FeeHandlerDailyLimitSetIterator is returned from FilterDailyLimitSet and is used to iterate over the raw logs and unpacked data for DailyLimitSet events raised by the FeeHandler contract. +type FeeHandlerDailyLimitSetIterator struct { + Event *FeeHandlerDailyLimitSet // 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 *FeeHandlerDailyLimitSetIterator) 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(FeeHandlerDailyLimitSet) + 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(FeeHandlerDailyLimitSet) + 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 *FeeHandlerDailyLimitSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeHandlerDailyLimitSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeHandlerDailyLimitSet represents a DailyLimitSet event raised by the FeeHandler contract. +type FeeHandlerDailyLimitSet struct { + TokenAddress common.Address + NewLimit *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDailyLimitSet is a free log retrieval operation binding the contract event 0xd3d22ffd28b02735cf411bd7f925bd8da01212c7028153e0d632e2953ac3088e. +// +// Solidity: event DailyLimitSet(address tokenAddress, uint256 newLimit) +func (_FeeHandler *FeeHandlerFilterer) FilterDailyLimitSet(opts *bind.FilterOpts) (*FeeHandlerDailyLimitSetIterator, error) { + + logs, sub, err := _FeeHandler.contract.FilterLogs(opts, "DailyLimitSet") + if err != nil { + return nil, err + } + return &FeeHandlerDailyLimitSetIterator{contract: _FeeHandler.contract, event: "DailyLimitSet", logs: logs, sub: sub}, nil +} + +// WatchDailyLimitSet is a free log subscription operation binding the contract event 0xd3d22ffd28b02735cf411bd7f925bd8da01212c7028153e0d632e2953ac3088e. +// +// Solidity: event DailyLimitSet(address tokenAddress, uint256 newLimit) +func (_FeeHandler *FeeHandlerFilterer) WatchDailyLimitSet(opts *bind.WatchOpts, sink chan<- *FeeHandlerDailyLimitSet) (event.Subscription, error) { + + logs, sub, err := _FeeHandler.contract.WatchLogs(opts, "DailyLimitSet") + 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(FeeHandlerDailyLimitSet) + if err := _FeeHandler.contract.UnpackLog(event, "DailyLimitSet", 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 +} + +// ParseDailyLimitSet is a log parse operation binding the contract event 0xd3d22ffd28b02735cf411bd7f925bd8da01212c7028153e0d632e2953ac3088e. +// +// Solidity: event DailyLimitSet(address tokenAddress, uint256 newLimit) +func (_FeeHandler *FeeHandlerFilterer) ParseDailyLimitSet(log types.Log) (*FeeHandlerDailyLimitSet, error) { + event := new(FeeHandlerDailyLimitSet) + if err := _FeeHandler.contract.UnpackLog(event, "DailyLimitSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FeeHandlerDailySellLimitUpdatedIterator is returned from FilterDailySellLimitUpdated and is used to iterate over the raw logs and unpacked data for DailySellLimitUpdated events raised by the FeeHandler contract. +type FeeHandlerDailySellLimitUpdatedIterator struct { + Event *FeeHandlerDailySellLimitUpdated // 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 *FeeHandlerDailySellLimitUpdatedIterator) 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(FeeHandlerDailySellLimitUpdated) + 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(FeeHandlerDailySellLimitUpdated) + 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 *FeeHandlerDailySellLimitUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeHandlerDailySellLimitUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeHandlerDailySellLimitUpdated represents a DailySellLimitUpdated event raised by the FeeHandler contract. +type FeeHandlerDailySellLimitUpdated struct { + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDailySellLimitUpdated is a free log retrieval operation binding the contract event 0xcdcea7139bd245b1c7468bc1cfb59ad732b3b0909bafa9f9436ad74c81d0aafb. +// +// Solidity: event DailySellLimitUpdated(uint256 amount) +func (_FeeHandler *FeeHandlerFilterer) FilterDailySellLimitUpdated(opts *bind.FilterOpts) (*FeeHandlerDailySellLimitUpdatedIterator, error) { + + logs, sub, err := _FeeHandler.contract.FilterLogs(opts, "DailySellLimitUpdated") + if err != nil { + return nil, err + } + return &FeeHandlerDailySellLimitUpdatedIterator{contract: _FeeHandler.contract, event: "DailySellLimitUpdated", logs: logs, sub: sub}, nil +} + +// WatchDailySellLimitUpdated is a free log subscription operation binding the contract event 0xcdcea7139bd245b1c7468bc1cfb59ad732b3b0909bafa9f9436ad74c81d0aafb. +// +// Solidity: event DailySellLimitUpdated(uint256 amount) +func (_FeeHandler *FeeHandlerFilterer) WatchDailySellLimitUpdated(opts *bind.WatchOpts, sink chan<- *FeeHandlerDailySellLimitUpdated) (event.Subscription, error) { + + logs, sub, err := _FeeHandler.contract.WatchLogs(opts, "DailySellLimitUpdated") + 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(FeeHandlerDailySellLimitUpdated) + if err := _FeeHandler.contract.UnpackLog(event, "DailySellLimitUpdated", 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 +} + +// ParseDailySellLimitUpdated is a log parse operation binding the contract event 0xcdcea7139bd245b1c7468bc1cfb59ad732b3b0909bafa9f9436ad74c81d0aafb. +// +// Solidity: event DailySellLimitUpdated(uint256 amount) +func (_FeeHandler *FeeHandlerFilterer) ParseDailySellLimitUpdated(log types.Log) (*FeeHandlerDailySellLimitUpdated, error) { + event := new(FeeHandlerDailySellLimitUpdated) + if err := _FeeHandler.contract.UnpackLog(event, "DailySellLimitUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FeeHandlerFeeBeneficiarySetIterator is returned from FilterFeeBeneficiarySet and is used to iterate over the raw logs and unpacked data for FeeBeneficiarySet events raised by the FeeHandler contract. +type FeeHandlerFeeBeneficiarySetIterator struct { + Event *FeeHandlerFeeBeneficiarySet // 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 *FeeHandlerFeeBeneficiarySetIterator) 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(FeeHandlerFeeBeneficiarySet) + 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(FeeHandlerFeeBeneficiarySet) + 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 *FeeHandlerFeeBeneficiarySetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeHandlerFeeBeneficiarySetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeHandlerFeeBeneficiarySet represents a FeeBeneficiarySet event raised by the FeeHandler contract. +type FeeHandlerFeeBeneficiarySet struct { + NewBeneficiary common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeBeneficiarySet is a free log retrieval operation binding the contract event 0xf7015098f8d6fa48f0560725ffd5f81bf687ee5ac45153b590bdcb04648bbdd3. +// +// Solidity: event FeeBeneficiarySet(address newBeneficiary) +func (_FeeHandler *FeeHandlerFilterer) FilterFeeBeneficiarySet(opts *bind.FilterOpts) (*FeeHandlerFeeBeneficiarySetIterator, error) { + + logs, sub, err := _FeeHandler.contract.FilterLogs(opts, "FeeBeneficiarySet") + if err != nil { + return nil, err + } + return &FeeHandlerFeeBeneficiarySetIterator{contract: _FeeHandler.contract, event: "FeeBeneficiarySet", logs: logs, sub: sub}, nil +} + +// WatchFeeBeneficiarySet is a free log subscription operation binding the contract event 0xf7015098f8d6fa48f0560725ffd5f81bf687ee5ac45153b590bdcb04648bbdd3. +// +// Solidity: event FeeBeneficiarySet(address newBeneficiary) +func (_FeeHandler *FeeHandlerFilterer) WatchFeeBeneficiarySet(opts *bind.WatchOpts, sink chan<- *FeeHandlerFeeBeneficiarySet) (event.Subscription, error) { + + logs, sub, err := _FeeHandler.contract.WatchLogs(opts, "FeeBeneficiarySet") + 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(FeeHandlerFeeBeneficiarySet) + if err := _FeeHandler.contract.UnpackLog(event, "FeeBeneficiarySet", 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 +} + +// ParseFeeBeneficiarySet is a log parse operation binding the contract event 0xf7015098f8d6fa48f0560725ffd5f81bf687ee5ac45153b590bdcb04648bbdd3. +// +// Solidity: event FeeBeneficiarySet(address newBeneficiary) +func (_FeeHandler *FeeHandlerFilterer) ParseFeeBeneficiarySet(log types.Log) (*FeeHandlerFeeBeneficiarySet, error) { + event := new(FeeHandlerFeeBeneficiarySet) + if err := _FeeHandler.contract.UnpackLog(event, "FeeBeneficiarySet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FeeHandlerMaxSlippageSetIterator is returned from FilterMaxSlippageSet and is used to iterate over the raw logs and unpacked data for MaxSlippageSet events raised by the FeeHandler contract. +type FeeHandlerMaxSlippageSetIterator struct { + Event *FeeHandlerMaxSlippageSet // 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 *FeeHandlerMaxSlippageSetIterator) 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(FeeHandlerMaxSlippageSet) + 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(FeeHandlerMaxSlippageSet) + 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 *FeeHandlerMaxSlippageSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeHandlerMaxSlippageSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeHandlerMaxSlippageSet represents a MaxSlippageSet event raised by the FeeHandler contract. +type FeeHandlerMaxSlippageSet struct { + Token common.Address + MaxSlippage *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMaxSlippageSet is a free log retrieval operation binding the contract event 0xd8df93d785f3d0d4294fd7b61e5d749c20eec95a2fed5b6b502a4cad09199ca6. +// +// Solidity: event MaxSlippageSet(address token, uint256 maxSlippage) +func (_FeeHandler *FeeHandlerFilterer) FilterMaxSlippageSet(opts *bind.FilterOpts) (*FeeHandlerMaxSlippageSetIterator, error) { + + logs, sub, err := _FeeHandler.contract.FilterLogs(opts, "MaxSlippageSet") + if err != nil { + return nil, err + } + return &FeeHandlerMaxSlippageSetIterator{contract: _FeeHandler.contract, event: "MaxSlippageSet", logs: logs, sub: sub}, nil +} + +// WatchMaxSlippageSet is a free log subscription operation binding the contract event 0xd8df93d785f3d0d4294fd7b61e5d749c20eec95a2fed5b6b502a4cad09199ca6. +// +// Solidity: event MaxSlippageSet(address token, uint256 maxSlippage) +func (_FeeHandler *FeeHandlerFilterer) WatchMaxSlippageSet(opts *bind.WatchOpts, sink chan<- *FeeHandlerMaxSlippageSet) (event.Subscription, error) { + + logs, sub, err := _FeeHandler.contract.WatchLogs(opts, "MaxSlippageSet") + 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(FeeHandlerMaxSlippageSet) + if err := _FeeHandler.contract.UnpackLog(event, "MaxSlippageSet", 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 +} + +// ParseMaxSlippageSet is a log parse operation binding the contract event 0xd8df93d785f3d0d4294fd7b61e5d749c20eec95a2fed5b6b502a4cad09199ca6. +// +// Solidity: event MaxSlippageSet(address token, uint256 maxSlippage) +func (_FeeHandler *FeeHandlerFilterer) ParseMaxSlippageSet(log types.Log) (*FeeHandlerMaxSlippageSet, error) { + event := new(FeeHandlerMaxSlippageSet) + if err := _FeeHandler.contract.UnpackLog(event, "MaxSlippageSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FeeHandlerOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the FeeHandler contract. +type FeeHandlerOwnershipTransferredIterator struct { + Event *FeeHandlerOwnershipTransferred // 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 *FeeHandlerOwnershipTransferredIterator) 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(FeeHandlerOwnershipTransferred) + 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(FeeHandlerOwnershipTransferred) + 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 *FeeHandlerOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeHandlerOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeHandlerOwnershipTransferred represents a OwnershipTransferred event raised by the FeeHandler contract. +type FeeHandlerOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_FeeHandler *FeeHandlerFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*FeeHandlerOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _FeeHandler.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &FeeHandlerOwnershipTransferredIterator{contract: _FeeHandler.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_FeeHandler *FeeHandlerFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *FeeHandlerOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _FeeHandler.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + 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(FeeHandlerOwnershipTransferred) + if err := _FeeHandler.contract.UnpackLog(event, "OwnershipTransferred", 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 +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_FeeHandler *FeeHandlerFilterer) ParseOwnershipTransferred(log types.Log) (*FeeHandlerOwnershipTransferred, error) { + event := new(FeeHandlerOwnershipTransferred) + if err := _FeeHandler.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FeeHandlerRegistrySetIterator is returned from FilterRegistrySet and is used to iterate over the raw logs and unpacked data for RegistrySet events raised by the FeeHandler contract. +type FeeHandlerRegistrySetIterator struct { + Event *FeeHandlerRegistrySet // 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 *FeeHandlerRegistrySetIterator) 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(FeeHandlerRegistrySet) + 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(FeeHandlerRegistrySet) + 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 *FeeHandlerRegistrySetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeHandlerRegistrySetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeHandlerRegistrySet represents a RegistrySet event raised by the FeeHandler contract. +type FeeHandlerRegistrySet struct { + RegistryAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRegistrySet is a free log retrieval operation binding the contract event 0x27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b. +// +// Solidity: event RegistrySet(address indexed registryAddress) +func (_FeeHandler *FeeHandlerFilterer) FilterRegistrySet(opts *bind.FilterOpts, registryAddress []common.Address) (*FeeHandlerRegistrySetIterator, error) { + + var registryAddressRule []interface{} + for _, registryAddressItem := range registryAddress { + registryAddressRule = append(registryAddressRule, registryAddressItem) + } + + logs, sub, err := _FeeHandler.contract.FilterLogs(opts, "RegistrySet", registryAddressRule) + if err != nil { + return nil, err + } + return &FeeHandlerRegistrySetIterator{contract: _FeeHandler.contract, event: "RegistrySet", logs: logs, sub: sub}, nil +} + +// WatchRegistrySet is a free log subscription operation binding the contract event 0x27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b. +// +// Solidity: event RegistrySet(address indexed registryAddress) +func (_FeeHandler *FeeHandlerFilterer) WatchRegistrySet(opts *bind.WatchOpts, sink chan<- *FeeHandlerRegistrySet, registryAddress []common.Address) (event.Subscription, error) { + + var registryAddressRule []interface{} + for _, registryAddressItem := range registryAddress { + registryAddressRule = append(registryAddressRule, registryAddressItem) + } + + logs, sub, err := _FeeHandler.contract.WatchLogs(opts, "RegistrySet", registryAddressRule) + 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(FeeHandlerRegistrySet) + if err := _FeeHandler.contract.UnpackLog(event, "RegistrySet", 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 +} + +// ParseRegistrySet is a log parse operation binding the contract event 0x27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b. +// +// Solidity: event RegistrySet(address indexed registryAddress) +func (_FeeHandler *FeeHandlerFilterer) ParseRegistrySet(log types.Log) (*FeeHandlerRegistrySet, error) { + event := new(FeeHandlerRegistrySet) + if err := _FeeHandler.contract.UnpackLog(event, "RegistrySet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FeeHandlerSoldAndBurnedTokenIterator is returned from FilterSoldAndBurnedToken and is used to iterate over the raw logs and unpacked data for SoldAndBurnedToken events raised by the FeeHandler contract. +type FeeHandlerSoldAndBurnedTokenIterator struct { + Event *FeeHandlerSoldAndBurnedToken // 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 *FeeHandlerSoldAndBurnedTokenIterator) 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(FeeHandlerSoldAndBurnedToken) + 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(FeeHandlerSoldAndBurnedToken) + 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 *FeeHandlerSoldAndBurnedTokenIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeHandlerSoldAndBurnedTokenIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeHandlerSoldAndBurnedToken represents a SoldAndBurnedToken event raised by the FeeHandler contract. +type FeeHandlerSoldAndBurnedToken struct { + Token common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSoldAndBurnedToken is a free log retrieval operation binding the contract event 0xac094032b4e9dccb3a000eedb94cf30146ca0d7c39be85229f478413fa21d1d8. +// +// Solidity: event SoldAndBurnedToken(address token, uint256 value) +func (_FeeHandler *FeeHandlerFilterer) FilterSoldAndBurnedToken(opts *bind.FilterOpts) (*FeeHandlerSoldAndBurnedTokenIterator, error) { + + logs, sub, err := _FeeHandler.contract.FilterLogs(opts, "SoldAndBurnedToken") + if err != nil { + return nil, err + } + return &FeeHandlerSoldAndBurnedTokenIterator{contract: _FeeHandler.contract, event: "SoldAndBurnedToken", logs: logs, sub: sub}, nil +} + +// WatchSoldAndBurnedToken is a free log subscription operation binding the contract event 0xac094032b4e9dccb3a000eedb94cf30146ca0d7c39be85229f478413fa21d1d8. +// +// Solidity: event SoldAndBurnedToken(address token, uint256 value) +func (_FeeHandler *FeeHandlerFilterer) WatchSoldAndBurnedToken(opts *bind.WatchOpts, sink chan<- *FeeHandlerSoldAndBurnedToken) (event.Subscription, error) { + + logs, sub, err := _FeeHandler.contract.WatchLogs(opts, "SoldAndBurnedToken") + 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(FeeHandlerSoldAndBurnedToken) + if err := _FeeHandler.contract.UnpackLog(event, "SoldAndBurnedToken", 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 +} + +// ParseSoldAndBurnedToken is a log parse operation binding the contract event 0xac094032b4e9dccb3a000eedb94cf30146ca0d7c39be85229f478413fa21d1d8. +// +// Solidity: event SoldAndBurnedToken(address token, uint256 value) +func (_FeeHandler *FeeHandlerFilterer) ParseSoldAndBurnedToken(log types.Log) (*FeeHandlerSoldAndBurnedToken, error) { + event := new(FeeHandlerSoldAndBurnedToken) + if err := _FeeHandler.contract.UnpackLog(event, "SoldAndBurnedToken", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FeeHandlerTokenAddedIterator is returned from FilterTokenAdded and is used to iterate over the raw logs and unpacked data for TokenAdded events raised by the FeeHandler contract. +type FeeHandlerTokenAddedIterator struct { + Event *FeeHandlerTokenAdded // 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 *FeeHandlerTokenAddedIterator) 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(FeeHandlerTokenAdded) + 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(FeeHandlerTokenAdded) + 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 *FeeHandlerTokenAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeHandlerTokenAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeHandlerTokenAdded represents a TokenAdded event raised by the FeeHandler contract. +type FeeHandlerTokenAdded struct { + TokenAddress common.Address + HandlerAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokenAdded is a free log retrieval operation binding the contract event 0xdffbd9ded1c09446f09377de547142dcce7dc541c8b0b028142b1eba7026b9e7. +// +// Solidity: event TokenAdded(address tokenAddress, address handlerAddress) +func (_FeeHandler *FeeHandlerFilterer) FilterTokenAdded(opts *bind.FilterOpts) (*FeeHandlerTokenAddedIterator, error) { + + logs, sub, err := _FeeHandler.contract.FilterLogs(opts, "TokenAdded") + if err != nil { + return nil, err + } + return &FeeHandlerTokenAddedIterator{contract: _FeeHandler.contract, event: "TokenAdded", logs: logs, sub: sub}, nil +} + +// WatchTokenAdded is a free log subscription operation binding the contract event 0xdffbd9ded1c09446f09377de547142dcce7dc541c8b0b028142b1eba7026b9e7. +// +// Solidity: event TokenAdded(address tokenAddress, address handlerAddress) +func (_FeeHandler *FeeHandlerFilterer) WatchTokenAdded(opts *bind.WatchOpts, sink chan<- *FeeHandlerTokenAdded) (event.Subscription, error) { + + logs, sub, err := _FeeHandler.contract.WatchLogs(opts, "TokenAdded") + 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(FeeHandlerTokenAdded) + if err := _FeeHandler.contract.UnpackLog(event, "TokenAdded", 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 +} + +// ParseTokenAdded is a log parse operation binding the contract event 0xdffbd9ded1c09446f09377de547142dcce7dc541c8b0b028142b1eba7026b9e7. +// +// Solidity: event TokenAdded(address tokenAddress, address handlerAddress) +func (_FeeHandler *FeeHandlerFilterer) ParseTokenAdded(log types.Log) (*FeeHandlerTokenAdded, error) { + event := new(FeeHandlerTokenAdded) + if err := _FeeHandler.contract.UnpackLog(event, "TokenAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FeeHandlerTokenRemovedIterator is returned from FilterTokenRemoved and is used to iterate over the raw logs and unpacked data for TokenRemoved events raised by the FeeHandler contract. +type FeeHandlerTokenRemovedIterator struct { + Event *FeeHandlerTokenRemoved // 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 *FeeHandlerTokenRemovedIterator) 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(FeeHandlerTokenRemoved) + 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(FeeHandlerTokenRemoved) + 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 *FeeHandlerTokenRemovedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FeeHandlerTokenRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FeeHandlerTokenRemoved represents a TokenRemoved event raised by the FeeHandler contract. +type FeeHandlerTokenRemoved struct { + TokenAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokenRemoved is a free log retrieval operation binding the contract event 0x4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd3. +// +// Solidity: event TokenRemoved(address tokenAddress) +func (_FeeHandler *FeeHandlerFilterer) FilterTokenRemoved(opts *bind.FilterOpts) (*FeeHandlerTokenRemovedIterator, error) { + + logs, sub, err := _FeeHandler.contract.FilterLogs(opts, "TokenRemoved") + if err != nil { + return nil, err + } + return &FeeHandlerTokenRemovedIterator{contract: _FeeHandler.contract, event: "TokenRemoved", logs: logs, sub: sub}, nil +} + +// WatchTokenRemoved is a free log subscription operation binding the contract event 0x4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd3. +// +// Solidity: event TokenRemoved(address tokenAddress) +func (_FeeHandler *FeeHandlerFilterer) WatchTokenRemoved(opts *bind.WatchOpts, sink chan<- *FeeHandlerTokenRemoved) (event.Subscription, error) { + + logs, sub, err := _FeeHandler.contract.WatchLogs(opts, "TokenRemoved") + 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(FeeHandlerTokenRemoved) + if err := _FeeHandler.contract.UnpackLog(event, "TokenRemoved", 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 +} + +// ParseTokenRemoved is a log parse operation binding the contract event 0x4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd3. +// +// Solidity: event TokenRemoved(address tokenAddress) +func (_FeeHandler *FeeHandlerFilterer) ParseTokenRemoved(log types.Log) (*FeeHandlerTokenRemoved, error) { + event := new(FeeHandlerTokenRemoved) + if err := _FeeHandler.contract.UnpackLog(event, "TokenRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-bindings/bindings/feehandler_more.go b/op-bindings/bindings/feehandler_more.go new file mode 100644 index 000000000000..13d82d24357f --- /dev/null +++ b/op-bindings/bindings/feehandler_more.go @@ -0,0 +1,25 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "encoding/json" + + "github.com/ethereum-optimism/optimism/op-bindings/solc" +) + +const FeeHandlerStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src/celo/FeeHandler.sol:FeeHandler\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1001,\"contract\":\"src/celo/FeeHandler.sol:FeeHandler\",\"label\":\"initialized\",\"offset\":20,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"src/celo/FeeHandler.sol:FeeHandler\",\"label\":\"registry\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_contract(ICeloRegistry)1010\"},{\"astId\":1003,\"contract\":\"src/celo/FeeHandler.sol:FeeHandler\",\"label\":\"_guardCounter\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1004,\"contract\":\"src/celo/FeeHandler.sol:FeeHandler\",\"label\":\"lastLimitDay\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1005,\"contract\":\"src/celo/FeeHandler.sol:FeeHandler\",\"label\":\"burnFraction\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_struct(Fraction)1012_storage\"},{\"astId\":1006,\"contract\":\"src/celo/FeeHandler.sol:FeeHandler\",\"label\":\"feeBeneficiary\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_address\"},{\"astId\":1007,\"contract\":\"src/celo/FeeHandler.sol:FeeHandler\",\"label\":\"celoToBeBurned\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_uint256\"},{\"astId\":1008,\"contract\":\"src/celo/FeeHandler.sol:FeeHandler\",\"label\":\"tokenStates\",\"offset\":0,\"slot\":\"7\",\"type\":\"t_mapping(t_address,t_struct(TokenState)1014_storage)\"},{\"astId\":1009,\"contract\":\"src/celo/FeeHandler.sol:FeeHandler\",\"label\":\"activeTokens\",\"offset\":0,\"slot\":\"8\",\"type\":\"t_struct(AddressSet)1011_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_bytes32)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"bytes32[]\",\"numberOfBytes\":\"32\",\"base\":\"t_bytes32\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_contract(ICeloRegistry)1010\":{\"encoding\":\"inplace\",\"label\":\"contract ICeloRegistry\",\"numberOfBytes\":\"20\"},\"t_mapping(t_address,t_struct(TokenState)1014_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct FeeHandler.TokenState)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(TokenState)1014_storage\"},\"t_mapping(t_bytes32,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_uint256\"},\"t_struct(AddressSet)1011_storage\":{\"encoding\":\"inplace\",\"label\":\"struct EnumerableSet.AddressSet\",\"numberOfBytes\":\"64\"},\"t_struct(Fraction)1012_storage\":{\"encoding\":\"inplace\",\"label\":\"struct FixidityLib.Fraction\",\"numberOfBytes\":\"32\"},\"t_struct(Set)1013_storage\":{\"encoding\":\"inplace\",\"label\":\"struct EnumerableSet.Set\",\"numberOfBytes\":\"64\"},\"t_struct(TokenState)1014_storage\":{\"encoding\":\"inplace\",\"label\":\"struct FeeHandler.TokenState\",\"numberOfBytes\":\"192\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}" + +var FeeHandlerStorageLayout = new(solc.StorageLayout) + +var FeeHandlerDeployedBin = "0x6080604052600436106102a45760003560e01c80636654f4351161016e578063a91ee0dc116100cb578063df3712e41161007f578063ec4bd8ae11610064578063ec4bd8ae14610813578063ee8df72d14610859578063f2fde38b1461086e57600080fd5b8063df3712e4146107dd578063e9f1bbde146107f357600080fd5b8063beabacc8116100b0578063beabacc814610757578063c558df3814610777578063ce4773d31461079757600080fd5b8063a91ee0dc14610722578063b8b99e4d1461074257600080fd5b80637b763140116101225780638de065b6116101075780638de065b6146106cb57806392f8bce3146106e257806394b6f9d41461070257600080fd5b80637b763140146106805780638da5cb5b146106a057600080fd5b80636c6c65ad116101535780636c6c65ad1461061e578063715018a61461063e5780637b1039991461065357600080fd5b80636654f435146105b857806368173bcf146105fe57600080fd5b8063492fb3431161021c5780635a0a3d82116101d05780635fa7b584116101b55780635fa7b5841461055857806363453ae114610578578063650a16051461059857600080fd5b80635a0a3d82146105165780635f5817e31461053657600080fd5b80634e73db99116102015780634e73db99146104a357806354255be0146104c35780635476bd72146104f657600080fd5b8063492fb3431461046157806349844b1c1461048e57600080fd5b8063158ef93e11610273578063384995cd11610258578063384995cd146103c15780633b9e3ad6146103e1578063436596c41461044c57600080fd5b8063158ef93e1461035f57806331828a5b146103a157600080fd5b8063036235a6146102b057806308906111146102e15780630d1ce2d2146102f757806313e33cea1461031957600080fd5b366102ab57005b600080fd5b3480156102bc57600080fd5b506102ce69d3c21bcecceda100000081565b6040519081526020015b60405180910390f35b3480156102ed57600080fd5b506102ce60065481565b34801561030357600080fd5b5061031761031236600461361b565b61088e565b005b34801561032557600080fd5b506102ce61033436600461361b565b73ffffffffffffffffffffffffffffffffffffffff1660009081526007602052604090206003015490565b34801561036b57600080fd5b506000546103919074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016102d8565b3480156103ad57600080fd5b506103916103bc366004613638565b6108a2565b3480156103cd57600080fd5b506103176103dc366004613664565b610917565b3480156103ed57600080fd5b506104276103fc36600461361b565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102d8565b34801561045857600080fd5b50610317610928565b34801561046d57600080fd5b506005546104279073ffffffffffffffffffffffffffffffffffffffff1681565b34801561049a57600080fd5b506102ce60c881565b3480156104af57600080fd5b506103176104be366004613638565b610932565b3480156104cf57600080fd5b506001806000806040805194855260208501939093529183015260608201526080016102d8565b34801561050257600080fd5b5061031761051136600461367d565b610948565b34801561052257600080fd5b5061031761053136600461361b565b61095a565b34801561054257600080fd5b5061054b61096b565b6040516102d891906136b6565b34801561056457600080fd5b5061031761057336600461361b565b61097c565b34801561058457600080fd5b5061031761059336600461361b565b61098d565b3480156105a457600080fd5b506103176105b336600461375c565b610996565b3480156105c457600080fd5b506102ce6105d336600461361b565b73ffffffffffffffffffffffffffffffffffffffff1660009081526007602052604090206004015490565b34801561060a57600080fd5b5061031761061936600461361b565b610d41565b34801561062a57600080fd5b5061039161063936600461361b565b610d52565b34801561064a57600080fd5b50610317610d5f565b34801561065f57600080fd5b506001546104279073ffffffffffffffffffffffffffffffffffffffff1681565b34801561068c57600080fd5b5061031761069b36600461361b565b610d71565b3480156106ac57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610427565b3480156106d757600080fd5b506004546102ce9081565b3480156106ee57600080fd5b506102ce6106fd36600461361b565b610d7a565b34801561070e57600080fd5b5061031761071d36600461361b565b610db7565b34801561072e57600080fd5b5061031761073d36600461361b565b610dc0565b34801561074e57600080fd5b50610317610eb4565b34801561076357600080fd5b50610391610772366004613852565b610ebc565b34801561078357600080fd5b50610317610792366004613638565b610f67565b3480156107a357600080fd5b506102ce6107b236600461361b565b73ffffffffffffffffffffffffffffffffffffffff1660009081526007602052604090206002015490565b3480156107e957600080fd5b506102ce60035481565b3480156107ff57600080fd5b5061031761080e36600461367d565b610f79565b34801561081f57600080fd5b506102ce61082e36600461361b565b73ffffffffffffffffffffffffffffffffffffffff1660009081526007602052604090206005015490565b34801561086557600080fd5b50610317610f8b565b34801561087a57600080fd5b5061031761088936600461361b565b610f93565b610896611047565b61089f816110c8565b50565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760205260408120600281015482036108dc576000915050610911565b60006108eb62015180426138c2565b90506003548111156109065760038181556002830154908301555b506003015482101590505b92915050565b61091f611047565b61089f81611289565b61093061139d565b565b61093a611047565b61094482826114a8565b5050565b610950611047565b610944828261166d565b610962611047565b61089f81611796565b6060610977600861180f565b905090565b610984611047565b61089f81611823565b61089f816118aa565b60005474010000000000000000000000000000000000000000900460ff1615610a20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f636f6e747261637420616c726561647920696e697469616c697a65640000000060448201526064015b60405180910390fd5b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055868514610aee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f68616e646c657273206c656e6774682073686f756c64206d6174636820746f6b60448201527f656e73206c656e677468000000000000000000000000000000000000000000006064820152608401610a17565b868314610b7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f6c696d697473206c656e6774682073686f756c64206d6174636820746f6b656e60448201527f73206c656e6774680000000000000000000000000000000000000000000000006064820152608401610a17565b868114610c0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f6d6178536c697070616765206c656e6774682073686f756c64206d617463682060448201527f746f6b656e73206c656e677468000000000000000000000000000000000000006064820152608401610a17565b610c1533611e1d565b610c1e8b610dc0565b610c278a611796565b610c3089611289565b60005b87811015610d3357610c91898983818110610c5057610c506138fd565b9050602002016020810190610c65919061361b565b888884818110610c7757610c776138fd565b9050602002016020810190610c8c919061361b565b61166d565b610cd9898983818110610ca657610ca66138fd565b9050602002016020810190610cbb919061361b565b868684818110610ccd57610ccd6138fd565b90506020020135611e92565b610d21898983818110610cee57610cee6138fd565b9050602002016020810190610d03919061361b565b848484818110610d1557610d156138fd565b905060200201356114a8565b80610d2b8161392c565b915050610c33565b505050505050505050505050565b610d49611047565b61089f81611ef6565b6000610911600883611f01565b610d67611047565b6109306000611e1d565b61089f81611f30565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260076020908152604080832081519283019091526001015490819052610911565b61089f81612094565b610dc8611047565b73ffffffffffffffffffffffffffffffffffffffff8116610e45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f43616e6e6f7420726567697374657220746865206e756c6c20616464726573736044820152606401610a17565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b90600090a250565b6109306127c0565b6000610ec6611047565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526024820184905285169063a9059cbb906044016020604051808303816000875af1158015610f3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5f9190613964565b949350505050565b610f6f611047565b6109448282611e92565b610f81611047565b6109448282612ad8565b610930612bce565b610f9b611047565b73ffffffffffffffffffffffffffffffffffffffff811661103e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a17565b61089f81611e1d565b60005473ffffffffffffffffffffffffffffffffffffffff163314610930576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a17565b73ffffffffffffffffffffffffffffffffffffffff808216600090815260076020526040902080549091161515806111ed57506001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9091169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161117d91815260200190565b602060405180830381865afa15801561119a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111be9190613986565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b611279576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f48616e646c65722068617320746f2062652073657420746f206163746976617460448201527f6520746f6b656e000000000000000000000000000000000000000000000000006064820152608401610a17565b611284600883612c16565b505050565b6040805160208082018352600091829052825180820184528481528351808301855292909252825190810190925269d3c21bcecceda10000008252906112d49082905b519051111590565b611360576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4275726e206672616374696f6e206d757374206265206c657373207468616e2060448201527f6f7220657175616c20746f2031000000000000000000000000000000000000006064820152608401610a17565b80516004556040518281527f41c679f4bcdc2c95f79a3647e2237162d9763d86685ef6c667781230c8ba9157906020015b60405180910390a15050565b60005b6113aa6008612c38565b8110156113dc5760006113be600883612c42565b90506113c9816118aa565b50806113d48161392c565b9150506113a0565b506001546040517f476f6c64546f6b656e000000000000000000000000000000000000000000000060208201526109309173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed906029015b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161146291815260200190565b602060405180830381865afa15801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a39190613986565b6118aa565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260076020526040812090829003611537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f43616e6e6f7420736574206d617820736c69707061676520746f207a65726f006044820152606401610a17565b60408051602080820183526000918290528251808201845285905260018401859055825180820184528581528351808301855292909252825190810190925269d3c21bcecceda1000000825261158c916112cc565b611618576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f53706c697070616765206d757374206265206c657373207468616e206f72206560448201527f7175616c20746f203100000000000000000000000000000000000000000000006064820152608401610a17565b6040805173ffffffffffffffffffffffffffffffffffffffff85168152602081018490527fd8df93d785f3d0d4294fd7b61e5d749c20eec95a2fed5b6b502a4cad09199ca691015b60405180910390a1505050565b73ffffffffffffffffffffffffffffffffffffffff81166116ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f43616e2774207365742068616e646c657220746f207a65726f000000000000006044820152606401610a17565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260076020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016918316919091178155611748600884612c16565b506040805173ffffffffffffffffffffffffffffffffffffffff8086168252841660208201527fdffbd9ded1c09446f09377de547142dcce7dc541c8b0b028142b1eba7026b9e79101611660565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ff7015098f8d6fa48f0560725ffd5f81bf687ee5ac45153b590bdcb04648bbdd39060200160405180910390a150565b6060600061181c83612c4e565b9392505050565b61182c81611ef6565b73ffffffffffffffffffffffffffffffffffffffff811660008181526007602090815260409182902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155915192835290917f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd39101611391565b6118b2612caa565b6040517fe583983600000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff919091169063e583983690602401602060405180830381865afa15801561191e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119429190613964565b156119cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f63616e27742063616c6c207768656e20636f6e74726163742069732066726f7a60448201527f656e0000000000000000000000000000000000000000000000000000000000006064820152608401610a17565b6001600260008282546119e291906139a3565b909155505060025460055473ffffffffffffffffffffffffffffffffffffffff16611a8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f43616e2774206469737472696275746520746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610a17565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152829060009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015611afd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b2191906139b6565b73ffffffffffffffffffffffffffffffffffffffff808616600090815260076020526040902080549293509116151580611c4857506001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9091169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611bd891815260200190565b602060405180830381865afa158015611bf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c199190613986565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b611cd4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f48616e646c65722068617320746f2062652073657420746f2073656c6c20746f60448201527f6b656e00000000000000000000000000000000000000000000000000000000006064820152608401610a17565b6000611ce4838360040154612d6e565b905080600003611cf75750505050611db2565b6005546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9182166004820152602481018390529085169063a9059cbb906044016020604051808303816000875af1158015611d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d949190613964565b50808260040154611da591906139cf565b8260040181905550505050505b6002548114610944576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7265656e7472616e742063616c6c0000000000000000000000000000000000006044820152606401610a17565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260076020908152604091829020600281018590558251938452908301849052917fd3d22ffd28b02735cf411bd7f925bd8da01212c7028153e0d632e2953ac3088e9101611660565b610944600882612d84565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561181c565b6001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9091169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611fb291815260200190565b602060405180830381865afa158015611fcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff39190613986565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461202e5761202e81612094565b6120366127c0565b61203f816118aa565b6001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015261089f9173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed9060290161142e565b61209c612caa565b6040517fe583983600000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff919091169063e583983690602401602060405180830381865afa158015612108573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061212c9190613964565b156121b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f63616e27742063616c6c207768656e20636f6e74726163742069732066726f7a60448201527f656e0000000000000000000000000000000000000000000000000000000000006064820152608401610a17565b6001600260008282546121cc91906139a3565b909155505060025473ffffffffffffffffffffffffffffffffffffffff8083166000908152600760205260409020805484921661228b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f48616e646c65722068617320746f2062652073657420746f2073656c6c20746f60448201527f6b656e00000000000000000000000000000000000000000000000000000000006064820152608401610a17565b604080516020810190915260018201549081905260000361232e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4d617820736c6970706167652068617320746f2062652073657420746f20736560448201527f6c6c20746f6b656e0000000000000000000000000000000000000000000000006064820152608401610a17565b6004808201546040517f70a0823100000000000000000000000000000000000000000000000000000000815230928101929092526000916123db919073ffffffffffffffffffffffffffffffffffffffff8616906370a0823190602401602060405180830381865afa1580156123a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123cc91906139b6565b6123d691906139cf565b612da6565b60408051602081019091526004548152909150600090612404906123ff9084612e85565b6132bc565b905080612410836132bc565b846004015461241f91906139a3565b61242991906139cf565b600484015560c88110156124405750505050611db2565b61244a86826108a2565b156124a5575060038201546040805173ffffffffffffffffffffffffffffffffffffffff88168152602081018390527fb1a68b0b66260ca392f760fd4dda4a94818d69c89a4eeb6610eb41db7bab8c37910160405180910390a15b82546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9182166004820152602481018390529085169063a9059cbb906044016020604051808303816000875af115801561251d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125419190613964565b5082546001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9283169260009284926331de7d15928c92169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016125d591815260200190565b602060405180830381865afa1580156125f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126169190613986565b604080516020810190915260018a01549081905287906040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b16815273ffffffffffffffffffffffffffffffffffffffff9485166004820152939092166024840152604483015260648201526084016020604051808303816000875af11580156126aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ce91906139b6565b9050806006546126de91906139a3565b60065560058501546126f19084906139a3565b600586015561270088846132d6565b6040805173ffffffffffffffffffffffffffffffffffffffff8a168152602081018590527fac094032b4e9dccb3a000eedb94cf30146ca0d7c39be85229f478413fa21d1d8910160405180910390a15050505050506002548114610944576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7265656e7472616e742063616c6c0000000000000000000000000000000000006044820152606401610a17565b6001546040517f476f6c64546f6b656e00000000000000000000000000000000000000000000006020820152600091600791839173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161284891815260200190565b602060405180830381865afa158015612865573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128899190613986565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed604051602001612938907f476f6c64546f6b656e0000000000000000000000000000000000000000000000815260090190565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161296c91815260200190565b602060405180830381865afa158015612989573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ad9190613986565b9050600047905060006006548460040154836129c991906139cf565b6129d391906139cf565b60408051602081019091526004548152909150600090612a00906123ff906129fa85612da6565b90612e85565b9050600060065482612a1291906139a3565b6040517f42966c680000000000000000000000000000000000000000000000000000000081526004810182905290915073ffffffffffffffffffffffffffffffffffffffff8616906342966c68906024016020604051808303816000875af1158015612a82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aa69190613964565b50600060065560048601548290612abe9085906139a3565b612ac891906139cf565b8660040181905550505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116612b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f43616e2774207365742068616e646c657220746f207a65726f2c20757365206460448201527f656163746976617465546f6b656e0000000000000000000000000000000000006064820152608401610a17565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260076020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60005b612bdb6008612c38565b811015612c0d576000612bef600883612c42565b9050612bfa81612094565b5080612c058161392c565b915050612bd1565b50610eb461139d565b600061181c8373ffffffffffffffffffffffffffffffffffffffff8416613351565b6000610911825490565b600061181c83836133a0565b606081600001805480602002602001604051908101604052809291908181526020018280548015612c9e57602002820191906000526020600020905b815481526020019060010190808311612c8a575b50505050509050919050565b6001546040517f467265657a657200000000000000000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed90602701604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401612d2d91815260200190565b602060405180830381865afa158015612d4a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109779190613986565b6000818310612d7d578161181c565b5090919050565b600061181c8373ffffffffffffffffffffffffffffffffffffffff84166133ca565b6040805160208101909152600081527601357c299a88ea76a58924d52ce4f26a85af186c2b9e74821115612e5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f63616e277420637265617465206669786964697479206e756d626572206c617260448201527f676572207468616e206d61784e657746697865642829000000000000000000006064820152608401610a17565b604051806020016040528069d3c21bcecceda100000084612e7d91906139e2565b905292915050565b60408051602081019091526000815282511580612ea157508151155b15612ebb5750604080516020810190915260008152610911565b81517fffffffffffffffffffffffffffffffffffffffffffff2c3de43133125f00000001612eea575081610911565b82517fffffffffffffffffffffffffffffffffffffffffffff2c3de43133125f00000001612f19575080610911565b600069d3c21bcecceda1000000612f2f856134bd565b51612f3a91906138c2565b90506000612f47856134fc565b519050600069d3c21bcecceda1000000612f60866134bd565b51612f6b91906138c2565b90506000612f78866134fc565b5190506000612f8783866139e2565b905084156130015782612f9a86836138c2565b14613001576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078317931206465746563746564000000000000000000006044820152606401610a17565b600061301769d3c21bcecceda1000000836139e2565b9050811561309b5769d3c21bcecceda100000061303483836138c2565b1461309b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6f766572666c6f772078317931202a20666978656431206465746563746564006044820152606401610a17565b90508060006130aa85876139e2565b9050851561312457846130bd87836138c2565b14613124576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078327931206465746563746564000000000000000000006044820152606401610a17565b600061313085896139e2565b905087156131aa578461314389836138c2565b146131aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078317932206465746563746564000000000000000000006044820152606401610a17565b6131b964e8d4a51000886138c2565b96506131ca64e8d4a51000866138c2565b945060006131d886896139e2565b9050871561325257856131eb89836138c2565b14613252576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078327932206465746563746564000000000000000000006044820152606401610a17565b6040805160208082018352878252825190810190925284825290613277908290613547565b905061329181604051806020016040528086815250613547565b90506132ab81604051806020016040528085815250613547565b9d9c50505050505050505050505050565b80516000906109119069d3c21bcecceda1000000906138c2565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760205260408120600281015490910361330c57505050565b81816003015461331c91906139cf565b60038201556040518281527fcdcea7139bd245b1c7468bc1cfb59ad732b3b0909bafa9f9436ad74c81d0aafb90602001611660565b600081815260018301602052604081205461339857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610911565b506000610911565b60008260000182815481106133b7576133b76138fd565b9060005260206000200154905092915050565b600081815260018301602052604081205480156134b35760006133ee6001836139cf565b8554909150600090613402906001906139cf565b9050818114613467576000866000018281548110613422576134226138fd565b9060005260206000200154905080876000018481548110613445576134456138fd565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613478576134786139f9565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610911565b6000915050610911565b604080516020810190915260008152604051806020016040528069d3c21bcecceda10000008085600001516134f291906138c2565b612e7d91906139e2565b604080516020810190915260008152604051806020016040528069d3c21bcecceda100000080856000015161353191906138c2565b61353b91906139e2565b8451612e7d91906139cf565b60408051602081019091526000815281518351600091613566916139a3565b84519091508110156135d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f616464206f766572666c6f7720646574656374656400000000000000000000006044820152606401610a17565b60408051602081019091529081529392505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461089f57600080fd5b8035613616816135e9565b919050565b60006020828403121561362d57600080fd5b813561181c816135e9565b6000806040838503121561364b57600080fd5b8235613656816135e9565b946020939093013593505050565b60006020828403121561367657600080fd5b5035919050565b6000806040838503121561369057600080fd5b823561369b816135e9565b915060208301356136ab816135e9565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561370457835173ffffffffffffffffffffffffffffffffffffffff16835292840192918401916001016136d2565b50909695505050505050565b60008083601f84011261372257600080fd5b50813567ffffffffffffffff81111561373a57600080fd5b6020830191508360208260051b850101111561375557600080fd5b9250929050565b600080600080600080600080600080600060e08c8e03121561377d57600080fd5b6137868c61360b565b9a5061379460208d0161360b565b995060408c0135985067ffffffffffffffff8060608e013511156137b757600080fd5b6137c78e60608f01358f01613710565b909950975060808d01358110156137dd57600080fd5b6137ed8e60808f01358f01613710565b909750955060a08d013581101561380357600080fd5b6138138e60a08f01358f01613710565b909550935060c08d013581101561382957600080fd5b5061383a8d60c08e01358e01613710565b81935080925050509295989b509295989b9093969950565b60008060006060848603121561386757600080fd5b8335613872816135e9565b92506020840135613882816135e9565b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000826138f8577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361395d5761395d613893565b5060010190565b60006020828403121561397657600080fd5b8151801515811461181c57600080fd5b60006020828403121561399857600080fd5b815161181c816135e9565b8082018082111561091157610911613893565b6000602082840312156139c857600080fd5b5051919050565b8181038181111561091157610911613893565b808202811582820484141761091157610911613893565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a" + +func init() { + if err := json.Unmarshal([]byte(FeeHandlerStorageLayoutJSON), FeeHandlerStorageLayout); err != nil { + panic(err) + } + + layouts["FeeHandler"] = FeeHandlerStorageLayout + deployedBytecodes["FeeHandler"] = FeeHandlerDeployedBin +} diff --git a/op-bindings/bindings/mentofeehandlerseller.go b/op-bindings/bindings/mentofeehandlerseller.go new file mode 100644 index 000000000000..0abc9b7be2cf --- /dev/null +++ b/op-bindings/bindings/mentofeehandlerseller.go @@ -0,0 +1,1127 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "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 ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// MentoFeeHandlerSellerMetaData contains all meta data concerning the MentoFeeHandlerSeller contract. +var MentoFeeHandlerSellerMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"test\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minimumReports\",\"type\":\"uint256\"}],\"name\":\"MinimumReportsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"registryAddress\",\"type\":\"address\"}],\"name\":\"RegistrySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"soldTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"boughtTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenSold\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"midPriceNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"midPriceDenominator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSlippage\",\"type\":\"uint256\"}],\"name\":\"calculateMinAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVersionNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_registryAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokenAddresses\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newMininumReports\",\"type\":\"uint256[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"minimumReports\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contractICeloRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sellTokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"buyTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSlippage\",\"type\":\"uint256\"}],\"name\":\"sell\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"newMininumReports\",\"type\":\"uint256\"}],\"name\":\"setMinimumReports\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registryAddress\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60806040523480156200001157600080fd5b5060405162001f1c38038062001f1c8339810160408190526200003491620000b4565b8080620000413362000064565b806200005b576000805460ff60a01b1916600160a01b1790555b505050620000df565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000c757600080fd5b81518015158114620000d857600080fd5b9392505050565b611e2d80620000ef6000396000f3fe6080604052600436106100d65760003560e01c80637b1039991161007f578063dbba0f0111610059578063dbba0f011461028b578063e4187b13146102ab578063f2fde38b146102cb578063ff1d5752146102eb57600080fd5b80637b103999146101ee5780638da5cb5b14610240578063a91ee0dc1461026b57600080fd5b80634e008cdb116100b05780634e008cdb1461017957806354255be0146101a6578063715018a6146101d957600080fd5b8063158ef93e146100e25780632f257aa01461012957806331de7d151461014b57600080fd5b366100dd57005b600080fd5b3480156100ee57600080fd5b506000546101149074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020015b60405180910390f35b34801561013557600080fd5b50610149610144366004611abd565b61030b565b005b34801561015757600080fd5b5061016b610166366004611ae9565b610321565b604051908152602001610120565b34801561018557600080fd5b5061016b610194366004611b2f565b60026020526000908152604090205481565b3480156101b257600080fd5b50600180600080604080519485526020850193909352918301526060820152608001610120565b3480156101e557600080fd5b50610149610b81565b3480156101fa57600080fd5b5060015461021b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610120565b34801561024c57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661021b565b34801561027757600080fd5b50610149610286366004611b2f565b610b95565b34801561029757600080fd5b506101146102a6366004611b53565b610c89565b3480156102b757600080fd5b5061016b6102c6366004611b95565b610d34565b3480156102d757600080fd5b506101496102e6366004611b2f565b610db7565b3480156102f757600080fd5b50610149610306366004611c13565b610e6e565b610313610fb1565b61031d8282611032565b5050565b6001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016103a491815260200190565b602060405180830381865afa1580156103c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e59190611c96565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461047e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f42757920746f6b656e2063616e206f6e6c7920626520676f6c6420746f6b656e60448201526064015b60405180910390fd5b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152859073ffffffffffffffffffffffffffffffffffffffff8216906370a0823190602401602060405180830381865afa1580156104ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050e9190611cb3565b84111561059d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f42616c616e6365206f6620746f6b656e20746f206275726e206e6f7420656e6f60448201527f75676800000000000000000000000000000000000000000000000000000000006064820152608401610475565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed8373ffffffffffffffffffffffffffffffffffffffff166340a12f646040518163ffffffff1660e01b8152600401602060405180830381865afa158015610628573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064c9190611cb3565b6040518263ffffffff1660e01b815260040161066a91815260200190565b602060405180830381865afa158015610687573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ab9190611c96565b9050806000806106b9611097565b73ffffffffffffffffffffffffffffffffffffffff8b8116600081815260026020526040908190205490517fbbc66a9400000000000000000000000000000000000000000000000000000000815260048101929092529293509083169063bbc66a9490602401602060405180830381865afa15801561073c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107609190611cb3565b10156107ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4e756d626572206f66207265706f72747320666f7220746f6b656e206e6f742060448201527f656e6f75676800000000000000000000000000000000000000000000000000006064820152608401610475565b6040517fef90e1b000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b81166004830152600091829184169063ef90e1b0906024016040805180830381865afa15801561085e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108829190611ccc565b9150915061089282828c8c610d34565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018d90529195509088169063095ea7b3906044016020604051808303816000875af115801561090b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092f9190611cf0565b506040517f8ab1a5d4000000000000000000000000000000000000000000000000000000008152600481018b9052602481018590526000604482015273ffffffffffffffffffffffffffffffffffffffff861690638ab1a5d4906064016020604051808303816000875af11580156109ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cf9190611cb3565b5060006109da611161565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015610a4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6e9190611cb3565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810182905290915073ffffffffffffffffffffffffffffffffffffffff83169063a9059cbb906044016020604051808303816000875af1158015610ae4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b089190611cf0565b507fd4cffd6979677853b45a7a17f455188a434e975ba474c5a2613c94beacea537a8e8e8e604051610b689392919073ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b60405180910390a19d9c50505050505050505050505050565b610b89610fb1565b610b9360006111b5565b565b610b9d610fb1565b73ffffffffffffffffffffffffffffffffffffffff8116610c1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f43616e6e6f7420726567697374657220746865206e756c6c20616464726573736044820152606401610475565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b90600090a250565b6000610c93610fb1565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526024820185905285169063a9059cbb906044016020604051808303816000875af1158015610d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2c9190611cf0565b949350505050565b600080610d598360408051602080820183526000909152815190810190915290815290565b90506000610d67878761122a565b90506000610d7486611268565b90506000610d828383611347565b9050610daa610da5610d9e84610d988789611347565b90611347565b839061177e565b61181c565b9998505050505050505050565b610dbf610fb1565b73ffffffffffffffffffffffffffffffffffffffff8116610e62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610475565b610e6b816111b5565b50565b60005474010000000000000000000000000000000000000000900460ff1615610ef3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f636f6e747261637420616c726561647920696e697469616c697a6564000000006044820152606401610475565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055610f3b336111b5565b610f4485610b95565b60005b83811015610fa957610f97858583818110610f6457610f64611d12565b9050602002016020810190610f799190611b2f565b848484818110610f8b57610f8b611d12565b90506020020135611032565b80610fa181611d70565b915050610f47565b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610475565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260026020908152604091829020849055815192835282018390527f03cc7dddcb89dd90027bd8fa62d09d1b5c49ce5d20f8c9bb6bdeaaa62ea1718b910160405180910390a15050565b6001546040517f536f727465644f7261636c657300000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed90602d015b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161111b91815260200190565b602060405180830381865afa158015611138573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115c9190611c96565b905090565b6001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed906029016110e7565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516020810190915260008152600061124484611268565b9050600061125184611268565b905061125d8282611836565b925050505b92915050565b6040805160208101909152600081527601357c299a88ea76a58924d52ce4f26a85af186c2b9e7482111561131e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f63616e277420637265617465206669786964697479206e756d626572206c617260448201527f676572207468616e206d61784e657746697865642829000000000000000000006064820152608401610475565b604051806020016040528069d3c21bcecceda10000008461133f9190611da8565b905292915050565b6040805160208101909152600081528251158061136357508151155b1561137d5750604080516020810190915260008152611262565b81517fffffffffffffffffffffffffffffffffffffffffffff2c3de43133125f000000016113ac575081611262565b82517fffffffffffffffffffffffffffffffffffffffffffff2c3de43133125f000000016113db575080611262565b600069d3c21bcecceda10000006113f18561196f565b516113fc9190611dbf565b90506000611409856119ae565b519050600069d3c21bcecceda10000006114228661196f565b5161142d9190611dbf565b9050600061143a866119ae565b51905060006114498386611da8565b905084156114c3578261145c8683611dbf565b146114c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078317931206465746563746564000000000000000000006044820152606401610475565b60006114d969d3c21bcecceda100000083611da8565b9050811561155d5769d3c21bcecceda10000006114f68383611dbf565b1461155d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6f766572666c6f772078317931202a20666978656431206465746563746564006044820152606401610475565b905080600061156c8587611da8565b905085156115e6578461157f8783611dbf565b146115e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078327931206465746563746564000000000000000000006044820152606401610475565b60006115f28589611da8565b9050871561166c57846116058983611dbf565b1461166c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078317932206465746563746564000000000000000000006044820152606401610475565b61167b64e8d4a5100088611dbf565b965061168c64e8d4a5100086611dbf565b9450600061169a8689611da8565b9050871561171457856116ad8983611dbf565b14611714576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078327932206465746563746564000000000000000000006044820152606401610475565b60408051602080820183528782528251908101909252848252906117399082906119f9565b9050611753816040518060200160405280868152506119f9565b905061176d816040518060200160405280858152506119f9565b9d9c50505050505050505050505050565b6040805160208101909152600081528151835110156117f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f737562737472616374696f6e20756e646572666c6f77206465746563746564006044820152606401610475565b604080516020810190915282518451829161181391611dfa565b90529392505050565b80516000906112629069d3c21bcecceda100000090611dbf565b60408051602081019091526000815281516000036118b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f63616e27742064697669646520627920300000000000000000000000000000006044820152606401610475565b82516000906118ca9069d3c21bcecceda100000090611da8565b84519091506118e369d3c21bcecceda100000083611dbf565b1461194a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6f766572666c6f772061742064697669646500000000000000000000000000006044820152606401610475565b60405180602001604052808460000151836119659190611dbf565b9052949350505050565b604080516020810190915260008152604051806020016040528069d3c21bcecceda10000008085600001516119a49190611dbf565b61133f9190611da8565b604080516020810190915260008152604051806020016040528069d3c21bcecceda10000008085600001516119e39190611dbf565b6119ed9190611da8565b845161133f9190611dfa565b60408051602081019091526000815281518351600091611a1891611e0d565b8451909150811015611a86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f616464206f766572666c6f7720646574656374656400000000000000000000006044820152606401610475565b60408051602081019091529081529392505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610e6b57600080fd5b60008060408385031215611ad057600080fd5b8235611adb81611a9b565b946020939093013593505050565b60008060008060808587031215611aff57600080fd5b8435611b0a81611a9b565b93506020850135611b1a81611a9b565b93969395505050506040820135916060013590565b600060208284031215611b4157600080fd5b8135611b4c81611a9b565b9392505050565b600080600060608486031215611b6857600080fd5b8335611b7381611a9b565b9250602084013591506040840135611b8a81611a9b565b809150509250925092565b60008060008060808587031215611bab57600080fd5b5050823594602084013594506040840135936060013592509050565b60008083601f840112611bd957600080fd5b50813567ffffffffffffffff811115611bf157600080fd5b6020830191508360208260051b8501011115611c0c57600080fd5b9250929050565b600080600080600060608688031215611c2b57600080fd5b8535611c3681611a9b565b9450602086013567ffffffffffffffff80821115611c5357600080fd5b611c5f89838a01611bc7565b90965094506040880135915080821115611c7857600080fd5b50611c8588828901611bc7565b969995985093965092949392505050565b600060208284031215611ca857600080fd5b8151611b4c81611a9b565b600060208284031215611cc557600080fd5b5051919050565b60008060408385031215611cdf57600080fd5b505080516020909101519092909150565b600060208284031215611d0257600080fd5b81518015158114611b4c57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611da157611da1611d41565b5060010190565b808202811582820484141761126257611262611d41565b600082611df5577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8181038181111561126257611262611d41565b8082018082111561126257611262611d4156fea164736f6c6343000813000a", +} + +// MentoFeeHandlerSellerABI is the input ABI used to generate the binding from. +// Deprecated: Use MentoFeeHandlerSellerMetaData.ABI instead. +var MentoFeeHandlerSellerABI = MentoFeeHandlerSellerMetaData.ABI + +// MentoFeeHandlerSellerBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use MentoFeeHandlerSellerMetaData.Bin instead. +var MentoFeeHandlerSellerBin = MentoFeeHandlerSellerMetaData.Bin + +// DeployMentoFeeHandlerSeller deploys a new Ethereum contract, binding an instance of MentoFeeHandlerSeller to it. +func DeployMentoFeeHandlerSeller(auth *bind.TransactOpts, backend bind.ContractBackend, test bool) (common.Address, *types.Transaction, *MentoFeeHandlerSeller, error) { + parsed, err := MentoFeeHandlerSellerMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(MentoFeeHandlerSellerBin), backend, test) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &MentoFeeHandlerSeller{MentoFeeHandlerSellerCaller: MentoFeeHandlerSellerCaller{contract: contract}, MentoFeeHandlerSellerTransactor: MentoFeeHandlerSellerTransactor{contract: contract}, MentoFeeHandlerSellerFilterer: MentoFeeHandlerSellerFilterer{contract: contract}}, nil +} + +// MentoFeeHandlerSeller is an auto generated Go binding around an Ethereum contract. +type MentoFeeHandlerSeller struct { + MentoFeeHandlerSellerCaller // Read-only binding to the contract + MentoFeeHandlerSellerTransactor // Write-only binding to the contract + MentoFeeHandlerSellerFilterer // Log filterer for contract events +} + +// MentoFeeHandlerSellerCaller is an auto generated read-only Go binding around an Ethereum contract. +type MentoFeeHandlerSellerCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MentoFeeHandlerSellerTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MentoFeeHandlerSellerTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MentoFeeHandlerSellerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MentoFeeHandlerSellerFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MentoFeeHandlerSellerSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MentoFeeHandlerSellerSession struct { + Contract *MentoFeeHandlerSeller // 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 +} + +// MentoFeeHandlerSellerCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MentoFeeHandlerSellerCallerSession struct { + Contract *MentoFeeHandlerSellerCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MentoFeeHandlerSellerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MentoFeeHandlerSellerTransactorSession struct { + Contract *MentoFeeHandlerSellerTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MentoFeeHandlerSellerRaw is an auto generated low-level Go binding around an Ethereum contract. +type MentoFeeHandlerSellerRaw struct { + Contract *MentoFeeHandlerSeller // Generic contract binding to access the raw methods on +} + +// MentoFeeHandlerSellerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MentoFeeHandlerSellerCallerRaw struct { + Contract *MentoFeeHandlerSellerCaller // Generic read-only contract binding to access the raw methods on +} + +// MentoFeeHandlerSellerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MentoFeeHandlerSellerTransactorRaw struct { + Contract *MentoFeeHandlerSellerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMentoFeeHandlerSeller creates a new instance of MentoFeeHandlerSeller, bound to a specific deployed contract. +func NewMentoFeeHandlerSeller(address common.Address, backend bind.ContractBackend) (*MentoFeeHandlerSeller, error) { + contract, err := bindMentoFeeHandlerSeller(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MentoFeeHandlerSeller{MentoFeeHandlerSellerCaller: MentoFeeHandlerSellerCaller{contract: contract}, MentoFeeHandlerSellerTransactor: MentoFeeHandlerSellerTransactor{contract: contract}, MentoFeeHandlerSellerFilterer: MentoFeeHandlerSellerFilterer{contract: contract}}, nil +} + +// NewMentoFeeHandlerSellerCaller creates a new read-only instance of MentoFeeHandlerSeller, bound to a specific deployed contract. +func NewMentoFeeHandlerSellerCaller(address common.Address, caller bind.ContractCaller) (*MentoFeeHandlerSellerCaller, error) { + contract, err := bindMentoFeeHandlerSeller(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MentoFeeHandlerSellerCaller{contract: contract}, nil +} + +// NewMentoFeeHandlerSellerTransactor creates a new write-only instance of MentoFeeHandlerSeller, bound to a specific deployed contract. +func NewMentoFeeHandlerSellerTransactor(address common.Address, transactor bind.ContractTransactor) (*MentoFeeHandlerSellerTransactor, error) { + contract, err := bindMentoFeeHandlerSeller(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MentoFeeHandlerSellerTransactor{contract: contract}, nil +} + +// NewMentoFeeHandlerSellerFilterer creates a new log filterer instance of MentoFeeHandlerSeller, bound to a specific deployed contract. +func NewMentoFeeHandlerSellerFilterer(address common.Address, filterer bind.ContractFilterer) (*MentoFeeHandlerSellerFilterer, error) { + contract, err := bindMentoFeeHandlerSeller(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MentoFeeHandlerSellerFilterer{contract: contract}, nil +} + +// bindMentoFeeHandlerSeller binds a generic wrapper to an already deployed contract. +func bindMentoFeeHandlerSeller(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(MentoFeeHandlerSellerABI)) + 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 (_MentoFeeHandlerSeller *MentoFeeHandlerSellerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MentoFeeHandlerSeller.Contract.MentoFeeHandlerSellerCaller.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 (_MentoFeeHandlerSeller *MentoFeeHandlerSellerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.MentoFeeHandlerSellerTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.MentoFeeHandlerSellerTransactor.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 (_MentoFeeHandlerSeller *MentoFeeHandlerSellerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MentoFeeHandlerSeller.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 (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.contract.Transact(opts, method, params...) +} + +// CalculateMinAmount is a free data retrieval call binding the contract method 0xe4187b13. +// +// Solidity: function calculateMinAmount(uint256 midPriceNumerator, uint256 midPriceDenominator, uint256 amount, uint256 maxSlippage) pure returns(uint256) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerCaller) CalculateMinAmount(opts *bind.CallOpts, midPriceNumerator *big.Int, midPriceDenominator *big.Int, amount *big.Int, maxSlippage *big.Int) (*big.Int, error) { + var out []interface{} + err := _MentoFeeHandlerSeller.contract.Call(opts, &out, "calculateMinAmount", midPriceNumerator, midPriceDenominator, amount, maxSlippage) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CalculateMinAmount is a free data retrieval call binding the contract method 0xe4187b13. +// +// Solidity: function calculateMinAmount(uint256 midPriceNumerator, uint256 midPriceDenominator, uint256 amount, uint256 maxSlippage) pure returns(uint256) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) CalculateMinAmount(midPriceNumerator *big.Int, midPriceDenominator *big.Int, amount *big.Int, maxSlippage *big.Int) (*big.Int, error) { + return _MentoFeeHandlerSeller.Contract.CalculateMinAmount(&_MentoFeeHandlerSeller.CallOpts, midPriceNumerator, midPriceDenominator, amount, maxSlippage) +} + +// CalculateMinAmount is a free data retrieval call binding the contract method 0xe4187b13. +// +// Solidity: function calculateMinAmount(uint256 midPriceNumerator, uint256 midPriceDenominator, uint256 amount, uint256 maxSlippage) pure returns(uint256) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerCallerSession) CalculateMinAmount(midPriceNumerator *big.Int, midPriceDenominator *big.Int, amount *big.Int, maxSlippage *big.Int) (*big.Int, error) { + return _MentoFeeHandlerSeller.Contract.CalculateMinAmount(&_MentoFeeHandlerSeller.CallOpts, midPriceNumerator, midPriceDenominator, amount, maxSlippage) +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerCaller) GetVersionNumber(opts *bind.CallOpts) (*big.Int, *big.Int, *big.Int, *big.Int, error) { + var out []interface{} + err := _MentoFeeHandlerSeller.contract.Call(opts, &out, "getVersionNumber") + + if err != nil { + return *new(*big.Int), *new(*big.Int), *new(*big.Int), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + out2 := *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + out3 := *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + + return out0, out1, out2, out3, err + +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) GetVersionNumber() (*big.Int, *big.Int, *big.Int, *big.Int, error) { + return _MentoFeeHandlerSeller.Contract.GetVersionNumber(&_MentoFeeHandlerSeller.CallOpts) +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerCallerSession) GetVersionNumber() (*big.Int, *big.Int, *big.Int, *big.Int, error) { + return _MentoFeeHandlerSeller.Contract.GetVersionNumber(&_MentoFeeHandlerSeller.CallOpts) +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerCaller) Initialized(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _MentoFeeHandlerSeller.contract.Call(opts, &out, "initialized") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) Initialized() (bool, error) { + return _MentoFeeHandlerSeller.Contract.Initialized(&_MentoFeeHandlerSeller.CallOpts) +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerCallerSession) Initialized() (bool, error) { + return _MentoFeeHandlerSeller.Contract.Initialized(&_MentoFeeHandlerSeller.CallOpts) +} + +// MinimumReports is a free data retrieval call binding the contract method 0x4e008cdb. +// +// Solidity: function minimumReports(address ) view returns(uint256) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerCaller) MinimumReports(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _MentoFeeHandlerSeller.contract.Call(opts, &out, "minimumReports", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinimumReports is a free data retrieval call binding the contract method 0x4e008cdb. +// +// Solidity: function minimumReports(address ) view returns(uint256) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) MinimumReports(arg0 common.Address) (*big.Int, error) { + return _MentoFeeHandlerSeller.Contract.MinimumReports(&_MentoFeeHandlerSeller.CallOpts, arg0) +} + +// MinimumReports is a free data retrieval call binding the contract method 0x4e008cdb. +// +// Solidity: function minimumReports(address ) view returns(uint256) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerCallerSession) MinimumReports(arg0 common.Address) (*big.Int, error) { + return _MentoFeeHandlerSeller.Contract.MinimumReports(&_MentoFeeHandlerSeller.CallOpts, arg0) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MentoFeeHandlerSeller.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) Owner() (common.Address, error) { + return _MentoFeeHandlerSeller.Contract.Owner(&_MentoFeeHandlerSeller.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerCallerSession) Owner() (common.Address, error) { + return _MentoFeeHandlerSeller.Contract.Owner(&_MentoFeeHandlerSeller.CallOpts) +} + +// Registry is a free data retrieval call binding the contract method 0x7b103999. +// +// Solidity: function registry() view returns(address) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerCaller) Registry(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MentoFeeHandlerSeller.contract.Call(opts, &out, "registry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Registry is a free data retrieval call binding the contract method 0x7b103999. +// +// Solidity: function registry() view returns(address) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) Registry() (common.Address, error) { + return _MentoFeeHandlerSeller.Contract.Registry(&_MentoFeeHandlerSeller.CallOpts) +} + +// Registry is a free data retrieval call binding the contract method 0x7b103999. +// +// Solidity: function registry() view returns(address) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerCallerSession) Registry() (common.Address, error) { + return _MentoFeeHandlerSeller.Contract.Registry(&_MentoFeeHandlerSeller.CallOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0xff1d5752. +// +// Solidity: function initialize(address _registryAddress, address[] tokenAddresses, uint256[] newMininumReports) returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactor) Initialize(opts *bind.TransactOpts, _registryAddress common.Address, tokenAddresses []common.Address, newMininumReports []*big.Int) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.contract.Transact(opts, "initialize", _registryAddress, tokenAddresses, newMininumReports) +} + +// Initialize is a paid mutator transaction binding the contract method 0xff1d5752. +// +// Solidity: function initialize(address _registryAddress, address[] tokenAddresses, uint256[] newMininumReports) returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) Initialize(_registryAddress common.Address, tokenAddresses []common.Address, newMininumReports []*big.Int) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.Initialize(&_MentoFeeHandlerSeller.TransactOpts, _registryAddress, tokenAddresses, newMininumReports) +} + +// Initialize is a paid mutator transaction binding the contract method 0xff1d5752. +// +// Solidity: function initialize(address _registryAddress, address[] tokenAddresses, uint256[] newMininumReports) returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactorSession) Initialize(_registryAddress common.Address, tokenAddresses []common.Address, newMininumReports []*big.Int) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.Initialize(&_MentoFeeHandlerSeller.TransactOpts, _registryAddress, tokenAddresses, newMininumReports) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) RenounceOwnership() (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.RenounceOwnership(&_MentoFeeHandlerSeller.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.RenounceOwnership(&_MentoFeeHandlerSeller.TransactOpts) +} + +// Sell is a paid mutator transaction binding the contract method 0x31de7d15. +// +// Solidity: function sell(address sellTokenAddress, address buyTokenAddress, uint256 amount, uint256 maxSlippage) returns(uint256) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactor) Sell(opts *bind.TransactOpts, sellTokenAddress common.Address, buyTokenAddress common.Address, amount *big.Int, maxSlippage *big.Int) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.contract.Transact(opts, "sell", sellTokenAddress, buyTokenAddress, amount, maxSlippage) +} + +// Sell is a paid mutator transaction binding the contract method 0x31de7d15. +// +// Solidity: function sell(address sellTokenAddress, address buyTokenAddress, uint256 amount, uint256 maxSlippage) returns(uint256) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) Sell(sellTokenAddress common.Address, buyTokenAddress common.Address, amount *big.Int, maxSlippage *big.Int) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.Sell(&_MentoFeeHandlerSeller.TransactOpts, sellTokenAddress, buyTokenAddress, amount, maxSlippage) +} + +// Sell is a paid mutator transaction binding the contract method 0x31de7d15. +// +// Solidity: function sell(address sellTokenAddress, address buyTokenAddress, uint256 amount, uint256 maxSlippage) returns(uint256) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactorSession) Sell(sellTokenAddress common.Address, buyTokenAddress common.Address, amount *big.Int, maxSlippage *big.Int) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.Sell(&_MentoFeeHandlerSeller.TransactOpts, sellTokenAddress, buyTokenAddress, amount, maxSlippage) +} + +// SetMinimumReports is a paid mutator transaction binding the contract method 0x2f257aa0. +// +// Solidity: function setMinimumReports(address tokenAddress, uint256 newMininumReports) returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactor) SetMinimumReports(opts *bind.TransactOpts, tokenAddress common.Address, newMininumReports *big.Int) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.contract.Transact(opts, "setMinimumReports", tokenAddress, newMininumReports) +} + +// SetMinimumReports is a paid mutator transaction binding the contract method 0x2f257aa0. +// +// Solidity: function setMinimumReports(address tokenAddress, uint256 newMininumReports) returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) SetMinimumReports(tokenAddress common.Address, newMininumReports *big.Int) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.SetMinimumReports(&_MentoFeeHandlerSeller.TransactOpts, tokenAddress, newMininumReports) +} + +// SetMinimumReports is a paid mutator transaction binding the contract method 0x2f257aa0. +// +// Solidity: function setMinimumReports(address tokenAddress, uint256 newMininumReports) returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactorSession) SetMinimumReports(tokenAddress common.Address, newMininumReports *big.Int) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.SetMinimumReports(&_MentoFeeHandlerSeller.TransactOpts, tokenAddress, newMininumReports) +} + +// SetRegistry is a paid mutator transaction binding the contract method 0xa91ee0dc. +// +// Solidity: function setRegistry(address registryAddress) returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactor) SetRegistry(opts *bind.TransactOpts, registryAddress common.Address) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.contract.Transact(opts, "setRegistry", registryAddress) +} + +// SetRegistry is a paid mutator transaction binding the contract method 0xa91ee0dc. +// +// Solidity: function setRegistry(address registryAddress) returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) SetRegistry(registryAddress common.Address) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.SetRegistry(&_MentoFeeHandlerSeller.TransactOpts, registryAddress) +} + +// SetRegistry is a paid mutator transaction binding the contract method 0xa91ee0dc. +// +// Solidity: function setRegistry(address registryAddress) returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactorSession) SetRegistry(registryAddress common.Address) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.SetRegistry(&_MentoFeeHandlerSeller.TransactOpts, registryAddress) +} + +// Transfer is a paid mutator transaction binding the contract method 0xdbba0f01. +// +// Solidity: function transfer(address token, uint256 amount, address to) returns(bool) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactor) Transfer(opts *bind.TransactOpts, token common.Address, amount *big.Int, to common.Address) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.contract.Transact(opts, "transfer", token, amount, to) +} + +// Transfer is a paid mutator transaction binding the contract method 0xdbba0f01. +// +// Solidity: function transfer(address token, uint256 amount, address to) returns(bool) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) Transfer(token common.Address, amount *big.Int, to common.Address) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.Transfer(&_MentoFeeHandlerSeller.TransactOpts, token, amount, to) +} + +// Transfer is a paid mutator transaction binding the contract method 0xdbba0f01. +// +// Solidity: function transfer(address token, uint256 amount, address to) returns(bool) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactorSession) Transfer(token common.Address, amount *big.Int, to common.Address) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.Transfer(&_MentoFeeHandlerSeller.TransactOpts, token, amount, to) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.TransferOwnership(&_MentoFeeHandlerSeller.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.TransferOwnership(&_MentoFeeHandlerSeller.TransactOpts, newOwner) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MentoFeeHandlerSeller.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerSession) Receive() (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.Receive(&_MentoFeeHandlerSeller.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerTransactorSession) Receive() (*types.Transaction, error) { + return _MentoFeeHandlerSeller.Contract.Receive(&_MentoFeeHandlerSeller.TransactOpts) +} + +// MentoFeeHandlerSellerMinimumReportsSetIterator is returned from FilterMinimumReportsSet and is used to iterate over the raw logs and unpacked data for MinimumReportsSet events raised by the MentoFeeHandlerSeller contract. +type MentoFeeHandlerSellerMinimumReportsSetIterator struct { + Event *MentoFeeHandlerSellerMinimumReportsSet // 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 *MentoFeeHandlerSellerMinimumReportsSetIterator) 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(MentoFeeHandlerSellerMinimumReportsSet) + 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(MentoFeeHandlerSellerMinimumReportsSet) + 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 *MentoFeeHandlerSellerMinimumReportsSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MentoFeeHandlerSellerMinimumReportsSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MentoFeeHandlerSellerMinimumReportsSet represents a MinimumReportsSet event raised by the MentoFeeHandlerSeller contract. +type MentoFeeHandlerSellerMinimumReportsSet struct { + TokenAddress common.Address + MinimumReports *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinimumReportsSet is a free log retrieval operation binding the contract event 0x03cc7dddcb89dd90027bd8fa62d09d1b5c49ce5d20f8c9bb6bdeaaa62ea1718b. +// +// Solidity: event MinimumReportsSet(address tokenAddress, uint256 minimumReports) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerFilterer) FilterMinimumReportsSet(opts *bind.FilterOpts) (*MentoFeeHandlerSellerMinimumReportsSetIterator, error) { + + logs, sub, err := _MentoFeeHandlerSeller.contract.FilterLogs(opts, "MinimumReportsSet") + if err != nil { + return nil, err + } + return &MentoFeeHandlerSellerMinimumReportsSetIterator{contract: _MentoFeeHandlerSeller.contract, event: "MinimumReportsSet", logs: logs, sub: sub}, nil +} + +// WatchMinimumReportsSet is a free log subscription operation binding the contract event 0x03cc7dddcb89dd90027bd8fa62d09d1b5c49ce5d20f8c9bb6bdeaaa62ea1718b. +// +// Solidity: event MinimumReportsSet(address tokenAddress, uint256 minimumReports) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerFilterer) WatchMinimumReportsSet(opts *bind.WatchOpts, sink chan<- *MentoFeeHandlerSellerMinimumReportsSet) (event.Subscription, error) { + + logs, sub, err := _MentoFeeHandlerSeller.contract.WatchLogs(opts, "MinimumReportsSet") + 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(MentoFeeHandlerSellerMinimumReportsSet) + if err := _MentoFeeHandlerSeller.contract.UnpackLog(event, "MinimumReportsSet", 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 +} + +// ParseMinimumReportsSet is a log parse operation binding the contract event 0x03cc7dddcb89dd90027bd8fa62d09d1b5c49ce5d20f8c9bb6bdeaaa62ea1718b. +// +// Solidity: event MinimumReportsSet(address tokenAddress, uint256 minimumReports) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerFilterer) ParseMinimumReportsSet(log types.Log) (*MentoFeeHandlerSellerMinimumReportsSet, error) { + event := new(MentoFeeHandlerSellerMinimumReportsSet) + if err := _MentoFeeHandlerSeller.contract.UnpackLog(event, "MinimumReportsSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MentoFeeHandlerSellerOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the MentoFeeHandlerSeller contract. +type MentoFeeHandlerSellerOwnershipTransferredIterator struct { + Event *MentoFeeHandlerSellerOwnershipTransferred // 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 *MentoFeeHandlerSellerOwnershipTransferredIterator) 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(MentoFeeHandlerSellerOwnershipTransferred) + 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(MentoFeeHandlerSellerOwnershipTransferred) + 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 *MentoFeeHandlerSellerOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MentoFeeHandlerSellerOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MentoFeeHandlerSellerOwnershipTransferred represents a OwnershipTransferred event raised by the MentoFeeHandlerSeller contract. +type MentoFeeHandlerSellerOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MentoFeeHandlerSellerOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MentoFeeHandlerSeller.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &MentoFeeHandlerSellerOwnershipTransferredIterator{contract: _MentoFeeHandlerSeller.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MentoFeeHandlerSellerOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MentoFeeHandlerSeller.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + 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(MentoFeeHandlerSellerOwnershipTransferred) + if err := _MentoFeeHandlerSeller.contract.UnpackLog(event, "OwnershipTransferred", 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 +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerFilterer) ParseOwnershipTransferred(log types.Log) (*MentoFeeHandlerSellerOwnershipTransferred, error) { + event := new(MentoFeeHandlerSellerOwnershipTransferred) + if err := _MentoFeeHandlerSeller.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MentoFeeHandlerSellerRegistrySetIterator is returned from FilterRegistrySet and is used to iterate over the raw logs and unpacked data for RegistrySet events raised by the MentoFeeHandlerSeller contract. +type MentoFeeHandlerSellerRegistrySetIterator struct { + Event *MentoFeeHandlerSellerRegistrySet // 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 *MentoFeeHandlerSellerRegistrySetIterator) 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(MentoFeeHandlerSellerRegistrySet) + 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(MentoFeeHandlerSellerRegistrySet) + 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 *MentoFeeHandlerSellerRegistrySetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MentoFeeHandlerSellerRegistrySetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MentoFeeHandlerSellerRegistrySet represents a RegistrySet event raised by the MentoFeeHandlerSeller contract. +type MentoFeeHandlerSellerRegistrySet struct { + RegistryAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRegistrySet is a free log retrieval operation binding the contract event 0x27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b. +// +// Solidity: event RegistrySet(address indexed registryAddress) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerFilterer) FilterRegistrySet(opts *bind.FilterOpts, registryAddress []common.Address) (*MentoFeeHandlerSellerRegistrySetIterator, error) { + + var registryAddressRule []interface{} + for _, registryAddressItem := range registryAddress { + registryAddressRule = append(registryAddressRule, registryAddressItem) + } + + logs, sub, err := _MentoFeeHandlerSeller.contract.FilterLogs(opts, "RegistrySet", registryAddressRule) + if err != nil { + return nil, err + } + return &MentoFeeHandlerSellerRegistrySetIterator{contract: _MentoFeeHandlerSeller.contract, event: "RegistrySet", logs: logs, sub: sub}, nil +} + +// WatchRegistrySet is a free log subscription operation binding the contract event 0x27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b. +// +// Solidity: event RegistrySet(address indexed registryAddress) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerFilterer) WatchRegistrySet(opts *bind.WatchOpts, sink chan<- *MentoFeeHandlerSellerRegistrySet, registryAddress []common.Address) (event.Subscription, error) { + + var registryAddressRule []interface{} + for _, registryAddressItem := range registryAddress { + registryAddressRule = append(registryAddressRule, registryAddressItem) + } + + logs, sub, err := _MentoFeeHandlerSeller.contract.WatchLogs(opts, "RegistrySet", registryAddressRule) + 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(MentoFeeHandlerSellerRegistrySet) + if err := _MentoFeeHandlerSeller.contract.UnpackLog(event, "RegistrySet", 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 +} + +// ParseRegistrySet is a log parse operation binding the contract event 0x27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b. +// +// Solidity: event RegistrySet(address indexed registryAddress) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerFilterer) ParseRegistrySet(log types.Log) (*MentoFeeHandlerSellerRegistrySet, error) { + event := new(MentoFeeHandlerSellerRegistrySet) + if err := _MentoFeeHandlerSeller.contract.UnpackLog(event, "RegistrySet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MentoFeeHandlerSellerTokenSoldIterator is returned from FilterTokenSold and is used to iterate over the raw logs and unpacked data for TokenSold events raised by the MentoFeeHandlerSeller contract. +type MentoFeeHandlerSellerTokenSoldIterator struct { + Event *MentoFeeHandlerSellerTokenSold // 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 *MentoFeeHandlerSellerTokenSoldIterator) 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(MentoFeeHandlerSellerTokenSold) + 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(MentoFeeHandlerSellerTokenSold) + 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 *MentoFeeHandlerSellerTokenSoldIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MentoFeeHandlerSellerTokenSoldIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MentoFeeHandlerSellerTokenSold represents a TokenSold event raised by the MentoFeeHandlerSeller contract. +type MentoFeeHandlerSellerTokenSold struct { + SoldTokenAddress common.Address + BoughtTokenAddress common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokenSold is a free log retrieval operation binding the contract event 0xd4cffd6979677853b45a7a17f455188a434e975ba474c5a2613c94beacea537a. +// +// Solidity: event TokenSold(address soldTokenAddress, address boughtTokenAddress, uint256 amount) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerFilterer) FilterTokenSold(opts *bind.FilterOpts) (*MentoFeeHandlerSellerTokenSoldIterator, error) { + + logs, sub, err := _MentoFeeHandlerSeller.contract.FilterLogs(opts, "TokenSold") + if err != nil { + return nil, err + } + return &MentoFeeHandlerSellerTokenSoldIterator{contract: _MentoFeeHandlerSeller.contract, event: "TokenSold", logs: logs, sub: sub}, nil +} + +// WatchTokenSold is a free log subscription operation binding the contract event 0xd4cffd6979677853b45a7a17f455188a434e975ba474c5a2613c94beacea537a. +// +// Solidity: event TokenSold(address soldTokenAddress, address boughtTokenAddress, uint256 amount) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerFilterer) WatchTokenSold(opts *bind.WatchOpts, sink chan<- *MentoFeeHandlerSellerTokenSold) (event.Subscription, error) { + + logs, sub, err := _MentoFeeHandlerSeller.contract.WatchLogs(opts, "TokenSold") + 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(MentoFeeHandlerSellerTokenSold) + if err := _MentoFeeHandlerSeller.contract.UnpackLog(event, "TokenSold", 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 +} + +// ParseTokenSold is a log parse operation binding the contract event 0xd4cffd6979677853b45a7a17f455188a434e975ba474c5a2613c94beacea537a. +// +// Solidity: event TokenSold(address soldTokenAddress, address boughtTokenAddress, uint256 amount) +func (_MentoFeeHandlerSeller *MentoFeeHandlerSellerFilterer) ParseTokenSold(log types.Log) (*MentoFeeHandlerSellerTokenSold, error) { + event := new(MentoFeeHandlerSellerTokenSold) + if err := _MentoFeeHandlerSeller.contract.UnpackLog(event, "TokenSold", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-bindings/bindings/mentofeehandlerseller_more.go b/op-bindings/bindings/mentofeehandlerseller_more.go new file mode 100644 index 000000000000..bb2a1fb7f8eb --- /dev/null +++ b/op-bindings/bindings/mentofeehandlerseller_more.go @@ -0,0 +1,25 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "encoding/json" + + "github.com/ethereum-optimism/optimism/op-bindings/solc" +) + +const MentoFeeHandlerSellerStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src/celo/MentoFeeHandlerSeller.sol:MentoFeeHandlerSeller\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1001,\"contract\":\"src/celo/MentoFeeHandlerSeller.sol:MentoFeeHandlerSeller\",\"label\":\"initialized\",\"offset\":20,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"src/celo/MentoFeeHandlerSeller.sol:MentoFeeHandlerSeller\",\"label\":\"registry\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_contract(ICeloRegistry)1004\"},{\"astId\":1003,\"contract\":\"src/celo/MentoFeeHandlerSeller.sol:MentoFeeHandlerSeller\",\"label\":\"minimumReports\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_address,t_uint256)\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_contract(ICeloRegistry)1004\":{\"encoding\":\"inplace\",\"label\":\"contract ICeloRegistry\",\"numberOfBytes\":\"20\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}" + +var MentoFeeHandlerSellerStorageLayout = new(solc.StorageLayout) + +var MentoFeeHandlerSellerDeployedBin = "0x6080604052600436106100d65760003560e01c80637b1039991161007f578063dbba0f0111610059578063dbba0f011461028b578063e4187b13146102ab578063f2fde38b146102cb578063ff1d5752146102eb57600080fd5b80637b103999146101ee5780638da5cb5b14610240578063a91ee0dc1461026b57600080fd5b80634e008cdb116100b05780634e008cdb1461017957806354255be0146101a6578063715018a6146101d957600080fd5b8063158ef93e146100e25780632f257aa01461012957806331de7d151461014b57600080fd5b366100dd57005b600080fd5b3480156100ee57600080fd5b506000546101149074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020015b60405180910390f35b34801561013557600080fd5b50610149610144366004611abd565b61030b565b005b34801561015757600080fd5b5061016b610166366004611ae9565b610321565b604051908152602001610120565b34801561018557600080fd5b5061016b610194366004611b2f565b60026020526000908152604090205481565b3480156101b257600080fd5b50600180600080604080519485526020850193909352918301526060820152608001610120565b3480156101e557600080fd5b50610149610b81565b3480156101fa57600080fd5b5060015461021b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610120565b34801561024c57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661021b565b34801561027757600080fd5b50610149610286366004611b2f565b610b95565b34801561029757600080fd5b506101146102a6366004611b53565b610c89565b3480156102b757600080fd5b5061016b6102c6366004611b95565b610d34565b3480156102d757600080fd5b506101496102e6366004611b2f565b610db7565b3480156102f757600080fd5b50610149610306366004611c13565b610e6e565b610313610fb1565b61031d8282611032565b5050565b6001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016103a491815260200190565b602060405180830381865afa1580156103c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e59190611c96565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461047e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f42757920746f6b656e2063616e206f6e6c7920626520676f6c6420746f6b656e60448201526064015b60405180910390fd5b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152859073ffffffffffffffffffffffffffffffffffffffff8216906370a0823190602401602060405180830381865afa1580156104ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050e9190611cb3565b84111561059d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f42616c616e6365206f6620746f6b656e20746f206275726e206e6f7420656e6f60448201527f75676800000000000000000000000000000000000000000000000000000000006064820152608401610475565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcf0aaed8373ffffffffffffffffffffffffffffffffffffffff166340a12f646040518163ffffffff1660e01b8152600401602060405180830381865afa158015610628573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064c9190611cb3565b6040518263ffffffff1660e01b815260040161066a91815260200190565b602060405180830381865afa158015610687573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ab9190611c96565b9050806000806106b9611097565b73ffffffffffffffffffffffffffffffffffffffff8b8116600081815260026020526040908190205490517fbbc66a9400000000000000000000000000000000000000000000000000000000815260048101929092529293509083169063bbc66a9490602401602060405180830381865afa15801561073c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107609190611cb3565b10156107ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4e756d626572206f66207265706f72747320666f7220746f6b656e206e6f742060448201527f656e6f75676800000000000000000000000000000000000000000000000000006064820152608401610475565b6040517fef90e1b000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b81166004830152600091829184169063ef90e1b0906024016040805180830381865afa15801561085e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108829190611ccc565b9150915061089282828c8c610d34565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152602482018d90529195509088169063095ea7b3906044016020604051808303816000875af115801561090b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092f9190611cf0565b506040517f8ab1a5d4000000000000000000000000000000000000000000000000000000008152600481018b9052602481018590526000604482015273ffffffffffffffffffffffffffffffffffffffff861690638ab1a5d4906064016020604051808303816000875af11580156109ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cf9190611cb3565b5060006109da611161565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015610a4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6e9190611cb3565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810182905290915073ffffffffffffffffffffffffffffffffffffffff83169063a9059cbb906044016020604051808303816000875af1158015610ae4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b089190611cf0565b507fd4cffd6979677853b45a7a17f455188a434e975ba474c5a2613c94beacea537a8e8e8e604051610b689392919073ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b60405180910390a19d9c50505050505050505050505050565b610b89610fb1565b610b9360006111b5565b565b610b9d610fb1565b73ffffffffffffffffffffffffffffffffffffffff8116610c1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f43616e6e6f7420726567697374657220746865206e756c6c20616464726573736044820152606401610475565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b90600090a250565b6000610c93610fb1565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526024820185905285169063a9059cbb906044016020604051808303816000875af1158015610d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2c9190611cf0565b949350505050565b600080610d598360408051602080820183526000909152815190810190915290815290565b90506000610d67878761122a565b90506000610d7486611268565b90506000610d828383611347565b9050610daa610da5610d9e84610d988789611347565b90611347565b839061177e565b61181c565b9998505050505050505050565b610dbf610fb1565b73ffffffffffffffffffffffffffffffffffffffff8116610e62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610475565b610e6b816111b5565b50565b60005474010000000000000000000000000000000000000000900460ff1615610ef3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f636f6e747261637420616c726561647920696e697469616c697a6564000000006044820152606401610475565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055610f3b336111b5565b610f4485610b95565b60005b83811015610fa957610f97858583818110610f6457610f64611d12565b9050602002016020810190610f799190611b2f565b848484818110610f8b57610f8b611d12565b90506020020135611032565b80610fa181611d70565b915050610f47565b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610475565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260026020908152604091829020849055815192835282018390527f03cc7dddcb89dd90027bd8fa62d09d1b5c49ce5d20f8c9bb6bdeaaa62ea1718b910160405180910390a15050565b6001546040517f536f727465644f7261636c657300000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed90602d015b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161111b91815260200190565b602060405180830381865afa158015611138573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115c9190611c96565b905090565b6001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed906029016110e7565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516020810190915260008152600061124484611268565b9050600061125184611268565b905061125d8282611836565b925050505b92915050565b6040805160208101909152600081527601357c299a88ea76a58924d52ce4f26a85af186c2b9e7482111561131e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f63616e277420637265617465206669786964697479206e756d626572206c617260448201527f676572207468616e206d61784e657746697865642829000000000000000000006064820152608401610475565b604051806020016040528069d3c21bcecceda10000008461133f9190611da8565b905292915050565b6040805160208101909152600081528251158061136357508151155b1561137d5750604080516020810190915260008152611262565b81517fffffffffffffffffffffffffffffffffffffffffffff2c3de43133125f000000016113ac575081611262565b82517fffffffffffffffffffffffffffffffffffffffffffff2c3de43133125f000000016113db575080611262565b600069d3c21bcecceda10000006113f18561196f565b516113fc9190611dbf565b90506000611409856119ae565b519050600069d3c21bcecceda10000006114228661196f565b5161142d9190611dbf565b9050600061143a866119ae565b51905060006114498386611da8565b905084156114c3578261145c8683611dbf565b146114c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078317931206465746563746564000000000000000000006044820152606401610475565b60006114d969d3c21bcecceda100000083611da8565b9050811561155d5769d3c21bcecceda10000006114f68383611dbf565b1461155d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6f766572666c6f772078317931202a20666978656431206465746563746564006044820152606401610475565b905080600061156c8587611da8565b905085156115e6578461157f8783611dbf565b146115e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078327931206465746563746564000000000000000000006044820152606401610475565b60006115f28589611da8565b9050871561166c57846116058983611dbf565b1461166c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078317932206465746563746564000000000000000000006044820152606401610475565b61167b64e8d4a5100088611dbf565b965061168c64e8d4a5100086611dbf565b9450600061169a8689611da8565b9050871561171457856116ad8983611dbf565b14611714576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f772078327932206465746563746564000000000000000000006044820152606401610475565b60408051602080820183528782528251908101909252848252906117399082906119f9565b9050611753816040518060200160405280868152506119f9565b905061176d816040518060200160405280858152506119f9565b9d9c50505050505050505050505050565b6040805160208101909152600081528151835110156117f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f737562737472616374696f6e20756e646572666c6f77206465746563746564006044820152606401610475565b604080516020810190915282518451829161181391611dfa565b90529392505050565b80516000906112629069d3c21bcecceda100000090611dbf565b60408051602081019091526000815281516000036118b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f63616e27742064697669646520627920300000000000000000000000000000006044820152606401610475565b82516000906118ca9069d3c21bcecceda100000090611da8565b84519091506118e369d3c21bcecceda100000083611dbf565b1461194a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6f766572666c6f772061742064697669646500000000000000000000000000006044820152606401610475565b60405180602001604052808460000151836119659190611dbf565b9052949350505050565b604080516020810190915260008152604051806020016040528069d3c21bcecceda10000008085600001516119a49190611dbf565b61133f9190611da8565b604080516020810190915260008152604051806020016040528069d3c21bcecceda10000008085600001516119e39190611dbf565b6119ed9190611da8565b845161133f9190611dfa565b60408051602081019091526000815281518351600091611a1891611e0d565b8451909150811015611a86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f616464206f766572666c6f7720646574656374656400000000000000000000006044820152606401610475565b60408051602081019091529081529392505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610e6b57600080fd5b60008060408385031215611ad057600080fd5b8235611adb81611a9b565b946020939093013593505050565b60008060008060808587031215611aff57600080fd5b8435611b0a81611a9b565b93506020850135611b1a81611a9b565b93969395505050506040820135916060013590565b600060208284031215611b4157600080fd5b8135611b4c81611a9b565b9392505050565b600080600060608486031215611b6857600080fd5b8335611b7381611a9b565b9250602084013591506040840135611b8a81611a9b565b809150509250925092565b60008060008060808587031215611bab57600080fd5b5050823594602084013594506040840135936060013592509050565b60008083601f840112611bd957600080fd5b50813567ffffffffffffffff811115611bf157600080fd5b6020830191508360208260051b8501011115611c0c57600080fd5b9250929050565b600080600080600060608688031215611c2b57600080fd5b8535611c3681611a9b565b9450602086013567ffffffffffffffff80821115611c5357600080fd5b611c5f89838a01611bc7565b90965094506040880135915080821115611c7857600080fd5b50611c8588828901611bc7565b969995985093965092949392505050565b600060208284031215611ca857600080fd5b8151611b4c81611a9b565b600060208284031215611cc557600080fd5b5051919050565b60008060408385031215611cdf57600080fd5b505080516020909101519092909150565b600060208284031215611d0257600080fd5b81518015158114611b4c57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611da157611da1611d41565b5060010190565b808202811582820484141761126257611262611d41565b600082611df5577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8181038181111561126257611262611d41565b8082018082111561126257611262611d4156fea164736f6c6343000813000a" + +func init() { + if err := json.Unmarshal([]byte(MentoFeeHandlerSellerStorageLayoutJSON), MentoFeeHandlerSellerStorageLayout); err != nil { + panic(err) + } + + layouts["MentoFeeHandlerSeller"] = MentoFeeHandlerSellerStorageLayout + deployedBytecodes["MentoFeeHandlerSeller"] = MentoFeeHandlerSellerDeployedBin +} diff --git a/op-bindings/bindings/sortedoracles.go b/op-bindings/bindings/sortedoracles.go new file mode 100644 index 000000000000..774c03a82a30 --- /dev/null +++ b/op-bindings/bindings/sortedoracles.go @@ -0,0 +1,2077 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "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 ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// SortedOraclesMetaData contains all meta data concerning the SortedOracles contract. +var SortedOraclesMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"test\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"MedianUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracleAddress\",\"type\":\"address\"}],\"name\":\"OracleAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracleAddress\",\"type\":\"address\"}],\"name\":\"OracleRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"}],\"name\":\"OracleReportRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"OracleReported\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reportExpiry\",\"type\":\"uint256\"}],\"name\":\"ReportExpirySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reportExpiry\",\"type\":\"uint256\"}],\"name\":\"TokenReportExpirySet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracleAddress\",\"type\":\"address\"}],\"name\":\"addOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getOracles\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getRates\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"enumSortedLinkedListWithMedian.MedianRelation[]\",\"name\":\"\",\"type\":\"uint8[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getTimestamps\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"enumSortedLinkedListWithMedian.MedianRelation[]\",\"name\":\"\",\"type\":\"uint8[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getTokenReportExpirySeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVersionNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_reportExpirySeconds\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isOldestReportExpired\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isOracle\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"medianRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"medianTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"numRates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"numTimestamps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"oracles\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"removeExpiredReports\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracleAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"removeOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"lesserKey\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"greaterKey\",\"type\":\"address\"}],\"name\":\"report\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reportExpirySeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_reportExpirySeconds\",\"type\":\"uint256\"}],\"name\":\"setReportExpiry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_reportExpirySeconds\",\"type\":\"uint256\"}],\"name\":\"setTokenReportExpiry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenReportExpirySeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60806040523480156200001157600080fd5b5060405162002c3d38038062002c3d8339810160408190526200003491620000b2565b80620000403362000062565b806200005a576000805460ff60a01b1916600160a01b1790555b5050620000dd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000c557600080fd5b81518015158114620000d657600080fd5b9392505050565b612b5080620000ed6000396000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c80638da5cb5b116100ee578063ebc1d6bb11610097578063f2fde38b11610071578063f2fde38b146103f5578063fc20935d14610408578063fe4b84df1461041b578063ffe736bf1461042e57600080fd5b8063ebc1d6bb146103a7578063ef90e1b0146103ba578063f0ca4adb146103e257600080fd5b8063b9292158116100c8578063b92921581461036e578063bbc66a9414610381578063dd34ca3b1461039457600080fd5b80638da5cb5b146102fc5780638e7492811461033b578063a00a8b2c1461035b57600080fd5b806353a57297116101505780636deb67991161012a5780636deb6799146102ce578063715018a6146102e157806380e50744146102e957600080fd5b806353a572971461028057806354255be0146102955780636dd6ef0c146102bb57600080fd5b80632e86bc01116101815780632e86bc0114610229578063370c998e14610249578063493a353c1461027757600080fd5b806302f55b61146101a8578063071b48fc146101d3578063158ef93e146101f4575b600080fd5b6101bb6101b636600461255a565b61046d565b6040516101ca939291906125c8565b60405180910390f35b6101e66101e136600461255a565b61055c565b6040519081526020016101ca565b6000546102199074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016101ca565b6101e661023736600461255a565b60066020526000908152604090205481565b61021961025736600461268f565b600360209081526000928352604080842090915290825290205460ff1681565b6101e660055481565b61029361028e3660046126c8565b610616565b005b6001806002806040805194855260208501939093529183015260608201526080016101ca565b6101e66102c936600461255a565b6109ab565b6101e66102dc36600461255a565b610a22565b610293610a7f565b6102936102f7366004612709565b610a93565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ca565b61034e61034936600461255a565b6111bc565b6040516101ca919061275c565b61031661036936600461276f565b61124c565b6101bb61037c36600461255a565b611291565b6101e661038f36600461255a565b611310565b6102936103a236600461276f565b611387565b6102936103b536600461279b565b61153b565b6103cd6103c836600461255a565b61169f565b604080519283526020830191909152016101ca565b6102936103f036600461268f565b611783565b61029361040336600461255a565b611981565b61029361041636600461276f565b611a38565b61029361042936600461279b565b611be9565b61044161043c36600461255a565b611cbf565b60408051921515835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016101ca565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600160205260409081902090517f6cfa38730000000000000000000000000000000000000000000000000000000081526060918291829173ed477a99035d0c1e11369f1d7a4e587893cc002b91636cfa3873916104ec9160040190815260200190565b600060405180830381865af4158015610509573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261054f919081019061292a565b9250925092509193909250565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604080822090517f59d556a8000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b906359d556a8906024015b602060405180830381865af41580156105ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106109190612a13565b92915050565b61061e611ee3565b73ffffffffffffffffffffffffffffffffffffffff831615801590610658575073ffffffffffffffffffffffffffffffffffffffff821615155b8015610688575073ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604090205481105b80156106ef575073ffffffffffffffffffffffffffffffffffffffff8381166000908152600460205260409020805491841691839081106106cb576106cb612a2c565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16145b6107a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605660248201527f746f6b656e2061646472206e756c6c206f72206f7261636c652061646472206e60448201527f756c6c206f7220696e646578206f6620746f6b656e206f7261636c65206e6f7460648201527f206d617070656420746f206f7261636c65206164647200000000000000000000608482015260a4015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8084166000818152600360209081526040808320948716835293815283822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055918152600490915220805461081790600190612a8a565b8154811061082757610827612a2c565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff86811684526004909252604090922080549190921691908390811061087157610871612a2c565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff94851617905591851681526004909152604090208054806108db576108db612a9d565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905561093d8383611f64565b1561094c5761094c8383612105565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f6dc84b66cc948d847632b9d829f7cb1cb904fbf2c084554a9bc22ad9d845334060405160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604080822090517f6eafa6c3000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b90636eafa6c3906024016105cf565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600660205260408120548103610a5657505060055490565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526006602052604090205490565b610a87611ee3565b610a9160006124c3565b565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600360209081526040808320338452909152902054849060ff16610b55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f73656e64657220776173206e6f7420616e206f7261636c6520666f7220746f6b60448201527f656e206164647200000000000000000000000000000000000000000000000000606482015260840161079d565b73ffffffffffffffffffffffffffffffffffffffff851660009081526001602052604080822090517f59d556a8000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b906359d556a890602401602060405180830381865af4158015610be4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c089190612a13565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600160205260409081902090517f95073a79000000000000000000000000000000000000000000000000000000008152600481019190915233602482015290915073ed477a99035d0c1e11369f1d7a4e587893cc002b906395073a7990604401602060405180830381865af4158015610ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc59190612acc565b15610e395773ffffffffffffffffffffffffffffffffffffffff8681166000908152600160205260409081902090517f832a21470000000000000000000000000000000000000000000000000000000081526004810191909152336024820152604481018790528582166064820152908416608482015273ed477a99035d0c1e11369f1d7a4e587893cc002b9063832a21479060a40160006040518083038186803b158015610d7357600080fd5b505af4158015610d87573d6000803e3d6000fd5b5050505073ffffffffffffffffffffffffffffffffffffffff86166000908152600260205260409081902090517fc1e728e9000000000000000000000000000000000000000000000000000000008152600481019190915233602482015273ed477a99035d0c1e11369f1d7a4e587893cc002b9063c1e728e99060440160006040518083038186803b158015610e1c57600080fd5b505af4158015610e30573d6000803e3d6000fd5b50505050610efb565b73ffffffffffffffffffffffffffffffffffffffff8681166000908152600160205260409081902090517fd4a092720000000000000000000000000000000000000000000000000000000081526004810191909152336024820152604481018790528582166064820152908416608482015273ed477a99035d0c1e11369f1d7a4e587893cc002b9063d4a092729060a40160006040518083038186803b158015610ee257600080fd5b505af4158015610ef6573d6000803e3d6000fd5b505050505b73ffffffffffffffffffffffffffffffffffffffff86166000908152600260205260409081902090517f0944c5940000000000000000000000000000000000000000000000000000000081526004810182905273ed477a99035d0c1e11369f1d7a4e587893cc002b9163d4a0927291339042908590630944c59490602401602060405180830381865af4158015610f96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fba9190612aee565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b168152600481019490945273ffffffffffffffffffffffffffffffffffffffff928316602485015260448401919091521660648201526000608482015260a40160006040518083038186803b15801561103b57600080fd5b505af415801561104f573d6000803e3d6000fd5b5050604080514281526020810189905233935073ffffffffffffffffffffffffffffffffffffffff8a1692507f7cebb17173a9ed273d2b7538f64395c0ebf352ff743f1cf8ce66b437a6144213910160405180910390a373ffffffffffffffffffffffffffffffffffffffff861660009081526001602052604080822090517f59d556a8000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b906359d556a890602401602060405180830381865af4158015611135573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111599190612a13565b90508181146111b3578673ffffffffffffffffffffffffffffffffffffffff167fa9981ebfc3b766a742486e898f54959b050a66006dbce1a4155c1f84a08bcf41826040516111aa91815260200190565b60405180910390a25b50505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815260409182902080548351818402810184019094528084526060939283018282801561124057602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611215575b50505050509050919050565b6004602052816000526040600020818154811061126857600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169150829050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600260205260409081902090517f6cfa38730000000000000000000000000000000000000000000000000000000081526060918291829173ed477a99035d0c1e11369f1d7a4e587893cc002b91636cfa3873916104ec9160040190815260200190565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604080822090517f6eafa6c3000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b90636eafa6c3906024016105cf565b73ffffffffffffffffffffffffffffffffffffffff82161580159061145e575073ffffffffffffffffffffffffffffffffffffffff82166000908152600260205260409081902090517f6eafa6c3000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b90636eafa6c390602401602060405180830381865af4158015611437573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145b9190612a13565b81105b6114ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f746f6b656e2061646472206e756c6c206f7220747279696e6720746f2072656d60448201527f6f766520746f6f206d616e79207265706f727473000000000000000000000000606482015260840161079d565b60005b818110156115365760008061150185611cbf565b91509150811561151a576115158582612105565b611521565b5050505050565b5050808061152e90612b0b565b9150506114ed565b505050565b611543611ee3565b600081116115d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f7265706f727420657870697279207365636f6e6473206d757374206265203e2060448201527f3000000000000000000000000000000000000000000000000000000000000000606482015260840161079d565b6005548103611664576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f7265706f72744578706972795365636f6e6473206861736e2774206368616e6760448201527f6564000000000000000000000000000000000000000000000000000000000000606482015260840161079d565b60058190556040518181527fc68a9b88effd8a11611ff410efbc83569f0031b7bc70dd455b61344c7f0a042f9060200160405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604080822090517f59d556a8000000000000000000000000000000000000000000000000000000008152829173ed477a99035d0c1e11369f1d7a4e587893cc002b916359d556a8916117189160040190815260200190565b602060405180830381865af4158015611735573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117599190612a13565b61176284611310565b156117775769d3c21bcecceda100000061177a565b60005b91509150915091565b61178b611ee3565b73ffffffffffffffffffffffffffffffffffffffff8216158015906117c5575073ffffffffffffffffffffffffffffffffffffffff811615155b8015611804575073ffffffffffffffffffffffffffffffffffffffff80831660009081526003602090815260408083209385168352929052205460ff16155b6118b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605a60248201527f746f6b656e206164647220776173206e756c6c206f72206f7261636c6520616460448201527f647220776173206e756c6c206f72206f7261636c652061646472206973206e6f60648201527f7420616e206f7261636c6520666f7220746f6b656e2061646472000000000000608482015260a40161079d565b73ffffffffffffffffffffffffffffffffffffffff808316600081815260036020908152604080832094861680845294825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558484526004835281842080549182018155845291832090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001685179055517f828d2be040dede7698182e08dfa8bfbd663c879aee772509c4a2bd961d0ed43f9190a35050565b611989611ee3565b73ffffffffffffffffffffffffffffffffffffffff8116611a2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161079d565b611a35816124c3565b50565b611a40611ee3565b60008111611ad0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f7265706f727420657870697279207365636f6e6473206d757374206265203e2060448201527f3000000000000000000000000000000000000000000000000000000000000000606482015260840161079d565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600660205260409020548103611b84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f746f6b656e207265706f72744578706972795365636f6e6473206861736e277460448201527f206368616e676564000000000000000000000000000000000000000000000000606482015260840161079d565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260066020908152604091829020849055815192835282018390527ff8324c8592dfd9991ee3e717351afe0a964605257959e3d99b0eb3d45bff9422910160405180910390a15050565b60005474010000000000000000000000000000000000000000900460ff1615611c6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f636f6e747261637420616c726561647920696e697469616c697a656400000000604482015260640161079d565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055611cb6336124c3565b611a358161153b565b60008073ffffffffffffffffffffffffffffffffffffffff8316611d3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f746f6b656e20616464726573732063616e6e6f74206265206e756c6c00000000604482015260640161079d565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602052604080822090517fd938ec7b000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b9063d938ec7b90602401602060405180830381865af4158015611dce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df29190612aee565b73ffffffffffffffffffffffffffffffffffffffff85811660009081526002602052604080822090517f7c6bb8620000000000000000000000000000000000000000000000000000000081526004810191909152918316602483015291925073ed477a99035d0c1e11369f1d7a4e587893cc002b90637c6bb86290604401602060405180830381865af4158015611e8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb19190612a13565b9050611ebc85610a22565b611ec68242612a8a565b10611ed75750600194909350915050565b50600094909350915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161079d565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604080822090517f95073a7900000000000000000000000000000000000000000000000000000000815273ed477a99035d0c1e11369f1d7a4e587893cc002b916395073a7991611ff99190869060040191825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b602060405180830381865af4158015612016573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203a9190612acc565b80156120fe575073ffffffffffffffffffffffffffffffffffffffff8381166000908152600260205260409081902090517f95073a790000000000000000000000000000000000000000000000000000000081526004810191909152908316602482015273ed477a99035d0c1e11369f1d7a4e587893cc002b906395073a7990604401602060405180830381865af41580156120da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fe9190612acc565b9392505050565b61210e826109ab565b600114801561212257506121228282611f64565b1561212b575050565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604080822090517f59d556a8000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b906359d556a890602401602060405180830381865af41580156121ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121de9190612a13565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160205260409081902090517fc1e728e900000000000000000000000000000000000000000000000000000000815291925073ed477a99035d0c1e11369f1d7a4e587893cc002b9163c1e728e99161227691869060040191825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60006040518083038186803b15801561228e57600080fd5b505af41580156122a2573d6000803e3d6000fd5b50505073ffffffffffffffffffffffffffffffffffffffff84166000908152600260205260409081902090517fc1e728e900000000000000000000000000000000000000000000000000000000815273ed477a99035d0c1e11369f1d7a4e587893cc002b925063c1e728e99161233b91869060040191825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60006040518083038186803b15801561235357600080fd5b505af4158015612367573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff8086169350861691507fe21a44017b6fa1658d84e937d56ff408501facdb4ff7427c479ac460d76f789390600090a373ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604080822090517f59d556a8000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b906359d556a890602401602060405180830381865af415801561243f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124639190612a13565b90508181146124bd578373ffffffffffffffffffffffffffffffffffffffff167fa9981ebfc3b766a742486e898f54959b050a66006dbce1a4155c1f84a08bcf41826040516124b491815260200190565b60405180910390a25b50505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff81168114611a3557600080fd5b60006020828403121561256c57600080fd5b81356120fe81612538565b600081518084526020808501945080840160005b838110156125bd57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161258b565b509495945050505050565b6060815260006125db6060830186612577565b82810360208481019190915285518083528682019282019060005b81811015612612578451835293830193918301916001016125f6565b50508481036040860152855180825290820192508186019060005b81811015612681578251600480821061266e577f4e487b71000000000000000000000000000000000000000000000000000000006000526021815260246000fd5b508552938301939183019160010161262d565b509298975050505050505050565b600080604083850312156126a257600080fd5b82356126ad81612538565b915060208301356126bd81612538565b809150509250929050565b6000806000606084860312156126dd57600080fd5b83356126e881612538565b925060208401356126f881612538565b929592945050506040919091013590565b6000806000806080858703121561271f57600080fd5b843561272a81612538565b935060208501359250604085013561274181612538565b9150606085013561275181612538565b939692955090935050565b6020815260006120fe6020830184612577565b6000806040838503121561278257600080fd5b823561278d81612538565b946020939093013593505050565b6000602082840312156127ad57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561282a5761282a6127b4565b604052919050565b600067ffffffffffffffff82111561284c5761284c6127b4565b5060051b60200190565b600082601f83011261286757600080fd5b8151602061287c61287783612832565b6127e3565b82815260059290921b8401810191818101908684111561289b57600080fd5b8286015b848110156128b6578051835291830191830161289f565b509695505050505050565b600082601f8301126128d257600080fd5b815160206128e261287783612832565b82815260059290921b8401810191818101908684111561290157600080fd5b8286015b848110156128b65780516004811061291d5760008081fd5b8352918301918301612905565b60008060006060848603121561293f57600080fd5b835167ffffffffffffffff8082111561295757600080fd5b818601915086601f83011261296b57600080fd5b8151602061297b61287783612832565b82815260059290921b8401810191818101908a84111561299a57600080fd5b948201945b838610156129c15785516129b281612538565b8252948201949082019061299f565b918901519197509093505050808211156129da57600080fd5b6129e687838801612856565b935060408601519150808211156129fc57600080fd5b50612a09868287016128c1565b9150509250925092565b600060208284031215612a2557600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561061057610610612a5b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060208284031215612ade57600080fd5b815180151581146120fe57600080fd5b600060208284031215612b0057600080fd5b81516120fe81612538565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612b3c57612b3c612a5b565b506001019056fea164736f6c6343000813000a", +} + +// SortedOraclesABI is the input ABI used to generate the binding from. +// Deprecated: Use SortedOraclesMetaData.ABI instead. +var SortedOraclesABI = SortedOraclesMetaData.ABI + +// SortedOraclesBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use SortedOraclesMetaData.Bin instead. +var SortedOraclesBin = SortedOraclesMetaData.Bin + +// DeploySortedOracles deploys a new Ethereum contract, binding an instance of SortedOracles to it. +func DeploySortedOracles(auth *bind.TransactOpts, backend bind.ContractBackend, test bool) (common.Address, *types.Transaction, *SortedOracles, error) { + parsed, err := SortedOraclesMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(SortedOraclesBin), backend, test) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &SortedOracles{SortedOraclesCaller: SortedOraclesCaller{contract: contract}, SortedOraclesTransactor: SortedOraclesTransactor{contract: contract}, SortedOraclesFilterer: SortedOraclesFilterer{contract: contract}}, nil +} + +// SortedOracles is an auto generated Go binding around an Ethereum contract. +type SortedOracles struct { + SortedOraclesCaller // Read-only binding to the contract + SortedOraclesTransactor // Write-only binding to the contract + SortedOraclesFilterer // Log filterer for contract events +} + +// SortedOraclesCaller is an auto generated read-only Go binding around an Ethereum contract. +type SortedOraclesCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SortedOraclesTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SortedOraclesTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SortedOraclesFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SortedOraclesFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SortedOraclesSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SortedOraclesSession struct { + Contract *SortedOracles // 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 +} + +// SortedOraclesCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SortedOraclesCallerSession struct { + Contract *SortedOraclesCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SortedOraclesTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SortedOraclesTransactorSession struct { + Contract *SortedOraclesTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SortedOraclesRaw is an auto generated low-level Go binding around an Ethereum contract. +type SortedOraclesRaw struct { + Contract *SortedOracles // Generic contract binding to access the raw methods on +} + +// SortedOraclesCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SortedOraclesCallerRaw struct { + Contract *SortedOraclesCaller // Generic read-only contract binding to access the raw methods on +} + +// SortedOraclesTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SortedOraclesTransactorRaw struct { + Contract *SortedOraclesTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSortedOracles creates a new instance of SortedOracles, bound to a specific deployed contract. +func NewSortedOracles(address common.Address, backend bind.ContractBackend) (*SortedOracles, error) { + contract, err := bindSortedOracles(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SortedOracles{SortedOraclesCaller: SortedOraclesCaller{contract: contract}, SortedOraclesTransactor: SortedOraclesTransactor{contract: contract}, SortedOraclesFilterer: SortedOraclesFilterer{contract: contract}}, nil +} + +// NewSortedOraclesCaller creates a new read-only instance of SortedOracles, bound to a specific deployed contract. +func NewSortedOraclesCaller(address common.Address, caller bind.ContractCaller) (*SortedOraclesCaller, error) { + contract, err := bindSortedOracles(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SortedOraclesCaller{contract: contract}, nil +} + +// NewSortedOraclesTransactor creates a new write-only instance of SortedOracles, bound to a specific deployed contract. +func NewSortedOraclesTransactor(address common.Address, transactor bind.ContractTransactor) (*SortedOraclesTransactor, error) { + contract, err := bindSortedOracles(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SortedOraclesTransactor{contract: contract}, nil +} + +// NewSortedOraclesFilterer creates a new log filterer instance of SortedOracles, bound to a specific deployed contract. +func NewSortedOraclesFilterer(address common.Address, filterer bind.ContractFilterer) (*SortedOraclesFilterer, error) { + contract, err := bindSortedOracles(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SortedOraclesFilterer{contract: contract}, nil +} + +// bindSortedOracles binds a generic wrapper to an already deployed contract. +func bindSortedOracles(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(SortedOraclesABI)) + 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 (_SortedOracles *SortedOraclesRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SortedOracles.Contract.SortedOraclesCaller.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 (_SortedOracles *SortedOraclesRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SortedOracles.Contract.SortedOraclesTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SortedOracles *SortedOraclesRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SortedOracles.Contract.SortedOraclesTransactor.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 (_SortedOracles *SortedOraclesCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SortedOracles.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 (_SortedOracles *SortedOraclesTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SortedOracles.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SortedOracles *SortedOraclesTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SortedOracles.Contract.contract.Transact(opts, method, params...) +} + +// GetOracles is a free data retrieval call binding the contract method 0x8e749281. +// +// Solidity: function getOracles(address token) view returns(address[]) +func (_SortedOracles *SortedOraclesCaller) GetOracles(opts *bind.CallOpts, token common.Address) ([]common.Address, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "getOracles", token) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetOracles is a free data retrieval call binding the contract method 0x8e749281. +// +// Solidity: function getOracles(address token) view returns(address[]) +func (_SortedOracles *SortedOraclesSession) GetOracles(token common.Address) ([]common.Address, error) { + return _SortedOracles.Contract.GetOracles(&_SortedOracles.CallOpts, token) +} + +// GetOracles is a free data retrieval call binding the contract method 0x8e749281. +// +// Solidity: function getOracles(address token) view returns(address[]) +func (_SortedOracles *SortedOraclesCallerSession) GetOracles(token common.Address) ([]common.Address, error) { + return _SortedOracles.Contract.GetOracles(&_SortedOracles.CallOpts, token) +} + +// GetRates is a free data retrieval call binding the contract method 0x02f55b61. +// +// Solidity: function getRates(address token) view returns(address[], uint256[], uint8[]) +func (_SortedOracles *SortedOraclesCaller) GetRates(opts *bind.CallOpts, token common.Address) ([]common.Address, []*big.Int, []uint8, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "getRates", token) + + if err != nil { + return *new([]common.Address), *new([]*big.Int), *new([]uint8), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + out1 := *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int) + out2 := *abi.ConvertType(out[2], new([]uint8)).(*[]uint8) + + return out0, out1, out2, err + +} + +// GetRates is a free data retrieval call binding the contract method 0x02f55b61. +// +// Solidity: function getRates(address token) view returns(address[], uint256[], uint8[]) +func (_SortedOracles *SortedOraclesSession) GetRates(token common.Address) ([]common.Address, []*big.Int, []uint8, error) { + return _SortedOracles.Contract.GetRates(&_SortedOracles.CallOpts, token) +} + +// GetRates is a free data retrieval call binding the contract method 0x02f55b61. +// +// Solidity: function getRates(address token) view returns(address[], uint256[], uint8[]) +func (_SortedOracles *SortedOraclesCallerSession) GetRates(token common.Address) ([]common.Address, []*big.Int, []uint8, error) { + return _SortedOracles.Contract.GetRates(&_SortedOracles.CallOpts, token) +} + +// GetTimestamps is a free data retrieval call binding the contract method 0xb9292158. +// +// Solidity: function getTimestamps(address token) view returns(address[], uint256[], uint8[]) +func (_SortedOracles *SortedOraclesCaller) GetTimestamps(opts *bind.CallOpts, token common.Address) ([]common.Address, []*big.Int, []uint8, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "getTimestamps", token) + + if err != nil { + return *new([]common.Address), *new([]*big.Int), *new([]uint8), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + out1 := *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int) + out2 := *abi.ConvertType(out[2], new([]uint8)).(*[]uint8) + + return out0, out1, out2, err + +} + +// GetTimestamps is a free data retrieval call binding the contract method 0xb9292158. +// +// Solidity: function getTimestamps(address token) view returns(address[], uint256[], uint8[]) +func (_SortedOracles *SortedOraclesSession) GetTimestamps(token common.Address) ([]common.Address, []*big.Int, []uint8, error) { + return _SortedOracles.Contract.GetTimestamps(&_SortedOracles.CallOpts, token) +} + +// GetTimestamps is a free data retrieval call binding the contract method 0xb9292158. +// +// Solidity: function getTimestamps(address token) view returns(address[], uint256[], uint8[]) +func (_SortedOracles *SortedOraclesCallerSession) GetTimestamps(token common.Address) ([]common.Address, []*big.Int, []uint8, error) { + return _SortedOracles.Contract.GetTimestamps(&_SortedOracles.CallOpts, token) +} + +// GetTokenReportExpirySeconds is a free data retrieval call binding the contract method 0x6deb6799. +// +// Solidity: function getTokenReportExpirySeconds(address token) view returns(uint256) +func (_SortedOracles *SortedOraclesCaller) GetTokenReportExpirySeconds(opts *bind.CallOpts, token common.Address) (*big.Int, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "getTokenReportExpirySeconds", token) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenReportExpirySeconds is a free data retrieval call binding the contract method 0x6deb6799. +// +// Solidity: function getTokenReportExpirySeconds(address token) view returns(uint256) +func (_SortedOracles *SortedOraclesSession) GetTokenReportExpirySeconds(token common.Address) (*big.Int, error) { + return _SortedOracles.Contract.GetTokenReportExpirySeconds(&_SortedOracles.CallOpts, token) +} + +// GetTokenReportExpirySeconds is a free data retrieval call binding the contract method 0x6deb6799. +// +// Solidity: function getTokenReportExpirySeconds(address token) view returns(uint256) +func (_SortedOracles *SortedOraclesCallerSession) GetTokenReportExpirySeconds(token common.Address) (*big.Int, error) { + return _SortedOracles.Contract.GetTokenReportExpirySeconds(&_SortedOracles.CallOpts, token) +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_SortedOracles *SortedOraclesCaller) GetVersionNumber(opts *bind.CallOpts) (*big.Int, *big.Int, *big.Int, *big.Int, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "getVersionNumber") + + if err != nil { + return *new(*big.Int), *new(*big.Int), *new(*big.Int), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + out2 := *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + out3 := *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + + return out0, out1, out2, out3, err + +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_SortedOracles *SortedOraclesSession) GetVersionNumber() (*big.Int, *big.Int, *big.Int, *big.Int, error) { + return _SortedOracles.Contract.GetVersionNumber(&_SortedOracles.CallOpts) +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_SortedOracles *SortedOraclesCallerSession) GetVersionNumber() (*big.Int, *big.Int, *big.Int, *big.Int, error) { + return _SortedOracles.Contract.GetVersionNumber(&_SortedOracles.CallOpts) +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_SortedOracles *SortedOraclesCaller) Initialized(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "initialized") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_SortedOracles *SortedOraclesSession) Initialized() (bool, error) { + return _SortedOracles.Contract.Initialized(&_SortedOracles.CallOpts) +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_SortedOracles *SortedOraclesCallerSession) Initialized() (bool, error) { + return _SortedOracles.Contract.Initialized(&_SortedOracles.CallOpts) +} + +// IsOldestReportExpired is a free data retrieval call binding the contract method 0xffe736bf. +// +// Solidity: function isOldestReportExpired(address token) view returns(bool, address) +func (_SortedOracles *SortedOraclesCaller) IsOldestReportExpired(opts *bind.CallOpts, token common.Address) (bool, common.Address, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "isOldestReportExpired", token) + + if err != nil { + return *new(bool), *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out1 := *abi.ConvertType(out[1], new(common.Address)).(*common.Address) + + return out0, out1, err + +} + +// IsOldestReportExpired is a free data retrieval call binding the contract method 0xffe736bf. +// +// Solidity: function isOldestReportExpired(address token) view returns(bool, address) +func (_SortedOracles *SortedOraclesSession) IsOldestReportExpired(token common.Address) (bool, common.Address, error) { + return _SortedOracles.Contract.IsOldestReportExpired(&_SortedOracles.CallOpts, token) +} + +// IsOldestReportExpired is a free data retrieval call binding the contract method 0xffe736bf. +// +// Solidity: function isOldestReportExpired(address token) view returns(bool, address) +func (_SortedOracles *SortedOraclesCallerSession) IsOldestReportExpired(token common.Address) (bool, common.Address, error) { + return _SortedOracles.Contract.IsOldestReportExpired(&_SortedOracles.CallOpts, token) +} + +// IsOracle is a free data retrieval call binding the contract method 0x370c998e. +// +// Solidity: function isOracle(address , address ) view returns(bool) +func (_SortedOracles *SortedOraclesCaller) IsOracle(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (bool, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "isOracle", arg0, arg1) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsOracle is a free data retrieval call binding the contract method 0x370c998e. +// +// Solidity: function isOracle(address , address ) view returns(bool) +func (_SortedOracles *SortedOraclesSession) IsOracle(arg0 common.Address, arg1 common.Address) (bool, error) { + return _SortedOracles.Contract.IsOracle(&_SortedOracles.CallOpts, arg0, arg1) +} + +// IsOracle is a free data retrieval call binding the contract method 0x370c998e. +// +// Solidity: function isOracle(address , address ) view returns(bool) +func (_SortedOracles *SortedOraclesCallerSession) IsOracle(arg0 common.Address, arg1 common.Address) (bool, error) { + return _SortedOracles.Contract.IsOracle(&_SortedOracles.CallOpts, arg0, arg1) +} + +// MedianRate is a free data retrieval call binding the contract method 0xef90e1b0. +// +// Solidity: function medianRate(address token) view returns(uint256, uint256) +func (_SortedOracles *SortedOraclesCaller) MedianRate(opts *bind.CallOpts, token common.Address) (*big.Int, *big.Int, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "medianRate", token) + + if err != nil { + return *new(*big.Int), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return out0, out1, err + +} + +// MedianRate is a free data retrieval call binding the contract method 0xef90e1b0. +// +// Solidity: function medianRate(address token) view returns(uint256, uint256) +func (_SortedOracles *SortedOraclesSession) MedianRate(token common.Address) (*big.Int, *big.Int, error) { + return _SortedOracles.Contract.MedianRate(&_SortedOracles.CallOpts, token) +} + +// MedianRate is a free data retrieval call binding the contract method 0xef90e1b0. +// +// Solidity: function medianRate(address token) view returns(uint256, uint256) +func (_SortedOracles *SortedOraclesCallerSession) MedianRate(token common.Address) (*big.Int, *big.Int, error) { + return _SortedOracles.Contract.MedianRate(&_SortedOracles.CallOpts, token) +} + +// MedianTimestamp is a free data retrieval call binding the contract method 0x071b48fc. +// +// Solidity: function medianTimestamp(address token) view returns(uint256) +func (_SortedOracles *SortedOraclesCaller) MedianTimestamp(opts *bind.CallOpts, token common.Address) (*big.Int, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "medianTimestamp", token) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MedianTimestamp is a free data retrieval call binding the contract method 0x071b48fc. +// +// Solidity: function medianTimestamp(address token) view returns(uint256) +func (_SortedOracles *SortedOraclesSession) MedianTimestamp(token common.Address) (*big.Int, error) { + return _SortedOracles.Contract.MedianTimestamp(&_SortedOracles.CallOpts, token) +} + +// MedianTimestamp is a free data retrieval call binding the contract method 0x071b48fc. +// +// Solidity: function medianTimestamp(address token) view returns(uint256) +func (_SortedOracles *SortedOraclesCallerSession) MedianTimestamp(token common.Address) (*big.Int, error) { + return _SortedOracles.Contract.MedianTimestamp(&_SortedOracles.CallOpts, token) +} + +// NumRates is a free data retrieval call binding the contract method 0xbbc66a94. +// +// Solidity: function numRates(address token) view returns(uint256) +func (_SortedOracles *SortedOraclesCaller) NumRates(opts *bind.CallOpts, token common.Address) (*big.Int, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "numRates", token) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NumRates is a free data retrieval call binding the contract method 0xbbc66a94. +// +// Solidity: function numRates(address token) view returns(uint256) +func (_SortedOracles *SortedOraclesSession) NumRates(token common.Address) (*big.Int, error) { + return _SortedOracles.Contract.NumRates(&_SortedOracles.CallOpts, token) +} + +// NumRates is a free data retrieval call binding the contract method 0xbbc66a94. +// +// Solidity: function numRates(address token) view returns(uint256) +func (_SortedOracles *SortedOraclesCallerSession) NumRates(token common.Address) (*big.Int, error) { + return _SortedOracles.Contract.NumRates(&_SortedOracles.CallOpts, token) +} + +// NumTimestamps is a free data retrieval call binding the contract method 0x6dd6ef0c. +// +// Solidity: function numTimestamps(address token) view returns(uint256) +func (_SortedOracles *SortedOraclesCaller) NumTimestamps(opts *bind.CallOpts, token common.Address) (*big.Int, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "numTimestamps", token) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NumTimestamps is a free data retrieval call binding the contract method 0x6dd6ef0c. +// +// Solidity: function numTimestamps(address token) view returns(uint256) +func (_SortedOracles *SortedOraclesSession) NumTimestamps(token common.Address) (*big.Int, error) { + return _SortedOracles.Contract.NumTimestamps(&_SortedOracles.CallOpts, token) +} + +// NumTimestamps is a free data retrieval call binding the contract method 0x6dd6ef0c. +// +// Solidity: function numTimestamps(address token) view returns(uint256) +func (_SortedOracles *SortedOraclesCallerSession) NumTimestamps(token common.Address) (*big.Int, error) { + return _SortedOracles.Contract.NumTimestamps(&_SortedOracles.CallOpts, token) +} + +// Oracles is a free data retrieval call binding the contract method 0xa00a8b2c. +// +// Solidity: function oracles(address , uint256 ) view returns(address) +func (_SortedOracles *SortedOraclesCaller) Oracles(opts *bind.CallOpts, arg0 common.Address, arg1 *big.Int) (common.Address, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "oracles", arg0, arg1) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Oracles is a free data retrieval call binding the contract method 0xa00a8b2c. +// +// Solidity: function oracles(address , uint256 ) view returns(address) +func (_SortedOracles *SortedOraclesSession) Oracles(arg0 common.Address, arg1 *big.Int) (common.Address, error) { + return _SortedOracles.Contract.Oracles(&_SortedOracles.CallOpts, arg0, arg1) +} + +// Oracles is a free data retrieval call binding the contract method 0xa00a8b2c. +// +// Solidity: function oracles(address , uint256 ) view returns(address) +func (_SortedOracles *SortedOraclesCallerSession) Oracles(arg0 common.Address, arg1 *big.Int) (common.Address, error) { + return _SortedOracles.Contract.Oracles(&_SortedOracles.CallOpts, arg0, arg1) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_SortedOracles *SortedOraclesCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_SortedOracles *SortedOraclesSession) Owner() (common.Address, error) { + return _SortedOracles.Contract.Owner(&_SortedOracles.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_SortedOracles *SortedOraclesCallerSession) Owner() (common.Address, error) { + return _SortedOracles.Contract.Owner(&_SortedOracles.CallOpts) +} + +// ReportExpirySeconds is a free data retrieval call binding the contract method 0x493a353c. +// +// Solidity: function reportExpirySeconds() view returns(uint256) +func (_SortedOracles *SortedOraclesCaller) ReportExpirySeconds(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "reportExpirySeconds") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ReportExpirySeconds is a free data retrieval call binding the contract method 0x493a353c. +// +// Solidity: function reportExpirySeconds() view returns(uint256) +func (_SortedOracles *SortedOraclesSession) ReportExpirySeconds() (*big.Int, error) { + return _SortedOracles.Contract.ReportExpirySeconds(&_SortedOracles.CallOpts) +} + +// ReportExpirySeconds is a free data retrieval call binding the contract method 0x493a353c. +// +// Solidity: function reportExpirySeconds() view returns(uint256) +func (_SortedOracles *SortedOraclesCallerSession) ReportExpirySeconds() (*big.Int, error) { + return _SortedOracles.Contract.ReportExpirySeconds(&_SortedOracles.CallOpts) +} + +// TokenReportExpirySeconds is a free data retrieval call binding the contract method 0x2e86bc01. +// +// Solidity: function tokenReportExpirySeconds(address ) view returns(uint256) +func (_SortedOracles *SortedOraclesCaller) TokenReportExpirySeconds(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _SortedOracles.contract.Call(opts, &out, "tokenReportExpirySeconds", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TokenReportExpirySeconds is a free data retrieval call binding the contract method 0x2e86bc01. +// +// Solidity: function tokenReportExpirySeconds(address ) view returns(uint256) +func (_SortedOracles *SortedOraclesSession) TokenReportExpirySeconds(arg0 common.Address) (*big.Int, error) { + return _SortedOracles.Contract.TokenReportExpirySeconds(&_SortedOracles.CallOpts, arg0) +} + +// TokenReportExpirySeconds is a free data retrieval call binding the contract method 0x2e86bc01. +// +// Solidity: function tokenReportExpirySeconds(address ) view returns(uint256) +func (_SortedOracles *SortedOraclesCallerSession) TokenReportExpirySeconds(arg0 common.Address) (*big.Int, error) { + return _SortedOracles.Contract.TokenReportExpirySeconds(&_SortedOracles.CallOpts, arg0) +} + +// AddOracle is a paid mutator transaction binding the contract method 0xf0ca4adb. +// +// Solidity: function addOracle(address token, address oracleAddress) returns() +func (_SortedOracles *SortedOraclesTransactor) AddOracle(opts *bind.TransactOpts, token common.Address, oracleAddress common.Address) (*types.Transaction, error) { + return _SortedOracles.contract.Transact(opts, "addOracle", token, oracleAddress) +} + +// AddOracle is a paid mutator transaction binding the contract method 0xf0ca4adb. +// +// Solidity: function addOracle(address token, address oracleAddress) returns() +func (_SortedOracles *SortedOraclesSession) AddOracle(token common.Address, oracleAddress common.Address) (*types.Transaction, error) { + return _SortedOracles.Contract.AddOracle(&_SortedOracles.TransactOpts, token, oracleAddress) +} + +// AddOracle is a paid mutator transaction binding the contract method 0xf0ca4adb. +// +// Solidity: function addOracle(address token, address oracleAddress) returns() +func (_SortedOracles *SortedOraclesTransactorSession) AddOracle(token common.Address, oracleAddress common.Address) (*types.Transaction, error) { + return _SortedOracles.Contract.AddOracle(&_SortedOracles.TransactOpts, token, oracleAddress) +} + +// Initialize is a paid mutator transaction binding the contract method 0xfe4b84df. +// +// Solidity: function initialize(uint256 _reportExpirySeconds) returns() +func (_SortedOracles *SortedOraclesTransactor) Initialize(opts *bind.TransactOpts, _reportExpirySeconds *big.Int) (*types.Transaction, error) { + return _SortedOracles.contract.Transact(opts, "initialize", _reportExpirySeconds) +} + +// Initialize is a paid mutator transaction binding the contract method 0xfe4b84df. +// +// Solidity: function initialize(uint256 _reportExpirySeconds) returns() +func (_SortedOracles *SortedOraclesSession) Initialize(_reportExpirySeconds *big.Int) (*types.Transaction, error) { + return _SortedOracles.Contract.Initialize(&_SortedOracles.TransactOpts, _reportExpirySeconds) +} + +// Initialize is a paid mutator transaction binding the contract method 0xfe4b84df. +// +// Solidity: function initialize(uint256 _reportExpirySeconds) returns() +func (_SortedOracles *SortedOraclesTransactorSession) Initialize(_reportExpirySeconds *big.Int) (*types.Transaction, error) { + return _SortedOracles.Contract.Initialize(&_SortedOracles.TransactOpts, _reportExpirySeconds) +} + +// RemoveExpiredReports is a paid mutator transaction binding the contract method 0xdd34ca3b. +// +// Solidity: function removeExpiredReports(address token, uint256 n) returns() +func (_SortedOracles *SortedOraclesTransactor) RemoveExpiredReports(opts *bind.TransactOpts, token common.Address, n *big.Int) (*types.Transaction, error) { + return _SortedOracles.contract.Transact(opts, "removeExpiredReports", token, n) +} + +// RemoveExpiredReports is a paid mutator transaction binding the contract method 0xdd34ca3b. +// +// Solidity: function removeExpiredReports(address token, uint256 n) returns() +func (_SortedOracles *SortedOraclesSession) RemoveExpiredReports(token common.Address, n *big.Int) (*types.Transaction, error) { + return _SortedOracles.Contract.RemoveExpiredReports(&_SortedOracles.TransactOpts, token, n) +} + +// RemoveExpiredReports is a paid mutator transaction binding the contract method 0xdd34ca3b. +// +// Solidity: function removeExpiredReports(address token, uint256 n) returns() +func (_SortedOracles *SortedOraclesTransactorSession) RemoveExpiredReports(token common.Address, n *big.Int) (*types.Transaction, error) { + return _SortedOracles.Contract.RemoveExpiredReports(&_SortedOracles.TransactOpts, token, n) +} + +// RemoveOracle is a paid mutator transaction binding the contract method 0x53a57297. +// +// Solidity: function removeOracle(address token, address oracleAddress, uint256 index) returns() +func (_SortedOracles *SortedOraclesTransactor) RemoveOracle(opts *bind.TransactOpts, token common.Address, oracleAddress common.Address, index *big.Int) (*types.Transaction, error) { + return _SortedOracles.contract.Transact(opts, "removeOracle", token, oracleAddress, index) +} + +// RemoveOracle is a paid mutator transaction binding the contract method 0x53a57297. +// +// Solidity: function removeOracle(address token, address oracleAddress, uint256 index) returns() +func (_SortedOracles *SortedOraclesSession) RemoveOracle(token common.Address, oracleAddress common.Address, index *big.Int) (*types.Transaction, error) { + return _SortedOracles.Contract.RemoveOracle(&_SortedOracles.TransactOpts, token, oracleAddress, index) +} + +// RemoveOracle is a paid mutator transaction binding the contract method 0x53a57297. +// +// Solidity: function removeOracle(address token, address oracleAddress, uint256 index) returns() +func (_SortedOracles *SortedOraclesTransactorSession) RemoveOracle(token common.Address, oracleAddress common.Address, index *big.Int) (*types.Transaction, error) { + return _SortedOracles.Contract.RemoveOracle(&_SortedOracles.TransactOpts, token, oracleAddress, index) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_SortedOracles *SortedOraclesTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SortedOracles.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_SortedOracles *SortedOraclesSession) RenounceOwnership() (*types.Transaction, error) { + return _SortedOracles.Contract.RenounceOwnership(&_SortedOracles.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_SortedOracles *SortedOraclesTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _SortedOracles.Contract.RenounceOwnership(&_SortedOracles.TransactOpts) +} + +// Report is a paid mutator transaction binding the contract method 0x80e50744. +// +// Solidity: function report(address token, uint256 value, address lesserKey, address greaterKey) returns() +func (_SortedOracles *SortedOraclesTransactor) Report(opts *bind.TransactOpts, token common.Address, value *big.Int, lesserKey common.Address, greaterKey common.Address) (*types.Transaction, error) { + return _SortedOracles.contract.Transact(opts, "report", token, value, lesserKey, greaterKey) +} + +// Report is a paid mutator transaction binding the contract method 0x80e50744. +// +// Solidity: function report(address token, uint256 value, address lesserKey, address greaterKey) returns() +func (_SortedOracles *SortedOraclesSession) Report(token common.Address, value *big.Int, lesserKey common.Address, greaterKey common.Address) (*types.Transaction, error) { + return _SortedOracles.Contract.Report(&_SortedOracles.TransactOpts, token, value, lesserKey, greaterKey) +} + +// Report is a paid mutator transaction binding the contract method 0x80e50744. +// +// Solidity: function report(address token, uint256 value, address lesserKey, address greaterKey) returns() +func (_SortedOracles *SortedOraclesTransactorSession) Report(token common.Address, value *big.Int, lesserKey common.Address, greaterKey common.Address) (*types.Transaction, error) { + return _SortedOracles.Contract.Report(&_SortedOracles.TransactOpts, token, value, lesserKey, greaterKey) +} + +// SetReportExpiry is a paid mutator transaction binding the contract method 0xebc1d6bb. +// +// Solidity: function setReportExpiry(uint256 _reportExpirySeconds) returns() +func (_SortedOracles *SortedOraclesTransactor) SetReportExpiry(opts *bind.TransactOpts, _reportExpirySeconds *big.Int) (*types.Transaction, error) { + return _SortedOracles.contract.Transact(opts, "setReportExpiry", _reportExpirySeconds) +} + +// SetReportExpiry is a paid mutator transaction binding the contract method 0xebc1d6bb. +// +// Solidity: function setReportExpiry(uint256 _reportExpirySeconds) returns() +func (_SortedOracles *SortedOraclesSession) SetReportExpiry(_reportExpirySeconds *big.Int) (*types.Transaction, error) { + return _SortedOracles.Contract.SetReportExpiry(&_SortedOracles.TransactOpts, _reportExpirySeconds) +} + +// SetReportExpiry is a paid mutator transaction binding the contract method 0xebc1d6bb. +// +// Solidity: function setReportExpiry(uint256 _reportExpirySeconds) returns() +func (_SortedOracles *SortedOraclesTransactorSession) SetReportExpiry(_reportExpirySeconds *big.Int) (*types.Transaction, error) { + return _SortedOracles.Contract.SetReportExpiry(&_SortedOracles.TransactOpts, _reportExpirySeconds) +} + +// SetTokenReportExpiry is a paid mutator transaction binding the contract method 0xfc20935d. +// +// Solidity: function setTokenReportExpiry(address _token, uint256 _reportExpirySeconds) returns() +func (_SortedOracles *SortedOraclesTransactor) SetTokenReportExpiry(opts *bind.TransactOpts, _token common.Address, _reportExpirySeconds *big.Int) (*types.Transaction, error) { + return _SortedOracles.contract.Transact(opts, "setTokenReportExpiry", _token, _reportExpirySeconds) +} + +// SetTokenReportExpiry is a paid mutator transaction binding the contract method 0xfc20935d. +// +// Solidity: function setTokenReportExpiry(address _token, uint256 _reportExpirySeconds) returns() +func (_SortedOracles *SortedOraclesSession) SetTokenReportExpiry(_token common.Address, _reportExpirySeconds *big.Int) (*types.Transaction, error) { + return _SortedOracles.Contract.SetTokenReportExpiry(&_SortedOracles.TransactOpts, _token, _reportExpirySeconds) +} + +// SetTokenReportExpiry is a paid mutator transaction binding the contract method 0xfc20935d. +// +// Solidity: function setTokenReportExpiry(address _token, uint256 _reportExpirySeconds) returns() +func (_SortedOracles *SortedOraclesTransactorSession) SetTokenReportExpiry(_token common.Address, _reportExpirySeconds *big.Int) (*types.Transaction, error) { + return _SortedOracles.Contract.SetTokenReportExpiry(&_SortedOracles.TransactOpts, _token, _reportExpirySeconds) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_SortedOracles *SortedOraclesTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _SortedOracles.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_SortedOracles *SortedOraclesSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _SortedOracles.Contract.TransferOwnership(&_SortedOracles.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_SortedOracles *SortedOraclesTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _SortedOracles.Contract.TransferOwnership(&_SortedOracles.TransactOpts, newOwner) +} + +// SortedOraclesMedianUpdatedIterator is returned from FilterMedianUpdated and is used to iterate over the raw logs and unpacked data for MedianUpdated events raised by the SortedOracles contract. +type SortedOraclesMedianUpdatedIterator struct { + Event *SortedOraclesMedianUpdated // 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 *SortedOraclesMedianUpdatedIterator) 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(SortedOraclesMedianUpdated) + 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(SortedOraclesMedianUpdated) + 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 *SortedOraclesMedianUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SortedOraclesMedianUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SortedOraclesMedianUpdated represents a MedianUpdated event raised by the SortedOracles contract. +type SortedOraclesMedianUpdated struct { + Token common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMedianUpdated is a free log retrieval operation binding the contract event 0xa9981ebfc3b766a742486e898f54959b050a66006dbce1a4155c1f84a08bcf41. +// +// Solidity: event MedianUpdated(address indexed token, uint256 value) +func (_SortedOracles *SortedOraclesFilterer) FilterMedianUpdated(opts *bind.FilterOpts, token []common.Address) (*SortedOraclesMedianUpdatedIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _SortedOracles.contract.FilterLogs(opts, "MedianUpdated", tokenRule) + if err != nil { + return nil, err + } + return &SortedOraclesMedianUpdatedIterator{contract: _SortedOracles.contract, event: "MedianUpdated", logs: logs, sub: sub}, nil +} + +// WatchMedianUpdated is a free log subscription operation binding the contract event 0xa9981ebfc3b766a742486e898f54959b050a66006dbce1a4155c1f84a08bcf41. +// +// Solidity: event MedianUpdated(address indexed token, uint256 value) +func (_SortedOracles *SortedOraclesFilterer) WatchMedianUpdated(opts *bind.WatchOpts, sink chan<- *SortedOraclesMedianUpdated, token []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _SortedOracles.contract.WatchLogs(opts, "MedianUpdated", tokenRule) + 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(SortedOraclesMedianUpdated) + if err := _SortedOracles.contract.UnpackLog(event, "MedianUpdated", 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 +} + +// ParseMedianUpdated is a log parse operation binding the contract event 0xa9981ebfc3b766a742486e898f54959b050a66006dbce1a4155c1f84a08bcf41. +// +// Solidity: event MedianUpdated(address indexed token, uint256 value) +func (_SortedOracles *SortedOraclesFilterer) ParseMedianUpdated(log types.Log) (*SortedOraclesMedianUpdated, error) { + event := new(SortedOraclesMedianUpdated) + if err := _SortedOracles.contract.UnpackLog(event, "MedianUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SortedOraclesOracleAddedIterator is returned from FilterOracleAdded and is used to iterate over the raw logs and unpacked data for OracleAdded events raised by the SortedOracles contract. +type SortedOraclesOracleAddedIterator struct { + Event *SortedOraclesOracleAdded // 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 *SortedOraclesOracleAddedIterator) 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(SortedOraclesOracleAdded) + 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(SortedOraclesOracleAdded) + 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 *SortedOraclesOracleAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SortedOraclesOracleAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SortedOraclesOracleAdded represents a OracleAdded event raised by the SortedOracles contract. +type SortedOraclesOracleAdded struct { + Token common.Address + OracleAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOracleAdded is a free log retrieval operation binding the contract event 0x828d2be040dede7698182e08dfa8bfbd663c879aee772509c4a2bd961d0ed43f. +// +// Solidity: event OracleAdded(address indexed token, address indexed oracleAddress) +func (_SortedOracles *SortedOraclesFilterer) FilterOracleAdded(opts *bind.FilterOpts, token []common.Address, oracleAddress []common.Address) (*SortedOraclesOracleAddedIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var oracleAddressRule []interface{} + for _, oracleAddressItem := range oracleAddress { + oracleAddressRule = append(oracleAddressRule, oracleAddressItem) + } + + logs, sub, err := _SortedOracles.contract.FilterLogs(opts, "OracleAdded", tokenRule, oracleAddressRule) + if err != nil { + return nil, err + } + return &SortedOraclesOracleAddedIterator{contract: _SortedOracles.contract, event: "OracleAdded", logs: logs, sub: sub}, nil +} + +// WatchOracleAdded is a free log subscription operation binding the contract event 0x828d2be040dede7698182e08dfa8bfbd663c879aee772509c4a2bd961d0ed43f. +// +// Solidity: event OracleAdded(address indexed token, address indexed oracleAddress) +func (_SortedOracles *SortedOraclesFilterer) WatchOracleAdded(opts *bind.WatchOpts, sink chan<- *SortedOraclesOracleAdded, token []common.Address, oracleAddress []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var oracleAddressRule []interface{} + for _, oracleAddressItem := range oracleAddress { + oracleAddressRule = append(oracleAddressRule, oracleAddressItem) + } + + logs, sub, err := _SortedOracles.contract.WatchLogs(opts, "OracleAdded", tokenRule, oracleAddressRule) + 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(SortedOraclesOracleAdded) + if err := _SortedOracles.contract.UnpackLog(event, "OracleAdded", 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 +} + +// ParseOracleAdded is a log parse operation binding the contract event 0x828d2be040dede7698182e08dfa8bfbd663c879aee772509c4a2bd961d0ed43f. +// +// Solidity: event OracleAdded(address indexed token, address indexed oracleAddress) +func (_SortedOracles *SortedOraclesFilterer) ParseOracleAdded(log types.Log) (*SortedOraclesOracleAdded, error) { + event := new(SortedOraclesOracleAdded) + if err := _SortedOracles.contract.UnpackLog(event, "OracleAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SortedOraclesOracleRemovedIterator is returned from FilterOracleRemoved and is used to iterate over the raw logs and unpacked data for OracleRemoved events raised by the SortedOracles contract. +type SortedOraclesOracleRemovedIterator struct { + Event *SortedOraclesOracleRemoved // 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 *SortedOraclesOracleRemovedIterator) 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(SortedOraclesOracleRemoved) + 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(SortedOraclesOracleRemoved) + 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 *SortedOraclesOracleRemovedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SortedOraclesOracleRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SortedOraclesOracleRemoved represents a OracleRemoved event raised by the SortedOracles contract. +type SortedOraclesOracleRemoved struct { + Token common.Address + OracleAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOracleRemoved is a free log retrieval operation binding the contract event 0x6dc84b66cc948d847632b9d829f7cb1cb904fbf2c084554a9bc22ad9d8453340. +// +// Solidity: event OracleRemoved(address indexed token, address indexed oracleAddress) +func (_SortedOracles *SortedOraclesFilterer) FilterOracleRemoved(opts *bind.FilterOpts, token []common.Address, oracleAddress []common.Address) (*SortedOraclesOracleRemovedIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var oracleAddressRule []interface{} + for _, oracleAddressItem := range oracleAddress { + oracleAddressRule = append(oracleAddressRule, oracleAddressItem) + } + + logs, sub, err := _SortedOracles.contract.FilterLogs(opts, "OracleRemoved", tokenRule, oracleAddressRule) + if err != nil { + return nil, err + } + return &SortedOraclesOracleRemovedIterator{contract: _SortedOracles.contract, event: "OracleRemoved", logs: logs, sub: sub}, nil +} + +// WatchOracleRemoved is a free log subscription operation binding the contract event 0x6dc84b66cc948d847632b9d829f7cb1cb904fbf2c084554a9bc22ad9d8453340. +// +// Solidity: event OracleRemoved(address indexed token, address indexed oracleAddress) +func (_SortedOracles *SortedOraclesFilterer) WatchOracleRemoved(opts *bind.WatchOpts, sink chan<- *SortedOraclesOracleRemoved, token []common.Address, oracleAddress []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var oracleAddressRule []interface{} + for _, oracleAddressItem := range oracleAddress { + oracleAddressRule = append(oracleAddressRule, oracleAddressItem) + } + + logs, sub, err := _SortedOracles.contract.WatchLogs(opts, "OracleRemoved", tokenRule, oracleAddressRule) + 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(SortedOraclesOracleRemoved) + if err := _SortedOracles.contract.UnpackLog(event, "OracleRemoved", 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 +} + +// ParseOracleRemoved is a log parse operation binding the contract event 0x6dc84b66cc948d847632b9d829f7cb1cb904fbf2c084554a9bc22ad9d8453340. +// +// Solidity: event OracleRemoved(address indexed token, address indexed oracleAddress) +func (_SortedOracles *SortedOraclesFilterer) ParseOracleRemoved(log types.Log) (*SortedOraclesOracleRemoved, error) { + event := new(SortedOraclesOracleRemoved) + if err := _SortedOracles.contract.UnpackLog(event, "OracleRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SortedOraclesOracleReportRemovedIterator is returned from FilterOracleReportRemoved and is used to iterate over the raw logs and unpacked data for OracleReportRemoved events raised by the SortedOracles contract. +type SortedOraclesOracleReportRemovedIterator struct { + Event *SortedOraclesOracleReportRemoved // 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 *SortedOraclesOracleReportRemovedIterator) 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(SortedOraclesOracleReportRemoved) + 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(SortedOraclesOracleReportRemoved) + 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 *SortedOraclesOracleReportRemovedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SortedOraclesOracleReportRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SortedOraclesOracleReportRemoved represents a OracleReportRemoved event raised by the SortedOracles contract. +type SortedOraclesOracleReportRemoved struct { + Token common.Address + Oracle common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOracleReportRemoved is a free log retrieval operation binding the contract event 0xe21a44017b6fa1658d84e937d56ff408501facdb4ff7427c479ac460d76f7893. +// +// Solidity: event OracleReportRemoved(address indexed token, address indexed oracle) +func (_SortedOracles *SortedOraclesFilterer) FilterOracleReportRemoved(opts *bind.FilterOpts, token []common.Address, oracle []common.Address) (*SortedOraclesOracleReportRemovedIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var oracleRule []interface{} + for _, oracleItem := range oracle { + oracleRule = append(oracleRule, oracleItem) + } + + logs, sub, err := _SortedOracles.contract.FilterLogs(opts, "OracleReportRemoved", tokenRule, oracleRule) + if err != nil { + return nil, err + } + return &SortedOraclesOracleReportRemovedIterator{contract: _SortedOracles.contract, event: "OracleReportRemoved", logs: logs, sub: sub}, nil +} + +// WatchOracleReportRemoved is a free log subscription operation binding the contract event 0xe21a44017b6fa1658d84e937d56ff408501facdb4ff7427c479ac460d76f7893. +// +// Solidity: event OracleReportRemoved(address indexed token, address indexed oracle) +func (_SortedOracles *SortedOraclesFilterer) WatchOracleReportRemoved(opts *bind.WatchOpts, sink chan<- *SortedOraclesOracleReportRemoved, token []common.Address, oracle []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var oracleRule []interface{} + for _, oracleItem := range oracle { + oracleRule = append(oracleRule, oracleItem) + } + + logs, sub, err := _SortedOracles.contract.WatchLogs(opts, "OracleReportRemoved", tokenRule, oracleRule) + 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(SortedOraclesOracleReportRemoved) + if err := _SortedOracles.contract.UnpackLog(event, "OracleReportRemoved", 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 +} + +// ParseOracleReportRemoved is a log parse operation binding the contract event 0xe21a44017b6fa1658d84e937d56ff408501facdb4ff7427c479ac460d76f7893. +// +// Solidity: event OracleReportRemoved(address indexed token, address indexed oracle) +func (_SortedOracles *SortedOraclesFilterer) ParseOracleReportRemoved(log types.Log) (*SortedOraclesOracleReportRemoved, error) { + event := new(SortedOraclesOracleReportRemoved) + if err := _SortedOracles.contract.UnpackLog(event, "OracleReportRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SortedOraclesOracleReportedIterator is returned from FilterOracleReported and is used to iterate over the raw logs and unpacked data for OracleReported events raised by the SortedOracles contract. +type SortedOraclesOracleReportedIterator struct { + Event *SortedOraclesOracleReported // 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 *SortedOraclesOracleReportedIterator) 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(SortedOraclesOracleReported) + 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(SortedOraclesOracleReported) + 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 *SortedOraclesOracleReportedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SortedOraclesOracleReportedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SortedOraclesOracleReported represents a OracleReported event raised by the SortedOracles contract. +type SortedOraclesOracleReported struct { + Token common.Address + Oracle common.Address + Timestamp *big.Int + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOracleReported is a free log retrieval operation binding the contract event 0x7cebb17173a9ed273d2b7538f64395c0ebf352ff743f1cf8ce66b437a6144213. +// +// Solidity: event OracleReported(address indexed token, address indexed oracle, uint256 timestamp, uint256 value) +func (_SortedOracles *SortedOraclesFilterer) FilterOracleReported(opts *bind.FilterOpts, token []common.Address, oracle []common.Address) (*SortedOraclesOracleReportedIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var oracleRule []interface{} + for _, oracleItem := range oracle { + oracleRule = append(oracleRule, oracleItem) + } + + logs, sub, err := _SortedOracles.contract.FilterLogs(opts, "OracleReported", tokenRule, oracleRule) + if err != nil { + return nil, err + } + return &SortedOraclesOracleReportedIterator{contract: _SortedOracles.contract, event: "OracleReported", logs: logs, sub: sub}, nil +} + +// WatchOracleReported is a free log subscription operation binding the contract event 0x7cebb17173a9ed273d2b7538f64395c0ebf352ff743f1cf8ce66b437a6144213. +// +// Solidity: event OracleReported(address indexed token, address indexed oracle, uint256 timestamp, uint256 value) +func (_SortedOracles *SortedOraclesFilterer) WatchOracleReported(opts *bind.WatchOpts, sink chan<- *SortedOraclesOracleReported, token []common.Address, oracle []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var oracleRule []interface{} + for _, oracleItem := range oracle { + oracleRule = append(oracleRule, oracleItem) + } + + logs, sub, err := _SortedOracles.contract.WatchLogs(opts, "OracleReported", tokenRule, oracleRule) + 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(SortedOraclesOracleReported) + if err := _SortedOracles.contract.UnpackLog(event, "OracleReported", 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 +} + +// ParseOracleReported is a log parse operation binding the contract event 0x7cebb17173a9ed273d2b7538f64395c0ebf352ff743f1cf8ce66b437a6144213. +// +// Solidity: event OracleReported(address indexed token, address indexed oracle, uint256 timestamp, uint256 value) +func (_SortedOracles *SortedOraclesFilterer) ParseOracleReported(log types.Log) (*SortedOraclesOracleReported, error) { + event := new(SortedOraclesOracleReported) + if err := _SortedOracles.contract.UnpackLog(event, "OracleReported", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SortedOraclesOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the SortedOracles contract. +type SortedOraclesOwnershipTransferredIterator struct { + Event *SortedOraclesOwnershipTransferred // 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 *SortedOraclesOwnershipTransferredIterator) 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(SortedOraclesOwnershipTransferred) + 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(SortedOraclesOwnershipTransferred) + 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 *SortedOraclesOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SortedOraclesOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SortedOraclesOwnershipTransferred represents a OwnershipTransferred event raised by the SortedOracles contract. +type SortedOraclesOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_SortedOracles *SortedOraclesFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*SortedOraclesOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _SortedOracles.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &SortedOraclesOwnershipTransferredIterator{contract: _SortedOracles.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_SortedOracles *SortedOraclesFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *SortedOraclesOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _SortedOracles.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + 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(SortedOraclesOwnershipTransferred) + if err := _SortedOracles.contract.UnpackLog(event, "OwnershipTransferred", 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 +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_SortedOracles *SortedOraclesFilterer) ParseOwnershipTransferred(log types.Log) (*SortedOraclesOwnershipTransferred, error) { + event := new(SortedOraclesOwnershipTransferred) + if err := _SortedOracles.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SortedOraclesReportExpirySetIterator is returned from FilterReportExpirySet and is used to iterate over the raw logs and unpacked data for ReportExpirySet events raised by the SortedOracles contract. +type SortedOraclesReportExpirySetIterator struct { + Event *SortedOraclesReportExpirySet // 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 *SortedOraclesReportExpirySetIterator) 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(SortedOraclesReportExpirySet) + 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(SortedOraclesReportExpirySet) + 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 *SortedOraclesReportExpirySetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SortedOraclesReportExpirySetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SortedOraclesReportExpirySet represents a ReportExpirySet event raised by the SortedOracles contract. +type SortedOraclesReportExpirySet struct { + ReportExpiry *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReportExpirySet is a free log retrieval operation binding the contract event 0xc68a9b88effd8a11611ff410efbc83569f0031b7bc70dd455b61344c7f0a042f. +// +// Solidity: event ReportExpirySet(uint256 reportExpiry) +func (_SortedOracles *SortedOraclesFilterer) FilterReportExpirySet(opts *bind.FilterOpts) (*SortedOraclesReportExpirySetIterator, error) { + + logs, sub, err := _SortedOracles.contract.FilterLogs(opts, "ReportExpirySet") + if err != nil { + return nil, err + } + return &SortedOraclesReportExpirySetIterator{contract: _SortedOracles.contract, event: "ReportExpirySet", logs: logs, sub: sub}, nil +} + +// WatchReportExpirySet is a free log subscription operation binding the contract event 0xc68a9b88effd8a11611ff410efbc83569f0031b7bc70dd455b61344c7f0a042f. +// +// Solidity: event ReportExpirySet(uint256 reportExpiry) +func (_SortedOracles *SortedOraclesFilterer) WatchReportExpirySet(opts *bind.WatchOpts, sink chan<- *SortedOraclesReportExpirySet) (event.Subscription, error) { + + logs, sub, err := _SortedOracles.contract.WatchLogs(opts, "ReportExpirySet") + 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(SortedOraclesReportExpirySet) + if err := _SortedOracles.contract.UnpackLog(event, "ReportExpirySet", 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 +} + +// ParseReportExpirySet is a log parse operation binding the contract event 0xc68a9b88effd8a11611ff410efbc83569f0031b7bc70dd455b61344c7f0a042f. +// +// Solidity: event ReportExpirySet(uint256 reportExpiry) +func (_SortedOracles *SortedOraclesFilterer) ParseReportExpirySet(log types.Log) (*SortedOraclesReportExpirySet, error) { + event := new(SortedOraclesReportExpirySet) + if err := _SortedOracles.contract.UnpackLog(event, "ReportExpirySet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SortedOraclesTokenReportExpirySetIterator is returned from FilterTokenReportExpirySet and is used to iterate over the raw logs and unpacked data for TokenReportExpirySet events raised by the SortedOracles contract. +type SortedOraclesTokenReportExpirySetIterator struct { + Event *SortedOraclesTokenReportExpirySet // 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 *SortedOraclesTokenReportExpirySetIterator) 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(SortedOraclesTokenReportExpirySet) + 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(SortedOraclesTokenReportExpirySet) + 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 *SortedOraclesTokenReportExpirySetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SortedOraclesTokenReportExpirySetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SortedOraclesTokenReportExpirySet represents a TokenReportExpirySet event raised by the SortedOracles contract. +type SortedOraclesTokenReportExpirySet struct { + Token common.Address + ReportExpiry *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokenReportExpirySet is a free log retrieval operation binding the contract event 0xf8324c8592dfd9991ee3e717351afe0a964605257959e3d99b0eb3d45bff9422. +// +// Solidity: event TokenReportExpirySet(address token, uint256 reportExpiry) +func (_SortedOracles *SortedOraclesFilterer) FilterTokenReportExpirySet(opts *bind.FilterOpts) (*SortedOraclesTokenReportExpirySetIterator, error) { + + logs, sub, err := _SortedOracles.contract.FilterLogs(opts, "TokenReportExpirySet") + if err != nil { + return nil, err + } + return &SortedOraclesTokenReportExpirySetIterator{contract: _SortedOracles.contract, event: "TokenReportExpirySet", logs: logs, sub: sub}, nil +} + +// WatchTokenReportExpirySet is a free log subscription operation binding the contract event 0xf8324c8592dfd9991ee3e717351afe0a964605257959e3d99b0eb3d45bff9422. +// +// Solidity: event TokenReportExpirySet(address token, uint256 reportExpiry) +func (_SortedOracles *SortedOraclesFilterer) WatchTokenReportExpirySet(opts *bind.WatchOpts, sink chan<- *SortedOraclesTokenReportExpirySet) (event.Subscription, error) { + + logs, sub, err := _SortedOracles.contract.WatchLogs(opts, "TokenReportExpirySet") + 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(SortedOraclesTokenReportExpirySet) + if err := _SortedOracles.contract.UnpackLog(event, "TokenReportExpirySet", 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 +} + +// ParseTokenReportExpirySet is a log parse operation binding the contract event 0xf8324c8592dfd9991ee3e717351afe0a964605257959e3d99b0eb3d45bff9422. +// +// Solidity: event TokenReportExpirySet(address token, uint256 reportExpiry) +func (_SortedOracles *SortedOraclesFilterer) ParseTokenReportExpirySet(log types.Log) (*SortedOraclesTokenReportExpirySet, error) { + event := new(SortedOraclesTokenReportExpirySet) + if err := _SortedOracles.contract.UnpackLog(event, "TokenReportExpirySet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-bindings/bindings/sortedoracles_more.go b/op-bindings/bindings/sortedoracles_more.go new file mode 100644 index 000000000000..6dcd4004fe6c --- /dev/null +++ b/op-bindings/bindings/sortedoracles_more.go @@ -0,0 +1,25 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "encoding/json" + + "github.com/ethereum-optimism/optimism/op-bindings/solc" +) + +const SortedOraclesStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src/celo/stability/SortedOracles.sol:SortedOracles\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1001,\"contract\":\"src/celo/stability/SortedOracles.sol:SortedOracles\",\"label\":\"initialized\",\"offset\":20,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"src/celo/stability/SortedOracles.sol:SortedOracles\",\"label\":\"rates\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_struct(List)1012_storage)\"},{\"astId\":1003,\"contract\":\"src/celo/stability/SortedOracles.sol:SortedOracles\",\"label\":\"timestamps\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_address,t_struct(List)1012_storage)\"},{\"astId\":1004,\"contract\":\"src/celo/stability/SortedOracles.sol:SortedOracles\",\"label\":\"isOracle\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_mapping(t_address,t_mapping(t_address,t_bool))\"},{\"astId\":1005,\"contract\":\"src/celo/stability/SortedOracles.sol:SortedOracles\",\"label\":\"oracles\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_mapping(t_address,t_array(t_address)dyn_storage)\"},{\"astId\":1006,\"contract\":\"src/celo/stability/SortedOracles.sol:SortedOracles\",\"label\":\"reportExpirySeconds\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_uint256\"},{\"astId\":1007,\"contract\":\"src/celo/stability/SortedOracles.sol:SortedOracles\",\"label\":\"tokenReportExpirySeconds\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_mapping(t_address,t_uint256)\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_address)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"address[]\",\"numberOfBytes\":\"32\",\"base\":\"t_address\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_enum(MedianRelation)1008\":{\"encoding\":\"inplace\",\"label\":\"enum SortedLinkedListWithMedian.MedianRelation\",\"numberOfBytes\":\"1\"},\"t_mapping(t_address,t_array(t_address)dyn_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e address[])\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_array(t_address)dyn_storage\"},\"t_mapping(t_address,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_bool\"},\"t_mapping(t_address,t_mapping(t_address,t_bool))\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e mapping(address =\u003e bool))\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_mapping(t_address,t_bool)\"},\"t_mapping(t_address,t_struct(List)1012_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct SortedLinkedListWithMedian.List)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(List)1012_storage\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_mapping(t_bytes32,t_enum(MedianRelation)1008)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e enum SortedLinkedListWithMedian.MedianRelation)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_enum(MedianRelation)1008\"},\"t_mapping(t_bytes32,t_struct(Element)1009_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e struct LinkedList.Element)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_struct(Element)1009_storage\"},\"t_mapping(t_bytes32,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_uint256\"},\"t_struct(Element)1009_storage\":{\"encoding\":\"inplace\",\"label\":\"struct LinkedList.Element\",\"numberOfBytes\":\"96\"},\"t_struct(List)1010_storage\":{\"encoding\":\"inplace\",\"label\":\"struct LinkedList.List\",\"numberOfBytes\":\"128\"},\"t_struct(List)1011_storage\":{\"encoding\":\"inplace\",\"label\":\"struct SortedLinkedList.List\",\"numberOfBytes\":\"160\"},\"t_struct(List)1012_storage\":{\"encoding\":\"inplace\",\"label\":\"struct SortedLinkedListWithMedian.List\",\"numberOfBytes\":\"224\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}" + +var SortedOraclesStorageLayout = new(solc.StorageLayout) + +var SortedOraclesDeployedBin = "0x608060405234801561001057600080fd5b50600436106101a35760003560e01c80638da5cb5b116100ee578063ebc1d6bb11610097578063f2fde38b11610071578063f2fde38b146103f5578063fc20935d14610408578063fe4b84df1461041b578063ffe736bf1461042e57600080fd5b8063ebc1d6bb146103a7578063ef90e1b0146103ba578063f0ca4adb146103e257600080fd5b8063b9292158116100c8578063b92921581461036e578063bbc66a9414610381578063dd34ca3b1461039457600080fd5b80638da5cb5b146102fc5780638e7492811461033b578063a00a8b2c1461035b57600080fd5b806353a57297116101505780636deb67991161012a5780636deb6799146102ce578063715018a6146102e157806380e50744146102e957600080fd5b806353a572971461028057806354255be0146102955780636dd6ef0c146102bb57600080fd5b80632e86bc01116101815780632e86bc0114610229578063370c998e14610249578063493a353c1461027757600080fd5b806302f55b61146101a8578063071b48fc146101d3578063158ef93e146101f4575b600080fd5b6101bb6101b636600461255a565b61046d565b6040516101ca939291906125c8565b60405180910390f35b6101e66101e136600461255a565b61055c565b6040519081526020016101ca565b6000546102199074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016101ca565b6101e661023736600461255a565b60066020526000908152604090205481565b61021961025736600461268f565b600360209081526000928352604080842090915290825290205460ff1681565b6101e660055481565b61029361028e3660046126c8565b610616565b005b6001806002806040805194855260208501939093529183015260608201526080016101ca565b6101e66102c936600461255a565b6109ab565b6101e66102dc36600461255a565b610a22565b610293610a7f565b6102936102f7366004612709565b610a93565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ca565b61034e61034936600461255a565b6111bc565b6040516101ca919061275c565b61031661036936600461276f565b61124c565b6101bb61037c36600461255a565b611291565b6101e661038f36600461255a565b611310565b6102936103a236600461276f565b611387565b6102936103b536600461279b565b61153b565b6103cd6103c836600461255a565b61169f565b604080519283526020830191909152016101ca565b6102936103f036600461268f565b611783565b61029361040336600461255a565b611981565b61029361041636600461276f565b611a38565b61029361042936600461279b565b611be9565b61044161043c36600461255a565b611cbf565b60408051921515835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016101ca565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600160205260409081902090517f6cfa38730000000000000000000000000000000000000000000000000000000081526060918291829173ed477a99035d0c1e11369f1d7a4e587893cc002b91636cfa3873916104ec9160040190815260200190565b600060405180830381865af4158015610509573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261054f919081019061292a565b9250925092509193909250565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604080822090517f59d556a8000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b906359d556a8906024015b602060405180830381865af41580156105ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106109190612a13565b92915050565b61061e611ee3565b73ffffffffffffffffffffffffffffffffffffffff831615801590610658575073ffffffffffffffffffffffffffffffffffffffff821615155b8015610688575073ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604090205481105b80156106ef575073ffffffffffffffffffffffffffffffffffffffff8381166000908152600460205260409020805491841691839081106106cb576106cb612a2c565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16145b6107a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605660248201527f746f6b656e2061646472206e756c6c206f72206f7261636c652061646472206e60448201527f756c6c206f7220696e646578206f6620746f6b656e206f7261636c65206e6f7460648201527f206d617070656420746f206f7261636c65206164647200000000000000000000608482015260a4015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8084166000818152600360209081526040808320948716835293815283822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055918152600490915220805461081790600190612a8a565b8154811061082757610827612a2c565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff86811684526004909252604090922080549190921691908390811061087157610871612a2c565b600091825260208083209190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff94851617905591851681526004909152604090208054806108db576108db612a9d565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905561093d8383611f64565b1561094c5761094c8383612105565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f6dc84b66cc948d847632b9d829f7cb1cb904fbf2c084554a9bc22ad9d845334060405160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604080822090517f6eafa6c3000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b90636eafa6c3906024016105cf565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600660205260408120548103610a5657505060055490565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526006602052604090205490565b610a87611ee3565b610a9160006124c3565b565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600360209081526040808320338452909152902054849060ff16610b55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f73656e64657220776173206e6f7420616e206f7261636c6520666f7220746f6b60448201527f656e206164647200000000000000000000000000000000000000000000000000606482015260840161079d565b73ffffffffffffffffffffffffffffffffffffffff851660009081526001602052604080822090517f59d556a8000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b906359d556a890602401602060405180830381865af4158015610be4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c089190612a13565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600160205260409081902090517f95073a79000000000000000000000000000000000000000000000000000000008152600481019190915233602482015290915073ed477a99035d0c1e11369f1d7a4e587893cc002b906395073a7990604401602060405180830381865af4158015610ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc59190612acc565b15610e395773ffffffffffffffffffffffffffffffffffffffff8681166000908152600160205260409081902090517f832a21470000000000000000000000000000000000000000000000000000000081526004810191909152336024820152604481018790528582166064820152908416608482015273ed477a99035d0c1e11369f1d7a4e587893cc002b9063832a21479060a40160006040518083038186803b158015610d7357600080fd5b505af4158015610d87573d6000803e3d6000fd5b5050505073ffffffffffffffffffffffffffffffffffffffff86166000908152600260205260409081902090517fc1e728e9000000000000000000000000000000000000000000000000000000008152600481019190915233602482015273ed477a99035d0c1e11369f1d7a4e587893cc002b9063c1e728e99060440160006040518083038186803b158015610e1c57600080fd5b505af4158015610e30573d6000803e3d6000fd5b50505050610efb565b73ffffffffffffffffffffffffffffffffffffffff8681166000908152600160205260409081902090517fd4a092720000000000000000000000000000000000000000000000000000000081526004810191909152336024820152604481018790528582166064820152908416608482015273ed477a99035d0c1e11369f1d7a4e587893cc002b9063d4a092729060a40160006040518083038186803b158015610ee257600080fd5b505af4158015610ef6573d6000803e3d6000fd5b505050505b73ffffffffffffffffffffffffffffffffffffffff86166000908152600260205260409081902090517f0944c5940000000000000000000000000000000000000000000000000000000081526004810182905273ed477a99035d0c1e11369f1d7a4e587893cc002b9163d4a0927291339042908590630944c59490602401602060405180830381865af4158015610f96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fba9190612aee565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b168152600481019490945273ffffffffffffffffffffffffffffffffffffffff928316602485015260448401919091521660648201526000608482015260a40160006040518083038186803b15801561103b57600080fd5b505af415801561104f573d6000803e3d6000fd5b5050604080514281526020810189905233935073ffffffffffffffffffffffffffffffffffffffff8a1692507f7cebb17173a9ed273d2b7538f64395c0ebf352ff743f1cf8ce66b437a6144213910160405180910390a373ffffffffffffffffffffffffffffffffffffffff861660009081526001602052604080822090517f59d556a8000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b906359d556a890602401602060405180830381865af4158015611135573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111599190612a13565b90508181146111b3578673ffffffffffffffffffffffffffffffffffffffff167fa9981ebfc3b766a742486e898f54959b050a66006dbce1a4155c1f84a08bcf41826040516111aa91815260200190565b60405180910390a25b50505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815260409182902080548351818402810184019094528084526060939283018282801561124057602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611215575b50505050509050919050565b6004602052816000526040600020818154811061126857600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169150829050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600260205260409081902090517f6cfa38730000000000000000000000000000000000000000000000000000000081526060918291829173ed477a99035d0c1e11369f1d7a4e587893cc002b91636cfa3873916104ec9160040190815260200190565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604080822090517f6eafa6c3000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b90636eafa6c3906024016105cf565b73ffffffffffffffffffffffffffffffffffffffff82161580159061145e575073ffffffffffffffffffffffffffffffffffffffff82166000908152600260205260409081902090517f6eafa6c3000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b90636eafa6c390602401602060405180830381865af4158015611437573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145b9190612a13565b81105b6114ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f746f6b656e2061646472206e756c6c206f7220747279696e6720746f2072656d60448201527f6f766520746f6f206d616e79207265706f727473000000000000000000000000606482015260840161079d565b60005b818110156115365760008061150185611cbf565b91509150811561151a576115158582612105565b611521565b5050505050565b5050808061152e90612b0b565b9150506114ed565b505050565b611543611ee3565b600081116115d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f7265706f727420657870697279207365636f6e6473206d757374206265203e2060448201527f3000000000000000000000000000000000000000000000000000000000000000606482015260840161079d565b6005548103611664576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f7265706f72744578706972795365636f6e6473206861736e2774206368616e6760448201527f6564000000000000000000000000000000000000000000000000000000000000606482015260840161079d565b60058190556040518181527fc68a9b88effd8a11611ff410efbc83569f0031b7bc70dd455b61344c7f0a042f9060200160405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604080822090517f59d556a8000000000000000000000000000000000000000000000000000000008152829173ed477a99035d0c1e11369f1d7a4e587893cc002b916359d556a8916117189160040190815260200190565b602060405180830381865af4158015611735573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117599190612a13565b61176284611310565b156117775769d3c21bcecceda100000061177a565b60005b91509150915091565b61178b611ee3565b73ffffffffffffffffffffffffffffffffffffffff8216158015906117c5575073ffffffffffffffffffffffffffffffffffffffff811615155b8015611804575073ffffffffffffffffffffffffffffffffffffffff80831660009081526003602090815260408083209385168352929052205460ff16155b6118b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605a60248201527f746f6b656e206164647220776173206e756c6c206f72206f7261636c6520616460448201527f647220776173206e756c6c206f72206f7261636c652061646472206973206e6f60648201527f7420616e206f7261636c6520666f7220746f6b656e2061646472000000000000608482015260a40161079d565b73ffffffffffffffffffffffffffffffffffffffff808316600081815260036020908152604080832094861680845294825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558484526004835281842080549182018155845291832090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001685179055517f828d2be040dede7698182e08dfa8bfbd663c879aee772509c4a2bd961d0ed43f9190a35050565b611989611ee3565b73ffffffffffffffffffffffffffffffffffffffff8116611a2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161079d565b611a35816124c3565b50565b611a40611ee3565b60008111611ad0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f7265706f727420657870697279207365636f6e6473206d757374206265203e2060448201527f3000000000000000000000000000000000000000000000000000000000000000606482015260840161079d565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600660205260409020548103611b84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f746f6b656e207265706f72744578706972795365636f6e6473206861736e277460448201527f206368616e676564000000000000000000000000000000000000000000000000606482015260840161079d565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260066020908152604091829020849055815192835282018390527ff8324c8592dfd9991ee3e717351afe0a964605257959e3d99b0eb3d45bff9422910160405180910390a15050565b60005474010000000000000000000000000000000000000000900460ff1615611c6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f636f6e747261637420616c726561647920696e697469616c697a656400000000604482015260640161079d565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055611cb6336124c3565b611a358161153b565b60008073ffffffffffffffffffffffffffffffffffffffff8316611d3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f746f6b656e20616464726573732063616e6e6f74206265206e756c6c00000000604482015260640161079d565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602052604080822090517fd938ec7b000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b9063d938ec7b90602401602060405180830381865af4158015611dce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df29190612aee565b73ffffffffffffffffffffffffffffffffffffffff85811660009081526002602052604080822090517f7c6bb8620000000000000000000000000000000000000000000000000000000081526004810191909152918316602483015291925073ed477a99035d0c1e11369f1d7a4e587893cc002b90637c6bb86290604401602060405180830381865af4158015611e8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb19190612a13565b9050611ebc85610a22565b611ec68242612a8a565b10611ed75750600194909350915050565b50600094909350915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161079d565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604080822090517f95073a7900000000000000000000000000000000000000000000000000000000815273ed477a99035d0c1e11369f1d7a4e587893cc002b916395073a7991611ff99190869060040191825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b602060405180830381865af4158015612016573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203a9190612acc565b80156120fe575073ffffffffffffffffffffffffffffffffffffffff8381166000908152600260205260409081902090517f95073a790000000000000000000000000000000000000000000000000000000081526004810191909152908316602482015273ed477a99035d0c1e11369f1d7a4e587893cc002b906395073a7990604401602060405180830381865af41580156120da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fe9190612acc565b9392505050565b61210e826109ab565b600114801561212257506121228282611f64565b1561212b575050565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604080822090517f59d556a8000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b906359d556a890602401602060405180830381865af41580156121ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121de9190612a13565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160205260409081902090517fc1e728e900000000000000000000000000000000000000000000000000000000815291925073ed477a99035d0c1e11369f1d7a4e587893cc002b9163c1e728e99161227691869060040191825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60006040518083038186803b15801561228e57600080fd5b505af41580156122a2573d6000803e3d6000fd5b50505073ffffffffffffffffffffffffffffffffffffffff84166000908152600260205260409081902090517fc1e728e900000000000000000000000000000000000000000000000000000000815273ed477a99035d0c1e11369f1d7a4e587893cc002b925063c1e728e99161233b91869060040191825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60006040518083038186803b15801561235357600080fd5b505af4158015612367573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff8086169350861691507fe21a44017b6fa1658d84e937d56ff408501facdb4ff7427c479ac460d76f789390600090a373ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604080822090517f59d556a8000000000000000000000000000000000000000000000000000000008152600481019190915273ed477a99035d0c1e11369f1d7a4e587893cc002b906359d556a890602401602060405180830381865af415801561243f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124639190612a13565b90508181146124bd578373ffffffffffffffffffffffffffffffffffffffff167fa9981ebfc3b766a742486e898f54959b050a66006dbce1a4155c1f84a08bcf41826040516124b491815260200190565b60405180910390a25b50505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff81168114611a3557600080fd5b60006020828403121561256c57600080fd5b81356120fe81612538565b600081518084526020808501945080840160005b838110156125bd57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161258b565b509495945050505050565b6060815260006125db6060830186612577565b82810360208481019190915285518083528682019282019060005b81811015612612578451835293830193918301916001016125f6565b50508481036040860152855180825290820192508186019060005b81811015612681578251600480821061266e577f4e487b71000000000000000000000000000000000000000000000000000000006000526021815260246000fd5b508552938301939183019160010161262d565b509298975050505050505050565b600080604083850312156126a257600080fd5b82356126ad81612538565b915060208301356126bd81612538565b809150509250929050565b6000806000606084860312156126dd57600080fd5b83356126e881612538565b925060208401356126f881612538565b929592945050506040919091013590565b6000806000806080858703121561271f57600080fd5b843561272a81612538565b935060208501359250604085013561274181612538565b9150606085013561275181612538565b939692955090935050565b6020815260006120fe6020830184612577565b6000806040838503121561278257600080fd5b823561278d81612538565b946020939093013593505050565b6000602082840312156127ad57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561282a5761282a6127b4565b604052919050565b600067ffffffffffffffff82111561284c5761284c6127b4565b5060051b60200190565b600082601f83011261286757600080fd5b8151602061287c61287783612832565b6127e3565b82815260059290921b8401810191818101908684111561289b57600080fd5b8286015b848110156128b6578051835291830191830161289f565b509695505050505050565b600082601f8301126128d257600080fd5b815160206128e261287783612832565b82815260059290921b8401810191818101908684111561290157600080fd5b8286015b848110156128b65780516004811061291d5760008081fd5b8352918301918301612905565b60008060006060848603121561293f57600080fd5b835167ffffffffffffffff8082111561295757600080fd5b818601915086601f83011261296b57600080fd5b8151602061297b61287783612832565b82815260059290921b8401810191818101908a84111561299a57600080fd5b948201945b838610156129c15785516129b281612538565b8252948201949082019061299f565b918901519197509093505050808211156129da57600080fd5b6129e687838801612856565b935060408601519150808211156129fc57600080fd5b50612a09868287016128c1565b9150509250925092565b600060208284031215612a2557600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561061057610610612a5b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060208284031215612ade57600080fd5b815180151581146120fe57600080fd5b600060208284031215612b0057600080fd5b81516120fe81612538565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612b3c57612b3c612a5b565b506001019056fea164736f6c6343000813000a" + +func init() { + if err := json.Unmarshal([]byte(SortedOraclesStorageLayoutJSON), SortedOraclesStorageLayout); err != nil { + panic(err) + } + + layouts["SortedOracles"] = SortedOraclesStorageLayout + deployedBytecodes["SortedOracles"] = SortedOraclesDeployedBin +} diff --git a/op-bindings/bindings/uniswapfeehandlerseller.go b/op-bindings/bindings/uniswapfeehandlerseller.go new file mode 100644 index 000000000000..d7df71b82deb --- /dev/null +++ b/op-bindings/bindings/uniswapfeehandlerseller.go @@ -0,0 +1,1758 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "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 ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// UniswapFeeHandlerSellerMetaData contains all meta data concerning the UniswapFeeHandlerSeller contract. +var UniswapFeeHandlerSellerMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"test\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minimumReports\",\"type\":\"uint256\"}],\"name\":\"MinimumReportsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokneAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"}],\"name\":\"ReceivedQuote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"registryAddress\",\"type\":\"address\"}],\"name\":\"RegistrySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"RouterAddressRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"RouterAddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"RouterUsed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"soldTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"boughtTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenSold\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"midPriceNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"midPriceDenominator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSlippage\",\"type\":\"uint256\"}],\"name\":\"calculateMinAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getRoutersForToken\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVersionNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_registryAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokenAddresses\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newMininumReports\",\"type\":\"uint256[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"minimumReports\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contractICeloRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"removeRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sellTokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"buyTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSlippage\",\"type\":\"uint256\"}],\"name\":\"sell\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"newMininumReports\",\"type\":\"uint256\"}],\"name\":\"setMinimumReports\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registryAddress\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60806040523480156200001157600080fd5b5060405162002ad538038062002ad58339810160408190526200003491620000b4565b8080620000413362000064565b806200005b576000805460ff60a01b1916600160a01b1790555b505050620000df565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000c757600080fd5b81518015158114620000d857600080fd5b9392505050565b6129e680620000ef6000396000f3fe6080604052600436106100f75760003560e01c806373f0a0701161008a578063dbba0f0111610059578063dbba0f011461031d578063e4187b131461033d578063f2fde38b1461035d578063ff1d57521461037d57600080fd5b806373f0a070146102605780637b103999146102805780638da5cb5b146102d2578063a91ee0dc146102fd57600080fd5b806341d68b8f116100c657806341d68b8f146101cb5780634e008cdb146101eb57806354255be014610218578063715018a61461024b57600080fd5b80630c2fef1414610103578063158ef93e146101395780632f257aa01461017b57806331de7d151461019d57600080fd5b366100fe57005b600080fd5b34801561010f57600080fd5b5061012361011e366004612444565b61039d565b60405161013091906124b2565b60405180910390f35b34801561014557600080fd5b5060005461016b9074010000000000000000000000000000000000000000900460ff1681565b6040519015158152602001610130565b34801561018757600080fd5b5061019b6101963660046124c5565b6103d4565b005b3480156101a957600080fd5b506101bd6101b83660046124f1565b6103ea565b604051908152602001610130565b3480156101d757600080fd5b5061019b6101e6366004612537565b610c45565b3480156101f757600080fd5b506101bd610206366004612444565b60026020526000908152604090205481565b34801561022457600080fd5b50600180600080604080519485526020850193909352918301526060820152608001610130565b34801561025757600080fd5b5061019b610c57565b34801561026c57600080fd5b5061019b61027b366004612537565b610c6b565b34801561028c57600080fd5b506001546102ad9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610130565b3480156102de57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166102ad565b34801561030957600080fd5b5061019b610318366004612444565b610cf8565b34801561032957600080fd5b5061016b610338366004612570565b610dec565b34801561034957600080fd5b506101bd6103583660046125b2565b610e97565b34801561036957600080fd5b5061019b610378366004612444565b610f1a565b34801561038957600080fd5b5061019b610398366004612630565b610fd1565b73ffffffffffffffffffffffffffffffffffffffff811660009081526003602052604090206060906103ce90611114565b92915050565b6103dc611128565b6103e682826111a9565b5050565b6001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161046d91815260200190565b602060405180830381865afa15801561048a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ae91906126b3565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610547576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f42757920746f6b656e2063616e206f6e6c7920626520676f6c6420746f6b656e60448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516600090815260036020526040812061057590611114565b5111610603576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f726f757465724164647265737365732073686f756c64206265206e6f6e20656d60448201527f7074790000000000000000000000000000000000000000000000000000000000606482015260840161053e565b600061060d611207565b604080516002808252606082018352929350600092839283929190602083019080368337019050509050888160008151811061064b5761064b6126ff565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508381600181518110610699576106996126ff565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060005b73ffffffffffffffffffffffffffffffffffffffff8a16600090815260036020526040902061070490611114565b518110156108a25773ffffffffffffffffffffffffffffffffffffffff8a16600090815260036020526040812061073b90836112d1565b6040517fd06ca61f000000000000000000000000000000000000000000000000000000008152909150819060009073ffffffffffffffffffffffffffffffffffffffff83169063d06ca61f90610797908e90899060040161272e565b600060405180830381865afa1580156107b4573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526107fa9190810190612747565b60018151811061080c5761080c6126ff565b602002602001015190508273ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff167fba55c28acee19777ec6c603117b386d3e3b39886c0d3d53bc244be24ee6e7c848360405161087591815260200190565b60405180910390a38581111561088c578095508196505b505050808061089a90612852565b9150506106d6565b508160000361090d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f43616e27742065786368616e67652077697468207a65726f2071756f74650000604482015260640161053e565b600061091b8a888a876112dd565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152602482018b9052919250908b169063095ea7b3906044016020604051808303816000875af1158015610994573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b8919061288a565b5073ffffffffffffffffffffffffffffffffffffffff84166338ed1739898385306109e46014426128ac565b6040518663ffffffff1660e01b8152600401610a049594939291906128bf565b6000604051808303816000875af1158015610a23573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610a699190810190612747565b506040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa158015610ad7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afb9190612908565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810182905290915073ffffffffffffffffffffffffffffffffffffffff87169063a9059cbb906044016020604051808303816000875af1158015610b71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b95919061288a565b5060405173ffffffffffffffffffffffffffffffffffffffff861681527f59afd9b3bf745a06d8739721397432b9f161243cee13868b9d6d6fca05b6e5519060200160405180910390a16040805173ffffffffffffffffffffffffffffffffffffffff808e1682528c1660208201529081018a90527fd4cffd6979677853b45a7a17f455188a434e975ba474c5a2613c94beacea537a9060600160405180910390a19a9950505050505050505050565b610c4d611128565b6103e68282611733565b610c5f611128565b610c6960006118c7565b565b610c73611128565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260409020610ca2908261193c565b506040805173ffffffffffffffffffffffffffffffffffffffff8085168252831660208201527f044c4b00bcc14b6c00430f73b8bc07f33aecb2387c7b188142d6d497342de89a91015b60405180910390a15050565b610d00611128565b73ffffffffffffffffffffffffffffffffffffffff8116610d7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f43616e6e6f7420726567697374657220746865206e756c6c2061646472657373604482015260640161053e565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b90600090a250565b6000610df6611128565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526024820185905285169063a9059cbb906044016020604051808303816000875af1158015610e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8f919061288a565b949350505050565b600080610ebc8360408051602080820183526000909152815190810190915290815290565b90506000610eca878761195e565b90506000610ed78661199a565b90506000610ee58383611a79565b9050610f0d610f08610f0184610efb8789611a79565b90611a79565b8390611eb0565b611f4e565b9998505050505050505050565b610f22611128565b73ffffffffffffffffffffffffffffffffffffffff8116610fc5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161053e565b610fce816118c7565b50565b60005474010000000000000000000000000000000000000000900460ff1615611056576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f636f6e747261637420616c726561647920696e697469616c697a656400000000604482015260640161053e565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000017905561109e336118c7565b6110a785610cf8565b60005b8381101561110c576110fa8585838181106110c7576110c76126ff565b90506020020160208101906110dc9190612444565b8484848181106110ee576110ee6126ff565b905060200201356111a9565b8061110481612852565b9150506110aa565b505050505050565b6060600061112183611f68565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161053e565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260026020908152604091829020849055815192835282018390527f03cc7dddcb89dd90027bd8fa62d09d1b5c49ce5d20f8c9bb6bdeaaa62ea1718b9101610cec565b6001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed906029015b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161128b91815260200190565b602060405180830381865afa1580156112a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cc91906126b3565b905090565b60006111218383611fc4565b6000806112e8611fee565b73ffffffffffffffffffffffffffffffffffffffff878116600081815260026020526040908190205490517fbbc66a940000000000000000000000000000000000000000000000000000000081526004810192909252929350829184169063bbc66a9490602401602060405180830381865afa15801561136c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113909190612908565b101561141e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4e756d626572206f66207265706f72747320666f7220746f6b656e206e6f742060448201527f656e6f7567680000000000000000000000000000000000000000000000000000606482015260840161053e565b600081156114cf576040517fef90e1b000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152600091829186169063ef90e1b0906024016040805180830381865afa158015611496573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ba9190612921565b915091506114ca82828a8c610e97565b925050505b60006114d9611207565b905060008673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611528573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154c91906126b3565b6040517fe6a4390500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c811660048301528481166024830152919091169063e6a4390590604401602060405180830381865afa1580156115c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e691906126b3565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808316600483015291925060009161171891908d16906370a0823190602401602060405180830381865afa15801561165d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116819190612908565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528616906370a0823190602401602060405180830381865afa1580156116ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117119190612908565b8b8d610e97565b90506117248185612042565b9b9a5050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166117b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f526f757465722063616e27742062652061646472657373207a65726f00000000604482015260640161053e565b73ffffffffffffffffffffffffffffffffffffffff821660009081526003602052604090206117df9082612059565b5073ffffffffffffffffffffffffffffffffffffffff8216600090815260036020819052604090912061181190611114565b51111561187a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d6178206e756d626572206f6620726f75746572732072656163686564000000604482015260640161053e565b6040805173ffffffffffffffffffffffffffffffffffffffff8085168252831660208201527fb3cbb74e835466bdbf8838b1acb70fa4a8b73e1a00cd5bacb9f68cf4dfc79cf39101610cec565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006111218373ffffffffffffffffffffffffffffffffffffffff841661207b565b60408051602081019091526000815260006119788461199a565b905060006119858461199a565b9050611991828261216e565b95945050505050565b6040805160208101909152600081527601357c299a88ea76a58924d52ce4f26a85af186c2b9e74821115611a50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f63616e277420637265617465206669786964697479206e756d626572206c617260448201527f676572207468616e206d61784e65774669786564282900000000000000000000606482015260840161053e565b604051806020016040528069d3c21bcecceda100000084611a719190612945565b905292915050565b60408051602081019091526000815282511580611a9557508151155b15611aaf57506040805160208101909152600081526103ce565b81517fffffffffffffffffffffffffffffffffffffffffffff2c3de43133125f00000001611ade5750816103ce565b82517fffffffffffffffffffffffffffffffffffffffffffff2c3de43133125f00000001611b0d5750806103ce565b600069d3c21bcecceda1000000611b23856122a7565b51611b2e919061295c565b90506000611b3b856122e6565b519050600069d3c21bcecceda1000000611b54866122a7565b51611b5f919061295c565b90506000611b6c866122e6565b5190506000611b7b8386612945565b90508415611bf55782611b8e868361295c565b14611bf5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f77207831793120646574656374656400000000000000000000604482015260640161053e565b6000611c0b69d3c21bcecceda100000083612945565b90508115611c8f5769d3c21bcecceda1000000611c28838361295c565b14611c8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6f766572666c6f772078317931202a2066697865643120646574656374656400604482015260640161053e565b9050806000611c9e8587612945565b90508515611d185784611cb1878361295c565b14611d18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f77207832793120646574656374656400000000000000000000604482015260640161053e565b6000611d248589612945565b90508715611d9e5784611d37898361295c565b14611d9e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f77207831793220646574656374656400000000000000000000604482015260640161053e565b611dad64e8d4a510008861295c565b9650611dbe64e8d4a510008661295c565b94506000611dcc8689612945565b90508715611e465785611ddf898361295c565b14611e46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f77207832793220646574656374656400000000000000000000604482015260640161053e565b6040805160208082018352878252825190810190925284825290611e6b908290612331565b9050611e8581604051806020016040528086815250612331565b9050611e9f81604051806020016040528085815250612331565b9d9c50505050505050505050505050565b604080516020810190915260008152815183511015611f2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f737562737472616374696f6e20756e646572666c6f7720646574656374656400604482015260640161053e565b6040805160208101909152825184518291611f4591612997565b90529392505050565b80516000906103ce9069d3c21bcecceda10000009061295c565b606081600001805480602002602001604051908101604052809291908181526020018280548015611fb857602002820191906000526020600020905b815481526020019060010190808311611fa4575b50505050509050919050565b6000826000018281548110611fdb57611fdb6126ff565b9060005260206000200154905092915050565b6001546040517f536f727465644f7261636c657300000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed90602d01611257565b6000818310156120525781611121565b5090919050565b60006111218373ffffffffffffffffffffffffffffffffffffffff84166123d3565b6000818152600183016020526040812054801561216457600061209f600183612997565b85549091506000906120b390600190612997565b90508181146121185760008660000182815481106120d3576120d36126ff565b90600052602060002001549050808760000184815481106120f6576120f66126ff565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612129576121296129aa565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506103ce565b60009150506103ce565b60408051602081019091526000815281516000036121e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f63616e2774206469766964652062792030000000000000000000000000000000604482015260640161053e565b82516000906122029069d3c21bcecceda100000090612945565b845190915061221b69d3c21bcecceda10000008361295c565b14612282576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6f766572666c6f77206174206469766964650000000000000000000000000000604482015260640161053e565b604051806020016040528084600001518361229d919061295c565b9052949350505050565b604080516020810190915260008152604051806020016040528069d3c21bcecceda10000008085600001516122dc919061295c565b611a719190612945565b604080516020810190915260008152604051806020016040528069d3c21bcecceda100000080856000015161231b919061295c565b6123259190612945565b8451611a719190612997565b60408051602081019091526000815281518351600091612350916128ac565b84519091508110156123be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f616464206f766572666c6f772064657465637465640000000000000000000000604482015260640161053e565b60408051602081019091529081529392505050565b600081815260018301602052604081205461241a575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556103ce565b5060006103ce565b73ffffffffffffffffffffffffffffffffffffffff81168114610fce57600080fd5b60006020828403121561245657600080fd5b813561112181612422565b600081518084526020808501945080840160005b838110156124a757815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101612475565b509495945050505050565b6020815260006111216020830184612461565b600080604083850312156124d857600080fd5b82356124e381612422565b946020939093013593505050565b6000806000806080858703121561250757600080fd5b843561251281612422565b9350602085013561252281612422565b93969395505050506040820135916060013590565b6000806040838503121561254a57600080fd5b823561255581612422565b9150602083013561256581612422565b809150509250929050565b60008060006060848603121561258557600080fd5b833561259081612422565b92506020840135915060408401356125a781612422565b809150509250925092565b600080600080608085870312156125c857600080fd5b5050823594602084013594506040840135936060013592509050565b60008083601f8401126125f657600080fd5b50813567ffffffffffffffff81111561260e57600080fd5b6020830191508360208260051b850101111561262957600080fd5b9250929050565b60008060008060006060868803121561264857600080fd5b853561265381612422565b9450602086013567ffffffffffffffff8082111561267057600080fd5b61267c89838a016125e4565b9096509450604088013591508082111561269557600080fd5b506126a2888289016125e4565b969995985093965092949392505050565b6000602082840312156126c557600080fd5b815161112181612422565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b828152604060208201526000610e8f6040830184612461565b6000602080838503121561275a57600080fd5b825167ffffffffffffffff8082111561277257600080fd5b818501915085601f83011261278657600080fd5b815181811115612798576127986126d0565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811085821117156127db576127db6126d0565b6040529182528482019250838101850191888311156127f957600080fd5b938501935b82851015612817578451845293850193928501926127fe565b98975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361288357612883612823565b5060010190565b60006020828403121561289c57600080fd5b8151801515811461112157600080fd5b808201808211156103ce576103ce612823565b85815284602082015260a0604082015260006128de60a0830186612461565b73ffffffffffffffffffffffffffffffffffffffff94909416606083015250608001529392505050565b60006020828403121561291a57600080fd5b5051919050565b6000806040838503121561293457600080fd5b505080516020909101519092909150565b80820281158282048414176103ce576103ce612823565b600082612992577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b818103818111156103ce576103ce612823565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a", +} + +// UniswapFeeHandlerSellerABI is the input ABI used to generate the binding from. +// Deprecated: Use UniswapFeeHandlerSellerMetaData.ABI instead. +var UniswapFeeHandlerSellerABI = UniswapFeeHandlerSellerMetaData.ABI + +// UniswapFeeHandlerSellerBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use UniswapFeeHandlerSellerMetaData.Bin instead. +var UniswapFeeHandlerSellerBin = UniswapFeeHandlerSellerMetaData.Bin + +// DeployUniswapFeeHandlerSeller deploys a new Ethereum contract, binding an instance of UniswapFeeHandlerSeller to it. +func DeployUniswapFeeHandlerSeller(auth *bind.TransactOpts, backend bind.ContractBackend, test bool) (common.Address, *types.Transaction, *UniswapFeeHandlerSeller, error) { + parsed, err := UniswapFeeHandlerSellerMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(UniswapFeeHandlerSellerBin), backend, test) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &UniswapFeeHandlerSeller{UniswapFeeHandlerSellerCaller: UniswapFeeHandlerSellerCaller{contract: contract}, UniswapFeeHandlerSellerTransactor: UniswapFeeHandlerSellerTransactor{contract: contract}, UniswapFeeHandlerSellerFilterer: UniswapFeeHandlerSellerFilterer{contract: contract}}, nil +} + +// UniswapFeeHandlerSeller is an auto generated Go binding around an Ethereum contract. +type UniswapFeeHandlerSeller struct { + UniswapFeeHandlerSellerCaller // Read-only binding to the contract + UniswapFeeHandlerSellerTransactor // Write-only binding to the contract + UniswapFeeHandlerSellerFilterer // Log filterer for contract events +} + +// UniswapFeeHandlerSellerCaller is an auto generated read-only Go binding around an Ethereum contract. +type UniswapFeeHandlerSellerCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapFeeHandlerSellerTransactor is an auto generated write-only Go binding around an Ethereum contract. +type UniswapFeeHandlerSellerTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapFeeHandlerSellerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UniswapFeeHandlerSellerFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UniswapFeeHandlerSellerSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type UniswapFeeHandlerSellerSession struct { + Contract *UniswapFeeHandlerSeller // 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 +} + +// UniswapFeeHandlerSellerCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type UniswapFeeHandlerSellerCallerSession struct { + Contract *UniswapFeeHandlerSellerCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// UniswapFeeHandlerSellerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type UniswapFeeHandlerSellerTransactorSession struct { + Contract *UniswapFeeHandlerSellerTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UniswapFeeHandlerSellerRaw is an auto generated low-level Go binding around an Ethereum contract. +type UniswapFeeHandlerSellerRaw struct { + Contract *UniswapFeeHandlerSeller // Generic contract binding to access the raw methods on +} + +// UniswapFeeHandlerSellerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UniswapFeeHandlerSellerCallerRaw struct { + Contract *UniswapFeeHandlerSellerCaller // Generic read-only contract binding to access the raw methods on +} + +// UniswapFeeHandlerSellerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UniswapFeeHandlerSellerTransactorRaw struct { + Contract *UniswapFeeHandlerSellerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewUniswapFeeHandlerSeller creates a new instance of UniswapFeeHandlerSeller, bound to a specific deployed contract. +func NewUniswapFeeHandlerSeller(address common.Address, backend bind.ContractBackend) (*UniswapFeeHandlerSeller, error) { + contract, err := bindUniswapFeeHandlerSeller(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &UniswapFeeHandlerSeller{UniswapFeeHandlerSellerCaller: UniswapFeeHandlerSellerCaller{contract: contract}, UniswapFeeHandlerSellerTransactor: UniswapFeeHandlerSellerTransactor{contract: contract}, UniswapFeeHandlerSellerFilterer: UniswapFeeHandlerSellerFilterer{contract: contract}}, nil +} + +// NewUniswapFeeHandlerSellerCaller creates a new read-only instance of UniswapFeeHandlerSeller, bound to a specific deployed contract. +func NewUniswapFeeHandlerSellerCaller(address common.Address, caller bind.ContractCaller) (*UniswapFeeHandlerSellerCaller, error) { + contract, err := bindUniswapFeeHandlerSeller(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UniswapFeeHandlerSellerCaller{contract: contract}, nil +} + +// NewUniswapFeeHandlerSellerTransactor creates a new write-only instance of UniswapFeeHandlerSeller, bound to a specific deployed contract. +func NewUniswapFeeHandlerSellerTransactor(address common.Address, transactor bind.ContractTransactor) (*UniswapFeeHandlerSellerTransactor, error) { + contract, err := bindUniswapFeeHandlerSeller(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UniswapFeeHandlerSellerTransactor{contract: contract}, nil +} + +// NewUniswapFeeHandlerSellerFilterer creates a new log filterer instance of UniswapFeeHandlerSeller, bound to a specific deployed contract. +func NewUniswapFeeHandlerSellerFilterer(address common.Address, filterer bind.ContractFilterer) (*UniswapFeeHandlerSellerFilterer, error) { + contract, err := bindUniswapFeeHandlerSeller(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UniswapFeeHandlerSellerFilterer{contract: contract}, nil +} + +// bindUniswapFeeHandlerSeller binds a generic wrapper to an already deployed contract. +func bindUniswapFeeHandlerSeller(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(UniswapFeeHandlerSellerABI)) + 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 (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapFeeHandlerSeller.Contract.UniswapFeeHandlerSellerCaller.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 (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.UniswapFeeHandlerSellerTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.UniswapFeeHandlerSellerTransactor.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 (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UniswapFeeHandlerSeller.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 (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.contract.Transact(opts, method, params...) +} + +// CalculateMinAmount is a free data retrieval call binding the contract method 0xe4187b13. +// +// Solidity: function calculateMinAmount(uint256 midPriceNumerator, uint256 midPriceDenominator, uint256 amount, uint256 maxSlippage) pure returns(uint256) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCaller) CalculateMinAmount(opts *bind.CallOpts, midPriceNumerator *big.Int, midPriceDenominator *big.Int, amount *big.Int, maxSlippage *big.Int) (*big.Int, error) { + var out []interface{} + err := _UniswapFeeHandlerSeller.contract.Call(opts, &out, "calculateMinAmount", midPriceNumerator, midPriceDenominator, amount, maxSlippage) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CalculateMinAmount is a free data retrieval call binding the contract method 0xe4187b13. +// +// Solidity: function calculateMinAmount(uint256 midPriceNumerator, uint256 midPriceDenominator, uint256 amount, uint256 maxSlippage) pure returns(uint256) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) CalculateMinAmount(midPriceNumerator *big.Int, midPriceDenominator *big.Int, amount *big.Int, maxSlippage *big.Int) (*big.Int, error) { + return _UniswapFeeHandlerSeller.Contract.CalculateMinAmount(&_UniswapFeeHandlerSeller.CallOpts, midPriceNumerator, midPriceDenominator, amount, maxSlippage) +} + +// CalculateMinAmount is a free data retrieval call binding the contract method 0xe4187b13. +// +// Solidity: function calculateMinAmount(uint256 midPriceNumerator, uint256 midPriceDenominator, uint256 amount, uint256 maxSlippage) pure returns(uint256) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCallerSession) CalculateMinAmount(midPriceNumerator *big.Int, midPriceDenominator *big.Int, amount *big.Int, maxSlippage *big.Int) (*big.Int, error) { + return _UniswapFeeHandlerSeller.Contract.CalculateMinAmount(&_UniswapFeeHandlerSeller.CallOpts, midPriceNumerator, midPriceDenominator, amount, maxSlippage) +} + +// GetRoutersForToken is a free data retrieval call binding the contract method 0x0c2fef14. +// +// Solidity: function getRoutersForToken(address token) view returns(address[]) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCaller) GetRoutersForToken(opts *bind.CallOpts, token common.Address) ([]common.Address, error) { + var out []interface{} + err := _UniswapFeeHandlerSeller.contract.Call(opts, &out, "getRoutersForToken", token) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetRoutersForToken is a free data retrieval call binding the contract method 0x0c2fef14. +// +// Solidity: function getRoutersForToken(address token) view returns(address[]) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) GetRoutersForToken(token common.Address) ([]common.Address, error) { + return _UniswapFeeHandlerSeller.Contract.GetRoutersForToken(&_UniswapFeeHandlerSeller.CallOpts, token) +} + +// GetRoutersForToken is a free data retrieval call binding the contract method 0x0c2fef14. +// +// Solidity: function getRoutersForToken(address token) view returns(address[]) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCallerSession) GetRoutersForToken(token common.Address) ([]common.Address, error) { + return _UniswapFeeHandlerSeller.Contract.GetRoutersForToken(&_UniswapFeeHandlerSeller.CallOpts, token) +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCaller) GetVersionNumber(opts *bind.CallOpts) (*big.Int, *big.Int, *big.Int, *big.Int, error) { + var out []interface{} + err := _UniswapFeeHandlerSeller.contract.Call(opts, &out, "getVersionNumber") + + if err != nil { + return *new(*big.Int), *new(*big.Int), *new(*big.Int), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + out2 := *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + out3 := *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + + return out0, out1, out2, out3, err + +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) GetVersionNumber() (*big.Int, *big.Int, *big.Int, *big.Int, error) { + return _UniswapFeeHandlerSeller.Contract.GetVersionNumber(&_UniswapFeeHandlerSeller.CallOpts) +} + +// GetVersionNumber is a free data retrieval call binding the contract method 0x54255be0. +// +// Solidity: function getVersionNumber() pure returns(uint256, uint256, uint256, uint256) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCallerSession) GetVersionNumber() (*big.Int, *big.Int, *big.Int, *big.Int, error) { + return _UniswapFeeHandlerSeller.Contract.GetVersionNumber(&_UniswapFeeHandlerSeller.CallOpts) +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCaller) Initialized(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _UniswapFeeHandlerSeller.contract.Call(opts, &out, "initialized") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) Initialized() (bool, error) { + return _UniswapFeeHandlerSeller.Contract.Initialized(&_UniswapFeeHandlerSeller.CallOpts) +} + +// Initialized is a free data retrieval call binding the contract method 0x158ef93e. +// +// Solidity: function initialized() view returns(bool) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCallerSession) Initialized() (bool, error) { + return _UniswapFeeHandlerSeller.Contract.Initialized(&_UniswapFeeHandlerSeller.CallOpts) +} + +// MinimumReports is a free data retrieval call binding the contract method 0x4e008cdb. +// +// Solidity: function minimumReports(address ) view returns(uint256) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCaller) MinimumReports(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _UniswapFeeHandlerSeller.contract.Call(opts, &out, "minimumReports", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinimumReports is a free data retrieval call binding the contract method 0x4e008cdb. +// +// Solidity: function minimumReports(address ) view returns(uint256) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) MinimumReports(arg0 common.Address) (*big.Int, error) { + return _UniswapFeeHandlerSeller.Contract.MinimumReports(&_UniswapFeeHandlerSeller.CallOpts, arg0) +} + +// MinimumReports is a free data retrieval call binding the contract method 0x4e008cdb. +// +// Solidity: function minimumReports(address ) view returns(uint256) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCallerSession) MinimumReports(arg0 common.Address) (*big.Int, error) { + return _UniswapFeeHandlerSeller.Contract.MinimumReports(&_UniswapFeeHandlerSeller.CallOpts, arg0) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _UniswapFeeHandlerSeller.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) Owner() (common.Address, error) { + return _UniswapFeeHandlerSeller.Contract.Owner(&_UniswapFeeHandlerSeller.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCallerSession) Owner() (common.Address, error) { + return _UniswapFeeHandlerSeller.Contract.Owner(&_UniswapFeeHandlerSeller.CallOpts) +} + +// Registry is a free data retrieval call binding the contract method 0x7b103999. +// +// Solidity: function registry() view returns(address) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCaller) Registry(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _UniswapFeeHandlerSeller.contract.Call(opts, &out, "registry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Registry is a free data retrieval call binding the contract method 0x7b103999. +// +// Solidity: function registry() view returns(address) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) Registry() (common.Address, error) { + return _UniswapFeeHandlerSeller.Contract.Registry(&_UniswapFeeHandlerSeller.CallOpts) +} + +// Registry is a free data retrieval call binding the contract method 0x7b103999. +// +// Solidity: function registry() view returns(address) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerCallerSession) Registry() (common.Address, error) { + return _UniswapFeeHandlerSeller.Contract.Registry(&_UniswapFeeHandlerSeller.CallOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0xff1d5752. +// +// Solidity: function initialize(address _registryAddress, address[] tokenAddresses, uint256[] newMininumReports) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactor) Initialize(opts *bind.TransactOpts, _registryAddress common.Address, tokenAddresses []common.Address, newMininumReports []*big.Int) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.contract.Transact(opts, "initialize", _registryAddress, tokenAddresses, newMininumReports) +} + +// Initialize is a paid mutator transaction binding the contract method 0xff1d5752. +// +// Solidity: function initialize(address _registryAddress, address[] tokenAddresses, uint256[] newMininumReports) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) Initialize(_registryAddress common.Address, tokenAddresses []common.Address, newMininumReports []*big.Int) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.Initialize(&_UniswapFeeHandlerSeller.TransactOpts, _registryAddress, tokenAddresses, newMininumReports) +} + +// Initialize is a paid mutator transaction binding the contract method 0xff1d5752. +// +// Solidity: function initialize(address _registryAddress, address[] tokenAddresses, uint256[] newMininumReports) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactorSession) Initialize(_registryAddress common.Address, tokenAddresses []common.Address, newMininumReports []*big.Int) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.Initialize(&_UniswapFeeHandlerSeller.TransactOpts, _registryAddress, tokenAddresses, newMininumReports) +} + +// RemoveRouter is a paid mutator transaction binding the contract method 0x73f0a070. +// +// Solidity: function removeRouter(address token, address router) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactor) RemoveRouter(opts *bind.TransactOpts, token common.Address, router common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.contract.Transact(opts, "removeRouter", token, router) +} + +// RemoveRouter is a paid mutator transaction binding the contract method 0x73f0a070. +// +// Solidity: function removeRouter(address token, address router) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) RemoveRouter(token common.Address, router common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.RemoveRouter(&_UniswapFeeHandlerSeller.TransactOpts, token, router) +} + +// RemoveRouter is a paid mutator transaction binding the contract method 0x73f0a070. +// +// Solidity: function removeRouter(address token, address router) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactorSession) RemoveRouter(token common.Address, router common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.RemoveRouter(&_UniswapFeeHandlerSeller.TransactOpts, token, router) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) RenounceOwnership() (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.RenounceOwnership(&_UniswapFeeHandlerSeller.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.RenounceOwnership(&_UniswapFeeHandlerSeller.TransactOpts) +} + +// Sell is a paid mutator transaction binding the contract method 0x31de7d15. +// +// Solidity: function sell(address sellTokenAddress, address buyTokenAddress, uint256 amount, uint256 maxSlippage) returns(uint256) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactor) Sell(opts *bind.TransactOpts, sellTokenAddress common.Address, buyTokenAddress common.Address, amount *big.Int, maxSlippage *big.Int) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.contract.Transact(opts, "sell", sellTokenAddress, buyTokenAddress, amount, maxSlippage) +} + +// Sell is a paid mutator transaction binding the contract method 0x31de7d15. +// +// Solidity: function sell(address sellTokenAddress, address buyTokenAddress, uint256 amount, uint256 maxSlippage) returns(uint256) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) Sell(sellTokenAddress common.Address, buyTokenAddress common.Address, amount *big.Int, maxSlippage *big.Int) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.Sell(&_UniswapFeeHandlerSeller.TransactOpts, sellTokenAddress, buyTokenAddress, amount, maxSlippage) +} + +// Sell is a paid mutator transaction binding the contract method 0x31de7d15. +// +// Solidity: function sell(address sellTokenAddress, address buyTokenAddress, uint256 amount, uint256 maxSlippage) returns(uint256) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactorSession) Sell(sellTokenAddress common.Address, buyTokenAddress common.Address, amount *big.Int, maxSlippage *big.Int) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.Sell(&_UniswapFeeHandlerSeller.TransactOpts, sellTokenAddress, buyTokenAddress, amount, maxSlippage) +} + +// SetMinimumReports is a paid mutator transaction binding the contract method 0x2f257aa0. +// +// Solidity: function setMinimumReports(address tokenAddress, uint256 newMininumReports) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactor) SetMinimumReports(opts *bind.TransactOpts, tokenAddress common.Address, newMininumReports *big.Int) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.contract.Transact(opts, "setMinimumReports", tokenAddress, newMininumReports) +} + +// SetMinimumReports is a paid mutator transaction binding the contract method 0x2f257aa0. +// +// Solidity: function setMinimumReports(address tokenAddress, uint256 newMininumReports) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) SetMinimumReports(tokenAddress common.Address, newMininumReports *big.Int) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.SetMinimumReports(&_UniswapFeeHandlerSeller.TransactOpts, tokenAddress, newMininumReports) +} + +// SetMinimumReports is a paid mutator transaction binding the contract method 0x2f257aa0. +// +// Solidity: function setMinimumReports(address tokenAddress, uint256 newMininumReports) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactorSession) SetMinimumReports(tokenAddress common.Address, newMininumReports *big.Int) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.SetMinimumReports(&_UniswapFeeHandlerSeller.TransactOpts, tokenAddress, newMininumReports) +} + +// SetRegistry is a paid mutator transaction binding the contract method 0xa91ee0dc. +// +// Solidity: function setRegistry(address registryAddress) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactor) SetRegistry(opts *bind.TransactOpts, registryAddress common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.contract.Transact(opts, "setRegistry", registryAddress) +} + +// SetRegistry is a paid mutator transaction binding the contract method 0xa91ee0dc. +// +// Solidity: function setRegistry(address registryAddress) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) SetRegistry(registryAddress common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.SetRegistry(&_UniswapFeeHandlerSeller.TransactOpts, registryAddress) +} + +// SetRegistry is a paid mutator transaction binding the contract method 0xa91ee0dc. +// +// Solidity: function setRegistry(address registryAddress) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactorSession) SetRegistry(registryAddress common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.SetRegistry(&_UniswapFeeHandlerSeller.TransactOpts, registryAddress) +} + +// SetRouter is a paid mutator transaction binding the contract method 0x41d68b8f. +// +// Solidity: function setRouter(address token, address router) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactor) SetRouter(opts *bind.TransactOpts, token common.Address, router common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.contract.Transact(opts, "setRouter", token, router) +} + +// SetRouter is a paid mutator transaction binding the contract method 0x41d68b8f. +// +// Solidity: function setRouter(address token, address router) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) SetRouter(token common.Address, router common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.SetRouter(&_UniswapFeeHandlerSeller.TransactOpts, token, router) +} + +// SetRouter is a paid mutator transaction binding the contract method 0x41d68b8f. +// +// Solidity: function setRouter(address token, address router) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactorSession) SetRouter(token common.Address, router common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.SetRouter(&_UniswapFeeHandlerSeller.TransactOpts, token, router) +} + +// Transfer is a paid mutator transaction binding the contract method 0xdbba0f01. +// +// Solidity: function transfer(address token, uint256 amount, address to) returns(bool) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactor) Transfer(opts *bind.TransactOpts, token common.Address, amount *big.Int, to common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.contract.Transact(opts, "transfer", token, amount, to) +} + +// Transfer is a paid mutator transaction binding the contract method 0xdbba0f01. +// +// Solidity: function transfer(address token, uint256 amount, address to) returns(bool) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) Transfer(token common.Address, amount *big.Int, to common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.Transfer(&_UniswapFeeHandlerSeller.TransactOpts, token, amount, to) +} + +// Transfer is a paid mutator transaction binding the contract method 0xdbba0f01. +// +// Solidity: function transfer(address token, uint256 amount, address to) returns(bool) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactorSession) Transfer(token common.Address, amount *big.Int, to common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.Transfer(&_UniswapFeeHandlerSeller.TransactOpts, token, amount, to) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.TransferOwnership(&_UniswapFeeHandlerSeller.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.TransferOwnership(&_UniswapFeeHandlerSeller.TransactOpts, newOwner) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerSession) Receive() (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.Receive(&_UniswapFeeHandlerSeller.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerTransactorSession) Receive() (*types.Transaction, error) { + return _UniswapFeeHandlerSeller.Contract.Receive(&_UniswapFeeHandlerSeller.TransactOpts) +} + +// UniswapFeeHandlerSellerMinimumReportsSetIterator is returned from FilterMinimumReportsSet and is used to iterate over the raw logs and unpacked data for MinimumReportsSet events raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerMinimumReportsSetIterator struct { + Event *UniswapFeeHandlerSellerMinimumReportsSet // 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 *UniswapFeeHandlerSellerMinimumReportsSetIterator) 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(UniswapFeeHandlerSellerMinimumReportsSet) + 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(UniswapFeeHandlerSellerMinimumReportsSet) + 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 *UniswapFeeHandlerSellerMinimumReportsSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapFeeHandlerSellerMinimumReportsSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapFeeHandlerSellerMinimumReportsSet represents a MinimumReportsSet event raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerMinimumReportsSet struct { + TokenAddress common.Address + MinimumReports *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinimumReportsSet is a free log retrieval operation binding the contract event 0x03cc7dddcb89dd90027bd8fa62d09d1b5c49ce5d20f8c9bb6bdeaaa62ea1718b. +// +// Solidity: event MinimumReportsSet(address tokenAddress, uint256 minimumReports) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) FilterMinimumReportsSet(opts *bind.FilterOpts) (*UniswapFeeHandlerSellerMinimumReportsSetIterator, error) { + + logs, sub, err := _UniswapFeeHandlerSeller.contract.FilterLogs(opts, "MinimumReportsSet") + if err != nil { + return nil, err + } + return &UniswapFeeHandlerSellerMinimumReportsSetIterator{contract: _UniswapFeeHandlerSeller.contract, event: "MinimumReportsSet", logs: logs, sub: sub}, nil +} + +// WatchMinimumReportsSet is a free log subscription operation binding the contract event 0x03cc7dddcb89dd90027bd8fa62d09d1b5c49ce5d20f8c9bb6bdeaaa62ea1718b. +// +// Solidity: event MinimumReportsSet(address tokenAddress, uint256 minimumReports) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) WatchMinimumReportsSet(opts *bind.WatchOpts, sink chan<- *UniswapFeeHandlerSellerMinimumReportsSet) (event.Subscription, error) { + + logs, sub, err := _UniswapFeeHandlerSeller.contract.WatchLogs(opts, "MinimumReportsSet") + 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(UniswapFeeHandlerSellerMinimumReportsSet) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "MinimumReportsSet", 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 +} + +// ParseMinimumReportsSet is a log parse operation binding the contract event 0x03cc7dddcb89dd90027bd8fa62d09d1b5c49ce5d20f8c9bb6bdeaaa62ea1718b. +// +// Solidity: event MinimumReportsSet(address tokenAddress, uint256 minimumReports) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) ParseMinimumReportsSet(log types.Log) (*UniswapFeeHandlerSellerMinimumReportsSet, error) { + event := new(UniswapFeeHandlerSellerMinimumReportsSet) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "MinimumReportsSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UniswapFeeHandlerSellerOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerOwnershipTransferredIterator struct { + Event *UniswapFeeHandlerSellerOwnershipTransferred // 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 *UniswapFeeHandlerSellerOwnershipTransferredIterator) 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(UniswapFeeHandlerSellerOwnershipTransferred) + 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(UniswapFeeHandlerSellerOwnershipTransferred) + 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 *UniswapFeeHandlerSellerOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapFeeHandlerSellerOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapFeeHandlerSellerOwnershipTransferred represents a OwnershipTransferred event raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*UniswapFeeHandlerSellerOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _UniswapFeeHandlerSeller.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &UniswapFeeHandlerSellerOwnershipTransferredIterator{contract: _UniswapFeeHandlerSeller.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *UniswapFeeHandlerSellerOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _UniswapFeeHandlerSeller.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + 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(UniswapFeeHandlerSellerOwnershipTransferred) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "OwnershipTransferred", 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 +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) ParseOwnershipTransferred(log types.Log) (*UniswapFeeHandlerSellerOwnershipTransferred, error) { + event := new(UniswapFeeHandlerSellerOwnershipTransferred) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UniswapFeeHandlerSellerReceivedQuoteIterator is returned from FilterReceivedQuote and is used to iterate over the raw logs and unpacked data for ReceivedQuote events raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerReceivedQuoteIterator struct { + Event *UniswapFeeHandlerSellerReceivedQuote // 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 *UniswapFeeHandlerSellerReceivedQuoteIterator) 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(UniswapFeeHandlerSellerReceivedQuote) + 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(UniswapFeeHandlerSellerReceivedQuote) + 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 *UniswapFeeHandlerSellerReceivedQuoteIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapFeeHandlerSellerReceivedQuoteIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapFeeHandlerSellerReceivedQuote represents a ReceivedQuote event raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerReceivedQuote struct { + TokneAddress common.Address + Router common.Address + Quote *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReceivedQuote is a free log retrieval operation binding the contract event 0xba55c28acee19777ec6c603117b386d3e3b39886c0d3d53bc244be24ee6e7c84. +// +// Solidity: event ReceivedQuote(address indexed tokneAddress, address indexed router, uint256 quote) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) FilterReceivedQuote(opts *bind.FilterOpts, tokneAddress []common.Address, router []common.Address) (*UniswapFeeHandlerSellerReceivedQuoteIterator, error) { + + var tokneAddressRule []interface{} + for _, tokneAddressItem := range tokneAddress { + tokneAddressRule = append(tokneAddressRule, tokneAddressItem) + } + var routerRule []interface{} + for _, routerItem := range router { + routerRule = append(routerRule, routerItem) + } + + logs, sub, err := _UniswapFeeHandlerSeller.contract.FilterLogs(opts, "ReceivedQuote", tokneAddressRule, routerRule) + if err != nil { + return nil, err + } + return &UniswapFeeHandlerSellerReceivedQuoteIterator{contract: _UniswapFeeHandlerSeller.contract, event: "ReceivedQuote", logs: logs, sub: sub}, nil +} + +// WatchReceivedQuote is a free log subscription operation binding the contract event 0xba55c28acee19777ec6c603117b386d3e3b39886c0d3d53bc244be24ee6e7c84. +// +// Solidity: event ReceivedQuote(address indexed tokneAddress, address indexed router, uint256 quote) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) WatchReceivedQuote(opts *bind.WatchOpts, sink chan<- *UniswapFeeHandlerSellerReceivedQuote, tokneAddress []common.Address, router []common.Address) (event.Subscription, error) { + + var tokneAddressRule []interface{} + for _, tokneAddressItem := range tokneAddress { + tokneAddressRule = append(tokneAddressRule, tokneAddressItem) + } + var routerRule []interface{} + for _, routerItem := range router { + routerRule = append(routerRule, routerItem) + } + + logs, sub, err := _UniswapFeeHandlerSeller.contract.WatchLogs(opts, "ReceivedQuote", tokneAddressRule, routerRule) + 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(UniswapFeeHandlerSellerReceivedQuote) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "ReceivedQuote", 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 +} + +// ParseReceivedQuote is a log parse operation binding the contract event 0xba55c28acee19777ec6c603117b386d3e3b39886c0d3d53bc244be24ee6e7c84. +// +// Solidity: event ReceivedQuote(address indexed tokneAddress, address indexed router, uint256 quote) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) ParseReceivedQuote(log types.Log) (*UniswapFeeHandlerSellerReceivedQuote, error) { + event := new(UniswapFeeHandlerSellerReceivedQuote) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "ReceivedQuote", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UniswapFeeHandlerSellerRegistrySetIterator is returned from FilterRegistrySet and is used to iterate over the raw logs and unpacked data for RegistrySet events raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerRegistrySetIterator struct { + Event *UniswapFeeHandlerSellerRegistrySet // 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 *UniswapFeeHandlerSellerRegistrySetIterator) 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(UniswapFeeHandlerSellerRegistrySet) + 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(UniswapFeeHandlerSellerRegistrySet) + 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 *UniswapFeeHandlerSellerRegistrySetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapFeeHandlerSellerRegistrySetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapFeeHandlerSellerRegistrySet represents a RegistrySet event raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerRegistrySet struct { + RegistryAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRegistrySet is a free log retrieval operation binding the contract event 0x27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b. +// +// Solidity: event RegistrySet(address indexed registryAddress) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) FilterRegistrySet(opts *bind.FilterOpts, registryAddress []common.Address) (*UniswapFeeHandlerSellerRegistrySetIterator, error) { + + var registryAddressRule []interface{} + for _, registryAddressItem := range registryAddress { + registryAddressRule = append(registryAddressRule, registryAddressItem) + } + + logs, sub, err := _UniswapFeeHandlerSeller.contract.FilterLogs(opts, "RegistrySet", registryAddressRule) + if err != nil { + return nil, err + } + return &UniswapFeeHandlerSellerRegistrySetIterator{contract: _UniswapFeeHandlerSeller.contract, event: "RegistrySet", logs: logs, sub: sub}, nil +} + +// WatchRegistrySet is a free log subscription operation binding the contract event 0x27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b. +// +// Solidity: event RegistrySet(address indexed registryAddress) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) WatchRegistrySet(opts *bind.WatchOpts, sink chan<- *UniswapFeeHandlerSellerRegistrySet, registryAddress []common.Address) (event.Subscription, error) { + + var registryAddressRule []interface{} + for _, registryAddressItem := range registryAddress { + registryAddressRule = append(registryAddressRule, registryAddressItem) + } + + logs, sub, err := _UniswapFeeHandlerSeller.contract.WatchLogs(opts, "RegistrySet", registryAddressRule) + 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(UniswapFeeHandlerSellerRegistrySet) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "RegistrySet", 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 +} + +// ParseRegistrySet is a log parse operation binding the contract event 0x27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b. +// +// Solidity: event RegistrySet(address indexed registryAddress) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) ParseRegistrySet(log types.Log) (*UniswapFeeHandlerSellerRegistrySet, error) { + event := new(UniswapFeeHandlerSellerRegistrySet) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "RegistrySet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UniswapFeeHandlerSellerRouterAddressRemovedIterator is returned from FilterRouterAddressRemoved and is used to iterate over the raw logs and unpacked data for RouterAddressRemoved events raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerRouterAddressRemovedIterator struct { + Event *UniswapFeeHandlerSellerRouterAddressRemoved // 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 *UniswapFeeHandlerSellerRouterAddressRemovedIterator) 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(UniswapFeeHandlerSellerRouterAddressRemoved) + 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(UniswapFeeHandlerSellerRouterAddressRemoved) + 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 *UniswapFeeHandlerSellerRouterAddressRemovedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapFeeHandlerSellerRouterAddressRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapFeeHandlerSellerRouterAddressRemoved represents a RouterAddressRemoved event raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerRouterAddressRemoved struct { + Token common.Address + Router common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRouterAddressRemoved is a free log retrieval operation binding the contract event 0x044c4b00bcc14b6c00430f73b8bc07f33aecb2387c7b188142d6d497342de89a. +// +// Solidity: event RouterAddressRemoved(address token, address router) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) FilterRouterAddressRemoved(opts *bind.FilterOpts) (*UniswapFeeHandlerSellerRouterAddressRemovedIterator, error) { + + logs, sub, err := _UniswapFeeHandlerSeller.contract.FilterLogs(opts, "RouterAddressRemoved") + if err != nil { + return nil, err + } + return &UniswapFeeHandlerSellerRouterAddressRemovedIterator{contract: _UniswapFeeHandlerSeller.contract, event: "RouterAddressRemoved", logs: logs, sub: sub}, nil +} + +// WatchRouterAddressRemoved is a free log subscription operation binding the contract event 0x044c4b00bcc14b6c00430f73b8bc07f33aecb2387c7b188142d6d497342de89a. +// +// Solidity: event RouterAddressRemoved(address token, address router) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) WatchRouterAddressRemoved(opts *bind.WatchOpts, sink chan<- *UniswapFeeHandlerSellerRouterAddressRemoved) (event.Subscription, error) { + + logs, sub, err := _UniswapFeeHandlerSeller.contract.WatchLogs(opts, "RouterAddressRemoved") + 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(UniswapFeeHandlerSellerRouterAddressRemoved) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "RouterAddressRemoved", 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 +} + +// ParseRouterAddressRemoved is a log parse operation binding the contract event 0x044c4b00bcc14b6c00430f73b8bc07f33aecb2387c7b188142d6d497342de89a. +// +// Solidity: event RouterAddressRemoved(address token, address router) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) ParseRouterAddressRemoved(log types.Log) (*UniswapFeeHandlerSellerRouterAddressRemoved, error) { + event := new(UniswapFeeHandlerSellerRouterAddressRemoved) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "RouterAddressRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UniswapFeeHandlerSellerRouterAddressSetIterator is returned from FilterRouterAddressSet and is used to iterate over the raw logs and unpacked data for RouterAddressSet events raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerRouterAddressSetIterator struct { + Event *UniswapFeeHandlerSellerRouterAddressSet // 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 *UniswapFeeHandlerSellerRouterAddressSetIterator) 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(UniswapFeeHandlerSellerRouterAddressSet) + 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(UniswapFeeHandlerSellerRouterAddressSet) + 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 *UniswapFeeHandlerSellerRouterAddressSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapFeeHandlerSellerRouterAddressSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapFeeHandlerSellerRouterAddressSet represents a RouterAddressSet event raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerRouterAddressSet struct { + Token common.Address + Router common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRouterAddressSet is a free log retrieval operation binding the contract event 0xb3cbb74e835466bdbf8838b1acb70fa4a8b73e1a00cd5bacb9f68cf4dfc79cf3. +// +// Solidity: event RouterAddressSet(address token, address router) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) FilterRouterAddressSet(opts *bind.FilterOpts) (*UniswapFeeHandlerSellerRouterAddressSetIterator, error) { + + logs, sub, err := _UniswapFeeHandlerSeller.contract.FilterLogs(opts, "RouterAddressSet") + if err != nil { + return nil, err + } + return &UniswapFeeHandlerSellerRouterAddressSetIterator{contract: _UniswapFeeHandlerSeller.contract, event: "RouterAddressSet", logs: logs, sub: sub}, nil +} + +// WatchRouterAddressSet is a free log subscription operation binding the contract event 0xb3cbb74e835466bdbf8838b1acb70fa4a8b73e1a00cd5bacb9f68cf4dfc79cf3. +// +// Solidity: event RouterAddressSet(address token, address router) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) WatchRouterAddressSet(opts *bind.WatchOpts, sink chan<- *UniswapFeeHandlerSellerRouterAddressSet) (event.Subscription, error) { + + logs, sub, err := _UniswapFeeHandlerSeller.contract.WatchLogs(opts, "RouterAddressSet") + 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(UniswapFeeHandlerSellerRouterAddressSet) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "RouterAddressSet", 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 +} + +// ParseRouterAddressSet is a log parse operation binding the contract event 0xb3cbb74e835466bdbf8838b1acb70fa4a8b73e1a00cd5bacb9f68cf4dfc79cf3. +// +// Solidity: event RouterAddressSet(address token, address router) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) ParseRouterAddressSet(log types.Log) (*UniswapFeeHandlerSellerRouterAddressSet, error) { + event := new(UniswapFeeHandlerSellerRouterAddressSet) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "RouterAddressSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UniswapFeeHandlerSellerRouterUsedIterator is returned from FilterRouterUsed and is used to iterate over the raw logs and unpacked data for RouterUsed events raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerRouterUsedIterator struct { + Event *UniswapFeeHandlerSellerRouterUsed // 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 *UniswapFeeHandlerSellerRouterUsedIterator) 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(UniswapFeeHandlerSellerRouterUsed) + 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(UniswapFeeHandlerSellerRouterUsed) + 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 *UniswapFeeHandlerSellerRouterUsedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapFeeHandlerSellerRouterUsedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapFeeHandlerSellerRouterUsed represents a RouterUsed event raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerRouterUsed struct { + Router common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRouterUsed is a free log retrieval operation binding the contract event 0x59afd9b3bf745a06d8739721397432b9f161243cee13868b9d6d6fca05b6e551. +// +// Solidity: event RouterUsed(address router) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) FilterRouterUsed(opts *bind.FilterOpts) (*UniswapFeeHandlerSellerRouterUsedIterator, error) { + + logs, sub, err := _UniswapFeeHandlerSeller.contract.FilterLogs(opts, "RouterUsed") + if err != nil { + return nil, err + } + return &UniswapFeeHandlerSellerRouterUsedIterator{contract: _UniswapFeeHandlerSeller.contract, event: "RouterUsed", logs: logs, sub: sub}, nil +} + +// WatchRouterUsed is a free log subscription operation binding the contract event 0x59afd9b3bf745a06d8739721397432b9f161243cee13868b9d6d6fca05b6e551. +// +// Solidity: event RouterUsed(address router) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) WatchRouterUsed(opts *bind.WatchOpts, sink chan<- *UniswapFeeHandlerSellerRouterUsed) (event.Subscription, error) { + + logs, sub, err := _UniswapFeeHandlerSeller.contract.WatchLogs(opts, "RouterUsed") + 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(UniswapFeeHandlerSellerRouterUsed) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "RouterUsed", 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 +} + +// ParseRouterUsed is a log parse operation binding the contract event 0x59afd9b3bf745a06d8739721397432b9f161243cee13868b9d6d6fca05b6e551. +// +// Solidity: event RouterUsed(address router) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) ParseRouterUsed(log types.Log) (*UniswapFeeHandlerSellerRouterUsed, error) { + event := new(UniswapFeeHandlerSellerRouterUsed) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "RouterUsed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// UniswapFeeHandlerSellerTokenSoldIterator is returned from FilterTokenSold and is used to iterate over the raw logs and unpacked data for TokenSold events raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerTokenSoldIterator struct { + Event *UniswapFeeHandlerSellerTokenSold // 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 *UniswapFeeHandlerSellerTokenSoldIterator) 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(UniswapFeeHandlerSellerTokenSold) + 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(UniswapFeeHandlerSellerTokenSold) + 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 *UniswapFeeHandlerSellerTokenSoldIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UniswapFeeHandlerSellerTokenSoldIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UniswapFeeHandlerSellerTokenSold represents a TokenSold event raised by the UniswapFeeHandlerSeller contract. +type UniswapFeeHandlerSellerTokenSold struct { + SoldTokenAddress common.Address + BoughtTokenAddress common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokenSold is a free log retrieval operation binding the contract event 0xd4cffd6979677853b45a7a17f455188a434e975ba474c5a2613c94beacea537a. +// +// Solidity: event TokenSold(address soldTokenAddress, address boughtTokenAddress, uint256 amount) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) FilterTokenSold(opts *bind.FilterOpts) (*UniswapFeeHandlerSellerTokenSoldIterator, error) { + + logs, sub, err := _UniswapFeeHandlerSeller.contract.FilterLogs(opts, "TokenSold") + if err != nil { + return nil, err + } + return &UniswapFeeHandlerSellerTokenSoldIterator{contract: _UniswapFeeHandlerSeller.contract, event: "TokenSold", logs: logs, sub: sub}, nil +} + +// WatchTokenSold is a free log subscription operation binding the contract event 0xd4cffd6979677853b45a7a17f455188a434e975ba474c5a2613c94beacea537a. +// +// Solidity: event TokenSold(address soldTokenAddress, address boughtTokenAddress, uint256 amount) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) WatchTokenSold(opts *bind.WatchOpts, sink chan<- *UniswapFeeHandlerSellerTokenSold) (event.Subscription, error) { + + logs, sub, err := _UniswapFeeHandlerSeller.contract.WatchLogs(opts, "TokenSold") + 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(UniswapFeeHandlerSellerTokenSold) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "TokenSold", 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 +} + +// ParseTokenSold is a log parse operation binding the contract event 0xd4cffd6979677853b45a7a17f455188a434e975ba474c5a2613c94beacea537a. +// +// Solidity: event TokenSold(address soldTokenAddress, address boughtTokenAddress, uint256 amount) +func (_UniswapFeeHandlerSeller *UniswapFeeHandlerSellerFilterer) ParseTokenSold(log types.Log) (*UniswapFeeHandlerSellerTokenSold, error) { + event := new(UniswapFeeHandlerSellerTokenSold) + if err := _UniswapFeeHandlerSeller.contract.UnpackLog(event, "TokenSold", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-bindings/bindings/uniswapfeehandlerseller_more.go b/op-bindings/bindings/uniswapfeehandlerseller_more.go new file mode 100644 index 000000000000..814dd6cd20e7 --- /dev/null +++ b/op-bindings/bindings/uniswapfeehandlerseller_more.go @@ -0,0 +1,25 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "encoding/json" + + "github.com/ethereum-optimism/optimism/op-bindings/solc" +) + +const UniswapFeeHandlerSellerStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src/celo/UniswapFeeHandlerSeller.sol:UniswapFeeHandlerSeller\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1001,\"contract\":\"src/celo/UniswapFeeHandlerSeller.sol:UniswapFeeHandlerSeller\",\"label\":\"initialized\",\"offset\":20,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"src/celo/UniswapFeeHandlerSeller.sol:UniswapFeeHandlerSeller\",\"label\":\"registry\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_contract(ICeloRegistry)1005\"},{\"astId\":1003,\"contract\":\"src/celo/UniswapFeeHandlerSeller.sol:UniswapFeeHandlerSeller\",\"label\":\"minimumReports\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":1004,\"contract\":\"src/celo/UniswapFeeHandlerSeller.sol:UniswapFeeHandlerSeller\",\"label\":\"routerAddresses\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_mapping(t_address,t_struct(AddressSet)1006_storage)\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_bytes32)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"bytes32[]\",\"numberOfBytes\":\"32\",\"base\":\"t_bytes32\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_contract(ICeloRegistry)1005\":{\"encoding\":\"inplace\",\"label\":\"contract ICeloRegistry\",\"numberOfBytes\":\"20\"},\"t_mapping(t_address,t_struct(AddressSet)1006_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e struct EnumerableSet.AddressSet)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_struct(AddressSet)1006_storage\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_mapping(t_bytes32,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_uint256\"},\"t_struct(AddressSet)1006_storage\":{\"encoding\":\"inplace\",\"label\":\"struct EnumerableSet.AddressSet\",\"numberOfBytes\":\"64\"},\"t_struct(Set)1007_storage\":{\"encoding\":\"inplace\",\"label\":\"struct EnumerableSet.Set\",\"numberOfBytes\":\"64\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}" + +var UniswapFeeHandlerSellerStorageLayout = new(solc.StorageLayout) + +var UniswapFeeHandlerSellerDeployedBin = "0x6080604052600436106100f75760003560e01c806373f0a0701161008a578063dbba0f0111610059578063dbba0f011461031d578063e4187b131461033d578063f2fde38b1461035d578063ff1d57521461037d57600080fd5b806373f0a070146102605780637b103999146102805780638da5cb5b146102d2578063a91ee0dc146102fd57600080fd5b806341d68b8f116100c657806341d68b8f146101cb5780634e008cdb146101eb57806354255be014610218578063715018a61461024b57600080fd5b80630c2fef1414610103578063158ef93e146101395780632f257aa01461017b57806331de7d151461019d57600080fd5b366100fe57005b600080fd5b34801561010f57600080fd5b5061012361011e366004612444565b61039d565b60405161013091906124b2565b60405180910390f35b34801561014557600080fd5b5060005461016b9074010000000000000000000000000000000000000000900460ff1681565b6040519015158152602001610130565b34801561018757600080fd5b5061019b6101963660046124c5565b6103d4565b005b3480156101a957600080fd5b506101bd6101b83660046124f1565b6103ea565b604051908152602001610130565b3480156101d757600080fd5b5061019b6101e6366004612537565b610c45565b3480156101f757600080fd5b506101bd610206366004612444565b60026020526000908152604090205481565b34801561022457600080fd5b50600180600080604080519485526020850193909352918301526060820152608001610130565b34801561025757600080fd5b5061019b610c57565b34801561026c57600080fd5b5061019b61027b366004612537565b610c6b565b34801561028c57600080fd5b506001546102ad9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610130565b3480156102de57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166102ad565b34801561030957600080fd5b5061019b610318366004612444565b610cf8565b34801561032957600080fd5b5061016b610338366004612570565b610dec565b34801561034957600080fd5b506101bd6103583660046125b2565b610e97565b34801561036957600080fd5b5061019b610378366004612444565b610f1a565b34801561038957600080fd5b5061019b610398366004612630565b610fd1565b73ffffffffffffffffffffffffffffffffffffffff811660009081526003602052604090206060906103ce90611114565b92915050565b6103dc611128565b6103e682826111a9565b5050565b6001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed90602901604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161046d91815260200190565b602060405180830381865afa15801561048a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ae91906126b3565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610547576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f42757920746f6b656e2063616e206f6e6c7920626520676f6c6420746f6b656e60448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516600090815260036020526040812061057590611114565b5111610603576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f726f757465724164647265737365732073686f756c64206265206e6f6e20656d60448201527f7074790000000000000000000000000000000000000000000000000000000000606482015260840161053e565b600061060d611207565b604080516002808252606082018352929350600092839283929190602083019080368337019050509050888160008151811061064b5761064b6126ff565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508381600181518110610699576106996126ff565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060005b73ffffffffffffffffffffffffffffffffffffffff8a16600090815260036020526040902061070490611114565b518110156108a25773ffffffffffffffffffffffffffffffffffffffff8a16600090815260036020526040812061073b90836112d1565b6040517fd06ca61f000000000000000000000000000000000000000000000000000000008152909150819060009073ffffffffffffffffffffffffffffffffffffffff83169063d06ca61f90610797908e90899060040161272e565b600060405180830381865afa1580156107b4573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526107fa9190810190612747565b60018151811061080c5761080c6126ff565b602002602001015190508273ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff167fba55c28acee19777ec6c603117b386d3e3b39886c0d3d53bc244be24ee6e7c848360405161087591815260200190565b60405180910390a38581111561088c578095508196505b505050808061089a90612852565b9150506106d6565b508160000361090d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f43616e27742065786368616e67652077697468207a65726f2071756f74650000604482015260640161053e565b600061091b8a888a876112dd565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152602482018b9052919250908b169063095ea7b3906044016020604051808303816000875af1158015610994573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b8919061288a565b5073ffffffffffffffffffffffffffffffffffffffff84166338ed1739898385306109e46014426128ac565b6040518663ffffffff1660e01b8152600401610a049594939291906128bf565b6000604051808303816000875af1158015610a23573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610a699190810190612747565b506040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa158015610ad7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afb9190612908565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810182905290915073ffffffffffffffffffffffffffffffffffffffff87169063a9059cbb906044016020604051808303816000875af1158015610b71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b95919061288a565b5060405173ffffffffffffffffffffffffffffffffffffffff861681527f59afd9b3bf745a06d8739721397432b9f161243cee13868b9d6d6fca05b6e5519060200160405180910390a16040805173ffffffffffffffffffffffffffffffffffffffff808e1682528c1660208201529081018a90527fd4cffd6979677853b45a7a17f455188a434e975ba474c5a2613c94beacea537a9060600160405180910390a19a9950505050505050505050565b610c4d611128565b6103e68282611733565b610c5f611128565b610c6960006118c7565b565b610c73611128565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260409020610ca2908261193c565b506040805173ffffffffffffffffffffffffffffffffffffffff8085168252831660208201527f044c4b00bcc14b6c00430f73b8bc07f33aecb2387c7b188142d6d497342de89a91015b60405180910390a15050565b610d00611128565b73ffffffffffffffffffffffffffffffffffffffff8116610d7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f43616e6e6f7420726567697374657220746865206e756c6c2061646472657373604482015260640161053e565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f27fe5f0c1c3b1ed427cc63d0f05759ffdecf9aec9e18d31ef366fc8a6cb5dc3b90600090a250565b6000610df6611128565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526024820185905285169063a9059cbb906044016020604051808303816000875af1158015610e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8f919061288a565b949350505050565b600080610ebc8360408051602080820183526000909152815190810190915290815290565b90506000610eca878761195e565b90506000610ed78661199a565b90506000610ee58383611a79565b9050610f0d610f08610f0184610efb8789611a79565b90611a79565b8390611eb0565b611f4e565b9998505050505050505050565b610f22611128565b73ffffffffffffffffffffffffffffffffffffffff8116610fc5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161053e565b610fce816118c7565b50565b60005474010000000000000000000000000000000000000000900460ff1615611056576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f636f6e747261637420616c726561647920696e697469616c697a656400000000604482015260640161053e565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000017905561109e336118c7565b6110a785610cf8565b60005b8381101561110c576110fa8585838181106110c7576110c76126ff565b90506020020160208101906110dc9190612444565b8484848181106110ee576110ee6126ff565b905060200201356111a9565b8061110481612852565b9150506110aa565b505050505050565b6060600061112183611f68565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161053e565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260026020908152604091829020849055815192835282018390527f03cc7dddcb89dd90027bd8fa62d09d1b5c49ce5d20f8c9bb6bdeaaa62ea1718b9101610cec565b6001546040517f476f6c64546f6b656e0000000000000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed906029015b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161128b91815260200190565b602060405180830381865afa1580156112a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cc91906126b3565b905090565b60006111218383611fc4565b6000806112e8611fee565b73ffffffffffffffffffffffffffffffffffffffff878116600081815260026020526040908190205490517fbbc66a940000000000000000000000000000000000000000000000000000000081526004810192909252929350829184169063bbc66a9490602401602060405180830381865afa15801561136c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113909190612908565b101561141e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4e756d626572206f66207265706f72747320666f7220746f6b656e206e6f742060448201527f656e6f7567680000000000000000000000000000000000000000000000000000606482015260840161053e565b600081156114cf576040517fef90e1b000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152600091829186169063ef90e1b0906024016040805180830381865afa158015611496573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ba9190612921565b915091506114ca82828a8c610e97565b925050505b60006114d9611207565b905060008673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611528573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154c91906126b3565b6040517fe6a4390500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c811660048301528481166024830152919091169063e6a4390590604401602060405180830381865afa1580156115c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e691906126b3565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808316600483015291925060009161171891908d16906370a0823190602401602060405180830381865afa15801561165d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116819190612908565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528616906370a0823190602401602060405180830381865afa1580156116ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117119190612908565b8b8d610e97565b90506117248185612042565b9b9a5050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166117b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f526f757465722063616e27742062652061646472657373207a65726f00000000604482015260640161053e565b73ffffffffffffffffffffffffffffffffffffffff821660009081526003602052604090206117df9082612059565b5073ffffffffffffffffffffffffffffffffffffffff8216600090815260036020819052604090912061181190611114565b51111561187a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d6178206e756d626572206f6620726f75746572732072656163686564000000604482015260640161053e565b6040805173ffffffffffffffffffffffffffffffffffffffff8085168252831660208201527fb3cbb74e835466bdbf8838b1acb70fa4a8b73e1a00cd5bacb9f68cf4dfc79cf39101610cec565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006111218373ffffffffffffffffffffffffffffffffffffffff841661207b565b60408051602081019091526000815260006119788461199a565b905060006119858461199a565b9050611991828261216e565b95945050505050565b6040805160208101909152600081527601357c299a88ea76a58924d52ce4f26a85af186c2b9e74821115611a50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f63616e277420637265617465206669786964697479206e756d626572206c617260448201527f676572207468616e206d61784e65774669786564282900000000000000000000606482015260840161053e565b604051806020016040528069d3c21bcecceda100000084611a719190612945565b905292915050565b60408051602081019091526000815282511580611a9557508151155b15611aaf57506040805160208101909152600081526103ce565b81517fffffffffffffffffffffffffffffffffffffffffffff2c3de43133125f00000001611ade5750816103ce565b82517fffffffffffffffffffffffffffffffffffffffffffff2c3de43133125f00000001611b0d5750806103ce565b600069d3c21bcecceda1000000611b23856122a7565b51611b2e919061295c565b90506000611b3b856122e6565b519050600069d3c21bcecceda1000000611b54866122a7565b51611b5f919061295c565b90506000611b6c866122e6565b5190506000611b7b8386612945565b90508415611bf55782611b8e868361295c565b14611bf5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f77207831793120646574656374656400000000000000000000604482015260640161053e565b6000611c0b69d3c21bcecceda100000083612945565b90508115611c8f5769d3c21bcecceda1000000611c28838361295c565b14611c8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6f766572666c6f772078317931202a2066697865643120646574656374656400604482015260640161053e565b9050806000611c9e8587612945565b90508515611d185784611cb1878361295c565b14611d18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f77207832793120646574656374656400000000000000000000604482015260640161053e565b6000611d248589612945565b90508715611d9e5784611d37898361295c565b14611d9e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f77207831793220646574656374656400000000000000000000604482015260640161053e565b611dad64e8d4a510008861295c565b9650611dbe64e8d4a510008661295c565b94506000611dcc8689612945565b90508715611e465785611ddf898361295c565b14611e46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f766572666c6f77207832793220646574656374656400000000000000000000604482015260640161053e565b6040805160208082018352878252825190810190925284825290611e6b908290612331565b9050611e8581604051806020016040528086815250612331565b9050611e9f81604051806020016040528085815250612331565b9d9c50505050505050505050505050565b604080516020810190915260008152815183511015611f2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f737562737472616374696f6e20756e646572666c6f7720646574656374656400604482015260640161053e565b6040805160208101909152825184518291611f4591612997565b90529392505050565b80516000906103ce9069d3c21bcecceda10000009061295c565b606081600001805480602002602001604051908101604052809291908181526020018280548015611fb857602002820191906000526020600020905b815481526020019060010190808311611fa4575b50505050509050919050565b6000826000018281548110611fdb57611fdb6126ff565b9060005260206000200154905092915050565b6001546040517f536f727465644f7261636c657300000000000000000000000000000000000000602082015260009173ffffffffffffffffffffffffffffffffffffffff169063dcf0aaed90602d01611257565b6000818310156120525781611121565b5090919050565b60006111218373ffffffffffffffffffffffffffffffffffffffff84166123d3565b6000818152600183016020526040812054801561216457600061209f600183612997565b85549091506000906120b390600190612997565b90508181146121185760008660000182815481106120d3576120d36126ff565b90600052602060002001549050808760000184815481106120f6576120f66126ff565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612129576121296129aa565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506103ce565b60009150506103ce565b60408051602081019091526000815281516000036121e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f63616e2774206469766964652062792030000000000000000000000000000000604482015260640161053e565b82516000906122029069d3c21bcecceda100000090612945565b845190915061221b69d3c21bcecceda10000008361295c565b14612282576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6f766572666c6f77206174206469766964650000000000000000000000000000604482015260640161053e565b604051806020016040528084600001518361229d919061295c565b9052949350505050565b604080516020810190915260008152604051806020016040528069d3c21bcecceda10000008085600001516122dc919061295c565b611a719190612945565b604080516020810190915260008152604051806020016040528069d3c21bcecceda100000080856000015161231b919061295c565b6123259190612945565b8451611a719190612997565b60408051602081019091526000815281518351600091612350916128ac565b84519091508110156123be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f616464206f766572666c6f772064657465637465640000000000000000000000604482015260640161053e565b60408051602081019091529081529392505050565b600081815260018301602052604081205461241a575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556103ce565b5060006103ce565b73ffffffffffffffffffffffffffffffffffffffff81168114610fce57600080fd5b60006020828403121561245657600080fd5b813561112181612422565b600081518084526020808501945080840160005b838110156124a757815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101612475565b509495945050505050565b6020815260006111216020830184612461565b600080604083850312156124d857600080fd5b82356124e381612422565b946020939093013593505050565b6000806000806080858703121561250757600080fd5b843561251281612422565b9350602085013561252281612422565b93969395505050506040820135916060013590565b6000806040838503121561254a57600080fd5b823561255581612422565b9150602083013561256581612422565b809150509250929050565b60008060006060848603121561258557600080fd5b833561259081612422565b92506020840135915060408401356125a781612422565b809150509250925092565b600080600080608085870312156125c857600080fd5b5050823594602084013594506040840135936060013592509050565b60008083601f8401126125f657600080fd5b50813567ffffffffffffffff81111561260e57600080fd5b6020830191508360208260051b850101111561262957600080fd5b9250929050565b60008060008060006060868803121561264857600080fd5b853561265381612422565b9450602086013567ffffffffffffffff8082111561267057600080fd5b61267c89838a016125e4565b9096509450604088013591508082111561269557600080fd5b506126a2888289016125e4565b969995985093965092949392505050565b6000602082840312156126c557600080fd5b815161112181612422565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b828152604060208201526000610e8f6040830184612461565b6000602080838503121561275a57600080fd5b825167ffffffffffffffff8082111561277257600080fd5b818501915085601f83011261278657600080fd5b815181811115612798576127986126d0565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811085821117156127db576127db6126d0565b6040529182528482019250838101850191888311156127f957600080fd5b938501935b82851015612817578451845293850193928501926127fe565b98975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361288357612883612823565b5060010190565b60006020828403121561289c57600080fd5b8151801515811461112157600080fd5b808201808211156103ce576103ce612823565b85815284602082015260a0604082015260006128de60a0830186612461565b73ffffffffffffffffffffffffffffffffffffffff94909416606083015250608001529392505050565b60006020828403121561291a57600080fd5b5051919050565b6000806040838503121561293457600080fd5b505080516020909101519092909150565b80820281158282048414176103ce576103ce612823565b600082612992577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b818103818111156103ce576103ce612823565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a" + +func init() { + if err := json.Unmarshal([]byte(UniswapFeeHandlerSellerStorageLayoutJSON), UniswapFeeHandlerSellerStorageLayout); err != nil { + panic(err) + } + + layouts["UniswapFeeHandlerSeller"] = UniswapFeeHandlerSellerStorageLayout + deployedBytecodes["UniswapFeeHandlerSeller"] = UniswapFeeHandlerSellerDeployedBin +} diff --git a/op-bindings/bindings/weth9.go b/op-bindings/bindings/weth9.go index 587e8bec5f5c..9bbff5938446 100644 --- a/op-bindings/bindings/weth9.go +++ b/op-bindings/bindings/weth9.go @@ -31,7 +31,7 @@ var ( // WETH9MetaData contains all meta data concerning the WETH9 contract. var WETH9MetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60c0604052600d60808190526c2bb930b83832b21022ba3432b960991b60a090815261002e916000919061007a565b50604080518082019091526004808252630ae8aa8960e31b602090920191825261005a9160019161007a565b506002805460ff1916601217905534801561007457600080fd5b50610115565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100bb57805160ff19168380011785556100e8565b828001600101855582156100e8579182015b828111156100e85782518255916020019190600101906100cd565b506100f49291506100f8565b5090565b61011291905b808211156100f457600081556001016100fe565b90565b6107f9806101246000396000f3fe6080604052600436106100bc5760003560e01c8063313ce56711610074578063a9059cbb1161004e578063a9059cbb146102cb578063d0e30db0146100bc578063dd62ed3e14610311576100bc565b8063313ce5671461024b57806370a082311461027657806395d89b41146102b6576100bc565b806318160ddd116100a557806318160ddd146101aa57806323b872dd146101d15780632e1a7d4d14610221576100bc565b806306fdde03146100c6578063095ea7b314610150575b6100c4610359565b005b3480156100d257600080fd5b506100db6103a8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101155781810151838201526020016100fd565b50505050905090810190601f1680156101425780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015c57600080fd5b506101966004803603604081101561017357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610454565b604080519115158252519081900360200190f35b3480156101b657600080fd5b506101bf6104c7565b60408051918252519081900360200190f35b3480156101dd57600080fd5b50610196600480360360608110156101f457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356104cb565b34801561022d57600080fd5b506100c46004803603602081101561024457600080fd5b503561066b565b34801561025757600080fd5b50610260610700565b6040805160ff9092168252519081900360200190f35b34801561028257600080fd5b506101bf6004803603602081101561029957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610709565b3480156102c257600080fd5b506100db61071b565b3480156102d757600080fd5b50610196600480360360408110156102ee57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610793565b34801561031d57600080fd5b506101bf6004803603604081101561033457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166107a7565b33600081815260036020908152604091829020805434908101909155825190815291517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9281900390910190a2565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f8101849004840282018401909252818152929183018282801561044c5780601f106104215761010080835404028352916020019161044c565b820191906000526020600020905b81548152906001019060200180831161042f57829003601f168201915b505050505081565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b4790565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260408120548211156104fd57600080fd5b73ffffffffffffffffffffffffffffffffffffffff84163314801590610573575073ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14155b156105ed5773ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020548211156105b557600080fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020805483900390555b73ffffffffffffffffffffffffffffffffffffffff808516600081815260036020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b3360009081526003602052604090205481111561068757600080fd5b33600081815260036020526040808220805485900390555183156108fc0291849190818181858888f193505050501580156106c6573d6000803e3d6000fd5b5060408051828152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a250565b60025460ff1681565b60036020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f8101849004840282018401909252818152929183018282801561044c5780601f106104215761010080835404028352916020019161044c565b60006107a03384846104cb565b9392505050565b60046020908152600092835260408084209091529082529020548156fea265627a7a723158203b5b5adf37f507cc9ca5ac0b72acf7873b794171cc0eeb888a5f850e69fe540d64736f6c63430005110032", + Bin: "0x60c0604052600d60808190526c2bb930b83832b21022ba3432b960991b60a090815261002e916000919061007a565b50604080518082019091526004808252630ae8aa8960e31b602090920191825261005a9160019161007a565b506002805460ff1916601217905534801561007457600080fd5b50610115565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100bb57805160ff19168380011785556100e8565b828001600101855582156100e8579182015b828111156100e85782518255916020019190600101906100cd565b506100f49291506100f8565b5090565b61011291905b808211156100f457600081556001016100fe565b90565b6107f9806101246000396000f3fe6080604052600436106100bc5760003560e01c8063313ce56711610074578063a9059cbb1161004e578063a9059cbb146102cb578063d0e30db0146100bc578063dd62ed3e14610311576100bc565b8063313ce5671461024b57806370a082311461027657806395d89b41146102b6576100bc565b806318160ddd116100a557806318160ddd146101aa57806323b872dd146101d15780632e1a7d4d14610221576100bc565b806306fdde03146100c6578063095ea7b314610150575b6100c4610359565b005b3480156100d257600080fd5b506100db6103a8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101155781810151838201526020016100fd565b50505050905090810190601f1680156101425780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015c57600080fd5b506101966004803603604081101561017357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610454565b604080519115158252519081900360200190f35b3480156101b657600080fd5b506101bf6104c7565b60408051918252519081900360200190f35b3480156101dd57600080fd5b50610196600480360360608110156101f457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356104cb565b34801561022d57600080fd5b506100c46004803603602081101561024457600080fd5b503561066b565b34801561025757600080fd5b50610260610700565b6040805160ff9092168252519081900360200190f35b34801561028257600080fd5b506101bf6004803603602081101561029957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610709565b3480156102c257600080fd5b506100db61071b565b3480156102d757600080fd5b50610196600480360360408110156102ee57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610793565b34801561031d57600080fd5b506101bf6004803603604081101561033457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166107a7565b33600081815260036020908152604091829020805434908101909155825190815291517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9281900390910190a2565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f8101849004840282018401909252818152929183018282801561044c5780601f106104215761010080835404028352916020019161044c565b820191906000526020600020905b81548152906001019060200180831161042f57829003601f168201915b505050505081565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b4790565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260408120548211156104fd57600080fd5b73ffffffffffffffffffffffffffffffffffffffff84163314801590610573575073ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14155b156105ed5773ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020548211156105b557600080fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020805483900390555b73ffffffffffffffffffffffffffffffffffffffff808516600081815260036020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b3360009081526003602052604090205481111561068757600080fd5b33600081815260036020526040808220805485900390555183156108fc0291849190818181858888f193505050501580156106c6573d6000803e3d6000fd5b5060408051828152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a250565b60025460ff1681565b60036020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f8101849004840282018401909252818152929183018282801561044c5780601f106104215761010080835404028352916020019161044c565b60006107a03384846104cb565b9392505050565b60046020908152600092835260408084209091529082529020548156fea265627a7a7231582052779822253f9baf8e7718034a0f54b0c092bc0f81fe18c1100dfc1e668ddc6e64736f6c63430005110032", } // WETH9ABI is the input ABI used to generate the binding from. diff --git a/op-bindings/bindings/weth9_more.go b/op-bindings/bindings/weth9_more.go index 7530f273d76b..8bdc686965fd 100644 --- a/op-bindings/bindings/weth9_more.go +++ b/op-bindings/bindings/weth9_more.go @@ -13,7 +13,7 @@ const WETH9StorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src var WETH9StorageLayout = new(solc.StorageLayout) -var WETH9DeployedBin = "0x6080604052600436106100bc5760003560e01c8063313ce56711610074578063a9059cbb1161004e578063a9059cbb146102cb578063d0e30db0146100bc578063dd62ed3e14610311576100bc565b8063313ce5671461024b57806370a082311461027657806395d89b41146102b6576100bc565b806318160ddd116100a557806318160ddd146101aa57806323b872dd146101d15780632e1a7d4d14610221576100bc565b806306fdde03146100c6578063095ea7b314610150575b6100c4610359565b005b3480156100d257600080fd5b506100db6103a8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101155781810151838201526020016100fd565b50505050905090810190601f1680156101425780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015c57600080fd5b506101966004803603604081101561017357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610454565b604080519115158252519081900360200190f35b3480156101b657600080fd5b506101bf6104c7565b60408051918252519081900360200190f35b3480156101dd57600080fd5b50610196600480360360608110156101f457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356104cb565b34801561022d57600080fd5b506100c46004803603602081101561024457600080fd5b503561066b565b34801561025757600080fd5b50610260610700565b6040805160ff9092168252519081900360200190f35b34801561028257600080fd5b506101bf6004803603602081101561029957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610709565b3480156102c257600080fd5b506100db61071b565b3480156102d757600080fd5b50610196600480360360408110156102ee57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610793565b34801561031d57600080fd5b506101bf6004803603604081101561033457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166107a7565b33600081815260036020908152604091829020805434908101909155825190815291517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9281900390910190a2565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f8101849004840282018401909252818152929183018282801561044c5780601f106104215761010080835404028352916020019161044c565b820191906000526020600020905b81548152906001019060200180831161042f57829003601f168201915b505050505081565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b4790565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260408120548211156104fd57600080fd5b73ffffffffffffffffffffffffffffffffffffffff84163314801590610573575073ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14155b156105ed5773ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020548211156105b557600080fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020805483900390555b73ffffffffffffffffffffffffffffffffffffffff808516600081815260036020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b3360009081526003602052604090205481111561068757600080fd5b33600081815260036020526040808220805485900390555183156108fc0291849190818181858888f193505050501580156106c6573d6000803e3d6000fd5b5060408051828152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a250565b60025460ff1681565b60036020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f8101849004840282018401909252818152929183018282801561044c5780601f106104215761010080835404028352916020019161044c565b60006107a03384846104cb565b9392505050565b60046020908152600092835260408084209091529082529020548156fea265627a7a723158203b5b5adf37f507cc9ca5ac0b72acf7873b794171cc0eeb888a5f850e69fe540d64736f6c63430005110032" +var WETH9DeployedBin = "0x6080604052600436106100bc5760003560e01c8063313ce56711610074578063a9059cbb1161004e578063a9059cbb146102cb578063d0e30db0146100bc578063dd62ed3e14610311576100bc565b8063313ce5671461024b57806370a082311461027657806395d89b41146102b6576100bc565b806318160ddd116100a557806318160ddd146101aa57806323b872dd146101d15780632e1a7d4d14610221576100bc565b806306fdde03146100c6578063095ea7b314610150575b6100c4610359565b005b3480156100d257600080fd5b506100db6103a8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101155781810151838201526020016100fd565b50505050905090810190601f1680156101425780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015c57600080fd5b506101966004803603604081101561017357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610454565b604080519115158252519081900360200190f35b3480156101b657600080fd5b506101bf6104c7565b60408051918252519081900360200190f35b3480156101dd57600080fd5b50610196600480360360608110156101f457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356104cb565b34801561022d57600080fd5b506100c46004803603602081101561024457600080fd5b503561066b565b34801561025757600080fd5b50610260610700565b6040805160ff9092168252519081900360200190f35b34801561028257600080fd5b506101bf6004803603602081101561029957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610709565b3480156102c257600080fd5b506100db61071b565b3480156102d757600080fd5b50610196600480360360408110156102ee57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610793565b34801561031d57600080fd5b506101bf6004803603604081101561033457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166107a7565b33600081815260036020908152604091829020805434908101909155825190815291517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9281900390910190a2565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f8101849004840282018401909252818152929183018282801561044c5780601f106104215761010080835404028352916020019161044c565b820191906000526020600020905b81548152906001019060200180831161042f57829003601f168201915b505050505081565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b4790565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260408120548211156104fd57600080fd5b73ffffffffffffffffffffffffffffffffffffffff84163314801590610573575073ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14155b156105ed5773ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020548211156105b557600080fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020805483900390555b73ffffffffffffffffffffffffffffffffffffffff808516600081815260036020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b3360009081526003602052604090205481111561068757600080fd5b33600081815260036020526040808220805485900390555183156108fc0291849190818181858888f193505050501580156106c6573d6000803e3d6000fd5b5060408051828152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a250565b60025460ff1681565b60036020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f8101849004840282018401909252818152929183018282801561044c5780601f106104215761010080835404028352916020019161044c565b60006107a03384846104cb565b9392505050565b60046020908152600092835260408084209091529082529020548156fea265627a7a7231582052779822253f9baf8e7718034a0f54b0c092bc0f81fe18c1100dfc1e668ddc6e64736f6c63430005110032" func init() { if err := json.Unmarshal([]byte(WETH9StorageLayoutJSON), WETH9StorageLayout); err != nil { diff --git a/op-bindings/predeploys/addresses.go b/op-bindings/predeploys/addresses.go index 0b90f407b346..96b7029be576 100644 --- a/op-bindings/predeploys/addresses.go +++ b/op-bindings/predeploys/addresses.go @@ -25,8 +25,15 @@ const ( L1FeeVault = "0x420000000000000000000000000000000000001a" SchemaRegistry = "0x4200000000000000000000000000000000000020" EAS = "0x4200000000000000000000000000000000000021" - CeloRegistry = "0x000000000000000000000000000000000000ce10" - GoldToken = "0x471ece3750da237f93b8e339c536989b8978a438" + + CeloRegistry = "0x000000000000000000000000000000000000ce10" + GoldToken = "0x471ece3750da237f93b8e339c536989b8978a438" + FeeHandler = "0xcd437749e43a154c07f3553504c68fbfd56b8778" + FeeCurrencyWhitelist = "0xbb024e9cdcb2f9e34d893630d19611b8a5381b3c" + MentoFeeHandlerSeller = "0x4efa274b7e33476c961065000d58ee09f7921a74" + UniswapFeeHandlerSeller = "0xd3aee28548dbb65df03981f0dc0713bfcbd10a97" + SortedOracles = "0xefb84935239dacdecf7c5ba76d8de40b077b7b33" + AddressSortedLinkedListWithMedian = "0xED477A99035d0c1e11369F1D7A4e587893cc002B" ) var ( @@ -50,8 +57,14 @@ var ( SchemaRegistryAddr = common.HexToAddress(SchemaRegistry) EASAddr = common.HexToAddress(EAS) - CeloRegistryAddr = common.HexToAddress(CeloRegistry) - GoldTokenAddr = common.HexToAddress(GoldToken) + CeloRegistryAddr = common.HexToAddress(CeloRegistry) + GoldTokenAddr = common.HexToAddress(GoldToken) + FeeHandlerAddr = common.HexToAddress(FeeHandler) + FeeCurrencyWhitelistAddr = common.HexToAddress(FeeCurrencyWhitelist) + MentoFeeHandlerSellerAddr = common.HexToAddress(MentoFeeHandlerSeller) + UniswapFeeHandlerSellerAddr = common.HexToAddress(UniswapFeeHandlerSeller) + SortedOraclesAddr = common.HexToAddress(SortedOracles) + AddressSortedLinkedListWithMedianAddr = common.HexToAddress(AddressSortedLinkedListWithMedian) Predeploys = make(map[string]*common.Address) CeloPredeploys = make(map[string]*common.Address) @@ -60,6 +73,8 @@ var ( // IsProxied returns true for predeploys that will sit behind a proxy contract func IsProxied(predeployAddr common.Address) bool { switch predeployAddr { + case AddressSortedLinkedListWithMedianAddr: + return false case WETH9Addr: case GovernanceTokenAddr: default: @@ -88,9 +103,22 @@ func init() { Predeploys["L1FeeVault"] = &L1FeeVaultAddr Predeploys["SchemaRegistry"] = &SchemaRegistryAddr Predeploys["EAS"] = &EASAddr + Predeploys["CeloRegistry"] = &CeloRegistryAddr Predeploys["GoldToken"] = &GoldTokenAddr + Predeploys["FeeHandler"] = &FeeHandlerAddr + Predeploys["FeeCurrencyWhitelist"] = &FeeCurrencyWhitelistAddr + Predeploys["MentoFeeHandlerSeller"] = &MentoFeeHandlerSellerAddr + Predeploys["UniswapFeeHandlerSeller"] = &UniswapFeeHandlerSellerAddr + Predeploys["SortedOracles"] = &SortedOraclesAddr + Predeploys["AddressSortedLinkedListWithMedian"] = &AddressSortedLinkedListWithMedianAddr CeloPredeploys[Predeploys["CeloRegistry"].String()] = Predeploys["CeloRegistry"] CeloPredeploys[Predeploys["GoldToken"].String()] = Predeploys["GoldToken"] + CeloPredeploys[Predeploys["FeeHandler"].String()] = Predeploys["FeeHandler"] + CeloPredeploys[Predeploys["FeeCurrencyWhitelist"].String()] = Predeploys["FeeCurrencyWhitelist"] + CeloPredeploys[Predeploys["MentoFeeHandlerSeller"].String()] = Predeploys["MentoFeeHandlerSeller"] + CeloPredeploys[Predeploys["UniswapFeeHandlerSeller"].String()] = Predeploys["UniswapFeeHandlerSeller"] + CeloPredeploys[Predeploys["SortedOracles"].String()] = Predeploys["SortedOracles"] + CeloPredeploys[Predeploys["AddressSortedLinkedListWithMedian"].String()] = Predeploys["AddressSortedLinkedListWithMedian"] } diff --git a/op-chain-ops/genesis/config.go b/op-chain-ops/genesis/config.go index 76ef8408148a..dff90c44e809 100644 --- a/op-chain-ops/genesis/config.go +++ b/op-chain-ops/genesis/config.go @@ -756,6 +756,29 @@ func NewL2StorageConfig(config *DeployConfig, block *types.Block) (state.Storage "0xd7e89ade8430819f08bf97a087285824af3351ee12d72a2d132b0c6c0687bfaf": predeploys.GoldTokenAddr, // keccak256(abi.encodePacked("GoldToken")); }, } + storage["FeeHandler"] = state.StorageValues{ + "initialized": true, + "registry": predeploys.CeloRegistry, + "_owner": config.ProxyAdminOwner, + "feeBeneficiary": config.ProxyAdminOwner, + } + storage["FeeCurrencyWhitelist"] = state.StorageValues{ + "initialized": true, + "_owner": config.ProxyAdminOwner, + } + storage["MentoFeeHandlerSeller"] = state.StorageValues{ + "initialized": true, + "_owner": config.ProxyAdminOwner, + } + storage["UniswapFeeHandlerSeller"] = state.StorageValues{ + "initialized": true, + "_owner": config.ProxyAdminOwner, + } + storage["SortedOracles"] = state.StorageValues{ + "initialized": true, + "_owner": config.ProxyAdminOwner, + "reportExpirySeconds": 600, + } return storage, nil } diff --git a/op-chain-ops/genesis/layer_two_test.go b/op-chain-ops/genesis/layer_two_test.go index 3ead7536de2f..50aafd6e9746 100644 --- a/op-chain-ops/genesis/layer_two_test.go +++ b/op-chain-ops/genesis/layer_two_test.go @@ -85,7 +85,7 @@ func TestBuildL2MainnetGenesis(t *testing.T) { config.EnableGovernance = true config.FundDevAccounts = false gen := testBuildL2Genesis(t, config) - require.Equal(t, 2326, len(gen.Alloc)) + require.Equal(t, 2337, len(gen.Alloc)) } func TestBuildL2MainnetNoGovernanceGenesis(t *testing.T) { @@ -94,5 +94,5 @@ func TestBuildL2MainnetNoGovernanceGenesis(t *testing.T) { config.EnableGovernance = false config.FundDevAccounts = false gen := testBuildL2Genesis(t, config) - require.Equal(t, 2326, len(gen.Alloc)) + require.Equal(t, 2337, len(gen.Alloc)) } diff --git a/op-chain-ops/immutables/immutables.go b/op-chain-ops/immutables/immutables.go index 0d139a058010..d4571df1c9a2 100644 --- a/op-chain-ops/immutables/immutables.go +++ b/op-chain-ops/immutables/immutables.go @@ -162,6 +162,40 @@ func BuildOptimism(immutable ImmutableConfig) (DeploymentResults, error) { false, }, }, + { + Name: "FeeHandler", + Args: []interface{}{ + false, + }, + }, + { + Name: "FeeCurrencyWhitelist", + Args: []interface{}{ + false, + }, + }, + { + Name: "MentoFeeHandlerSeller", + Args: []interface{}{ + false, + }, + }, + { + Name: "UniswapFeeHandlerSeller", + Args: []interface{}{ + false, + }, + }, + { + Name: "SortedOracles", + Args: []interface{}{ + false, + }, + }, + { + Name: "AddressSortedLinkedListWithMedian", + Args: []interface{}{}, + }, } return BuildL2(deployments) } @@ -261,6 +295,18 @@ func l2Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep _, tx, _, err = bindings.DeployCeloRegistry(opts, backend, false) case "GoldToken": _, tx, _, err = bindings.DeployGoldToken(opts, backend, false) + case "FeeHandler": + _, tx, _, err = bindings.DeployFeeHandler(opts, backend, false) + case "FeeCurrencyWhitelist": + _, tx, _, err = bindings.DeployFeeCurrencyWhitelist(opts, backend, false) + case "MentoFeeHandlerSeller": + _, tx, _, err = bindings.DeployMentoFeeHandlerSeller(opts, backend, false) + case "UniswapFeeHandlerSeller": + _, tx, _, err = bindings.DeployUniswapFeeHandlerSeller(opts, backend, false) + case "SortedOracles": + _, tx, _, err = bindings.DeploySortedOracles(opts, backend, false) + case "AddressSortedLinkedListWithMedian": + _, tx, _, err = bindings.DeployAddressSortedLinkedListWithMedian(opts, backend) default: return tx, fmt.Errorf("unknown contract: %s", deployment.Name) } diff --git a/op-chain-ops/immutables/immutables_test.go b/op-chain-ops/immutables/immutables_test.go index f7ee657b590c..f768e162b293 100644 --- a/op-chain-ops/immutables/immutables_test.go +++ b/op-chain-ops/immutables/immutables_test.go @@ -53,30 +53,66 @@ func TestBuildOptimism(t *testing.T) { "minimumWithdrawalAmount": minimumWithdrawalAmount, "withdrawalNetwork": uint8(0), }, + "FeeHandler": { + "recipient": common.HexToAddress("0x1234567890123456789012345678901234567890"), + "minimumWithdrawalAmount": minimumWithdrawalAmount, + "withdrawalNetwork": uint8(0), + }, + "FeeCurrencyWhitelist": { + "recipient": common.HexToAddress("0x1234567890123456789012345678901234567890"), + "minimumWithdrawalAmount": minimumWithdrawalAmount, + "withdrawalNetwork": uint8(0), + }, + "MentoFeeHandlerSeller": { + "recipient": common.HexToAddress("0x1234567890123456789012345678901234567890"), + "minimumWithdrawalAmount": minimumWithdrawalAmount, + "withdrawalNetwork": uint8(0), + }, + "UniswapFeeHandlerSeller": { + "recipient": common.HexToAddress("0x1234567890123456789012345678901234567890"), + "minimumWithdrawalAmount": minimumWithdrawalAmount, + "withdrawalNetwork": uint8(0), + }, + "SortedOracles": { + "recipient": common.HexToAddress("0x1234567890123456789012345678901234567890"), + "minimumWithdrawalAmount": minimumWithdrawalAmount, + "withdrawalNetwork": uint8(0), + }, + "AddressSortedLinkedListWithMedian": { + "recipient": common.HexToAddress("0x1234567890123456789012345678901234567890"), + "minimumWithdrawalAmount": minimumWithdrawalAmount, + "withdrawalNetwork": uint8(0), + }, }) require.Nil(t, err) require.NotNil(t, results) contracts := map[string]bool{ - "GasPriceOracle": true, - "L1Block": true, - "L2CrossDomainMessenger": true, - "L2StandardBridge": true, - "L2ToL1MessagePasser": true, - "SequencerFeeVault": true, - "BaseFeeVault": true, - "L1FeeVault": true, - "OptimismMintableERC20Factory": true, - "DeployerWhitelist": true, - "LegacyMessagePasser": true, - "L1BlockNumber": true, - "L2ERC721Bridge": true, - "OptimismMintableERC721Factory": true, - "LegacyERC20ETH": true, - "EAS": true, - "SchemaRegistry": true, - "CeloRegistry": true, - "GoldToken": true, + "GasPriceOracle": true, + "L1Block": true, + "L2CrossDomainMessenger": true, + "L2StandardBridge": true, + "L2ToL1MessagePasser": true, + "SequencerFeeVault": true, + "BaseFeeVault": true, + "L1FeeVault": true, + "OptimismMintableERC20Factory": true, + "DeployerWhitelist": true, + "LegacyMessagePasser": true, + "L1BlockNumber": true, + "L2ERC721Bridge": true, + "OptimismMintableERC721Factory": true, + "LegacyERC20ETH": true, + "EAS": true, + "SchemaRegistry": true, + "CeloRegistry": true, + "GoldToken": true, + "FeeHandler": true, + "FeeCurrencyWhitelist": true, + "MentoFeeHandlerSeller": true, + "UniswapFeeHandlerSeller": true, + "SortedOracles": true, + "AddressSortedLinkedListWithMedian": true, } // Only the exact contracts that we care about are being diff --git a/packages/contracts-bedrock/package.json b/packages/contracts-bedrock/package.json index 3bbb43996726..eab676f01fbe 100644 --- a/packages/contracts-bedrock/package.json +++ b/packages/contracts-bedrock/package.json @@ -13,6 +13,7 @@ "bindings:ts": "nx generate @eth-optimism/contracts-ts", "bindings:go": "cd ../../op-bindings && make", "build": "forge build", + "build:linkedLibraries": "forge build --libraries src/celo/common/linkedlists/AddressSortedLinkedListWithMedian.sol:AddressSortedLinkedListWithMedian:0xED477A99035d0c1e11369F1D7A4e587893cc002B", "prebuild": "./scripts/verify-foundry-install.sh", "build:differential": "go build -o ./scripts/differential-testing/differential-testing ./scripts/differential-testing", "build:fuzz": "(cd test-case-generator && go build ./cmd/fuzz.go)", diff --git a/packages/contracts-bedrock/src/celo/CalledByVm.sol b/packages/contracts-bedrock/src/celo/CalledByVm.sol index a9c77c42de25..c3f6efe12072 100644 --- a/packages/contracts-bedrock/src/celo/CalledByVm.sol +++ b/packages/contracts-bedrock/src/celo/CalledByVm.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; contract CalledByVm { modifier onlyVm() { diff --git a/packages/contracts-bedrock/src/celo/FeeCurrencyWhitelist.sol b/packages/contracts-bedrock/src/celo/FeeCurrencyWhitelist.sol new file mode 100644 index 000000000000..d52d4a155ea6 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/FeeCurrencyWhitelist.sol @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import "../../lib/openzeppelin-contracts/contracts/access/Ownable.sol"; + +import "./interfaces/IFeeCurrencyWhitelist.sol"; + +import "./common/Initializable.sol"; + +import "./common/interfaces/ICeloVersionedContract.sol"; + +/** + * @title Holds a whitelist of the ERC20+ tokens that can be used to pay for gas + * Not including the native Celo token + */ +contract FeeCurrencyWhitelist is IFeeCurrencyWhitelist, Ownable, Initializable, ICeloVersionedContract { + // Array of all the tokens enabled + address[] public whitelist; + + event FeeCurrencyWhitelisted(address token); + + event FeeCurrencyWhitelistRemoved(address token); + + /** + * @notice Sets initialized == true on implementation contracts + * @param test Set to true to skip implementation initialization + */ + constructor(bool test) Initializable(test) { } + + /** + * @notice Used in place of the constructor to allow the contract to be upgradable via proxy. + */ + function initialize() external initializer { + _transferOwnership(msg.sender); + } + + /** + * @notice Returns the storage, major, minor, and patch version of the contract. + * @return Storage version of the contract. + * @return Major version of the contract. + * @return Minor version of the contract. + * @return Patch version of the contract. + */ + function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) { + return (1, 1, 1, 0); + } + + /** + * @notice Removes a Mento token as enabled fee token. Tokens added with addToken should be + * removed with this function. + * @param tokenAddress The address of the token to remove. + * @param index The index of the token in the whitelist array. + */ + function removeToken(address tokenAddress, uint256 index) public onlyOwner { + require(whitelist[index] == tokenAddress, "Index does not match"); + uint256 length = whitelist.length; + whitelist[index] = whitelist[length - 1]; + whitelist.pop(); + emit FeeCurrencyWhitelistRemoved(tokenAddress); + } + + /** + * @dev Add a token to the whitelist + * @param tokenAddress The address of the token to add. + */ + function addToken(address tokenAddress) external onlyOwner { + whitelist.push(tokenAddress); + emit FeeCurrencyWhitelisted(tokenAddress); + } + + /** + * @return a list of all tokens enabled as gas fee currency. + */ + function getWhitelist() external view returns (address[] memory) { + return whitelist; + } +} diff --git a/packages/contracts-bedrock/src/celo/FeeHandler.sol b/packages/contracts-bedrock/src/celo/FeeHandler.sol new file mode 100644 index 000000000000..492eb6c128ff --- /dev/null +++ b/packages/contracts-bedrock/src/celo/FeeHandler.sol @@ -0,0 +1,544 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import "../../lib/openzeppelin-contracts/contracts/utils/math/Math.sol"; +import "../../lib/openzeppelin-contracts/contracts/access/Ownable.sol"; +import "../../lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol"; +import "../../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; + +import "./UsingRegistry.sol"; +import "./common/Freezable.sol"; +import "./common/FixidityLib.sol"; +import "./common/Initializable.sol"; + +import "./common/interfaces/IFeeHandler.sol"; +import "./common/interfaces/IFeeHandlerSeller.sol"; + +// TODO move to IStableToken when it adds method getExchangeRegistryId +import "./interfaces/IStableTokenMento.sol"; +import "./common/interfaces/ICeloVersionedContract.sol"; +import "./common/interfaces/ICeloToken.sol"; +import "./stability/interfaces/ISortedOracles.sol"; + +// Using the minimal required signatures in the interfaces so more contracts could be compatible +import "./common/libraries/ReentrancyGuard.sol"; + +// An implementation of FeeHandler as described in CIP-52 +// See https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0052.md +contract FeeHandler is + Ownable, + Initializable, + UsingRegistry, + ICeloVersionedContract, + Freezable, + IFeeHandler, + ReentrancyGuard +{ + using FixidityLib for FixidityLib.Fraction; + using EnumerableSet for EnumerableSet.AddressSet; + + uint256 public constant FIXED1_UINT = 1000000000000000000000000; // TODO move to FIX and add check + + // Min units that can be burned + uint256 public constant MIN_BURN = 200; + + // last day the daily limits were updated + uint256 public lastLimitDay; + + FixidityLib.Fraction public burnFraction; // 80% + + address public feeBeneficiary; + + uint256 public celoToBeBurned; + + // This mapping can not be public because it contains a FixidityLib.Fraction + // and that'd be only supported with experimental features in this + // compiler version + mapping(address => TokenState) private tokenStates; + + struct TokenState { + address handler; + FixidityLib.Fraction maxSlippage; + // Max amounts that can be burned in a day for a token + uint256 dailySellLimit; + // Max amounts that can be burned today for a token + uint256 currentDaySellLimit; + uint256 toDistribute; + // Historical amounts burned by this contract + uint256 pastBurn; + } + + EnumerableSet.AddressSet private activeTokens; + + event SoldAndBurnedToken(address token, uint256 value); + event DailyLimitSet(address tokenAddress, uint256 newLimit); + event DailyLimitHit(address token, uint256 burning); + event MaxSlippageSet(address token, uint256 maxSlippage); + event DailySellLimitUpdated(uint256 amount); + event FeeBeneficiarySet(address newBeneficiary); + event BurnFractionSet(uint256 fraction); + event TokenAdded(address tokenAddress, address handlerAddress); + event TokenRemoved(address tokenAddress); + + /** + * @notice Sets initialized == true on implementation contracts. + * @param test Set to true to skip implementation initialisation. + */ + constructor(bool test) Initializable(test) { } + + /** + * @notice Used in place of the constructor to allow the contract to be upgradable via proxy. + */ + function initialize( + address _registryAddress, + address newFeeBeneficiary, + uint256 newBurnFraction, + address[] calldata tokens, + address[] calldata handlers, + uint256[] calldata newLimits, + uint256[] calldata newMaxSlippages + ) + external + initializer + { + require(tokens.length == handlers.length, "handlers length should match tokens length"); + require(tokens.length == newLimits.length, "limits length should match tokens length"); + require(tokens.length == newMaxSlippages.length, "maxSlippage length should match tokens length"); + + _transferOwnership(msg.sender); + setRegistry(_registryAddress); + _setFeeBeneficiary(newFeeBeneficiary); + _setBurnFraction(newBurnFraction); + + for (uint256 i = 0; i < tokens.length; i++) { + _addToken(tokens[i], handlers[i]); + _setDailySellLimit(tokens[i], newLimits[i]); + _setMaxSplippage(tokens[i], newMaxSlippages[i]); + } + } + + // Without this the contract cant receive Celo as native transfer + receive() external payable { } + + /** + * @dev Returns the handler address for the specified token. + * @param tokenAddress The address of the token for which to return the handler. + * @return The address of the handler contract for the specified token. + */ + function getTokenHandler(address tokenAddress) external view returns (address) { + return tokenStates[tokenAddress].handler; + } + + /** + * @dev Returns a boolean indicating whether the specified token is active or not. + * @param tokenAddress The address of the token for which to retrieve the active status. + * @return A boolean representing the active status of the specified token. + */ + function getTokenActive(address tokenAddress) external view returns (bool) { + return activeTokens.contains(tokenAddress); + } + + /** + * @dev Returns the maximum slippage percentage for the specified token. + * @param tokenAddress The address of the token for which to retrieve the maximum + * slippage percentage. + * @return The maximum slippage percentage as a uint256 value. + */ + function getTokenMaxSlippage(address tokenAddress) external view returns (uint256) { + return FixidityLib.unwrap(tokenStates[tokenAddress].maxSlippage); + } + + /** + * @dev Returns the daily burn limit for the specified token. + * @param tokenAddress The address of the token for which to retrieve the daily burn limit. + * @return The daily burn limit as a uint256 value. + */ + + function getTokenDailySellLimit(address tokenAddress) external view returns (uint256) { + return tokenStates[tokenAddress].dailySellLimit; + } + + /** + * @dev Returns the current daily sell limit for the specified token. + * @param tokenAddress The address of the token for which to retrieve the current daily limit. + * @return The current daily limit as a uint256 value. + */ + function getTokenCurrentDaySellLimit(address tokenAddress) external view returns (uint256) { + return tokenStates[tokenAddress].currentDaySellLimit; + } + + /** + * @dev Returns the amount of tokens available to distribute for the specified token. + * @param tokenAddress The address of the token for which to retrieve the amount of + * tokens available to distribute. + * @return The amount of tokens available to distribute as a uint256 value. + */ + function getTokenToDistribute(address tokenAddress) external view returns (uint256) { + return tokenStates[tokenAddress].toDistribute; + } + + function getActiveTokens() public view returns (address[] memory) { + return activeTokens.values(); + } + + /** + * @dev Sets the fee beneficiary address to the specified address. + * @param beneficiary The address to set as the fee beneficiary. + */ + function setFeeBeneficiary(address beneficiary) external onlyOwner { + return _setFeeBeneficiary(beneficiary); + } + + function _setFeeBeneficiary(address beneficiary) private { + feeBeneficiary = beneficiary; + emit FeeBeneficiarySet(beneficiary); + } + + /** + * @dev Sets the burn fraction to the specified value. + * @param fraction The value to set as the burn fraction. + */ + function setBurnFraction(uint256 fraction) external onlyOwner { + return _setBurnFraction(fraction); + } + + function _setBurnFraction(uint256 newFraction) private { + FixidityLib.Fraction memory fraction = FixidityLib.wrap(newFraction); + require(FixidityLib.lte(fraction, FixidityLib.fixed1()), "Burn fraction must be less than or equal to 1"); + burnFraction = fraction; + emit BurnFractionSet(newFraction); + } + + /** + * @dev Sets the burn fraction to the specified value. Token has to have a handler set. + * @param tokenAddress The address of the token to sell + */ + function sell(address tokenAddress) external { + return _sell(tokenAddress); + } + + /** + * @dev Adds a new token to the contract with the specified token and handler addresses. + * @param tokenAddress The address of the token to add. + * @param handlerAddress The address of the handler contract for the specified token. + */ + function addToken(address tokenAddress, address handlerAddress) external onlyOwner { + _addToken(tokenAddress, handlerAddress); + } + + function _addToken(address tokenAddress, address handlerAddress) private { + require(handlerAddress != address(0), "Can't set handler to zero"); + TokenState storage tokenState = tokenStates[tokenAddress]; + tokenState.handler = handlerAddress; + + activeTokens.add(tokenAddress); + emit TokenAdded(tokenAddress, handlerAddress); + } + + /** + * @notice Allows the owner to activate a specified token. + * @param tokenAddress The address of the token to be activated. + */ + function activateToken(address tokenAddress) external onlyOwner { + _activateToken(tokenAddress); + } + + function _activateToken(address tokenAddress) private { + TokenState storage tokenState = tokenStates[tokenAddress]; + require( + tokenState.handler != address(0) || tokenAddress == registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID), + "Handler has to be set to activate token" + ); + activeTokens.add(tokenAddress); + } + + /** + * @dev Deactivates the specified token by marking it as inactive. + * @param tokenAddress The address of the token to deactivate. + */ + function deactivateToken(address tokenAddress) external onlyOwner { + _deactivateToken(tokenAddress); + } + + function _deactivateToken(address tokenAddress) private { + activeTokens.remove(tokenAddress); + } + + /** + * @notice Allows the owner to set a handler contract for a specified token. + * @param tokenAddress The address of the token to set the handler for. + * @param handlerAddress The address of the handler contract to be set. + */ + function setHandler(address tokenAddress, address handlerAddress) external onlyOwner { + _setHandler(tokenAddress, handlerAddress); + } + + function _setHandler(address tokenAddress, address handlerAddress) private { + require(handlerAddress != address(0), "Can't set handler to zero, use deactivateToken"); + TokenState storage tokenState = tokenStates[tokenAddress]; + tokenState.handler = handlerAddress; + } + + function removeToken(address tokenAddress) external onlyOwner { + _removeToken(tokenAddress); + } + + function _removeToken(address tokenAddress) private { + _deactivateToken(tokenAddress); + TokenState storage tokenState = tokenStates[tokenAddress]; + tokenState.handler = address(0); + emit TokenRemoved(tokenAddress); + } + + function _sell(address tokenAddress) private onlyWhenNotFrozen nonReentrant { + IERC20 token = IERC20(tokenAddress); + + TokenState storage tokenState = tokenStates[tokenAddress]; + require(tokenState.handler != address(0), "Handler has to be set to sell token"); + require(FixidityLib.unwrap(tokenState.maxSlippage) != 0, "Max slippage has to be set to sell token"); + FixidityLib.Fraction memory balanceToProcess = + FixidityLib.newFixed(token.balanceOf(address(this)) - tokenState.toDistribute); + + uint256 balanceToBurn = (burnFraction.multiply(balanceToProcess).fromFixed()); + + tokenState.toDistribute = tokenState.toDistribute + balanceToProcess.fromFixed() - balanceToBurn; + + // small numbers cause rounding errors and zero case should be skipped + if (balanceToBurn < MIN_BURN) { + return; + } + + if (dailySellLimitHit(tokenAddress, balanceToBurn)) { + // in case the limit is hit, burn the max possible + balanceToBurn = tokenState.currentDaySellLimit; + emit DailyLimitHit(tokenAddress, balanceToBurn); + } + + token.transfer(tokenState.handler, balanceToBurn); + IFeeHandlerSeller handler = IFeeHandlerSeller(tokenState.handler); + + uint256 celoReceived = handler.sell( + tokenAddress, + registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID), + balanceToBurn, + FixidityLib.unwrap(tokenState.maxSlippage) + ); + + celoToBeBurned = celoToBeBurned + celoReceived; + tokenState.pastBurn = tokenState.pastBurn + balanceToBurn; + updateLimits(tokenAddress, balanceToBurn); + + emit SoldAndBurnedToken(tokenAddress, balanceToBurn); + } + + /** + * @dev Distributes the available tokens for the specified token address to the fee beneficiary. + * @param tokenAddress The address of the token for which to distribute the available tokens. + */ + function distribute(address tokenAddress) external { + return _distribute(tokenAddress); + } + + function _distribute(address tokenAddress) private onlyWhenNotFrozen nonReentrant { + require(feeBeneficiary != address(0), "Can't distribute to the zero address"); + IERC20 token = IERC20(tokenAddress); + uint256 tokenBalance = token.balanceOf(address(this)); + + TokenState storage tokenState = tokenStates[tokenAddress]; + require( + tokenState.handler != address(0) || tokenAddress == registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID), + "Handler has to be set to sell token" + ); + + // safty check to avoid a revert due balance + uint256 balanceToDistribute = Math.min(tokenBalance, tokenState.toDistribute); + + if (balanceToDistribute == 0) { + // don't distribute with zero balance + return; + } + + token.transfer(feeBeneficiary, balanceToDistribute); + tokenState.toDistribute = tokenState.toDistribute - balanceToDistribute; + } + + /** + * @notice Returns the storage, major, minor, and patch version of the contract. + * @return Storage version of the contract. + * @return Major version of the contract. + * @return Minor version of the contract. + * @return Patch version of the contract. + */ + function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) { + return (1, 1, 0, 0); + } + + /** + * @notice Allows owner to set max slippage for a token. + * @param token Address of the token to set. + * @param newMax New sllipage to set, as Fixidity fraction. + */ + function setMaxSplippage(address token, uint256 newMax) external onlyOwner { + _setMaxSplippage(token, newMax); + } + + function _setMaxSplippage(address token, uint256 newMax) private { + TokenState storage tokenState = tokenStates[token]; + require(newMax != 0, "Cannot set max slippage to zero"); + tokenState.maxSlippage = FixidityLib.wrap(newMax); + require( + FixidityLib.lte(tokenState.maxSlippage, FixidityLib.fixed1()), "Splippage must be less than or equal to 1" + ); + emit MaxSlippageSet(token, newMax); + } + + /** + * @notice Allows owner to set the daily burn limit for a token. + * @param token Address of the token to set. + * @param newLimit The new limit to set, in the token units. + */ + function setDailySellLimit(address token, uint256 newLimit) external onlyOwner { + _setDailySellLimit(token, newLimit); + } + + function _setDailySellLimit(address token, uint256 newLimit) private { + TokenState storage tokenState = tokenStates[token]; + tokenState.dailySellLimit = newLimit; + emit DailyLimitSet(token, newLimit); + } + + /** + * @dev Burns CELO tokens according to burnFraction. + */ + function burnCelo() external { + return _burnCelo(); + } + + /** + * @dev Distributes the available tokens for all registered tokens to the feeBeneficiary. + */ + function distributeAll() external { + return _distributeAll(); + } + + function _distributeAll() private { + for (uint256 i = 0; i < EnumerableSet.length(activeTokens); i++) { + address token = activeTokens.at(i); + _distribute(token); + } + // distribute Celo + _distribute(registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID)); + } + + /** + * @dev Distributes the available tokens for all registered tokens to the feeBeneficiary. + */ + function handleAll() external { + return _handleAll(); + } + + function _handleAll() private { + for (uint256 i = 0; i < EnumerableSet.length(activeTokens); i++) { + // calling _handle would trigger may burn Celo and distributions + // that can be just batched at the end + address token = activeTokens.at(i); + _sell(token); + } + _distributeAll(); // distributes Celo as well + _burnCelo(); + } + + /** + * @dev Distributes the the token for to the feeBeneficiary. + */ + function handle(address tokenAddress) external { + return _handle(tokenAddress); + } + + function _handle(address tokenAddress) private { + // Celo doesn't have to be exchanged for anything + if (tokenAddress != registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID)) { + _sell(tokenAddress); + } + _burnCelo(); + _distribute(tokenAddress); + _distribute(registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID)); + } + + /** + * @notice Burns all the Celo balance of this contract. + */ + function _burnCelo() private { + TokenState storage tokenState = tokenStates[registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID)]; + ICeloToken celo = ICeloToken(registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID)); + + uint256 balanceOfCelo = address(this).balance; + + uint256 balanceToProcess = balanceOfCelo - tokenState.toDistribute - celoToBeBurned; + uint256 currentBalanceToBurn = FixidityLib.newFixed(balanceToProcess).multiply(burnFraction).fromFixed(); + uint256 totalBalanceToBurn = currentBalanceToBurn + celoToBeBurned; + celo.burn(totalBalanceToBurn); + + celoToBeBurned = 0; + tokenState.toDistribute = tokenState.toDistribute + balanceToProcess - currentBalanceToBurn; + } + + /** + * @param token The address of the token to query. + * @return The amount burned for a token. + */ + function getPastBurnForToken(address token) external view returns (uint256) { + return tokenStates[token].pastBurn; + } + + /** + * @param token The address of the token to query. + * @param amountToBurn The amount of the token to burn. + * @return Returns true if burning amountToBurn would exceed the daily limit. + */ + function dailySellLimitHit(address token, uint256 amountToBurn) public returns (bool) { + TokenState storage tokenState = tokenStates[token]; + + if (tokenState.dailySellLimit == 0) { + // if no limit set, assume uncapped + return false; + } + + uint256 currentDay = block.timestamp / 1 days; + // Pattern borrowed from Reserve.sol + if (currentDay > lastLimitDay) { + lastLimitDay = currentDay; + tokenState.currentDaySellLimit = tokenState.dailySellLimit; + } + + return amountToBurn >= tokenState.currentDaySellLimit; + } + + /** + * @notice Updates the current day limit for a token. + * @param token The address of the token to query. + * @param amountBurned the amount of the token that was burned. + */ + function updateLimits(address token, uint256 amountBurned) private { + TokenState storage tokenState = tokenStates[token]; + + if (tokenState.dailySellLimit == 0) { + // if no limit set, assume uncapped + return; + } + tokenState.currentDaySellLimit = tokenState.currentDaySellLimit - amountBurned; + emit DailySellLimitUpdated(amountBurned); + } + + /** + * @notice Allows owner to transfer tokens of this contract. It's meant for governance to + * trigger use cases not contemplated in this contract. + * @param token The address of the token to transfer. + * @param recipient The address of the recipient to transfer the tokens to. + * @param value The amount of tokens to transfer. + * @return A boolean indicating whether the transfer was successful or not. + */ + function transfer(address token, address recipient, uint256 value) external onlyOwner returns (bool) { + return IERC20(token).transfer(recipient, value); + } +} diff --git a/packages/contracts-bedrock/src/celo/FeeHandlerSeller.sol b/packages/contracts-bedrock/src/celo/FeeHandlerSeller.sol new file mode 100644 index 000000000000..4d22125af4d6 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/FeeHandlerSeller.sol @@ -0,0 +1,92 @@ +// SPDX-License-Identifier: LGPL-3.0-only +pragma solidity ^0.8.15; + +import "./common/FixidityLib.sol"; +import "../../lib/openzeppelin-contracts/contracts/access/Ownable.sol"; +import "../../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; +import "./UsingRegistry.sol"; +import "./common/Initializable.sol"; + +// Abstract class for a FeeHandlerSeller, as defined in CIP-52 +// https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0052.md +abstract contract FeeHandlerSeller is Ownable, Initializable, UsingRegistry { + using FixidityLib for FixidityLib.Fraction; + + // Address of the token + // Minimal number of reports in SortedOracles contract + mapping(address => uint256) public minimumReports; + + event MinimumReportsSet(address tokenAddress, uint256 minimumReports); + event TokenSold(address soldTokenAddress, address boughtTokenAddress, uint256 amount); + + constructor(bool testingDeployment) Initializable(testingDeployment) { } + + function initialize( + address _registryAddress, + address[] calldata tokenAddresses, + uint256[] calldata newMininumReports + ) + external + initializer + { + _transferOwnership(msg.sender); + setRegistry(_registryAddress); + + for (uint256 i = 0; i < tokenAddresses.length; i++) { + _setMinimumReports(tokenAddresses[i], newMininumReports[i]); + } + } + + /** + * @notice Allows owner to set the minimum number of reports required. + * @param newMininumReports The new update minimum number of reports required. + */ + function setMinimumReports(address tokenAddress, uint256 newMininumReports) public onlyOwner { + _setMinimumReports(tokenAddress, newMininumReports); + } + + function _setMinimumReports(address tokenAddress, uint256 newMininumReports) internal { + minimumReports[tokenAddress] = newMininumReports; + emit MinimumReportsSet(tokenAddress, newMininumReports); + } + + /** + * @dev Calculates the minimum amount of tokens that should be received for the specified + * amount with the given mid-price and maximum slippage. + * @param midPriceNumerator The numerator of the mid-price for the token pair. + * @param midPriceDenominator The denominator of the mid-price for the token pair. + * @param amount The amount of tokens to be exchanged. + * @param maxSlippage The maximum slippage percentage as a fraction of the mid-price. + * @return The minimum amount of tokens that should be received as a uint256 value. + */ + function calculateMinAmount( + uint256 midPriceNumerator, + uint256 midPriceDenominator, + uint256 amount, + uint256 maxSlippage // as fraction + ) + public + pure + returns (uint256) + { + FixidityLib.Fraction memory maxSlippageFraction = FixidityLib.wrap(maxSlippage); + + FixidityLib.Fraction memory price = FixidityLib.newFixedFraction(midPriceNumerator, midPriceDenominator); + FixidityLib.Fraction memory amountFraction = FixidityLib.newFixed(amount); + FixidityLib.Fraction memory totalAmount = price.multiply(amountFraction); + + return totalAmount.subtract(price.multiply(maxSlippageFraction).multiply(amountFraction)).fromFixed(); + } + + /** + * @notice Allows owner to transfer tokens of this contract. It's meant for governance to + * trigger use cases not contemplated in this contract. + * @param token The address of the token to transfer. + * @param amount The amount of tokens to transfer. + * @param to The address of the recipient to transfer the tokens to. + * @return A boolean indicating whether the transfer was successful or not. + */ + function transfer(address token, uint256 amount, address to) external onlyOwner returns (bool) { + return IERC20(token).transfer(to, amount); + } +} diff --git a/packages/contracts-bedrock/src/celo/Initializable.sol b/packages/contracts-bedrock/src/celo/Initializable.sol index 56859f5a0fd1..7929728eef4e 100644 --- a/packages/contracts-bedrock/src/celo/Initializable.sol +++ b/packages/contracts-bedrock/src/celo/Initializable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; contract Initializable { bool public initialized; diff --git a/packages/contracts-bedrock/src/celo/MentoFeeHandlerSeller.sol b/packages/contracts-bedrock/src/celo/MentoFeeHandlerSeller.sol new file mode 100644 index 000000000000..e5a9ff455f39 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/MentoFeeHandlerSeller.sol @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import "../../lib/openzeppelin-contracts/contracts/access/Ownable.sol"; +import "../../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; + +import "./interfaces/IStableTokenMento.sol"; + +import "./common/interfaces/IFeeHandlerSeller.sol"; +import "./stability/interfaces/ISortedOracles.sol"; +import "./common/FixidityLib.sol"; +import "./common/Initializable.sol"; + +import "./FeeHandlerSeller.sol"; + +// An implementation of FeeHandlerSeller supporting interfaces compatible with +// Mento +// See https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0052.md +contract MentoFeeHandlerSeller is FeeHandlerSeller { + using FixidityLib for FixidityLib.Fraction; + + /** + * @notice Sets initialized == true on implementation contracts. + * @param test Set to true to skip implementation initialisation. + */ + constructor(bool test) FeeHandlerSeller(test) { } + + // without this line the contract can't receive native Celo transfers + receive() external payable { } + + /** + * @notice Returns the storage, major, minor, and patch version of the contract. + * @return Storage version of the contract. + * @return Major version of the contract. + * @return Minor version of the contract. + * @return Patch version of the contract. + */ + function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) { + return (1, 1, 0, 0); + } + + function sell( + address sellTokenAddress, + address buyTokenAddress, + uint256 amount, + uint256 maxSlippage // as fraction, + ) + external + returns (uint256) + { + require( + buyTokenAddress == registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID), "Buy token can only be gold token" + ); + + IStableTokenMento stableToken = IStableTokenMento(sellTokenAddress); + require(amount <= stableToken.balanceOf(address(this)), "Balance of token to burn not enough"); + + address exchangeAddress = registry.getAddressForOrDie(stableToken.getExchangeRegistryId()); + + IExchange exchange = IExchange(exchangeAddress); + + uint256 minAmount = 0; + + ISortedOracles sortedOracles = getSortedOracles(); + + require( + sortedOracles.numRates(sellTokenAddress) >= minimumReports[sellTokenAddress], + "Number of reports for token not enough" + ); + + (uint256 rateNumerator, uint256 rateDenominator) = sortedOracles.medianRate(sellTokenAddress); + minAmount = calculateMinAmount(rateNumerator, rateDenominator, amount, maxSlippage); + + // TODO an upgrade would be to compare using routers as well + stableToken.approve(exchangeAddress, amount); + exchange.sell(amount, minAmount, false); + + IERC20 goldToken = getGoldToken(); + uint256 celoAmount = goldToken.balanceOf(address(this)); + goldToken.transfer(msg.sender, celoAmount); + + emit TokenSold(sellTokenAddress, buyTokenAddress, amount); + return celoAmount; + } +} diff --git a/packages/contracts-bedrock/src/celo/UniswapFeeHandlerSeller.sol b/packages/contracts-bedrock/src/celo/UniswapFeeHandlerSeller.sol new file mode 100644 index 000000000000..54ce14eaf37c --- /dev/null +++ b/packages/contracts-bedrock/src/celo/UniswapFeeHandlerSeller.sol @@ -0,0 +1,193 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import "../../lib/openzeppelin-contracts/contracts/utils/math/Math.sol"; +import "../../lib/openzeppelin-contracts/contracts/access/Ownable.sol"; +import "../../lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol"; +import "../../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; + +import "./UsingRegistry.sol"; + +import "./common/interfaces/IFeeHandlerSeller.sol"; +import "./stability/interfaces/ISortedOracles.sol"; +import "./common/FixidityLib.sol"; +import "./common/Initializable.sol"; +import "./FeeHandlerSeller.sol"; + +import "./uniswap/interfaces/IUniswapV2RouterMin.sol"; +import "./uniswap/interfaces/IUniswapV2FactoryMin.sol"; + +// An implementation of FeeHandlerSeller supporting interfaces compatible with +// Uniswap V2 API +// See https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0052.md +contract UniswapFeeHandlerSeller is FeeHandlerSeller { + using FixidityLib for FixidityLib.Fraction; + using EnumerableSet for EnumerableSet.AddressSet; + + uint256 constant MAX_TIMESTAMP_BLOCK_EXCHANGE = 20; + uint256 constant MAX_NUMBER_ROUTERS_PER_TOKEN = 3; + mapping(address => EnumerableSet.AddressSet) private routerAddresses; + + event ReceivedQuote(address indexed tokneAddress, address indexed router, uint256 quote); + event RouterUsed(address router); + event RouterAddressSet(address token, address router); + event RouterAddressRemoved(address token, address router); + + /** + * @notice Sets initialized == true on implementation contracts. + * @param test Set to true to skip implementation initialisation. + */ + constructor(bool test) FeeHandlerSeller(test) { } + + // without this line the contract can't receive native Celo transfers + receive() external payable { } + + /** + * @notice Returns the storage, major, minor, and patch version of the contract. + * @return Storage version of the contract. + * @return Major version of the contract. + * @return Minor version of the contract. + * @return Patch version of the contract. + */ + function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) { + return (1, 1, 0, 0); + } + + /** + * @notice Allows owner to set the router for a token. + * @param token Address of the token to set. + * @param router The new router. + */ + function setRouter(address token, address router) external onlyOwner { + _setRouter(token, router); + } + + function _setRouter(address token, address router) private { + require(router != address(0), "Router can't be address zero"); + routerAddresses[token].add(router); + require(routerAddresses[token].values().length <= MAX_NUMBER_ROUTERS_PER_TOKEN, "Max number of routers reached"); + emit RouterAddressSet(token, router); + } + + /** + * @notice Allows owner to remove a router for a token. + * @param token Address of the token. + * @param router Address of the router to remove. + */ + function removeRouter(address token, address router) external onlyOwner { + routerAddresses[token].remove(router); + emit RouterAddressRemoved(token, router); + } + + /** + * @notice Get the list of routers for a token. + * @param token The address of the token to query. + * @return An array of all the allowed router. + */ + function getRoutersForToken(address token) external view returns (address[] memory) { + return routerAddresses[token].values(); + } + + /** + * @dev Calculates the minimum amount of tokens that can be received for a given amount of sell tokens, + * taking into account the slippage and the rates of the sell token and CELO token on the Uniswap V2 pair. + * @param sellTokenAddress The address of the sell token. + * @param maxSlippage The maximum slippage allowed. + * @param amount The amount of sell tokens to be traded. + * @param bestRouter The Uniswap V2 router with the best price. + * @return The minimum amount of tokens that can be received. + */ + function calculateAllMinAmount( + address sellTokenAddress, + uint256 maxSlippage, + uint256 amount, + IUniswapV2RouterMin bestRouter + ) + private + view + returns (uint256) + { + ISortedOracles sortedOracles = getSortedOracles(); + uint256 minReports = minimumReports[sellTokenAddress]; + + require(sortedOracles.numRates(sellTokenAddress) >= minReports, "Number of reports for token not enough"); + + uint256 minimalSortedOracles = 0; + // if minimumReports for this token is zero, assume the check is not needed + if (minReports > 0) { + (uint256 rateNumerator, uint256 rateDenominator) = sortedOracles.medianRate(sellTokenAddress); + + minimalSortedOracles = calculateMinAmount(rateNumerator, rateDenominator, amount, maxSlippage); + } + + IERC20 celoToken = getGoldToken(); + address pair = IUniswapV2FactoryMin(bestRouter.factory()).getPair(sellTokenAddress, address(celoToken)); + uint256 minAmountPair = + calculateMinAmount(IERC20(sellTokenAddress).balanceOf(pair), celoToken.balanceOf(pair), amount, maxSlippage); + + return Math.max(minAmountPair, minimalSortedOracles); + } + + // This function explicitly defines few variables because it was getting error "stack too deep" + function sell( + address sellTokenAddress, + address buyTokenAddress, + uint256 amount, + uint256 maxSlippage // as fraction, + ) + external + returns (uint256) + { + require( + buyTokenAddress == registry.getAddressForOrDie(GOLD_TOKEN_REGISTRY_ID), "Buy token can only be gold token" + ); + + require(routerAddresses[sellTokenAddress].values().length > 0, "routerAddresses should be non empty"); + + // An improvement to this function would be to allow the user to pass a path as argument + // and if it generates a better outcome that the ones enabled that gets used + // and the user gets a reward + + IERC20 celoToken = getGoldToken(); + + IUniswapV2RouterMin bestRouter; + uint256 bestRouterQuote = 0; + + address[] memory path = new address[](2); + + path[0] = sellTokenAddress; + path[1] = address(celoToken); + + for (uint256 i = 0; i < routerAddresses[sellTokenAddress].values().length; i++) { + address poolAddress = routerAddresses[sellTokenAddress].at(i); + IUniswapV2RouterMin router = IUniswapV2RouterMin(poolAddress); + + // Using the second return value becuase it's the last argument, + // the previous values show how many tokens are exchanged in each path + // so the first value would be equivalent to balanceToBurn + uint256 wouldGet = router.getAmountsOut(amount, path)[1]; + + emit ReceivedQuote(sellTokenAddress, poolAddress, wouldGet); + if (wouldGet > bestRouterQuote) { + bestRouterQuote = wouldGet; + bestRouter = router; + } + } + + require(bestRouterQuote != 0, "Can't exchange with zero quote"); + + uint256 minAmount = 0; + minAmount = calculateAllMinAmount(sellTokenAddress, maxSlippage, amount, bestRouter); + + IERC20(sellTokenAddress).approve(address(bestRouter), amount); + bestRouter.swapExactTokensForTokens( + amount, minAmount, path, address(this), block.timestamp + MAX_TIMESTAMP_BLOCK_EXCHANGE + ); + + uint256 celoAmount = celoToken.balanceOf(address(this)); + celoToken.transfer(msg.sender, celoAmount); + emit RouterUsed(address(bestRouter)); + emit TokenSold(sellTokenAddress, buyTokenAddress, amount); + return celoAmount; + } +} diff --git a/packages/contracts-bedrock/src/celo/common/FixidityLib.sol b/packages/contracts-bedrock/src/celo/common/FixidityLib.sol new file mode 100644 index 000000000000..613da1856219 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/common/FixidityLib.sol @@ -0,0 +1,288 @@ +// SPDX-License-Identifier: LGPL-3.0-only +pragma solidity ^0.8.15; + +/** + * @title FixidityLib + * @author Gadi Guy, Alberto Cuesta Canada + * @notice This library provides fixed point arithmetic with protection against + * overflow. + * All operations are done with uint256 and the operands must have been created + * with any of the newFrom* functions, which shift the comma digits() to the + * right and check for limits, or with wrap() which expects a number already + * in the internal representation of a fraction. + * When using this library be sure to use maxNewFixed() as the upper limit for + * creation of fixed point numbers. + * @dev All contained functions are pure and thus marked internal to be inlined + * on consuming contracts at compile time for gas efficiency. + */ +library FixidityLib { + struct Fraction { + uint256 value; + } + + /** + * @notice Number of positions that the comma is shifted to the right. + */ + function digits() internal pure returns (uint8) { + return 24; + } + + uint256 private constant FIXED1_UINT = 1000000000000000000000000; + + /** + * @notice This is 1 in the fixed point units used in this library. + * @dev Test fixed1() equals 10^digits() + * Hardcoded to 24 digits. + */ + function fixed1() internal pure returns (Fraction memory) { + return Fraction(FIXED1_UINT); + } + + /** + * @notice Wrap a uint256 that represents a 24-decimal fraction in a Fraction + * struct. + * @param x Number that already represents a 24-decimal fraction. + * @return A Fraction struct with contents x. + */ + function wrap(uint256 x) internal pure returns (Fraction memory) { + return Fraction(x); + } + + /** + * @notice Unwraps the uint256 inside of a Fraction struct. + */ + function unwrap(Fraction memory x) internal pure returns (uint256) { + return x.value; + } + + /** + * @notice The amount of decimals lost on each multiplication operand. + * @dev Test mulPrecision() equals sqrt(fixed1) + */ + function mulPrecision() internal pure returns (uint256) { + return 1000000000000; + } + + /** + * @notice Maximum value that can be converted to fixed point. Optimize for deployment. + * @dev + * Test maxNewFixed() equals maxUint256() / fixed1() + */ + function maxNewFixed() internal pure returns (uint256) { + return 115792089237316195423570985008687907853269984665640564; + } + + /** + * @notice Converts a uint256 to fixed point Fraction + * @dev Test newFixed(0) returns 0 + * Test newFixed(1) returns fixed1() + * Test newFixed(maxNewFixed()) returns maxNewFixed() * fixed1() + * Test newFixed(maxNewFixed()+1) fails + */ + function newFixed(uint256 x) internal pure returns (Fraction memory) { + require(x <= maxNewFixed(), "can't create fixidity number larger than maxNewFixed()"); + return Fraction(x * FIXED1_UINT); + } + + /** + * @notice Converts a uint256 in the fixed point representation of this + * library to a non decimal. All decimal digits will be truncated. + */ + function fromFixed(Fraction memory x) internal pure returns (uint256) { + return x.value / FIXED1_UINT; + } + + /** + * @notice Converts two uint256 representing a fraction to fixed point units, + * equivalent to multiplying dividend and divisor by 10^digits(). + * @param numerator numerator must be <= maxNewFixed() + * @param denominator denominator must be <= maxNewFixed() and denominator can't be 0 + * @dev + * Test newFixedFraction(1,0) fails + * Test newFixedFraction(0,1) returns 0 + * Test newFixedFraction(1,1) returns fixed1() + * Test newFixedFraction(1,fixed1()) returns 1 + */ + function newFixedFraction(uint256 numerator, uint256 denominator) internal pure returns (Fraction memory) { + Fraction memory convertedNumerator = newFixed(numerator); + Fraction memory convertedDenominator = newFixed(denominator); + return divide(convertedNumerator, convertedDenominator); + } + + /** + * @notice Returns the integer part of a fixed point number. + * @dev + * Test integer(0) returns 0 + * Test integer(fixed1()) returns fixed1() + * Test integer(newFixed(maxNewFixed())) returns maxNewFixed()*fixed1() + */ + function integer(Fraction memory x) internal pure returns (Fraction memory) { + return Fraction((x.value / FIXED1_UINT) * FIXED1_UINT); // Can't overflow + } + + /** + * @notice Returns the fractional part of a fixed point number. + * In the case of a negative number the fractional is also negative. + * @dev + * Test fractional(0) returns 0 + * Test fractional(fixed1()) returns 0 + * Test fractional(fixed1()-1) returns 10^24-1 + */ + function fractional(Fraction memory x) internal pure returns (Fraction memory) { + return Fraction(x.value - (x.value / FIXED1_UINT) * FIXED1_UINT); // Can't overflow + } + + /** + * @notice x+y. + * @dev The maximum value that can be safely used as an addition operator is defined as + * maxFixedAdd = maxUint256()-1 / 2, or + * 57896044618658097711785492504343953926634992332820282019728792003956564819967. + * Test add(maxFixedAdd,maxFixedAdd) equals maxFixedAdd + maxFixedAdd + * Test add(maxFixedAdd+1,maxFixedAdd+1) throws + */ + function add(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) { + uint256 z = x.value + y.value; + require(z >= x.value, "add overflow detected"); + return Fraction(z); + } + + /** + * @notice x-y. + * @dev + * Test subtract(6, 10) fails + */ + function subtract(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) { + require(x.value >= y.value, "substraction underflow detected"); + return Fraction(x.value - y.value); + } + + /** + * @notice x*y. If any of the operators is higher than the max multiplier value it + * might overflow. + * @dev The maximum value that can be safely used as a multiplication operator + * (maxFixedMul) is calculated as sqrt(maxUint256()*fixed1()), + * or 340282366920938463463374607431768211455999999999999 + * Test multiply(0,0) returns 0 + * Test multiply(maxFixedMul,0) returns 0 + * Test multiply(0,maxFixedMul) returns 0 + * Test multiply(fixed1()/mulPrecision(),fixed1()*mulPrecision()) returns fixed1() + * Test multiply(maxFixedMul,maxFixedMul) is around maxUint256() + * Test multiply(maxFixedMul+1,maxFixedMul+1) fails + */ + function multiply(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) { + if (x.value == 0 || y.value == 0) return Fraction(0); + if (y.value == FIXED1_UINT) return x; + if (x.value == FIXED1_UINT) return y; + + // Separate into integer and fractional parts + // x = x1 + x2, y = y1 + y2 + uint256 x1 = integer(x).value / FIXED1_UINT; + uint256 x2 = fractional(x).value; + uint256 y1 = integer(y).value / FIXED1_UINT; + uint256 y2 = fractional(y).value; + + // (x1 + x2) * (y1 + y2) = (x1 * y1) + (x1 * y2) + (x2 * y1) + (x2 * y2) + uint256 x1y1 = x1 * y1; + if (x1 != 0) require(x1y1 / x1 == y1, "overflow x1y1 detected"); + + // x1y1 needs to be multiplied back by fixed1 + // solium-disable-next-line mixedcase + uint256 fixed_x1y1 = x1y1 * FIXED1_UINT; + if (x1y1 != 0) require(fixed_x1y1 / x1y1 == FIXED1_UINT, "overflow x1y1 * fixed1 detected"); + x1y1 = fixed_x1y1; + + uint256 x2y1 = x2 * y1; + if (x2 != 0) require(x2y1 / x2 == y1, "overflow x2y1 detected"); + + uint256 x1y2 = x1 * y2; + if (x1 != 0) require(x1y2 / x1 == y2, "overflow x1y2 detected"); + + x2 = x2 / mulPrecision(); + y2 = y2 / mulPrecision(); + uint256 x2y2 = x2 * y2; + if (x2 != 0) require(x2y2 / x2 == y2, "overflow x2y2 detected"); + + // result = fixed1() * x1 * y1 + x1 * y2 + x2 * y1 + x2 * y2 / fixed1(); + Fraction memory result = Fraction(x1y1); + result = add(result, Fraction(x2y1)); // Add checks for overflow + result = add(result, Fraction(x1y2)); // Add checks for overflow + result = add(result, Fraction(x2y2)); // Add checks for overflow + return result; + } + + /** + * @notice 1/x + * @dev + * Test reciprocal(0) fails + * Test reciprocal(fixed1()) returns fixed1() + * Test reciprocal(fixed1()*fixed1()) returns 1 // Testing how the fractional is truncated + * Test reciprocal(1+fixed1()*fixed1()) returns 0 // Testing how the fractional is truncated + * Test reciprocal(newFixedFraction(1, 1e24)) returns newFixed(1e24) + */ + function reciprocal(Fraction memory x) internal pure returns (Fraction memory) { + require(x.value != 0, "can't call reciprocal(0)"); + return Fraction((FIXED1_UINT * FIXED1_UINT) / x.value); // Can't overflow + } + + /** + * @notice x/y. If the dividend is higher than the max dividend value, it + * might overflow. You can use multiply(x,reciprocal(y)) instead. + * @dev The maximum value that can be safely used as a dividend (maxNewFixed) is defined as + * divide(maxNewFixed,newFixedFraction(1,fixed1())) is around maxUint256(). + * This yields the value 115792089237316195423570985008687907853269984665640564. + * Test maxNewFixed equals maxUint256()/fixed1() + * Test divide(maxNewFixed,1) equals maxNewFixed*(fixed1) + * Test divide(maxNewFixed+1,multiply(mulPrecision(),mulPrecision())) throws + * Test divide(fixed1(),0) fails + * Test divide(maxNewFixed,1) = maxNewFixed*(10^digits()) + * Test divide(maxNewFixed+1,1) throws + */ + function divide(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) { + require(y.value != 0, "can't divide by 0"); + uint256 X = x.value * FIXED1_UINT; + require(X / FIXED1_UINT == x.value, "overflow at divide"); + return Fraction(X / y.value); + } + + /** + * @notice x > y + */ + function gt(Fraction memory x, Fraction memory y) internal pure returns (bool) { + return x.value > y.value; + } + + /** + * @notice x >= y + */ + function gte(Fraction memory x, Fraction memory y) internal pure returns (bool) { + return x.value >= y.value; + } + + /** + * @notice x < y + */ + function lt(Fraction memory x, Fraction memory y) internal pure returns (bool) { + return x.value < y.value; + } + + /** + * @notice x <= y + */ + function lte(Fraction memory x, Fraction memory y) internal pure returns (bool) { + return x.value <= y.value; + } + + /** + * @notice x == y + */ + function equals(Fraction memory x, Fraction memory y) internal pure returns (bool) { + return x.value == y.value; + } + + /** + * @notice x <= 1 + */ + function isProperFraction(Fraction memory x) internal pure returns (bool) { + return lte(x, fixed1()); + } +} diff --git a/packages/contracts-bedrock/src/celo/common/Freezable.sol b/packages/contracts-bedrock/src/celo/common/Freezable.sol new file mode 100644 index 000000000000..7541ea6fa571 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/common/Freezable.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import "../UsingRegistry.sol"; + +contract Freezable is UsingRegistry { + // onlyWhenNotFrozen functions can only be called when `frozen` is false, otherwise they will + // revert. + modifier onlyWhenNotFrozen() { + require(!getFreezer().isFrozen(address(this)), "can't call when contract is frozen"); + _; + } +} diff --git a/packages/contracts-bedrock/src/celo/common/Initializable.sol b/packages/contracts-bedrock/src/celo/common/Initializable.sol new file mode 100644 index 000000000000..92baac5494d3 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/common/Initializable.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +contract Initializable { + bool public initialized; + + constructor(bool testingDeployment) { + if (!testingDeployment) { + initialized = true; + } + } + + modifier initializer() { + require(!initialized, "contract already initialized"); + initialized = true; + _; + } +} diff --git a/packages/contracts-bedrock/src/celo/common/interfaces/ICeloToken.sol b/packages/contracts-bedrock/src/celo/common/interfaces/ICeloToken.sol new file mode 100644 index 000000000000..5bf2033f3172 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/common/interfaces/ICeloToken.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: LGPL-3.0-only +pragma solidity ^0.8.15; + +/** + * @title This interface describes the non- ERC20 shared interface for all Celo Tokens, and + * in the absence of interface inheritance is intended as a companion to IERC20.sol. + */ +interface ICeloToken { + function transferWithComment(address, uint256, string calldata) external returns (bool); + function name() external view returns (string memory); + function symbol() external view returns (string memory); + function decimals() external view returns (uint8); + function burn(uint256 value) external returns (bool); +} diff --git a/packages/contracts-bedrock/src/celo/common/interfaces/ICeloVersionedContract.sol b/packages/contracts-bedrock/src/celo/common/interfaces/ICeloVersionedContract.sol index 2e79fb2275ce..37b1538c2a12 100644 --- a/packages/contracts-bedrock/src/celo/common/interfaces/ICeloVersionedContract.sol +++ b/packages/contracts-bedrock/src/celo/common/interfaces/ICeloVersionedContract.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface ICeloVersionedContract { /** diff --git a/packages/contracts-bedrock/src/celo/common/interfaces/IExchange.sol b/packages/contracts-bedrock/src/celo/common/interfaces/IExchange.sol new file mode 100644 index 000000000000..4e15e8a8750d --- /dev/null +++ b/packages/contracts-bedrock/src/celo/common/interfaces/IExchange.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: LGPL-3.0-only +pragma solidity ^0.8.15; + +interface IExchange { + function buy(uint256, uint256, bool) external returns (uint256); + + function sell(uint256, uint256, bool) external returns (uint256); + + function exchange(uint256, uint256, bool) external returns (uint256); + + function setUpdateFrequency(uint256) external; + + function getBuyTokenAmount(uint256, bool) external view returns (uint256); + + function getSellTokenAmount(uint256, bool) external view returns (uint256); + + function getBuyAndSellBuckets(bool) external view returns (uint256, uint256); +} diff --git a/packages/contracts-bedrock/src/celo/common/interfaces/IFeeHandler.sol b/packages/contracts-bedrock/src/celo/common/interfaces/IFeeHandler.sol new file mode 100644 index 000000000000..b707a446a685 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/common/interfaces/IFeeHandler.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: LGPL-3.0-only +pragma solidity ^0.8.15; + +import "../FixidityLib.sol"; + +interface IFeeHandler { + // sets the portion of the fee that should be burned. + function setBurnFraction(uint256 fraction) external; + + function addToken(address tokenAddress, address handlerAddress) external; + function removeToken(address tokenAddress) external; + + function setHandler(address tokenAddress, address handlerAddress) external; + + // marks token to be handled in "handleAll()) + function activateToken(address tokenAddress) external; + function deactivateToken(address tokenAddress) external; + + function sell(address tokenAddress) external; + + // calls exchange(tokenAddress), and distribute(tokenAddress) + function handle(address tokenAddress) external; + + // main entrypoint for a burn, iterates over token and calles handle + function handleAll() external; + + // Sends the balance of token at tokenAddress to feesBeneficiary, + // according to the entry tokensToDistribute[tokenAddress] + function distribute(address tokenAddress) external; + + // burns the balance of Celo in the contract minus the entry of tokensToDistribute[CeloAddress] + function burnCelo() external; + + // calls distribute for all the nonCeloTokens + function distributeAll() external; + + // in case some funds need to be returned or moved to another contract + function transfer(address token, address recipient, uint256 value) external returns (bool); +} diff --git a/packages/contracts-bedrock/src/celo/common/interfaces/IFeeHandlerSeller.sol b/packages/contracts-bedrock/src/celo/common/interfaces/IFeeHandlerSeller.sol new file mode 100644 index 000000000000..c3a9df0ee324 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/common/interfaces/IFeeHandlerSeller.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: LGPL-3.0-only +pragma solidity ^0.8.15; + +import "../FixidityLib.sol"; + +interface IFeeHandlerSeller { + function sell( + address sellTokenAddress, + address buyTokenAddress, + uint256 amount, + uint256 minAmount + ) + external + returns (uint256); + // in case some funds need to be returned or moved to another contract + function transfer(address token, uint256 amount, address to) external returns (bool); +} diff --git a/packages/contracts-bedrock/src/celo/common/libraries/ReentrancyGuard.sol b/packages/contracts-bedrock/src/celo/common/libraries/ReentrancyGuard.sol new file mode 100644 index 000000000000..ff1909c76a25 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/common/libraries/ReentrancyGuard.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +/** + * @title Helps contracts guard against reentrancy attacks. + * @author Remco Bloemen , Eenae + * @dev If you mark a function `nonReentrant`, you should also + * mark it `external`. + */ +abstract contract ReentrancyGuard { + /// @dev counter to allow mutex lock with only one SSTORE operation + uint256 private _guardCounter; + + constructor() { + // The counter starts at one to prevent changing it from zero to a non-zero + // value, which is a more expensive operation. + _guardCounter = 1; + } + + /** + * @dev Prevents a contract from calling itself, directly or indirectly. + * Calling a `nonReentrant` function from another `nonReentrant` + * function is not supported. It is possible to prevent this from happening + * by making the `nonReentrant` function external, and make it call a + * `private` function that does the actual work. + */ + modifier nonReentrant() { + _guardCounter += 1; + uint256 localCounter = _guardCounter; + _; + require(localCounter == _guardCounter, "reentrant call"); + } +} diff --git a/packages/contracts-bedrock/src/celo/common/linkedlists/AddressSortedLinkedList.sol b/packages/contracts-bedrock/src/celo/common/linkedlists/AddressSortedLinkedList.sol new file mode 100644 index 000000000000..38ae7359e0e0 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/common/linkedlists/AddressSortedLinkedList.sol @@ -0,0 +1,267 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import "@openzeppelin/contracts/utils/math/Math.sol"; + +import "./SortedLinkedList.sol"; + +/** + * @title Maintains a sorted list of unsigned ints keyed by address. + */ +library AddressSortedLinkedList { + using SortedLinkedList for SortedLinkedList.List; + + /** + * @notice Inserts an element into a doubly linked list. + * @param list A storage pointer to the underlying list. + * @param key The key of the element to insert. + * @param value The element value. + * @param lesserKey The key of the element less than the element to insert. + * @param greaterKey The key of the element greater than the element to insert. + */ + function insert( + SortedLinkedList.List storage list, + address key, + uint256 value, + address lesserKey, + address greaterKey + ) + public + { + list.insert(toBytes(key), value, toBytes(lesserKey), toBytes(greaterKey)); + } + + /** + * @notice Removes an element from the doubly linked list. + * @param list A storage pointer to the underlying list. + * @param key The key of the element to remove. + */ + function remove(SortedLinkedList.List storage list, address key) public { + list.remove(toBytes(key)); + } + + /** + * @notice Updates an element in the list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @param value The element value. + * @param lesserKey The key of the element will be just left of `key` after the update. + * @param greaterKey The key of the element will be just right of `key` after the update. + * @dev Note that only one of "lesserKey" or "greaterKey" needs to be correct to reduce friction. + */ + function update( + SortedLinkedList.List storage list, + address key, + uint256 value, + address lesserKey, + address greaterKey + ) + public + { + list.update(toBytes(key), value, toBytes(lesserKey), toBytes(greaterKey)); + } + + /** + * @notice Returns whether or not a particular key is present in the sorted list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @return Whether or not the key is in the sorted list. + */ + function contains(SortedLinkedList.List storage list, address key) public view returns (bool) { + return list.contains(toBytes(key)); + } + + /** + * @notice Returns the value for a particular key in the sorted list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @return The element value. + */ + function getValue(SortedLinkedList.List storage list, address key) public view returns (uint256) { + return list.getValue(toBytes(key)); + } + + /** + * @notice Gets all elements from the doubly linked list. + * @return Array of all keys in the list. + * @return Values corresponding to keys, which will be ordered largest to smallest. + */ + function getElements(SortedLinkedList.List storage list) public view returns (address[] memory, uint256[] memory) { + bytes32[] memory byteKeys = list.getKeys(); + address[] memory keys = new address[](byteKeys.length); + uint256[] memory values = new uint256[](byteKeys.length); + for (uint256 i = 0; i < byteKeys.length; i = i + 1) { + keys[i] = toAddress(byteKeys[i]); + values[i] = list.values[byteKeys[i]]; + } + return (keys, values); + } + + /** + * @notice Returns the minimum of `max` and the number of elements in the list > threshold. + * @param list A storage pointer to the underlying list. + * @param threshold The number that the element must exceed to be included. + * @param max The maximum number returned by this function. + * @return The minimum of `max` and the number of elements in the list > threshold. + */ + function numElementsGreaterThan( + SortedLinkedList.List storage list, + uint256 threshold, + uint256 max + ) + public + view + returns (uint256) + { + uint256 revisedMax = Math.min(max, list.list.numElements); + bytes32 key = list.list.head; + for (uint256 i = 0; i < revisedMax; i = i + 1) { + if (list.getValue(key) < threshold) { + return i; + } + key = list.list.elements[key].previousKey; + } + return revisedMax; + } + + /** + * @notice Returns the N greatest elements of the list. + * @param list A storage pointer to the underlying list. + * @param n The number of elements to return. + * @return The keys of the greatest elements. + */ + function headN(SortedLinkedList.List storage list, uint256 n) public view returns (address[] memory) { + bytes32[] memory byteKeys = list.headN(n); + address[] memory keys = new address[](n); + for (uint256 i = 0; i < n; i = i + 1) { + keys[i] = toAddress(byteKeys[i]); + } + return keys; + } + + /** + * @notice Gets all element keys from the doubly linked list. + * @param list A storage pointer to the underlying list. + * @return All element keys from head to tail. + */ + function getKeys(SortedLinkedList.List storage list) public view returns (address[] memory) { + return headN(list, list.list.numElements); + } + + /** + * @notice Returns the number of elements in the list. + * @param list A storage pointer to the underlying list. + * @return The number of elements in the list. + */ + function getNumElements(SortedLinkedList.List storage list) public view returns (uint256) { + return list.list.numElements; + } + + /** + * @notice Returns the key of the first element in the list. + * @param list A storage pointer to the underlying list. + * @return The key of the first element in the list. + */ + function getHead(SortedLinkedList.List storage list) public view returns (address) { + return toAddress(list.list.head); + } + + /** + * @notice Returns the key of the last element in the list. + * @param list A storage pointer to the underlying list. + * @return The key of the last element in the list. + */ + function getTail(SortedLinkedList.List storage list) public view returns (address) { + return toAddress(list.list.tail); + } + + /** + * @notice Gets lesser and greater for address that has increased it's value. + * @param list A storage pointer to the underlying list. + * @param group The original address. + * @param newValue New value that has to be bigger or equal than the previous one. + * @param loopLimit The max limit of loops that will be executed. + */ + function getLesserAndGreaterOfAddressThatIncreasedValue( + SortedLinkedList.List storage list, + address group, + uint256 newValue, + uint256 loopLimit + ) + public + view + returns (address previous, address next) + { + (, previous, next) = get(list, group); + + while (next != address(0) && loopLimit != 0 && newValue > getValue(list, next)) { + previous = next; + (,, next) = get(list, previous); + loopLimit--; + } + + if (loopLimit == 0) { + return (address(0), address(0)); + } + } + + /** + * @notice Gets lesser and greater for address that has decreased it's value. + * @param list A storage pointer to the underlying list. + * @param group The original address. + * @param newValue New value that has to be smaller or equal than the previous one. + * @param loopLimit The max limit of loops that will be executed. + */ + function getLesserAndGreaterOfAddressThatDecreasedValue( + SortedLinkedList.List storage list, + address group, + uint256 newValue, + uint256 loopLimit + ) + public + view + returns (address previous, address next) + { + (, previous, next) = get(list, group); + while (previous != address(0) && loopLimit != 0 && newValue < getValue(list, previous)) { + next = previous; + (, previous,) = get(list, next); + loopLimit--; + } + if (loopLimit == 0) { + return (address(0), address(0)); + } + } + + function toBytes(address a) public pure returns (bytes32) { + return bytes32(uint256(uint160(a)) << 96); + } + + function toAddress(bytes32 b) public pure returns (address) { + return address(uint160(uint256(b) >> 96)); + } + + /** + * @notice Returns Element based on key. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @return exists Whether or not the key exists. + * @return previousKey Previous key. + * @return nextKey Next key. + */ + function get( + SortedLinkedList.List storage list, + address key + ) + internal + view + returns (bool exists, address previousKey, address nextKey) + { + LinkedList.Element memory element = list.get(toBytes(key)); + exists = element.exists; + if (element.exists) { + previousKey = toAddress(element.previousKey); + nextKey = toAddress(element.nextKey); + } + } +} diff --git a/packages/contracts-bedrock/src/celo/common/linkedlists/AddressSortedLinkedListWithMedian.sol b/packages/contracts-bedrock/src/celo/common/linkedlists/AddressSortedLinkedListWithMedian.sol new file mode 100644 index 000000000000..2ddf56612244 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/common/linkedlists/AddressSortedLinkedListWithMedian.sol @@ -0,0 +1,160 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import "./SortedLinkedListWithMedian.sol"; + +/** + * @title Maintains a sorted list of unsigned ints keyed by address. + */ +library AddressSortedLinkedListWithMedian { + using SortedLinkedListWithMedian for SortedLinkedListWithMedian.List; + + function toBytes(address a) public pure returns (bytes32) { + return bytes32(uint256(uint160(a)) << 96); + } + + function toAddress(bytes32 b) public pure returns (address) { + return address(uint160(uint256(b) >> 96)); + } + + /** + * @notice Inserts an element into a doubly linked list. + * @param list A storage pointer to the underlying list. + * @param key The key of the element to insert. + * @param value The element value. + * @param lesserKey The key of the element less than the element to insert. + * @param greaterKey The key of the element greater than the element to insert. + */ + function insert( + SortedLinkedListWithMedian.List storage list, + address key, + uint256 value, + address lesserKey, + address greaterKey + ) + public + { + list.insert(toBytes(key), value, toBytes(lesserKey), toBytes(greaterKey)); + } + + /** + * @notice Removes an element from the doubly linked list. + * @param list A storage pointer to the underlying list. + * @param key The key of the element to remove. + */ + function remove(SortedLinkedListWithMedian.List storage list, address key) public { + list.remove(toBytes(key)); + } + + /** + * @notice Updates an element in the list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @param value The element value. + * @param lesserKey The key of the element will be just left of `key` after the update. + * @param greaterKey The key of the element will be just right of `key` after the update. + * @dev Note that only one of "lesserKey" or "greaterKey" needs to be correct to reduce friction. + */ + function update( + SortedLinkedListWithMedian.List storage list, + address key, + uint256 value, + address lesserKey, + address greaterKey + ) + public + { + list.update(toBytes(key), value, toBytes(lesserKey), toBytes(greaterKey)); + } + + /** + * @notice Returns whether or not a particular key is present in the sorted list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @return Whether or not the key is in the sorted list. + */ + function contains(SortedLinkedListWithMedian.List storage list, address key) public view returns (bool) { + return list.contains(toBytes(key)); + } + + /** + * @notice Returns the value for a particular key in the sorted list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @return The element value. + */ + function getValue(SortedLinkedListWithMedian.List storage list, address key) public view returns (uint256) { + return list.getValue(toBytes(key)); + } + + /** + * @notice Returns the median value of the sorted list. + * @param list A storage pointer to the underlying list. + * @return The median value. + */ + function getMedianValue(SortedLinkedListWithMedian.List storage list) public view returns (uint256) { + return list.getValue(list.median); + } + + /** + * @notice Returns the key of the first element in the list. + * @param list A storage pointer to the underlying list. + * @return The key of the first element in the list. + */ + function getHead(SortedLinkedListWithMedian.List storage list) external view returns (address) { + return toAddress(list.getHead()); + } + + /** + * @notice Returns the key of the median element in the list. + * @param list A storage pointer to the underlying list. + * @return The key of the median element in the list. + */ + function getMedian(SortedLinkedListWithMedian.List storage list) external view returns (address) { + return toAddress(list.getMedian()); + } + + /** + * @notice Returns the key of the last element in the list. + * @param list A storage pointer to the underlying list. + * @return The key of the last element in the list. + */ + function getTail(SortedLinkedListWithMedian.List storage list) external view returns (address) { + return toAddress(list.getTail()); + } + + /** + * @notice Returns the number of elements in the list. + * @param list A storage pointer to the underlying list. + * @return The number of elements in the list. + */ + function getNumElements(SortedLinkedListWithMedian.List storage list) external view returns (uint256) { + return list.getNumElements(); + } + + /** + * @notice Gets all elements from the doubly linked list. + * @param list A storage pointer to the underlying list. + * @return Array of all keys in the list. + * @return Values corresponding to keys, which will be ordered largest to smallest. + * @return Array of relations to median of corresponding list elements. + */ + function getElements(SortedLinkedListWithMedian.List storage list) + public + view + returns (address[] memory, uint256[] memory, SortedLinkedListWithMedian.MedianRelation[] memory) + { + bytes32[] memory byteKeys = list.getKeys(); + address[] memory keys = new address[](byteKeys.length); + uint256[] memory values = new uint256[](byteKeys.length); + // prettier-ignore + SortedLinkedListWithMedian.MedianRelation[] memory relations = + new SortedLinkedListWithMedian.MedianRelation[](keys.length); + for (uint256 i = 0; i < byteKeys.length; i++) { + keys[i] = toAddress(byteKeys[i]); + values[i] = list.getValue(byteKeys[i]); + relations[i] = list.relation[byteKeys[i]]; + } + return (keys, values, relations); + } +} diff --git a/packages/contracts-bedrock/src/celo/common/linkedlists/LinkedList.sol b/packages/contracts-bedrock/src/celo/common/linkedlists/LinkedList.sol new file mode 100644 index 000000000000..d04e8b7e027c --- /dev/null +++ b/packages/contracts-bedrock/src/celo/common/linkedlists/LinkedList.sol @@ -0,0 +1,162 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +/** + * @title Maintains a doubly linked list keyed by bytes32. + * @dev Following the `next` pointers will lead you to the head, rather than the tail. + */ +library LinkedList { + struct Element { + bytes32 previousKey; + bytes32 nextKey; + bool exists; + } + + struct List { + bytes32 head; + bytes32 tail; + uint256 numElements; + mapping(bytes32 => Element) elements; + } + + /** + * @notice Inserts an element into a doubly linked list. + * @param list A storage pointer to the underlying list. + * @param key The key of the element to insert. + * @param previousKey The key of the element that comes before the element to insert. + * @param nextKey The key of the element that comes after the element to insert. + */ + function insert(List storage list, bytes32 key, bytes32 previousKey, bytes32 nextKey) internal { + require(key != bytes32(0), "Key must be defined"); + require(!contains(list, key), "Can't insert an existing element"); + require(previousKey != key && nextKey != key, "Key cannot be the same as previousKey or nextKey"); + + Element storage element = list.elements[key]; + element.exists = true; + + if (list.numElements == 0) { + list.tail = key; + list.head = key; + } else { + require(previousKey != bytes32(0) || nextKey != bytes32(0), "Either previousKey or nextKey must be defined"); + + element.previousKey = previousKey; + element.nextKey = nextKey; + + if (previousKey != bytes32(0)) { + require(contains(list, previousKey), "If previousKey is defined, it must exist in the list"); + Element storage previousElement = list.elements[previousKey]; + require(previousElement.nextKey == nextKey, "previousKey must be adjacent to nextKey"); + previousElement.nextKey = key; + } else { + list.tail = key; + } + + if (nextKey != bytes32(0)) { + require(contains(list, nextKey), "If nextKey is defined, it must exist in the list"); + Element storage nextElement = list.elements[nextKey]; + require(nextElement.previousKey == previousKey, "previousKey must be adjacent to nextKey"); + nextElement.previousKey = key; + } else { + list.head = key; + } + } + + list.numElements = list.numElements + 1; + } + + /** + * @notice Inserts an element at the tail of the doubly linked list. + * @param list A storage pointer to the underlying list. + * @param key The key of the element to insert. + */ + function push(List storage list, bytes32 key) internal { + insert(list, key, bytes32(0), list.tail); + } + + /** + * @notice Removes an element from the doubly linked list. + * @param list A storage pointer to the underlying list. + * @param key The key of the element to remove. + */ + function remove(List storage list, bytes32 key) internal { + Element storage element = list.elements[key]; + require(key != bytes32(0) && contains(list, key), "key not in list"); + if (element.previousKey != bytes32(0)) { + Element storage previousElement = list.elements[element.previousKey]; + previousElement.nextKey = element.nextKey; + } else { + list.tail = element.nextKey; + } + + if (element.nextKey != bytes32(0)) { + Element storage nextElement = list.elements[element.nextKey]; + nextElement.previousKey = element.previousKey; + } else { + list.head = element.previousKey; + } + + delete list.elements[key]; + list.numElements = list.numElements - 1; + } + + /** + * @notice Updates an element in the list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @param previousKey The key of the element that comes before the updated element. + * @param nextKey The key of the element that comes after the updated element. + */ + function update(List storage list, bytes32 key, bytes32 previousKey, bytes32 nextKey) internal { + require(key != bytes32(0) && key != previousKey && key != nextKey && contains(list, key), "key on in list"); + remove(list, key); + insert(list, key, previousKey, nextKey); + } + + /** + * @notice Returns whether or not a particular key is present in the sorted list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @return Whether or not the key is in the sorted list. + */ + function contains(List storage list, bytes32 key) internal view returns (bool) { + return list.elements[key].exists; + } + + /** + * @notice Returns Element based on key. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @return Whether or not the key is in the sorted list. + */ + function get(List storage list, bytes32 key) internal view returns (Element memory) { + return list.elements[key]; + } + + /** + * @notice Returns the keys of the N elements at the head of the list. + * @param list A storage pointer to the underlying list. + * @param n The number of elements to return. + * @return The keys of the N elements at the head of the list. + * @dev Reverts if n is greater than the number of elements in the list. + */ + function headN(List storage list, uint256 n) internal view returns (bytes32[] memory) { + require(n <= list.numElements, "not enough elements"); + bytes32[] memory keys = new bytes32[](n); + bytes32 key = list.head; + for (uint256 i = 0; i < n; i = i + 1) { + keys[i] = key; + key = list.elements[key].previousKey; + } + return keys; + } + + /** + * @notice Gets all element keys from the doubly linked list. + * @param list A storage pointer to the underlying list. + * @return All element keys from head to tail. + */ + function getKeys(List storage list) internal view returns (bytes32[] memory) { + return headN(list, list.numElements); + } +} diff --git a/packages/contracts-bedrock/src/celo/common/linkedlists/SortedLinkedList.sol b/packages/contracts-bedrock/src/celo/common/linkedlists/SortedLinkedList.sol new file mode 100644 index 000000000000..9703cf565523 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/common/linkedlists/SortedLinkedList.sol @@ -0,0 +1,218 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import "./LinkedList.sol"; + +/** + * @title Maintains a sorted list of unsigned ints keyed by bytes32. + */ +library SortedLinkedList { + using LinkedList for LinkedList.List; + + struct List { + LinkedList.List list; + mapping(bytes32 => uint256) values; + } + + /** + * @notice Inserts an element into a doubly linked list. + * @param list A storage pointer to the underlying list. + * @param key The key of the element to insert. + * @param value The element value. + * @param lesserKey The key of the element less than the element to insert. + * @param greaterKey The key of the element greater than the element to insert. + */ + function insert(List storage list, bytes32 key, uint256 value, bytes32 lesserKey, bytes32 greaterKey) internal { + require(key != bytes32(0) && key != lesserKey && key != greaterKey && !contains(list, key), "invalid key"); + require( + (lesserKey != bytes32(0) || greaterKey != bytes32(0)) || list.list.numElements == 0, + "greater and lesser key zero" + ); + require(contains(list, lesserKey) || lesserKey == bytes32(0), "invalid lesser key"); + require(contains(list, greaterKey) || greaterKey == bytes32(0), "invalid greater key"); + (lesserKey, greaterKey) = getLesserAndGreater(list, value, lesserKey, greaterKey); + list.list.insert(key, lesserKey, greaterKey); + list.values[key] = value; + } + + /** + * @notice Removes an element from the doubly linked list. + * @param list A storage pointer to the underlying list. + * @param key The key of the element to remove. + */ + function remove(List storage list, bytes32 key) internal { + list.list.remove(key); + list.values[key] = 0; + } + + /** + * @notice Updates an element in the list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @param value The element value. + * @param lesserKey The key of the element will be just left of `key` after the update. + * @param greaterKey The key of the element will be just right of `key` after the update. + * @dev Note that only one of "lesserKey" or "greaterKey" needs to be correct to reduce friction. + */ + function update(List storage list, bytes32 key, uint256 value, bytes32 lesserKey, bytes32 greaterKey) internal { + remove(list, key); + insert(list, key, value, lesserKey, greaterKey); + } + + /** + * @notice Inserts an element at the tail of the doubly linked list. + * @param list A storage pointer to the underlying list. + * @param key The key of the element to insert. + */ + function push(List storage list, bytes32 key) internal { + insert(list, key, 0, bytes32(0), list.list.tail); + } + + /** + * @notice Removes N elements from the head of the list and returns their keys. + * @param list A storage pointer to the underlying list. + * @param n The number of elements to pop. + * @return The keys of the popped elements. + */ + function popN(List storage list, uint256 n) internal returns (bytes32[] memory) { + require(n <= list.list.numElements, "not enough elements"); + bytes32[] memory keys = new bytes32[](n); + for (uint256 i = 0; i < n; i = i + 1) { + bytes32 key = list.list.head; + keys[i] = key; + remove(list, key); + } + return keys; + } + + /** + * @notice Returns whether or not a particular key is present in the sorted list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @return Whether or not the key is in the sorted list. + */ + function contains(List storage list, bytes32 key) internal view returns (bool) { + return list.list.contains(key); + } + + /** + * @notice Returns Element based on key. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @return Whether or not the key is in the sorted list. + */ + function get(List storage list, bytes32 key) internal view returns (LinkedList.Element memory) { + return list.list.get(key); + } + + /** + * @notice Returns the value for a particular key in the sorted list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @return The element value. + */ + function getValue(List storage list, bytes32 key) internal view returns (uint256) { + return list.values[key]; + } + + /** + * @notice Gets all elements from the doubly linked list. + * @param list A storage pointer to the underlying list. + * @return Array of all keys in the list. + * @return Values corresponding to keys, which will be ordered largest to smallest. + */ + function getElements(List storage list) internal view returns (bytes32[] memory, uint256[] memory) { + bytes32[] memory keys = getKeys(list); + uint256[] memory values = new uint256[](keys.length); + for (uint256 i = 0; i < keys.length; i = i + 1) { + values[i] = list.values[keys[i]]; + } + return (keys, values); + } + + /** + * @notice Gets all element keys from the doubly linked list. + * @param list A storage pointer to the underlying list. + * @return All element keys from head to tail. + */ + function getKeys(List storage list) internal view returns (bytes32[] memory) { + return list.list.getKeys(); + } + + /** + * @notice Returns first N greatest elements of the list. + * @param list A storage pointer to the underlying list. + * @param n The number of elements to return. + * @return The keys of the first n elements. + * @dev Reverts if n is greater than the number of elements in the list. + */ + function headN(List storage list, uint256 n) internal view returns (bytes32[] memory) { + return list.list.headN(n); + } + + /** + * @notice Returns the keys of the elements greaterKey than and less than the provided value. + * @param list A storage pointer to the underlying list. + * @param value The element value. + * @param lesserKey The key of the element which could be just left of the new value. + * @param greaterKey The key of the element which could be just right of the new value. + * @return The correct lesserKey keys. + * @return The correct greaterKey keys. + */ + function getLesserAndGreater( + List storage list, + uint256 value, + bytes32 lesserKey, + bytes32 greaterKey + ) + private + view + returns (bytes32, bytes32) + { + // Check for one of the following conditions and fail if none are met: + // 1. The value is less than the current lowest value + // 2. The value is greater than the current greatest value + // 3. The value is just greater than the value for `lesserKey` + // 4. The value is just less than the value for `greaterKey` + if (lesserKey == bytes32(0) && isValueBetween(list, value, lesserKey, list.list.tail)) { + return (lesserKey, list.list.tail); + } else if (greaterKey == bytes32(0) && isValueBetween(list, value, list.list.head, greaterKey)) { + return (list.list.head, greaterKey); + } else if ( + lesserKey != bytes32(0) && isValueBetween(list, value, lesserKey, list.list.elements[lesserKey].nextKey) + ) { + return (lesserKey, list.list.elements[lesserKey].nextKey); + } else if ( + greaterKey != bytes32(0) + && isValueBetween(list, value, list.list.elements[greaterKey].previousKey, greaterKey) + ) { + return (list.list.elements[greaterKey].previousKey, greaterKey); + } + + require(false, "get lesser and greater failure"); + return (0, 0); + } + + /** + * @notice Returns whether or not a given element is between two other elements. + * @param list A storage pointer to the underlying list. + * @param value The element value. + * @param lesserKey The key of the element whose value should be lesserKey. + * @param greaterKey The key of the element whose value should be greaterKey. + * @return True if the given element is between the two other elements. + */ + function isValueBetween( + List storage list, + uint256 value, + bytes32 lesserKey, + bytes32 greaterKey + ) + private + view + returns (bool) + { + bool isLesser = lesserKey == bytes32(0) || list.values[lesserKey] <= value; + bool isGreater = greaterKey == bytes32(0) || list.values[greaterKey] >= value; + return isLesser && isGreater; + } +} diff --git a/packages/contracts-bedrock/src/celo/common/linkedlists/SortedLinkedListWithMedian.sol b/packages/contracts-bedrock/src/celo/common/linkedlists/SortedLinkedListWithMedian.sol new file mode 100644 index 000000000000..458ef5542207 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/common/linkedlists/SortedLinkedListWithMedian.sol @@ -0,0 +1,253 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import "./LinkedList.sol"; +import "./SortedLinkedList.sol"; + +/** + * @title Maintains a sorted list of unsigned ints keyed by bytes32. + */ +library SortedLinkedListWithMedian { + using SortedLinkedList for SortedLinkedList.List; + + enum MedianAction { + None, + Lesser, + Greater + } + + enum MedianRelation { + Undefined, + Lesser, + Greater, + Equal + } + + struct List { + SortedLinkedList.List list; + bytes32 median; + mapping(bytes32 => MedianRelation) relation; + } + + /** + * @notice Inserts an element into a doubly linked list. + * @param list A storage pointer to the underlying list. + * @param key The key of the element to insert. + * @param value The element value. + * @param lesserKey The key of the element less than the element to insert. + * @param greaterKey The key of the element greater than the element to insert. + */ + function insert(List storage list, bytes32 key, uint256 value, bytes32 lesserKey, bytes32 greaterKey) internal { + list.list.insert(key, value, lesserKey, greaterKey); + LinkedList.Element storage element = list.list.list.elements[key]; + + MedianAction action = MedianAction.None; + if (list.list.list.numElements == 1) { + list.median = key; + list.relation[key] = MedianRelation.Equal; + } else if (list.list.list.numElements % 2 == 1) { + // When we have an odd number of elements, and the element that we inserted is less than + // the previous median, we need to slide the median down one element, since we had previously + // selected the greater of the two middle elements. + if (element.previousKey == bytes32(0) || list.relation[element.previousKey] == MedianRelation.Lesser) { + action = MedianAction.Lesser; + list.relation[key] = MedianRelation.Lesser; + } else { + list.relation[key] = MedianRelation.Greater; + } + } else { + // When we have an even number of elements, and the element that we inserted is greater than + // the previous median, we need to slide the median up one element, since we always select + // the greater of the two middle elements. + if (element.nextKey == bytes32(0) || list.relation[element.nextKey] == MedianRelation.Greater) { + action = MedianAction.Greater; + list.relation[key] = MedianRelation.Greater; + } else { + list.relation[key] = MedianRelation.Lesser; + } + } + updateMedian(list, action); + } + + /** + * @notice Removes an element from the doubly linked list. + * @param list A storage pointer to the underlying list. + * @param key The key of the element to remove. + */ + function remove(List storage list, bytes32 key) internal { + MedianAction action = MedianAction.None; + if (list.list.list.numElements == 0) { + list.median = bytes32(0); + } else if (list.list.list.numElements % 2 == 0) { + // When we have an even number of elements, we always choose the higher of the two medians. + // Thus, if the element we're removing is greaterKey than or equal to the median we need to + // slide the median left by one. + if (list.relation[key] == MedianRelation.Greater || list.relation[key] == MedianRelation.Equal) { + action = MedianAction.Lesser; + } + } else { + // When we don't have an even number of elements, we just choose the median value. + // Thus, if the element we're removing is less than or equal to the median, we need to slide + // median right by one. + if (list.relation[key] == MedianRelation.Lesser || list.relation[key] == MedianRelation.Equal) { + action = MedianAction.Greater; + } + } + updateMedian(list, action); + + list.list.remove(key); + } + + /** + * @notice Updates an element in the list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @param value The element value. + * @param lesserKey The key of the element will be just left of `key` after the update. + * @param greaterKey The key of the element will be just right of `key` after the update. + * @dev Note that only one of "lesserKey" or "greaterKey" needs to be correct to reduce friction. + */ + function update(List storage list, bytes32 key, uint256 value, bytes32 lesserKey, bytes32 greaterKey) internal { + remove(list, key); + insert(list, key, value, lesserKey, greaterKey); + } + + /** + * @notice Inserts an element at the tail of the doubly linked list. + * @param list A storage pointer to the underlying list. + * @param key The key of the element to insert. + */ + function push(List storage list, bytes32 key) internal { + insert(list, key, 0, bytes32(0), list.list.list.tail); + } + + /** + * @notice Removes N elements from the head of the list and returns their keys. + * @param list A storage pointer to the underlying list. + * @param n The number of elements to pop. + * @return The keys of the popped elements. + */ + function popN(List storage list, uint256 n) internal returns (bytes32[] memory) { + require(n <= list.list.list.numElements, "not enough elements"); + bytes32[] memory keys = new bytes32[](n); + for (uint256 i = 0; i < n; i++) { + bytes32 key = list.list.list.head; + keys[i] = key; + remove(list, key); + } + return keys; + } + + /** + * @notice Returns whether or not a particular key is present in the sorted list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @return Whether or not the key is in the sorted list. + */ + function contains(List storage list, bytes32 key) internal view returns (bool) { + return list.list.contains(key); + } + + /** + * @notice Returns the value for a particular key in the sorted list. + * @param list A storage pointer to the underlying list. + * @param key The element key. + * @return The element value. + */ + function getValue(List storage list, bytes32 key) internal view returns (uint256) { + return list.list.values[key]; + } + + /** + * @notice Returns the median value of the sorted list. + * @param list A storage pointer to the underlying list. + * @return The median value. + */ + function getMedianValue(List storage list) internal view returns (uint256) { + return getValue(list, list.median); + } + + /** + * @notice Returns the key of the first element in the list. + * @param list A storage pointer to the underlying list. + * @return The key of the first element in the list. + */ + function getHead(List storage list) internal view returns (bytes32) { + return list.list.list.head; + } + + /** + * @notice Returns the key of the median element in the list. + * @param list A storage pointer to the underlying list. + * @return The key of the median element in the list. + */ + function getMedian(List storage list) internal view returns (bytes32) { + return list.median; + } + + /** + * @notice Returns the key of the last element in the list. + * @param list A storage pointer to the underlying list. + * @return The key of the last element in the list. + */ + function getTail(List storage list) internal view returns (bytes32) { + return list.list.list.tail; + } + + /** + * @notice Returns the number of elements in the list. + * @param list A storage pointer to the underlying list. + * @return The number of elements in the list. + */ + function getNumElements(List storage list) internal view returns (uint256) { + return list.list.list.numElements; + } + + /** + * @notice Gets all elements from the doubly linked list. + * @param list A storage pointer to the underlying list. + * @return Array of all keys in the list. + * @return Values corresponding to keys, which will be ordered largest to smallest. + * @return Array of relations to median of corresponding list elements. + */ + function getElements(List storage list) + internal + view + returns (bytes32[] memory, uint256[] memory, MedianRelation[] memory) + { + bytes32[] memory keys = getKeys(list); + uint256[] memory values = new uint256[](keys.length); + MedianRelation[] memory relations = new MedianRelation[](keys.length); + for (uint256 i = 0; i < keys.length; i++) { + values[i] = list.list.values[keys[i]]; + relations[i] = list.relation[keys[i]]; + } + return (keys, values, relations); + } + + /** + * @notice Gets all element keys from the doubly linked list. + * @param list A storage pointer to the underlying list. + * @return All element keys from head to tail. + */ + function getKeys(List storage list) internal view returns (bytes32[] memory) { + return list.list.getKeys(); + } + + /** + * @notice Moves the median pointer right or left of its current value. + * @param list A storage pointer to the underlying list. + * @param action Which direction to move the median pointer. + */ + function updateMedian(List storage list, MedianAction action) private { + LinkedList.Element storage previousMedian = list.list.list.elements[list.median]; + if (action == MedianAction.Lesser) { + list.relation[list.median] = MedianRelation.Greater; + list.median = previousMedian.previousKey; + } else if (action == MedianAction.Greater) { + list.relation[list.median] = MedianRelation.Lesser; + list.median = previousMedian.nextKey; + } + list.relation[list.median] = MedianRelation.Equal; + } +} diff --git a/packages/contracts-bedrock/src/celo/governance/interfaces/IElection.sol b/packages/contracts-bedrock/src/celo/governance/interfaces/IElection.sol index 3da4148575fd..f099ce364a27 100644 --- a/packages/contracts-bedrock/src/celo/governance/interfaces/IElection.sol +++ b/packages/contracts-bedrock/src/celo/governance/interfaces/IElection.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface IElection { function electValidatorSigners() external view returns (address[] memory); diff --git a/packages/contracts-bedrock/src/celo/governance/interfaces/IGovernance.sol b/packages/contracts-bedrock/src/celo/governance/interfaces/IGovernance.sol index 38fc7671f798..883844ea8f21 100644 --- a/packages/contracts-bedrock/src/celo/governance/interfaces/IGovernance.sol +++ b/packages/contracts-bedrock/src/celo/governance/interfaces/IGovernance.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface IGovernance { function votePartially( diff --git a/packages/contracts-bedrock/src/celo/governance/interfaces/ILockedGold.sol b/packages/contracts-bedrock/src/celo/governance/interfaces/ILockedGold.sol index 8b58aa1915f5..38002d58914c 100644 --- a/packages/contracts-bedrock/src/celo/governance/interfaces/ILockedGold.sol +++ b/packages/contracts-bedrock/src/celo/governance/interfaces/ILockedGold.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface ILockedGold { function lock() external payable; diff --git a/packages/contracts-bedrock/src/celo/governance/interfaces/IReleaseGold.sol b/packages/contracts-bedrock/src/celo/governance/interfaces/IReleaseGold.sol index 7f918ef3e288..e211ce7399e3 100644 --- a/packages/contracts-bedrock/src/celo/governance/interfaces/IReleaseGold.sol +++ b/packages/contracts-bedrock/src/celo/governance/interfaces/IReleaseGold.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface IReleaseGold { function transfer(address, uint256) external; diff --git a/packages/contracts-bedrock/src/celo/governance/interfaces/IValidators.sol b/packages/contracts-bedrock/src/celo/governance/interfaces/IValidators.sol index a3ec6efa26fd..8a10e91fc812 100644 --- a/packages/contracts-bedrock/src/celo/governance/interfaces/IValidators.sol +++ b/packages/contracts-bedrock/src/celo/governance/interfaces/IValidators.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface IValidators { function registerValidator(bytes calldata, bytes calldata, bytes calldata) external returns (bool); diff --git a/packages/contracts-bedrock/src/celo/identity/interfaces/IAttestations.sol b/packages/contracts-bedrock/src/celo/identity/interfaces/IAttestations.sol index 3f1e87fbcaf1..5c1a1d7a8f48 100644 --- a/packages/contracts-bedrock/src/celo/identity/interfaces/IAttestations.sol +++ b/packages/contracts-bedrock/src/celo/identity/interfaces/IAttestations.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface IAttestations { function revoke(bytes32, uint256) external; diff --git a/packages/contracts-bedrock/src/celo/identity/interfaces/IRandom.sol b/packages/contracts-bedrock/src/celo/identity/interfaces/IRandom.sol index 8f8462dda715..65cf3082d685 100644 --- a/packages/contracts-bedrock/src/celo/identity/interfaces/IRandom.sol +++ b/packages/contracts-bedrock/src/celo/identity/interfaces/IRandom.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface IRandom { function revealAndCommit(bytes32, bytes32, address) external; diff --git a/packages/contracts-bedrock/src/celo/interfaces/IAccounts.sol b/packages/contracts-bedrock/src/celo/interfaces/IAccounts.sol index 77e7362a53ce..734dcddeb941 100644 --- a/packages/contracts-bedrock/src/celo/interfaces/IAccounts.sol +++ b/packages/contracts-bedrock/src/celo/interfaces/IAccounts.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface IAccounts { function isAccount(address) external view returns (bool); diff --git a/packages/contracts-bedrock/src/celo/interfaces/ICeloRegistry.sol b/packages/contracts-bedrock/src/celo/interfaces/ICeloRegistry.sol index c2c2aeff7ed8..95e586da3954 100644 --- a/packages/contracts-bedrock/src/celo/interfaces/ICeloRegistry.sol +++ b/packages/contracts-bedrock/src/celo/interfaces/ICeloRegistry.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface ICeloRegistry { function setAddressFor(string calldata, address) external; diff --git a/packages/contracts-bedrock/src/celo/interfaces/ICeloToken copy.sol b/packages/contracts-bedrock/src/celo/interfaces/ICeloToken copy.sol index 74161ee2f3a3..5bf2033f3172 100644 --- a/packages/contracts-bedrock/src/celo/interfaces/ICeloToken copy.sol +++ b/packages/contracts-bedrock/src/celo/interfaces/ICeloToken copy.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; /** * @title This interface describes the non- ERC20 shared interface for all Celo Tokens, and diff --git a/packages/contracts-bedrock/src/celo/interfaces/ICeloToken.sol b/packages/contracts-bedrock/src/celo/interfaces/ICeloToken.sol index 74161ee2f3a3..5bf2033f3172 100644 --- a/packages/contracts-bedrock/src/celo/interfaces/ICeloToken.sol +++ b/packages/contracts-bedrock/src/celo/interfaces/ICeloToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; /** * @title This interface describes the non- ERC20 shared interface for all Celo Tokens, and diff --git a/packages/contracts-bedrock/src/celo/interfaces/ICeloVersionedContract.sol b/packages/contracts-bedrock/src/celo/interfaces/ICeloVersionedContract.sol index 2e79fb2275ce..37b1538c2a12 100644 --- a/packages/contracts-bedrock/src/celo/interfaces/ICeloVersionedContract.sol +++ b/packages/contracts-bedrock/src/celo/interfaces/ICeloVersionedContract.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface ICeloVersionedContract { /** diff --git a/packages/contracts-bedrock/src/celo/interfaces/IFeeCurrencyWhitelist.sol b/packages/contracts-bedrock/src/celo/interfaces/IFeeCurrencyWhitelist.sol index 8723f08a1613..e2c6b60ed637 100644 --- a/packages/contracts-bedrock/src/celo/interfaces/IFeeCurrencyWhitelist.sol +++ b/packages/contracts-bedrock/src/celo/interfaces/IFeeCurrencyWhitelist.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface IFeeCurrencyWhitelist { function addToken(address) external; diff --git a/packages/contracts-bedrock/src/celo/interfaces/IFreezer.sol b/packages/contracts-bedrock/src/celo/interfaces/IFreezer.sol index d80d14274435..a629b3325a5b 100644 --- a/packages/contracts-bedrock/src/celo/interfaces/IFreezer.sol +++ b/packages/contracts-bedrock/src/celo/interfaces/IFreezer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface IFreezer { function isFrozen(address) external view returns (bool); diff --git a/packages/contracts-bedrock/src/celo/interfaces/IMetaTransactionWallet.sol b/packages/contracts-bedrock/src/celo/interfaces/IMetaTransactionWallet.sol index 83e3a709dc9e..5c7f392814b6 100644 --- a/packages/contracts-bedrock/src/celo/interfaces/IMetaTransactionWallet.sol +++ b/packages/contracts-bedrock/src/celo/interfaces/IMetaTransactionWallet.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface IMetaTransactionWallet { function setEip712DomainSeparator() external; diff --git a/packages/contracts-bedrock/src/celo/interfaces/IMetaTransactionWalletDeployer.sol b/packages/contracts-bedrock/src/celo/interfaces/IMetaTransactionWalletDeployer.sol index 09a54e88cac7..5828bee3c746 100644 --- a/packages/contracts-bedrock/src/celo/interfaces/IMetaTransactionWalletDeployer.sol +++ b/packages/contracts-bedrock/src/celo/interfaces/IMetaTransactionWalletDeployer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface IMetaTransactionWalletDeployer { function deploy(address, address, bytes calldata) external; diff --git a/packages/contracts-bedrock/src/celo/interfaces/IStableTokenMento.sol b/packages/contracts-bedrock/src/celo/interfaces/IStableTokenMento.sol index 4242a34d9432..b309071d9f0a 100644 --- a/packages/contracts-bedrock/src/celo/interfaces/IStableTokenMento.sol +++ b/packages/contracts-bedrock/src/celo/interfaces/IStableTokenMento.sol @@ -1,4 +1,5 @@ -pragma solidity ^0.5.13; +// SPDX-License-Identifier: LGPL-3.0-only +pragma solidity ^0.8.15; /** * @title This interface describes the functions specific to Celo Stable Tokens, and in the diff --git a/packages/contracts-bedrock/src/celo/mento/interfaces/IExchange.sol b/packages/contracts-bedrock/src/celo/mento/interfaces/IExchange.sol index e47e1823a82f..4e15e8a8750d 100644 --- a/packages/contracts-bedrock/src/celo/mento/interfaces/IExchange.sol +++ b/packages/contracts-bedrock/src/celo/mento/interfaces/IExchange.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface IExchange { function buy(uint256, uint256, bool) external returns (uint256); diff --git a/packages/contracts-bedrock/src/celo/mento/interfaces/IReserve.sol b/packages/contracts-bedrock/src/celo/mento/interfaces/IReserve.sol index 31f39fad5de5..14f77c10549a 100644 --- a/packages/contracts-bedrock/src/celo/mento/interfaces/IReserve.sol +++ b/packages/contracts-bedrock/src/celo/mento/interfaces/IReserve.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface IReserve { function setTobinTaxStalenessThreshold(uint256) external; diff --git a/packages/contracts-bedrock/src/celo/mento/interfaces/IStableToken.sol b/packages/contracts-bedrock/src/celo/mento/interfaces/IStableToken.sol index bcfaa4367424..c0b681dfb8ae 100644 --- a/packages/contracts-bedrock/src/celo/mento/interfaces/IStableToken.sol +++ b/packages/contracts-bedrock/src/celo/mento/interfaces/IStableToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; /** * @title This interface describes the functions specific to Celo Stable Tokens, and in the diff --git a/packages/contracts-bedrock/src/celo/stability/SortedOracles.sol b/packages/contracts-bedrock/src/celo/stability/SortedOracles.sol new file mode 100644 index 000000000000..3e41141698c3 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/stability/SortedOracles.sol @@ -0,0 +1,330 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import "../../../lib/openzeppelin-contracts/contracts/access/Ownable.sol"; + +import "./interfaces/ISortedOracles.sol"; +import "../common/interfaces/ICeloVersionedContract.sol"; + +import "../common/FixidityLib.sol"; +import "../common/Initializable.sol"; +import "../common/linkedlists/AddressSortedLinkedListWithMedian.sol"; +import "../common/linkedlists/SortedLinkedListWithMedian.sol"; + +/** + * @title Maintains a sorted list of oracle exchange rates between CELO and other currencies. + */ +contract SortedOracles is ISortedOracles, ICeloVersionedContract, Ownable, Initializable { + using AddressSortedLinkedListWithMedian for SortedLinkedListWithMedian.List; + using FixidityLib for FixidityLib.Fraction; + + uint256 private constant FIXED1_UINT = 1000000000000000000000000; + + // Maps a token address to a sorted list of report values. + mapping(address => SortedLinkedListWithMedian.List) private rates; + // Maps a token address to a sorted list of report timestamps. + mapping(address => SortedLinkedListWithMedian.List) private timestamps; + mapping(address => mapping(address => bool)) public isOracle; + mapping(address => address[]) public oracles; + + // `reportExpirySeconds` is the fallback value used to determine reporting + // frequency. Initially it was the _only_ value but we later introduced + // the per token mapping in `tokenReportExpirySeconds`. If a token + // doesn't have a value in the mapping (i.e. it's 0), the fallback is used. + // See: #getTokenReportExpirySeconds + uint256 public reportExpirySeconds; + mapping(address => uint256) public tokenReportExpirySeconds; + + event OracleAdded(address indexed token, address indexed oracleAddress); + event OracleRemoved(address indexed token, address indexed oracleAddress); + event OracleReported(address indexed token, address indexed oracle, uint256 timestamp, uint256 value); + event OracleReportRemoved(address indexed token, address indexed oracle); + event MedianUpdated(address indexed token, uint256 value); + event ReportExpirySet(uint256 reportExpiry); + event TokenReportExpirySet(address token, uint256 reportExpiry); + + modifier onlyOracle(address token) { + require(isOracle[token][msg.sender], "sender was not an oracle for token addr"); + _; + } + + /** + * @notice Returns the storage, major, minor, and patch version of the contract. + * @return Storage version of the contract. + * @return Major version of the contract. + * @return Minor version of the contract. + * @return Patch version of the contract. + */ + function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) { + return (1, 1, 2, 2); + } + + /** + * @notice Sets initialized == true on implementation contracts + * @param test Set to true to skip implementation initialization + */ + constructor(bool test) Initializable(test) { } + + /** + * @notice Used in place of the constructor to allow the contract to be upgradable via proxy. + * @param _reportExpirySeconds The number of seconds before a report is considered expired. + */ + function initialize(uint256 _reportExpirySeconds) external initializer { + _transferOwnership(msg.sender); + setReportExpiry(_reportExpirySeconds); + } + + /** + * @notice Sets the report expiry parameter. + * @param _reportExpirySeconds The number of seconds before a report is considered expired. + */ + function setReportExpiry(uint256 _reportExpirySeconds) public onlyOwner { + require(_reportExpirySeconds > 0, "report expiry seconds must be > 0"); + require(_reportExpirySeconds != reportExpirySeconds, "reportExpirySeconds hasn't changed"); + reportExpirySeconds = _reportExpirySeconds; + emit ReportExpirySet(_reportExpirySeconds); + } + + /** + * @notice Sets the report expiry parameter for a token. + * @param _token The address of the token to set expiry for. + * @param _reportExpirySeconds The number of seconds before a report is considered expired. + */ + function setTokenReportExpiry(address _token, uint256 _reportExpirySeconds) external onlyOwner { + require(_reportExpirySeconds > 0, "report expiry seconds must be > 0"); + require(_reportExpirySeconds != tokenReportExpirySeconds[_token], "token reportExpirySeconds hasn't changed"); + tokenReportExpirySeconds[_token] = _reportExpirySeconds; + emit TokenReportExpirySet(_token, _reportExpirySeconds); + } + + /** + * @notice Adds a new Oracle. + * @param token The address of the token. + * @param oracleAddress The address of the oracle. + */ + function addOracle(address token, address oracleAddress) external onlyOwner { + require( + token != address(0) && oracleAddress != address(0) && !isOracle[token][oracleAddress], + "token addr was null or oracle addr was null or oracle addr is not an oracle for token addr" + ); + isOracle[token][oracleAddress] = true; + oracles[token].push(oracleAddress); + emit OracleAdded(token, oracleAddress); + } + + /** + * @notice Removes an Oracle. + * @param token The address of the token. + * @param oracleAddress The address of the oracle. + * @param index The index of `oracleAddress` in the list of oracles. + */ + function removeOracle(address token, address oracleAddress, uint256 index) external onlyOwner { + require( + token != address(0) && oracleAddress != address(0) && oracles[token].length > index + && oracles[token][index] == oracleAddress, + "token addr null or oracle addr null or index of token oracle not mapped to oracle addr" + ); + isOracle[token][oracleAddress] = false; + oracles[token][index] = oracles[token][oracles[token].length - 1]; + oracles[token].pop(); + if (reportExists(token, oracleAddress)) { + removeReport(token, oracleAddress); + } + emit OracleRemoved(token, oracleAddress); + } + + /** + * @notice Removes a report that is expired. + * @param token The address of the token for which the CELO exchange rate is being reported. + * @param n The number of expired reports to remove, at most (deterministic upper gas bound). + */ + function removeExpiredReports(address token, uint256 n) external { + require( + token != address(0) && n < timestamps[token].getNumElements(), + "token addr null or trying to remove too many reports" + ); + for (uint256 i = 0; i < n; i++) { + (bool isExpired, address oldestAddress) = isOldestReportExpired(token); + if (isExpired) { + removeReport(token, oldestAddress); + } else { + break; + } + } + } + + /** + * @notice Check if last report is expired. + * @param token The address of the token for which the CELO exchange rate is being reported. + * @return isExpired + * @return The address of the last report. + */ + function isOldestReportExpired(address token) public view returns (bool, address) { + require(token != address(0), "token address cannot be null"); + address oldest = timestamps[token].getTail(); + uint256 timestamp = timestamps[token].getValue(oldest); + // solhint-disable-next-line not-rely-on-time + if (block.timestamp - timestamp >= getTokenReportExpirySeconds(token)) { + return (true, oldest); + } + return (false, oldest); + } + + /** + * @notice Updates an oracle value and the median. + * @param token The address of the token for which the CELO exchange rate is being reported. + * @param value The amount of `token` equal to one CELO, expressed as a fixidity value. + * @param lesserKey The element which should be just left of the new oracle value. + * @param greaterKey The element which should be just right of the new oracle value. + * @dev Note that only one of `lesserKey` or `greaterKey` needs to be correct to reduce friction. + */ + function report(address token, uint256 value, address lesserKey, address greaterKey) external onlyOracle(token) { + uint256 originalMedian = rates[token].getMedianValue(); + if (rates[token].contains(msg.sender)) { + rates[token].update(msg.sender, value, lesserKey, greaterKey); + + // Rather than update the timestamp, we remove it and re-add it at the + // head of the list later. The reason for this is that we need to handle + // a few different cases: + // 1. This oracle is the only one to report so far. lesserKey = address(0) + // 2. Other oracles have reported since this one's last report. lesserKey = getHead() + // 3. Other oracles have reported, but the most recent is this one. + // lesserKey = key immediately after getHead() + // + // However, if we just remove this timestamp, timestamps[token].getHead() + // does the right thing in all cases. + timestamps[token].remove(msg.sender); + } else { + rates[token].insert(msg.sender, value, lesserKey, greaterKey); + } + timestamps[token].insert( + msg.sender, + // solhint-disable-next-line not-rely-on-time + block.timestamp, + timestamps[token].getHead(), + address(0) + ); + emit OracleReported(token, msg.sender, block.timestamp, value); + uint256 newMedian = rates[token].getMedianValue(); + if (newMedian != originalMedian) { + emit MedianUpdated(token, newMedian); + } + } + + /** + * @notice Returns the number of rates. + * @param token The address of the token for which the CELO exchange rate is being reported. + * @return The number of reported oracle rates for `token`. + */ + function numRates(address token) public view returns (uint256) { + return rates[token].getNumElements(); + } + + /** + * @notice Returns the median rate. + * @param token The address of the token for which the CELO exchange rate is being reported. + * @return The median exchange rate for `token`. + * @return fixidity + */ + function medianRate(address token) external view returns (uint256, uint256) { + return (rates[token].getMedianValue(), numRates(token) == 0 ? 0 : FIXED1_UINT); + } + + /** + * @notice Gets all elements from the doubly linked list. + * @param token The address of the token for which the CELO exchange rate is being reported. + * @return keys Keys of nn unpacked list of elements from largest to smallest. + * @return values Values of an unpacked list of elements from largest to smallest. + * @return relations Relations of an unpacked list of elements from largest to smallest. + */ + function getRates(address token) + external + view + returns (address[] memory, uint256[] memory, SortedLinkedListWithMedian.MedianRelation[] memory) + { + return rates[token].getElements(); + } + + /** + * @notice Returns the number of timestamps. + * @param token The address of the token for which the CELO exchange rate is being reported. + * @return The number of oracle report timestamps for `token`. + */ + function numTimestamps(address token) public view returns (uint256) { + return timestamps[token].getNumElements(); + } + + /** + * @notice Returns the median timestamp. + * @param token The address of the token for which the CELO exchange rate is being reported. + * @return The median report timestamp for `token`. + */ + function medianTimestamp(address token) external view returns (uint256) { + return timestamps[token].getMedianValue(); + } + + /** + * @notice Gets all elements from the doubly linked list. + * @param token The address of the token for which the CELO exchange rate is being reported. + * @return keys Keys of nn unpacked list of elements from largest to smallest. + * @return values Values of an unpacked list of elements from largest to smallest. + * @return relations Relations of an unpacked list of elements from largest to smallest. + */ + function getTimestamps(address token) + external + view + returns (address[] memory, uint256[] memory, SortedLinkedListWithMedian.MedianRelation[] memory) + { + return timestamps[token].getElements(); + } + + /** + * @notice Returns whether a report exists on token from oracle. + * @param token The address of the token for which the CELO exchange rate is being reported. + * @param oracle The oracle whose report should be checked. + */ + function reportExists(address token, address oracle) internal view returns (bool) { + return rates[token].contains(oracle) && timestamps[token].contains(oracle); + } + + /** + * @notice Returns the list of oracles for a particular token. + * @param token The address of the token whose oracles should be returned. + * @return The list of oracles for a particular token. + */ + function getOracles(address token) external view returns (address[] memory) { + return oracles[token]; + } + + /** + * @notice Returns the expiry for the token if exists, if not the default. + * @param token The address of the token. + * @return The report expiry in seconds. + */ + function getTokenReportExpirySeconds(address token) public view returns (uint256) { + if (tokenReportExpirySeconds[token] == 0) { + return reportExpirySeconds; + } + + return tokenReportExpirySeconds[token]; + } + + /** + * @notice Removes an oracle value and updates the median. + * @param token The address of the token for which the CELO exchange rate is being reported. + * @param oracle The oracle whose value should be removed. + * @dev This can be used to delete elements for oracles that have been removed. + * However, a > 1 elements reports list should always be maintained + */ + function removeReport(address token, address oracle) private { + if (numTimestamps(token) == 1 && reportExists(token, oracle)) return; + uint256 originalMedian = rates[token].getMedianValue(); + rates[token].remove(oracle); + timestamps[token].remove(oracle); + emit OracleReportRemoved(token, oracle); + uint256 newMedian = rates[token].getMedianValue(); + if (newMedian != originalMedian) { + emit MedianUpdated(token, newMedian); + } + } +} diff --git a/packages/contracts-bedrock/src/celo/stability/interfaces/ISortedOracles.sol b/packages/contracts-bedrock/src/celo/stability/interfaces/ISortedOracles.sol index e386b2b0deb1..8ed8280a1e07 100644 --- a/packages/contracts-bedrock/src/celo/stability/interfaces/ISortedOracles.sol +++ b/packages/contracts-bedrock/src/celo/stability/interfaces/ISortedOracles.sol @@ -1,4 +1,4 @@ -pragma solidity >=0.5.13 <0.9.0; +pragma solidity ^0.8.15; interface ISortedOracles { function addOracle(address, address) external; diff --git a/packages/contracts-bedrock/src/celo/uniswap/interfaces/IUniswapV2FactoryMin.sol b/packages/contracts-bedrock/src/celo/uniswap/interfaces/IUniswapV2FactoryMin.sol new file mode 100644 index 000000000000..14c6495920a1 --- /dev/null +++ b/packages/contracts-bedrock/src/celo/uniswap/interfaces/IUniswapV2FactoryMin.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: LGPL-3.0-only +pragma solidity ^0.8.15; + +interface IUniswapV2FactoryMin { + function getPair(address tokenA, address tokenB) external view returns (address pair); +} diff --git a/packages/contracts-bedrock/src/celo/uniswap/interfaces/IUniswapV2RouterMin.sol b/packages/contracts-bedrock/src/celo/uniswap/interfaces/IUniswapV2RouterMin.sol new file mode 100644 index 000000000000..f1755edb137d --- /dev/null +++ b/packages/contracts-bedrock/src/celo/uniswap/interfaces/IUniswapV2RouterMin.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: LGPL-3.0-only +pragma solidity ^0.8.15; + +interface IUniswapV2RouterMin { + function factory() external pure returns (address); + function swapExactTokensForTokens( + uint256 amountIn, + uint256 amountOutMin, + address[] calldata path, + address to, + uint256 deadline + ) + external + returns (uint256[] memory amounts); + function getAmountsOut( + uint256 amountIn, + address[] calldata path + ) + external + view + returns (uint256[] memory amounts); +}