diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..146ab09 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml new file mode 100644 index 0000000..7005479 --- /dev/null +++ b/.idea/watcherTasks.xml @@ -0,0 +1,29 @@ + + + + + + + + \ No newline at end of file diff --git a/bsc/client.go b/bsc/client.go new file mode 100644 index 0000000..5f39b45 --- /dev/null +++ b/bsc/client.go @@ -0,0 +1,30 @@ +package bsc + +import ( + "context" + + "git.lehouerou.net/laurent/evm" + "github.com/pkg/errors" +) + +const ( + BinanceRpcUrl = "https://bsc-dataseed.binance.org/" +) + +type Client struct { + evm.Client +} + +func NewClientWithUrl(ctx context.Context, rpcurl string, privatekey string, options ...evm.ClientOption) (*Client, error) { + ethclient, err := evm.NewClient(ctx, rpcurl, privatekey, NewTokenMapper(), options...) + if err != nil { + return nil, errors.Wrap(err, "creating ethereum client") + } + return &Client{ + ethclient, + }, nil +} + +func NewClient(ctx context.Context, privatekey string, options ...evm.ClientOption) (*Client, error) { + return NewClientWithUrl(ctx, BinanceRpcUrl, privatekey, options...) +} diff --git a/bsc/contracts/wbnb.abi b/bsc/contracts/wbnb.abi new file mode 100644 index 0000000..13e246c --- /dev/null +++ b/bsc/contracts/wbnb.abi @@ -0,0 +1 @@ +[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"},{"name":"wad","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"src","type":"address"},{"name":"dst","type":"address"},{"name":"wad","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"wad","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"dst","type":"address"},{"name":"wad","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":true,"name":"guy","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":true,"name":"dst","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"dst","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Withdrawal","type":"event"}] \ No newline at end of file diff --git a/bsc/contracts/wbnb.go b/bsc/contracts/wbnb.go new file mode 100644 index 0000000..9b50811 --- /dev/null +++ b/bsc/contracts/wbnb.go @@ -0,0 +1,1090 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +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 +) + +// WBnbMetaData contains all meta data concerning the WBnb contract. +var WBnbMetaData = &bind.MetaData{ + ABI: "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"guy\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"src\",\"type\":\"address\"},{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"src\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"}]", +} + +// WBnbABI is the input ABI used to generate the binding from. +// Deprecated: Use WBnbMetaData.ABI instead. +var WBnbABI = WBnbMetaData.ABI + +// WBnb is an auto generated Go binding around an Ethereum contract. +type WBnb struct { + WBnbCaller // Read-only binding to the contract + WBnbTransactor // Write-only binding to the contract + WBnbFilterer // Log filterer for contract events +} + +// WBnbCaller is an auto generated read-only Go binding around an Ethereum contract. +type WBnbCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WBnbTransactor is an auto generated write-only Go binding around an Ethereum contract. +type WBnbTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WBnbFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type WBnbFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WBnbSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type WBnbSession struct { + Contract *WBnb // 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 +} + +// WBnbCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type WBnbCallerSession struct { + Contract *WBnbCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// WBnbTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type WBnbTransactorSession struct { + Contract *WBnbTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// WBnbRaw is an auto generated low-level Go binding around an Ethereum contract. +type WBnbRaw struct { + Contract *WBnb // Generic contract binding to access the raw methods on +} + +// WBnbCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type WBnbCallerRaw struct { + Contract *WBnbCaller // Generic read-only contract binding to access the raw methods on +} + +// WBnbTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type WBnbTransactorRaw struct { + Contract *WBnbTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewWBnb creates a new instance of WBnb, bound to a specific deployed contract. +func NewWBnb(address common.Address, backend bind.ContractBackend) (*WBnb, error) { + contract, err := bindWBnb(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &WBnb{WBnbCaller: WBnbCaller{contract: contract}, WBnbTransactor: WBnbTransactor{contract: contract}, WBnbFilterer: WBnbFilterer{contract: contract}}, nil +} + +// NewWBnbCaller creates a new read-only instance of WBnb, bound to a specific deployed contract. +func NewWBnbCaller(address common.Address, caller bind.ContractCaller) (*WBnbCaller, error) { + contract, err := bindWBnb(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &WBnbCaller{contract: contract}, nil +} + +// NewWBnbTransactor creates a new write-only instance of WBnb, bound to a specific deployed contract. +func NewWBnbTransactor(address common.Address, transactor bind.ContractTransactor) (*WBnbTransactor, error) { + contract, err := bindWBnb(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &WBnbTransactor{contract: contract}, nil +} + +// NewWBnbFilterer creates a new log filterer instance of WBnb, bound to a specific deployed contract. +func NewWBnbFilterer(address common.Address, filterer bind.ContractFilterer) (*WBnbFilterer, error) { + contract, err := bindWBnb(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &WBnbFilterer{contract: contract}, nil +} + +// bindWBnb binds a generic wrapper to an already deployed contract. +func bindWBnb(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(WBnbABI)) + 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 (_WBnb *WBnbRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _WBnb.Contract.WBnbCaller.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 (_WBnb *WBnbRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WBnb.Contract.WBnbTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_WBnb *WBnbRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _WBnb.Contract.WBnbTransactor.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 (_WBnb *WBnbCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _WBnb.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 (_WBnb *WBnbTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WBnb.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_WBnb *WBnbTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _WBnb.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_WBnb *WBnbCaller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) { + var out []interface{} + err := _WBnb.contract.Call(opts, &out, "allowance", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_WBnb *WBnbSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _WBnb.Contract.Allowance(&_WBnb.CallOpts, arg0, arg1) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_WBnb *WBnbCallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _WBnb.Contract.Allowance(&_WBnb.CallOpts, arg0, arg1) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_WBnb *WBnbCaller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _WBnb.contract.Call(opts, &out, "balanceOf", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_WBnb *WBnbSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _WBnb.Contract.BalanceOf(&_WBnb.CallOpts, arg0) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_WBnb *WBnbCallerSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _WBnb.Contract.BalanceOf(&_WBnb.CallOpts, arg0) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_WBnb *WBnbCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _WBnb.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_WBnb *WBnbSession) Decimals() (uint8, error) { + return _WBnb.Contract.Decimals(&_WBnb.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_WBnb *WBnbCallerSession) Decimals() (uint8, error) { + return _WBnb.Contract.Decimals(&_WBnb.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_WBnb *WBnbCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _WBnb.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_WBnb *WBnbSession) Name() (string, error) { + return _WBnb.Contract.Name(&_WBnb.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_WBnb *WBnbCallerSession) Name() (string, error) { + return _WBnb.Contract.Name(&_WBnb.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_WBnb *WBnbCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _WBnb.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_WBnb *WBnbSession) Symbol() (string, error) { + return _WBnb.Contract.Symbol(&_WBnb.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_WBnb *WBnbCallerSession) Symbol() (string, error) { + return _WBnb.Contract.Symbol(&_WBnb.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_WBnb *WBnbCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _WBnb.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_WBnb *WBnbSession) TotalSupply() (*big.Int, error) { + return _WBnb.Contract.TotalSupply(&_WBnb.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_WBnb *WBnbCallerSession) TotalSupply() (*big.Int, error) { + return _WBnb.Contract.TotalSupply(&_WBnb.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address guy, uint256 wad) returns(bool) +func (_WBnb *WBnbTransactor) Approve(opts *bind.TransactOpts, guy common.Address, wad *big.Int) (*types.Transaction, error) { + return _WBnb.contract.Transact(opts, "approve", guy, wad) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address guy, uint256 wad) returns(bool) +func (_WBnb *WBnbSession) Approve(guy common.Address, wad *big.Int) (*types.Transaction, error) { + return _WBnb.Contract.Approve(&_WBnb.TransactOpts, guy, wad) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address guy, uint256 wad) returns(bool) +func (_WBnb *WBnbTransactorSession) Approve(guy common.Address, wad *big.Int) (*types.Transaction, error) { + return _WBnb.Contract.Approve(&_WBnb.TransactOpts, guy, wad) +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_WBnb *WBnbTransactor) Deposit(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WBnb.contract.Transact(opts, "deposit") +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_WBnb *WBnbSession) Deposit() (*types.Transaction, error) { + return _WBnb.Contract.Deposit(&_WBnb.TransactOpts) +} + +// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. +// +// Solidity: function deposit() payable returns() +func (_WBnb *WBnbTransactorSession) Deposit() (*types.Transaction, error) { + return _WBnb.Contract.Deposit(&_WBnb.TransactOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address dst, uint256 wad) returns(bool) +func (_WBnb *WBnbTransactor) Transfer(opts *bind.TransactOpts, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _WBnb.contract.Transact(opts, "transfer", dst, wad) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address dst, uint256 wad) returns(bool) +func (_WBnb *WBnbSession) Transfer(dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _WBnb.Contract.Transfer(&_WBnb.TransactOpts, dst, wad) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address dst, uint256 wad) returns(bool) +func (_WBnb *WBnbTransactorSession) Transfer(dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _WBnb.Contract.Transfer(&_WBnb.TransactOpts, dst, wad) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address src, address dst, uint256 wad) returns(bool) +func (_WBnb *WBnbTransactor) TransferFrom(opts *bind.TransactOpts, src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _WBnb.contract.Transact(opts, "transferFrom", src, dst, wad) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address src, address dst, uint256 wad) returns(bool) +func (_WBnb *WBnbSession) TransferFrom(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _WBnb.Contract.TransferFrom(&_WBnb.TransactOpts, src, dst, wad) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address src, address dst, uint256 wad) returns(bool) +func (_WBnb *WBnbTransactorSession) TransferFrom(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _WBnb.Contract.TransferFrom(&_WBnb.TransactOpts, src, dst, wad) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 wad) returns() +func (_WBnb *WBnbTransactor) Withdraw(opts *bind.TransactOpts, wad *big.Int) (*types.Transaction, error) { + return _WBnb.contract.Transact(opts, "withdraw", wad) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 wad) returns() +func (_WBnb *WBnbSession) Withdraw(wad *big.Int) (*types.Transaction, error) { + return _WBnb.Contract.Withdraw(&_WBnb.TransactOpts, wad) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// +// Solidity: function withdraw(uint256 wad) returns() +func (_WBnb *WBnbTransactorSession) Withdraw(wad *big.Int) (*types.Transaction, error) { + return _WBnb.Contract.Withdraw(&_WBnb.TransactOpts, wad) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_WBnb *WBnbTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _WBnb.contract.RawTransact(opts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_WBnb *WBnbSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _WBnb.Contract.Fallback(&_WBnb.TransactOpts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_WBnb *WBnbTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _WBnb.Contract.Fallback(&_WBnb.TransactOpts, calldata) +} + +// WBnbApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the WBnb contract. +type WBnbApprovalIterator struct { + Event *WBnbApproval // 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 *WBnbApprovalIterator) 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(WBnbApproval) + 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(WBnbApproval) + 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 *WBnbApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WBnbApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WBnbApproval represents a Approval event raised by the WBnb contract. +type WBnbApproval struct { + Src common.Address + Guy common.Address + Wad *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed src, address indexed guy, uint256 wad) +func (_WBnb *WBnbFilterer) FilterApproval(opts *bind.FilterOpts, src []common.Address, guy []common.Address) (*WBnbApprovalIterator, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var guyRule []interface{} + for _, guyItem := range guy { + guyRule = append(guyRule, guyItem) + } + + logs, sub, err := _WBnb.contract.FilterLogs(opts, "Approval", srcRule, guyRule) + if err != nil { + return nil, err + } + return &WBnbApprovalIterator{contract: _WBnb.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed src, address indexed guy, uint256 wad) +func (_WBnb *WBnbFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *WBnbApproval, src []common.Address, guy []common.Address) (event.Subscription, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var guyRule []interface{} + for _, guyItem := range guy { + guyRule = append(guyRule, guyItem) + } + + logs, sub, err := _WBnb.contract.WatchLogs(opts, "Approval", srcRule, guyRule) + 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(WBnbApproval) + if err := _WBnb.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed src, address indexed guy, uint256 wad) +func (_WBnb *WBnbFilterer) ParseApproval(log types.Log) (*WBnbApproval, error) { + event := new(WBnbApproval) + if err := _WBnb.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// WBnbDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the WBnb contract. +type WBnbDepositIterator struct { + Event *WBnbDeposit // 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 *WBnbDepositIterator) 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(WBnbDeposit) + 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(WBnbDeposit) + 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 *WBnbDepositIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WBnbDepositIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WBnbDeposit represents a Deposit event raised by the WBnb contract. +type WBnbDeposit struct { + Dst common.Address + Wad *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDeposit is a free log retrieval operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed dst, uint256 wad) +func (_WBnb *WBnbFilterer) FilterDeposit(opts *bind.FilterOpts, dst []common.Address) (*WBnbDepositIterator, error) { + + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _WBnb.contract.FilterLogs(opts, "Deposit", dstRule) + if err != nil { + return nil, err + } + return &WBnbDepositIterator{contract: _WBnb.contract, event: "Deposit", logs: logs, sub: sub}, nil +} + +// WatchDeposit is a free log subscription operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed dst, uint256 wad) +func (_WBnb *WBnbFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *WBnbDeposit, dst []common.Address) (event.Subscription, error) { + + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _WBnb.contract.WatchLogs(opts, "Deposit", dstRule) + 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(WBnbDeposit) + if err := _WBnb.contract.UnpackLog(event, "Deposit", 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 +} + +// ParseDeposit is a log parse operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. +// +// Solidity: event Deposit(address indexed dst, uint256 wad) +func (_WBnb *WBnbFilterer) ParseDeposit(log types.Log) (*WBnbDeposit, error) { + event := new(WBnbDeposit) + if err := _WBnb.contract.UnpackLog(event, "Deposit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// WBnbTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the WBnb contract. +type WBnbTransferIterator struct { + Event *WBnbTransfer // 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 *WBnbTransferIterator) 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(WBnbTransfer) + 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(WBnbTransfer) + 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 *WBnbTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WBnbTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WBnbTransfer represents a Transfer event raised by the WBnb contract. +type WBnbTransfer struct { + Src common.Address + Dst common.Address + Wad *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed src, address indexed dst, uint256 wad) +func (_WBnb *WBnbFilterer) FilterTransfer(opts *bind.FilterOpts, src []common.Address, dst []common.Address) (*WBnbTransferIterator, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _WBnb.contract.FilterLogs(opts, "Transfer", srcRule, dstRule) + if err != nil { + return nil, err + } + return &WBnbTransferIterator{contract: _WBnb.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed src, address indexed dst, uint256 wad) +func (_WBnb *WBnbFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *WBnbTransfer, src []common.Address, dst []common.Address) (event.Subscription, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _WBnb.contract.WatchLogs(opts, "Transfer", srcRule, dstRule) + 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(WBnbTransfer) + if err := _WBnb.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed src, address indexed dst, uint256 wad) +func (_WBnb *WBnbFilterer) ParseTransfer(log types.Log) (*WBnbTransfer, error) { + event := new(WBnbTransfer) + if err := _WBnb.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// WBnbWithdrawalIterator is returned from FilterWithdrawal and is used to iterate over the raw logs and unpacked data for Withdrawal events raised by the WBnb contract. +type WBnbWithdrawalIterator struct { + Event *WBnbWithdrawal // 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 *WBnbWithdrawalIterator) 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(WBnbWithdrawal) + 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(WBnbWithdrawal) + 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 *WBnbWithdrawalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WBnbWithdrawalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WBnbWithdrawal represents a Withdrawal event raised by the WBnb contract. +type WBnbWithdrawal struct { + Src common.Address + Wad *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawal is a free log retrieval operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed src, uint256 wad) +func (_WBnb *WBnbFilterer) FilterWithdrawal(opts *bind.FilterOpts, src []common.Address) (*WBnbWithdrawalIterator, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + + logs, sub, err := _WBnb.contract.FilterLogs(opts, "Withdrawal", srcRule) + if err != nil { + return nil, err + } + return &WBnbWithdrawalIterator{contract: _WBnb.contract, event: "Withdrawal", logs: logs, sub: sub}, nil +} + +// WatchWithdrawal is a free log subscription operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed src, uint256 wad) +func (_WBnb *WBnbFilterer) WatchWithdrawal(opts *bind.WatchOpts, sink chan<- *WBnbWithdrawal, src []common.Address) (event.Subscription, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + + logs, sub, err := _WBnb.contract.WatchLogs(opts, "Withdrawal", srcRule) + 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(WBnbWithdrawal) + if err := _WBnb.contract.UnpackLog(event, "Withdrawal", 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 +} + +// ParseWithdrawal is a log parse operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. +// +// Solidity: event Withdrawal(address indexed src, uint256 wad) +func (_WBnb *WBnbFilterer) ParseWithdrawal(log types.Log) (*WBnbWithdrawal, error) { + event := new(WBnbWithdrawal) + if err := _WBnb.contract.UnpackLog(event, "Withdrawal", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/bsc/tokenmapper.go b/bsc/tokenmapper.go new file mode 100644 index 0000000..9ca05ee --- /dev/null +++ b/bsc/tokenmapper.go @@ -0,0 +1,309 @@ +package bsc + +import ( + "git.lehouerou.net/laurent/evm" + "github.com/ethereum/go-ethereum/common" +) + +var tokens = map[string]string{ + "$DG": "0x9fdc3ae5c814b79dca2556564047c5e7e5449c19", + "1INCH": "0x111111111117dc0aa78b770fa6a738034120c302", + "2LC": "0x11f6ecc9e2658627e0876212f1078b9f84d3196e", + "7UP": "0x29f350b3822f51dc29619c583adbc9628646e315", + "ACS": "0x4197c6ef3879a08cd51e5560da5064b773aa1d29", + "ADA": "0x3ee2200efb3400fabb9aacf31297cbdd1d435d47", + "ADX": "0x6bff4fb161347ad7de4a625ae5aa3a1ca7077819", + "ALICE": "0xac51066d7bec65dc4589368da368b212745d63e8", + "ALPACA": "0x8f0528ce5ef7b51152a59745befdd91d97091d2f", + "ALPHA": "0xa1faa113cbe53436df28ff0aee54275c13b40975", + "ANDX": "0xb63a911ae7dc40510e7bb552b7fcb94c198bbe2d", + "ANKR": "0xf307910a4c7bbc79691fd374889b36d8531b08e3", + "ANY": "0xf68c9df95a18b2a5a5fa1124d79eeeffbad0b6fa", + "ARGON": "0x851f7a700c5d67db59612b871338a85526752c25", + "ATA": "0xa2120b9e674d3fc3875f415a7df52e382f141225", + "ATOM": "0x0eb3a705fc54725037cc9e008bdede697f62f335", + "AUTO": "0xa184088a740c695e156f91f5cc086a06bb78b827", + "AVAX": "0x1ce0c2827e2ef14d5c4f29a091d735a204794041", + "AXS": "0x715d400f88c167884bbcc41c5fea407ed4d2f8a0", + "BAKE": "0xE02dF9e3e622DeBdD69fb838bB799E3F168902c5", + "BAND": "0xad6caeb32cd2c308980a548bd0bc5aa4306c6c18", + "BAT": "0x101d82428437127bf1608f699cd651e6abf9766e", + "BCH": "0x8ff795a6f4d97e7887c79bea79aba5cc76444adf", + "BCHA": "0xd475c9c934dcd6d5f1cac530585aa5ba14185b92", + "BELT": "0xe0e514c71282b6f4e823703a39374cf58dc3ea4f", + "BETH": "0x250632378e573c6be1ac2f97fcdf00515d0aa91b", + "BGOV": "0xf8e026dc4c0860771f691ecffbbdfe2fa51c77cf", + "BHC": "0x6fd7c98458a943f469e1cf4ea85b173f5cd342f4", + "BIDR": "0x9a2f5556e9a637e8fbce886d8e3cf8b316a1d8a2", + "BIFI": "0xCa3F508B8e4Dd382eE878A314789373D80A5190A", + "BNT": "0xa069008a669e2af00a86673d9d584cfb524a42cc", + "BOG": "0xb09fe1613fe03e7361319d2a43edc17422f36b09", + "BPAY": "0xebc76079da0c245fae7225b58a57a54809b40618", + "BRY": "0xf859Bf77cBe8699013d6Dbc7C2b926Aaf307F830", + "BSC-USD": "0x55d398326f99059ff775485246999027b3197955", + "BSCX": "0x5ac52ee5b2a633895292ff6d8a89bb9190451587", + "BTCB": "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c", + "BTCST": "0x78650b139471520656b9e7aa7a5e9276814a38e9", + "BTD": "0xd1102332a213e21faf78b69c03572031f3552c33", + "BTS": "0xc2e1acef50ae55661855e8dcb72adb182a3cc259", + "BTT": "0x8595f9da7b868b1822194faed312235e43007b49", + "BUNI": "0x0e7beec376099429b85639eb3abe7cf22694ed49", + "BUNNY": "0xc9849e6fdb743d08faee3e34dd2d1bc69ea11a51", + "BURGER": "0xae9269f27437f0fcbc232d39ec814844a51d6b8f", + "BUSD": "0xe9e7cea3dedca5984780bafc599bd69add087d56", + "BUX": "0x211ffbe424b90e25a15531ca322adf1559779e45", + "BZRX": "0x4b87642aedf10b642be4663db842ecc5a88bf5ba", + "BabyFlokiCoin": "0x808fac147a9c02723d0be300ac4753eaf93c0e1f", + "C98": "0xaec945e04baf28b135fa7c640f624f8d90f1c3a6", + "CAN": "0x007ea5c0ea75a8df45d288a4debdd5bb633f9e56", + "CAR": "0x176a25637e5078519230a4d80a7a47350940264a", + "CARS": "0x1228Fb5eF4C98CaBd696Ba1BD4819e050389D21A", + "CBIX": "0x34681c1035f97e1edcccec5f142e02ff81a3a230", + "CELR": "0x1f9f6a696c6fd109cd3956f45dc709d2b3902163", + "CHESS": "0x20de22029ab63cf9a7cf5feb2b737ca1ee4c82a6", + "CHI": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c", + "CHS": "0xadd8a06fd58761a5047426e160b2b88ad3b9d464", + "CMCX": "0xb2343143f814639c9b1f42961c698247171df34a", + "COMP": "0x52ce071bd9b1c4b00a0b92d298c512478cad67e8", + "COS": "0x96dd399f9c3afda1f194182f71600f1b65946501", + "COTI": "0xadbaf88b39d37dc68775ed1541f1bf83a5a45feb", + "COVAC": "0x2ADfe76173F7e7DAef1463A83BA4d06171fAc454", + "CREAM": "0xd4cb328a82bdf5f03eb737f37fa6b370aef3e888", + "CRP": "0x1ad8d89074afa789a027b9a31d0bd14e254711d0", + "CTI": "0x3f670f65b9ce89b82e82121fd68c340ac22c08d6", + "CTK": "0xa8c2b8eec3d368c0253ad3dae65a5f2bbb89c929", + "CTSI": "0x8da443f84fea710266c8eb6bc34b71702d033ef2", + "CYT": "0xd9025e25bb6cf39f8c926a704039d2dd51088063", + "Cake": "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82", + "D100": "0x9d8aac497a4b8fe697dd63101d793f0c6a6eebb6", + "DAI": "0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3", + "DARA": "0x0255af6c9f86f6b0543357bacefa262a2664f80f", + "DDIM": "0xc9132c76060f6b319764ea075973a650a1a53bc9", + "DES": "0xb38b3c34e4bb6144c1e5283af720E046Ee833a2a", + "DF": "0x4a9a2b2b04549c3927dd2c9668a5ef3fca473623", + "DFY": "0xd98560689c6e748dc37bc410b4d3096b1aa3d8c2", + "DGN": "0x72f28c09be1342447fa01ebc76ef508473d08c5c", + "DGSTB": "0x5aa638c6777e2f041951a3d539a32cac83503441", + "DITTO": "0x233d91a0713155003fc4dce0afa871b508b3b715", + "DODO": "0x67ee3cb086f8a16f34bee3ca72fad36f7db929e2", + "DOGE": "0xba2ae424d960c26247dd6c32edc70b295c744c43", + "DOGGY": "0x74926b3d118a63f6958922d3dc05eb9c6e6e00c6", + "DOS": "0xdc0f0a5719c39764b011edd02811bd228296887c", + "DOT": "0x7083609fce4d1d8dc0c979aab8c869ea2c873402", + "DYT": "0x740623d2c797b7d8d1ecb98e9b4afcf99ec31e14", + "EGG": "0xf952fc3ca7325cc27d15885d37117676d25bfda6", + "EGLD": "0xbf7c81fff98bbe61b40ed186e4afd6ddd01337fe", + "ELF": "0xa3f020a5c92e15be13caf0ee5c95cf79585eecc9", + "ELTB": "0x380291a9a8593b39f123cf39cc1cc47463330b1f", + "EMS": "0x8444bd389e5db8ceaad7b95466a0b8a1939af1a9", + "EOS": "0x56b6fb708fc5732dec1afc8d8556423a2edccbd6", + "EPS": "0xa7f552078dcc247c2684336020c03648500c6d9f", + "ETC": "0x3d6545b08693dae087e957cb1180ee38b9e3c25e", + "ETH": "0x2170ed0880ac9a755fd29b2688956bd959f933f8", + "EVAI": "0x233302a38fdbdd2b3f6ee19a66d7e47c4a64fe46", + "EXF": "0x6306e883493824ccf606d90e25f68a28e47b98a3", + "EZ": "0x5512014efa6cd57764fa743756f7a6ce3358cc83", + "FEG": "0xacfc95585d80ab62f67a14c566c1b7a49fe91167", + "FINE": "0x4e6415a5727ea08aae4580057187923aec331227", + "FIRO": "0xd5d0322b6bab6a762c79f8c81a0b674778e13aed", + "FLOW": "0xc943c5320b9c18c153d1e2d12cc3074bebfb31a2", + "FNX": "0xdfd9e2a17596cad6295ecffda42d9b6f63f7b5d5", + "FOMO": "0x329016b785f138cd931c673ea59d0113526321d4", + "FOR": "0x658a109c5900bc6d2357c87549b651670e5b0539", + "FRAX": "0x90c97f71e18723b0cf0dfa30ee176ab653e89f40", + "FREE": "0x12e34cdf6a031a10fe241864c32fb03a4fdad739", + "FRIES": "0x393b312c01048b3ed2720bf1b090084c09e408a1", + "FRONT": "0x928e55dab735aa8260af3cedada18b5f70c72f1b", + "FSXU": "0xa94b7a842aadb617a0b08fa744e033c6de2f7595", + "FTM": "0xad29abb318791d579433d831ed122afeaf29dcfe", + "FUSE": "0x5857c96dae9cf8511b08cb07f85753c472d36ea3", + "FUSII": "0x3a50d6daacc82f17a2434184fe904fc45542a734", + "FXS": "0xe48a3d7d0bc88d552f730b62c006bc925eadb9ee", + "Fuel": "0x2090c8295769791ab7a3cf1cc6e0aa19f35e441a", + "GALA": "0x7ddee176f665cd201f93eede625770e2fd911990", + "GBYTE": "0xeb34de0c4b2955ce0ff1526cdf735c9e6d249d09", + "GENA": "0x7f4959528D4C9c7379b3437C7Eea40376fD96B8a", + "GFCE": "0x5f136383e230f972739fae2e81e7e774afe64c66", + "GFX": "0xe4fa3c576c31696322e8d7165c5965d5a1f6a1a5", + "GOFI": "0x6b8227a0e18bd35a10849601db194b24aab2c8ea", + "GTON": "0x64d5baf5ac030e2b7c435add967f787ae94d0205", + "GUM": "0xc53708664b99df348dd27c3ac0759d2da9c40462", + "HAKKA": "0x1d1eb8e8293222e1a29d2c0e4ce6c0acfd89aaac", + "HE": "0x20d39a5130f799b95b55a930e5b7ebc589ea9ed8", + "HOTCROSS": "0x4fa7163e153419e0e1064e418dd7a99314ed27b6", + "HPS": "0xeda21b525ac789eab1a08ef2404dd8505ffb973d", + "HTB": "0x4e840aadd28da189b9906674b4afcb77c128d9ea", + "HUP": "0x375a7b6a6f74a5acb86c420c53c4ce8cf1d51b4d", + "Helmet": "0x948d2a81086a075b3130bac19e4c6dee1d2e3fe8", + "INNBC": "0xdf1f0026374d4bcc490be5e316963cf6df2fff19", + "IOTA": "0xd944f1d1e9d5f9bb90b62f9d45e447d989580782", + "IOTX": "0x9678e42cebeb63f23197d726b29b1cb20d0064e5", + "JNTR": "0x5f2caa99fc378248ac02cbbaac27e3fa155ed2c4", + "JST": "0xea998d307aca04d4f0a3b3036aba84ae2e409c0a", + "JulD": "0x5a41f637c3f7553dba6ddc2d3ca92641096577ea", + "KHP": "0x15B3d410fCd0d695E1bbe4F717F8E1B6D0Fb2D0C", + "KIWI": "0xcfdf8a80fecaeecc144fa74c0df8691bfd0e26e3", + "KMD": "0x2003f7ba57ea956b05b85c60b4b2ceea9b111256", + "KNC": "0xfe56d5892bdffc7bf58f2e84be1b2c32d21c308b", + "KOGE": "0xe6df05ce8c8301223373cf5b969afcb1498c5528", + "KP3RB": "0x5ea29eee799aa7cc379fde5cf370bc24f2ea7c81", + "L99": "0x033c90840F27C83B1Aa0Ffe6Db65C954BF6ABbdd", + "LAUNCH": "0xb5389a679151c4b8621b1098c6e0961a3cfee8d4", + "LINA": "0x762539b45a1dcce3d36d080f74d1aed37844b878", + "LINK": "0xf8a0bf9cf54bb92f17374d9e9a321e6a111a51bd", + "LIT": "0xb59490ab09a0f526cc7305822ac65f2ab12f9723", + "LMT": "0x9617857e191354dbea0b714d78bc59e57c411087", + "LTC": "0x4338665cbb7b2485a8855a139b75d5e34ab0db94", + "LTO": "0x857b222fc79e1cbbf8ca5f78cb133d1b7cf34bbd", + "MATH": "0xf218184af829cf2b0019f8e6f0b2423498a36983", + "MATTER": "0x1c9491865a1de77c5b6e19d2e6a5f1d7a6f2b25f", + "MDA": "0xd72aa9e1cddc2f6d6e0444580002170fba1f8eed", + "MDT": "0x668db7aa38eac6b40c9d13dbe61361dc4c4611d1", + "MILK": "0x8e9f5173e16ff93f81579d73a7f9723324d6b6af", + "MIR": "0x5b6dcf557e2abe2323c48445e8cc948910d8c2c9", + "MKR": "0x5f0da599bb2cccfcf6fdfd7d81743b6020864350", + "MLTPX": "0x9d7c580e0bc4ea441db96eebc7e1440d264bce51", + "MONSTA": "0x8a5d7fcd4c90421d21d30fcc4435948ac3618b2f", + "MoonX": "0x053f574b35eb29deb6817bd8b3f8c848c6abbe53", + "N1CE": "0xc14df1e2fff3708816495e7364ff274aceecad91", + "NEAR": "0x1fa4a73a3f0133f0025378af00236f3abdee5d63", + "NFT": "0x1fc9004ec7e5722891f5f38bae7678efcb11d34d", + "NMX": "0xd32d01a43c869edcd1117c640fbdcfcfd97d9d65", + "NPXB": "0xd8cb4c2369db13c94c90c7fd3bebc9757900ee6b", + "NUTS": "0x8893d5fa71389673c5c4b9b3cb4ee1ba71207556", + "NWC": "0x968f6f898a6df937fc1859b323ac2f14643e3fed", + "OCT": "0x49277cc5be56b519901e561096bfd416277b4f6d", + "OM": "0xf78d2e7936f5fe18308a3b2951a93b6c4a41f5e2", + "ONT": "0xfd7b3a77848f1c2d67e05e54d78d174a0c850335", + "ORE": "0x93d5a19a993d195cfc75acdd736a994428290a59", + "ORI": "0x3045d1a840364c3657b8df6c6f86a4359c23472b", + "OVR": "0x7e35d0e9180bf3a1fc47b0d110be7a21a10b41fe", + "PASTA": "0xab9d0fae6eb062f2698c2d429a1be9185a5d4f6e", + "PAX": "0xb7f8cd00c5a06c0537e2abff0b58033d02e5e094", + "PAXG": "0x7950865a9140cb519342433146ed5b40c6f210f7", + "PEARL": "0x118b60763002f3ba7603a3c17f946a0c7dab789f", + "PERL": "0x0f9e4d49f25de22c2202af916b681fbb3790497b", + "PHA": "0x0112e557d400474717056c4e6d40edd846f38351", + "PHO": "0xb9784c1633ef3b839563b988c323798634714368", + "PIZZA": "0x2cc26dd730f548dc4ac291ae7d84a0c96980d2cb", + "POLS": "0x7e624fa0e1c4abfd309cc15719b7e2580887f570", + "POSI": "0x5ca42204cdaa70d5c773946e69de942b85ca6706", + "PPAY": "0xfb288d60d3b66f9c3e231a9a39ed3f158a4269aa", + "PROM": "0xaf53d56ff99f1322515e54fdde93ff8b3b7dafd5", + "PROPEL": "0x9b44df3318972be845d83f961735609137c4c23c", + "PVU": "0x31471e0791fcdbe82fbf4c44943255e923f1b794", + "QANX": "0xaaa7a10a8ee237ea61e8ac46c50a8db8bcc1baaa", + "RAVEN": "0xcd7c5025753a49f1881b31c48caa7c517bb46308", + "RBS": "0x95336aC5f7E840e7716781313e1607F7C9D6BE25", + "RBT": "0x891e4554227385c5c740f9b483e935e3cbc29f01", + "RBW": "0x4cc23264e1ef8dd8173e4ec07e6a01cc7476d997", + "REEF": "0xf21768ccbc73ea5b6fd3c687208a7c2def2d966e", + "RFOX": "0x0a3a21356793b49154fd3bbe91cbc2a16c0457f5", + "RGP": "0xfa262f303aa244f9cc66f312f0755d89c3793192", + "RHYTHM": "0xe4318f2acf2b9c3f518a3a03b5412f4999970ddb", + "RISE": "0xc7d43f2b51f44f09fbb8a691a0451e8ffcf36c0a", + "RPG": "0x01E0d17a533E5930A349C2BB71304F04F20AB12B", + "Ramen": "0x4f47a0d15c1e53f3d94c069c7d16977c29f9cb6b", + "SAFEMOON": "0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3", + "SAKE": "0x8bd778b12b15416359a227f0533ce2d91844e1ed", + "SATT": "0x448bee2d93be708b54ee6353a7cc35c4933f1156", + "SBS": "0xc1d99537392084cc02d3f52386729b79d01035ce", + "SEEDS": "0xefb94d158206dfa5cb8c30950001713106440928", + "SFP": "0xd41fdb03ba84762dd66a0af1a6c8540ff1ba5dfb", + "SHARD": "0xd8a1734945b9ba38eb19a291b475e31f49e59877", + "SHIB": "0x2859e4544c4bb03966803b044a93563bd2d0dd4d", + "SHIELD": "0x60b3bc37593853c04410c4f07fe4d6748245bf77", + "SKILL": "0x154a9f9cbd3449ad22fdae23044319d6ef2a1fab", + "SLP": "0x070a08beef8d36734dd67a491202ff35a6a16d97", + "SNX": "0x9ac983826058b8a9c7aa1c9171441191232e8404", + "SPARTA": "0x3910db0600ea925f63c36ddb1351ab6e2c6eb102", + "SPORE": "0x77f6a5f1b7a2b6d6c322af8581317d6bb0a52689", + "START": "0x31d0a7ada4d4c131eb612db48861211f63e57610", + "STAX": "0x0da6ed8b13214ff28e9ca979dd37439e8a88f6c4", + "STM": "0x90df11a8cce420675e73922419e3f4f3fe13cccb", + "SUN": "0xa1e6c58d503e4eee986167f45a063853cefe08c3", + "SWFTC": "0xe64e30276c2f826febd3784958d6da7b55dfbad3", + "SWTH": "0x250b211ee44459dad5cd3bca803dd6a7ecb5d46c", + "SXP": "0x47bead2563dcbf3bf2c9407fea4dc236faba485a", + "SYL": "0x7e52a123ed6db6ac872a875552935fbbd2544c86", + "TACO": "0x9066e87Bac891409D690cfEfA41379b34af06391", + "TCT": "0xca0a9df6a8cad800046c1ddc5755810718b65c44", + "THUGS": "0xe10e9822a5de22f8761919310dda35cd997d63c0", + "TKO": "0x9f589e3eabe42ebc94a44727b3f3531c0c877809", + "TLM": "0x2222227e22102fe3322098e4cbfe18cfebd57c95", + "TLOS": "0xb6c53431608e626ac81a9776ac3e999c5556717c", + "TORN": "0x1ba8d3c4c219b124d351f603060663bd1bcd9bbf", + "TOZ": "0xcf0bea8b08fd28e339eff49f717a828f79f7f5ec", + "TREE": "0x9bd547446ea13c0c13df2c1885e1f5b019a77441", + "TRX": "0x85eac5ac2f758618dfa09bdbe0cf174e7d574d5b", + "TUSD": "0x14016e85a25aeb13065688cafb43044c2ef86784", + "TWIN": "0xaf83f292fced83032f52ced45ef7dbddb586441a", + "TWT": "0x4b0f1812e5df2a09796481ff14017e6005508003", + "UBU": "0xd2ddfba7bb12f6e70c2aab6b6bf9edaef42ed22f", + "UFT": "0x2645d5f59d952ef2317c8e0aaa5a61c392ccd44d", + "UNI": "0xbf5140a22578168fd562dccf235e5d43a02ce9b1", + "USDC": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d", + "USDP": "0xb3c11196a4f3b1da7c23d9fb0a3dde9c6340934f", + "USELESS": "0x2cd2664ce5639e46c6a3125257361e01d0213657", + "UST": "0x23396cf899ca06c4472205fc903bdb4de249d6fc", + "VAI": "0x4bd17003473389a42daf6a0a729f6fdb328bbbd7", + "VANCII": "0x8f9b482b74afc0b7e8aefc704f1f04df208ee332", + "VFOX": "0x4d61577d8fd2208a0afb814ea089fdeae19ed202", + "VLTY": "0x38A5cbe2FB53d1d407Dd5A22C4362daF48EB8526", + "VRT": "0x5f84ce30dc3cf7909101c69086c50de191895883", + "WANA": "0x339c72829ab7dd45c3c52f965e7abe358dd8761e", + "WBNB": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", + "WE": "0x0dd3a140346a94d403ac62385daaf5a86b50e752", + "WIN": "0xaef0d72a118ce24fee3cd1d43d383897d05b4e99", + "WINGS": "0x0487b824c8261462f88940f97053e65bdb498446", + "WQT": "0xe89508D74579A06A65B907c91F697CF4F8D9Fac7", + "WRX": "0x8e17ed70334c87ece574c9d537bc153d8609e2a3", + "WSPP": "0x46d502fac9aea7c5bc7b13c8ec9d02378c33d36f", + "Weather": "0xbe3e4cfd929156f612df36042d79201ecf5344d7", + "XCUR": "0x708c671aa997da536869b50b6c67fa0c32ce80b2", + "XEC": "0x0ef2e7602add1733bfdb17ac3094d0421b502ca3", + "XP": "0x6a0b045ea1cbc87946ee6ca4d118dc0b5c152455", + "XRP": "0x1d2f0da169ceb9fc7b3144628db156f3f6c60dbe", + "XTF": "0x0377facbddbee59d40869808bb67fa741038bc67", + "XTM": "0x3f526a5a8811cc1812d923d5dbb20e4b1c6028db", + "XTZ": "0x16939ef78684453bfdfb47825f8a5f714f12623a", + "XVS": "0xcf6bb5389c92bdda8a3747ddb454cb7a64626c63", + "Xpose": "0xcc10c8afd683c5aa86b1d170d75b555bce5a2c37", + "YFI": "0x88f1a5ae2a3bf98aeaf342d26b30a79438c9142e", + "YFII": "0x7f70642d88cf1c4a3a7abb072b53b929b653eda5", + "ZEC": "0x1ba42e5193dfa8b03d15dd1b86a3113bbbef8eeb", + "ZIL": "0xb86abcb37c3a4b64f74f59301aff131a1becc787", + "ZMN": "0xfcb8a4b1a0b645e08064e05b98e9cc6f48d2aa57", + "bCFX": "0x045c4324039dA91c52C55DF5D785385Aab073DcF", + "bMXX": "0x4131b87f74415190425ccd873048c708f8005823", + "bROOBEE": "0xe64f5cb844946c1f102bd25bbd87a5ab4ae89fbe", + "crADA": "0x81c15d3e956e55e77e1f3f257f0a65bd2725fc55", + "iDNA": "0x0de08c1abe5fb86dd7fd2ac90400ace305138d5b", + "vADA": "0x9a0af7fdb2065ce470d72664de73cae409da28ec", + "vBCH": "0x5f0388ebc2b94fa8e123f404b79ccf5f40b29176", + "vBETH": "0x972207a639cc1b374b893cc33fa251b55ceb7c07", + "vBSWAP": "0x4f0ed527e8a95ecaa132af214dfd41f30b361600", + "vBTC": "0x882c173bc7ff3b7786ca16dfed3dfffb9ee7847b", + "vBUSD": "0x95c78222b3d6e262426483d42cfa53685a67ab9d", + "vDAI": "0x334b3ecb4dca3593bccc3c7ebd1a1c1d1780fbf1", + "vDOGE": "0xec3422ef92b2fb59e84c8b02ba73f1fe84ed8d71", + "vDOT": "0x1610bc33319e9398de5f57b33a5b184c806ad217", + "vETH": "0xf508fcd89b8bd15579dc79a6827cb4686a3592c8", + "vFIL": "0xf91d58b5ae142dacc749f58a49fcbac340cb0343", + "vLINK": "0x650b940a1033b8a1b1873f78730fcfc73ec11f1f", + "vLTC": "0x57a5297f2cb2c0aac9d554660acd6d385ab50c6b", + "vSXP": "0x2ff3d0f6990a40261c66e1ff2017acbc282eb6d0", + "vUSDC": "0xeca88125a5adbe82614ffc12d0db554e2e2867c8", + "vUSDT": "0xfd5840cd36d94d7229439859c0112a4185bc0255", + "vXRP": "0xb248a295732e0225acd3337607cc01068e3b9c10", + "vXVS": "0x151b1e2635a717bcdc836ecd6fbb62b674fe3e1d", + "xMARK": "0x26a5dfab467d4f58fb266648cae769503cec9580", +} + +func NewTokenMapper() evm.TokenMapper { + tm := evm.NewTokenMapper() + for s, s2 := range tokens { + tm.AddToken(s, common.HexToAddress(s2)) + } + return tm +} diff --git a/bsc/wbnb.go b/bsc/wbnb.go new file mode 100644 index 0000000..4711578 --- /dev/null +++ b/bsc/wbnb.go @@ -0,0 +1,41 @@ +package bsc + +import ( + "context" + + "git.lehouerou.net/laurent/evm" + "git.lehouerou.net/laurent/evm/bsc/contracts" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/pkg/errors" + "github.com/shopspring/decimal" +) + +type WBNB struct { + evm.Token + client evm.Client + contract *contracts.WBnb +} + +func NewWBNB(address string, client evm.Client) (*WBNB, error) { + t, err := evm.NewToken(client, common.HexToAddress(address)) + if err != nil { + return nil, errors.Wrap(err, "init token contract") + } + c, err := contracts.NewWBnb(common.HexToAddress(address), client) + if err != nil { + return nil, errors.Wrap(err, "init wbnb contract") + } + + return &WBNB{ + Token: t, + client: client, + contract: c, + }, nil +} + +func (w *WBNB) UnwrapWBNB(ctx context.Context, amount decimal.Decimal) (evm.Transaction, error) { + return w.client.Execute(ctx, func(ctx context.Context, opts *evm.TransactOpts) (*types.Transaction, error) { + return w.contract.Withdraw(opts.TransactOpts, w.ValueToBigInt(amount)) + }) +} diff --git a/client.go b/client.go new file mode 100644 index 0000000..e947dab --- /dev/null +++ b/client.go @@ -0,0 +1,202 @@ +package evm + +import ( + "context" + "crypto/ecdsa" + "math/big" + "strings" + "sync" + "time" + + "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/crypto" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/pkg/errors" + "github.com/rs/zerolog/log" + "github.com/shopspring/decimal" +) + +type Client interface { + bind.ContractBackend + PublicAddress() common.Address + PublicAddressAsHexString() string + PendingNonce(context.Context) (uint64, error) + NewTransactor() (*bind.TransactOpts, error) + Execute(context.Context, func(context.Context, *TransactOpts) (*types.Transaction, error)) (Transaction, error) + NativeTokenBalance(context.Context) (decimal.Decimal, error) + CurrentBlockNumber(context.Context) (uint64, error) + CurrentBlock(context.Context) (*types.Block, error) + SetPendingTransactionCheckPeriod(duration time.Duration) + TransactionByHash(context.Context, common.Hash) (*types.Transaction, bool, error) + + TokenService() TokenService +} + +type ClientOption func(c Client) (Client, error) + +func WithPendingTransactionWaitResolution(duration time.Duration) ClientOption { + return func(c Client) (Client, error) { + c.SetPendingTransactionCheckPeriod(duration) + return c, nil + } +} + +type client struct { + *ethclient.Client + ts TokenService + pendingTransactionCheckPeriod time.Duration + fromAddress common.Address + transactionlock *sync.Mutex + privateKey *ecdsa.PrivateKey + chainId *big.Int + + defaultTimeout time.Duration +} + +func (c *client) TokenService() TokenService { + return c.ts +} + +func NewClient(ctx context.Context, rpcurl string, privatekey string, tm TokenMapper, options ...ClientOption) (Client, error) { + c, err := ethclient.Dial(rpcurl) + if err != nil { + return nil, errors.Wrapf(err, "dialing rpc url %s", rpcurl) + } + + ecdsaprivatekey, publicaddress, err := GetPrivateKeyAndPublicAddressFromString(privatekey) + if err != nil { + return nil, errors.Wrap(err, "reading private key") + } + + res := &client{ + Client: c, + + pendingTransactionCheckPeriod: 2 * time.Second, + privateKey: ecdsaprivatekey, + fromAddress: publicaddress, + transactionlock: &sync.Mutex{}, + + defaultTimeout: 15 * time.Minute, + } + res.ts = NewTokenService(res, tm) + res.chainId, err = c.ChainID(ctx) + if err != nil { + return nil, errors.Wrap(err, "retrieving chain id") + } + + ires := Client(res) + for _, option := range options { + ires, err = option(ires) + if err != nil { + return nil, errors.Wrap(err, "applying option") + } + } + return ires, nil +} + +func (c *client) PublicAddress() common.Address { + return c.fromAddress +} + +func (c *client) SetPendingTransactionCheckPeriod(period time.Duration) { + c.pendingTransactionCheckPeriod = period +} + +func (c *client) PendingNonce(ctx context.Context) (uint64, error) { + return c.PendingNonceAt(ctx, c.PublicAddress()) +} + +func (c *client) PublicAddressAsHexString() string { + return c.PublicAddress().Hex() +} + +func (c *client) NewTransactor() (*bind.TransactOpts, error) { + return bind.NewKeyedTransactorWithChainID(c.privateKey, c.chainId) +} + +func (c *client) Execute(ctx context.Context, action func(context.Context, *TransactOpts) (*types.Transaction, error)) (Transaction, error) { + c.transactionlock.Lock() + defer c.transactionlock.Unlock() + localctx, cancel := context.WithTimeout(ctx, c.defaultTimeout) + defer cancel() + auth, err := NewTransactOpts(localctx, c) + if err != nil { + return nil, errors.Wrap(err, "init transaction options") + } + tx, err := action(localctx, auth) + if err != nil { + return nil, errors.Wrap(err, "executing waitable action") + } + log.Debug().Msgf("//TX// tx started / hash: %s / gasprice: %s / gaslimit: %d", tx.Hash().Hex(), decimal.NewFromBigInt(tx.GasPrice(), -9), tx.Gas()) + return NewTransaction(localctx, c, c.pendingTransactionCheckPeriod, tx), nil +} + +func (c *client) GetTransactionsForAddressInBlock(ctx context.Context, a string, b int64) { + block, err := c.BlockByNumber(ctx, big.NewInt(b)) + if err != nil { + panic(err) + } + txcount, err := c.TransactionCount(ctx, block.Hash()) + if err != nil { + panic(err) + } + for i := 0; i < int(txcount); i++ { + tx, err := c.TransactionInBlock(ctx, block.Hash(), uint(i)) + if err != nil { + panic(err) + } + if strings.ToLower(tx.To().Hex()) == strings.ToLower(a) { + log.Debug().Msgf("%d // %s // %s -> %s", b, decimal.NewFromBigInt(tx.Value(), -18), "", tx.To()) + } + } +} + +func (c *client) SuggestGasPrice(ctx context.Context) (*big.Int, error) { + return c.Client.SuggestGasPrice(ctx) +} + +func (c *client) CurrentBlockNumber(ctx context.Context) (uint64, error) { + block, err := c.BlockNumber(ctx) + if err != nil { + return 0, err + } + return block, nil +} + +func (c *client) CurrentBlock(ctx context.Context) (*types.Block, error) { + number, err := c.CurrentBlockNumber(ctx) + if err != nil { + return nil, errors.Wrap(err, "getting current block number") + } + block, err := c.BlockByNumber(ctx, big.NewInt(int64(number))) + if err != nil { + return nil, errors.Wrapf(err, "getting block %d", number) + } + return block, nil +} + +func (c *client) NativeTokenBalance(ctx context.Context) (decimal.Decimal, error) { + return c.BalanceFromAddress(ctx, c.PublicAddress()) +} + +func (c *client) BalanceFromAddress(ctx context.Context, address common.Address) (decimal.Decimal, error) { + b, err := c.PendingBalanceAt(ctx, address) + if err != nil { + return decimal.Zero, errors.Wrap(err, "getting balance") + } + return decimal.NewFromBigInt(b, -18), nil +} + +func GetPrivateKeyAndPublicAddressFromString(privatekey string) (*ecdsa.PrivateKey, common.Address, error) { + privateKeyECDSA, err := crypto.HexToECDSA(privatekey) + if err != nil { + return nil, common.Address{}, errors.Wrap(err, "converting hex private key to ecdsa") + } + publicKeyECDSA, ok := privateKeyECDSA.Public().(*ecdsa.PublicKey) + if !ok { + return nil, common.Address{}, errors.New("cannot assert type: publicKey is not of type *ecdsa.PublicKey") + } + return privateKeyECDSA, crypto.PubkeyToAddress(*publicKeyECDSA), nil +} diff --git a/contracts/token.abi b/contracts/token.abi new file mode 100644 index 0000000..0901c62 --- /dev/null +++ b/contracts/token.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/contracts/token.go b/contracts/token.go new file mode 100644 index 0000000..a36ccc8 --- /dev/null +++ b/contracts/token.go @@ -0,0 +1,400 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// TokenABI is the input ABI used to generate the binding from. +const TokenABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// Token is an auto generated Go binding around an Ethereum contract. +type Token struct { + TokenCaller // Read-only binding to the contract + TokenTransactor // Write-only binding to the contract + TokenFilterer // Log filterer for contract events +} + +// TokenCaller is an auto generated read-only Go binding around an Ethereum contract. +type TokenCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TokenTransactor is an auto generated write-only Go binding around an Ethereum contract. +type TokenTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TokenFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TokenSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type TokenSession struct { + Contract *Token // 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 +} + +// TokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type TokenCallerSession struct { + Contract *TokenCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// TokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type TokenTransactorSession struct { + Contract *TokenTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TokenRaw is an auto generated low-level Go binding around an Ethereum contract. +type TokenRaw struct { + Contract *Token // Generic contract binding to access the raw methods on +} + +// TokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TokenCallerRaw struct { + Contract *TokenCaller // Generic read-only contract binding to access the raw methods on +} + +// TokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TokenTransactorRaw struct { + Contract *TokenTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewToken creates a new instance of Token, bound to a specific deployed contract. +func NewToken(address common.Address, backend bind.ContractBackend) (*Token, error) { + contract, err := bindToken(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Token{TokenCaller: TokenCaller{contract: contract}, TokenTransactor: TokenTransactor{contract: contract}, TokenFilterer: TokenFilterer{contract: contract}}, nil +} + +// NewTokenCaller creates a new read-only instance of Token, bound to a specific deployed contract. +func NewTokenCaller(address common.Address, caller bind.ContractCaller) (*TokenCaller, error) { + contract, err := bindToken(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &TokenCaller{contract: contract}, nil +} + +// NewTokenTransactor creates a new write-only instance of Token, bound to a specific deployed contract. +func NewTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*TokenTransactor, error) { + contract, err := bindToken(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &TokenTransactor{contract: contract}, nil +} + +// NewTokenFilterer creates a new log filterer instance of Token, bound to a specific deployed contract. +func NewTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*TokenFilterer, error) { + contract, err := bindToken(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &TokenFilterer{contract: contract}, nil +} + +// bindToken binds a generic wrapper to an already deployed contract. +func bindToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(TokenABI)) + 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 (_Token *TokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Token.Contract.TokenCaller.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 (_Token *TokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Token.Contract.TokenTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Token *TokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Token.Contract.TokenTransactor.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 (_Token *TokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Token.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 (_Token *TokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Token.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Token *TokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Token.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_Token *TokenCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _Token.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_Token *TokenSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _Token.Contract.Allowance(&_Token.CallOpts, owner, spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_Token *TokenCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _Token.Contract.Allowance(&_Token.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_Token *TokenCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var out []interface{} + err := _Token.contract.Call(opts, &out, "balanceOf", owner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_Token *TokenSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _Token.Contract.BalanceOf(&_Token.CallOpts, owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_Token *TokenCallerSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _Token.Contract.BalanceOf(&_Token.CallOpts, owner) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_Token *TokenCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _Token.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_Token *TokenSession) Decimals() (uint8, error) { + return _Token.Contract.Decimals(&_Token.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_Token *TokenCallerSession) Decimals() (uint8, error) { + return _Token.Contract.Decimals(&_Token.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_Token *TokenCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Token.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_Token *TokenSession) Name() (string, error) { + return _Token.Contract.Name(&_Token.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_Token *TokenCallerSession) Name() (string, error) { + return _Token.Contract.Name(&_Token.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_Token *TokenCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Token.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_Token *TokenSession) Symbol() (string, error) { + return _Token.Contract.Symbol(&_Token.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_Token *TokenCallerSession) Symbol() (string, error) { + return _Token.Contract.Symbol(&_Token.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_Token *TokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Token.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_Token *TokenSession) TotalSupply() (*big.Int, error) { + return _Token.Contract.TotalSupply(&_Token.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_Token *TokenCallerSession) TotalSupply() (*big.Int, error) { + return _Token.Contract.TotalSupply(&_Token.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_Token *TokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _Token.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_Token *TokenSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _Token.Contract.Approve(&_Token.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_Token *TokenTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _Token.Contract.Approve(&_Token.TransactOpts, spender, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_Token *TokenTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _Token.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_Token *TokenSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _Token.Contract.Transfer(&_Token.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_Token *TokenTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _Token.Contract.Transfer(&_Token.TransactOpts, to, value) +} diff --git a/contracts/token.sol b/contracts/token.sol new file mode 100644 index 0000000..bae728a --- /dev/null +++ b/contracts/token.sol @@ -0,0 +1,12 @@ +pragma solidity >=0.6.0; + +interface Token { + function name() external view returns (string memory); + function symbol() external view returns (string memory); + function decimals() external view returns (uint8); + function totalSupply() external view returns (uint); + function balanceOf(address owner) external view returns (uint); + function allowance(address owner, address spender) external view returns (uint); + function approve(address spender, uint value) external returns (bool); + function transfer(address to, uint value) external returns (bool); +} \ No newline at end of file diff --git a/go.mod b/go.mod index d6e408e..cb66b2d 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,27 @@ module git.lehouerou.net/laurent/evm go 1.17 + +require ( + github.com/ethereum/go-ethereum v1.10.12 + github.com/pkg/errors v0.9.1 + github.com/rs/zerolog v1.26.0 + github.com/shopspring/decimal v1.3.1 +) + +require ( + github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect + github.com/btcsuite/btcd v0.20.1-beta // indirect + github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea // indirect + github.com/go-ole/go-ole v1.2.1 // indirect + github.com/go-stack/stack v1.8.0 // indirect + github.com/google/uuid v1.1.5 // indirect + github.com/gorilla/websocket v1.4.2 // indirect + github.com/rjeczalik/notify v0.9.1 // indirect + github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect + github.com/tklauser/go-sysconf v0.3.5 // indirect + github.com/tklauser/numcpus v0.2.2 // indirect + golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 // indirect + golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 // indirect + gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..20a6b48 --- /dev/null +++ b/go.sum @@ -0,0 +1,617 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= +github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= +github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= +github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= +github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= +github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= +github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= +github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= +github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= +github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= +github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= +github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= +github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea h1:j4317fAZh7X6GqbFowYdYdI0L9bwxL07jyPZIdepyZ0= +github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= +github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= +github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= +github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= +github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ethereum/go-ethereum v1.10.12 h1:el/KddB3gLEsnNgGQ3SQuZuiZjwnFTYHe5TwUet5Om4= +github.com/ethereum/go-ethereum v1.10.12/go.mod h1:W3yfrFyL9C1pHcwY5hmRHVDaorTiQxhYBkKyu5mEDHw= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.5 h1:kxhtnfFVi+rYdOALN0B3k9UT86zVJKfBimRaciULW4I= +github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= +github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= +github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huin/goupnp v1.0.2 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI= +github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= +github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= +github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= +github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= +github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= +github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= +github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= +github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= +github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= +github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA= +github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= +github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= +github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= +github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= +github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= +github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.26.0 h1:ORM4ibhEZeTeQlCojCK2kPz1ogAY4bGs4tD+SaAdGaE= +github.com/rs/zerolog v1.26.0/go.mod h1:yBiM87lvSqX8h0Ww4sdzNSkVYZ8dL2xjZJG1lAuGZEo= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg= +github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= +github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= +github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA= +github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= +github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef h1:wHSqTBrZW24CsNJDfeh9Ex6Pm0Rcpc7qrgKBiL44vF4= +github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 h1:uCLL3g5wH2xjxVREVuAbP9JM5PPKjRbXKRa6IBjkzmU= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= +gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= +gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/pancakeswap/contracts/masterchef.abi b/pancakeswap/contracts/masterchef.abi new file mode 100644 index 0000000..8efeb74 --- /dev/null +++ b/pancakeswap/contracts/masterchef.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"contract CakeToken","name":"_cake","type":"address"},{"internalType":"contract SyrupBar","name":"_syrup","type":"address"},{"internalType":"address","name":"_devaddr","type":"address"},{"internalType":"uint256","name":"_cakePerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","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":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"BONUS_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IBEP20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cake","outputs":[{"internalType":"contract CakeToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cakePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devaddr","type":"address"}],"name":"dev","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devaddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"enterStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"leaveStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrator","outputs":[{"internalType":"contract IMigratorChef","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingCake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IBEP20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accCakePerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMigratorChef","name":"_migrator","type":"address"}],"name":"setMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"syrup","outputs":[{"internalType":"contract SyrupBar","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"multiplierNumber","type":"uint256"}],"name":"updateMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/pancakeswap/contracts/masterchef.go b/pancakeswap/contracts/masterchef.go new file mode 100644 index 0000000..ec400f4 --- /dev/null +++ b/pancakeswap/contracts/masterchef.go @@ -0,0 +1,1582 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +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 +) + +// MasterChefMetaData contains all meta data concerning the MasterChef contract. +var MasterChefMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"contractCakeToken\",\"name\":\"_cake\",\"type\":\"address\"},{\"internalType\":\"contractSyrupBar\",\"name\":\"_syrup\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_devaddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_cakePerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EmergencyWithdraw\",\"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\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BONUS_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_allocPoint\",\"type\":\"uint256\"},{\"internalType\":\"contractIBEP20\",\"name\":\"_lpToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_withUpdate\",\"type\":\"bool\"}],\"name\":\"add\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cake\",\"outputs\":[{\"internalType\":\"contractCakeToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cakePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devaddr\",\"type\":\"address\"}],\"name\":\"dev\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devaddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"emergencyWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"enterStaking\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_to\",\"type\":\"uint256\"}],\"name\":\"getMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"leaveStaking\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"massUpdatePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"migrator\",\"outputs\":[{\"internalType\":\"contractIMigratorChef\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"pendingCake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"poolInfo\",\"outputs\":[{\"internalType\":\"contractIBEP20\",\"name\":\"lpToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allocPoint\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastRewardBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accCakePerShare\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poolLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_allocPoint\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_withUpdate\",\"type\":\"bool\"}],\"name\":\"set\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIMigratorChef\",\"name\":\"_migrator\",\"type\":\"address\"}],\"name\":\"setMigrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"syrup\",\"outputs\":[{\"internalType\":\"contractSyrupBar\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAllocPoint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"multiplierNumber\",\"type\":\"uint256\"}],\"name\":\"updateMultiplier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"updatePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardDebt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// MasterChefABI is the input ABI used to generate the binding from. +// Deprecated: Use MasterChefMetaData.ABI instead. +var MasterChefABI = MasterChefMetaData.ABI + +// MasterChef is an auto generated Go binding around an Ethereum contract. +type MasterChef struct { + MasterChefCaller // Read-only binding to the contract + MasterChefTransactor // Write-only binding to the contract + MasterChefFilterer // Log filterer for contract events +} + +// MasterChefCaller is an auto generated read-only Go binding around an Ethereum contract. +type MasterChefCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MasterChefTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MasterChefTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MasterChefFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MasterChefFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MasterChefSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MasterChefSession struct { + Contract *MasterChef // 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 +} + +// MasterChefCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MasterChefCallerSession struct { + Contract *MasterChefCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MasterChefTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MasterChefTransactorSession struct { + Contract *MasterChefTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MasterChefRaw is an auto generated low-level Go binding around an Ethereum contract. +type MasterChefRaw struct { + Contract *MasterChef // Generic contract binding to access the raw methods on +} + +// MasterChefCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MasterChefCallerRaw struct { + Contract *MasterChefCaller // Generic read-only contract binding to access the raw methods on +} + +// MasterChefTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MasterChefTransactorRaw struct { + Contract *MasterChefTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMasterChef creates a new instance of MasterChef, bound to a specific deployed contract. +func NewMasterChef(address common.Address, backend bind.ContractBackend) (*MasterChef, error) { + contract, err := bindMasterChef(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MasterChef{MasterChefCaller: MasterChefCaller{contract: contract}, MasterChefTransactor: MasterChefTransactor{contract: contract}, MasterChefFilterer: MasterChefFilterer{contract: contract}}, nil +} + +// NewMasterChefCaller creates a new read-only instance of MasterChef, bound to a specific deployed contract. +func NewMasterChefCaller(address common.Address, caller bind.ContractCaller) (*MasterChefCaller, error) { + contract, err := bindMasterChef(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MasterChefCaller{contract: contract}, nil +} + +// NewMasterChefTransactor creates a new write-only instance of MasterChef, bound to a specific deployed contract. +func NewMasterChefTransactor(address common.Address, transactor bind.ContractTransactor) (*MasterChefTransactor, error) { + contract, err := bindMasterChef(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MasterChefTransactor{contract: contract}, nil +} + +// NewMasterChefFilterer creates a new log filterer instance of MasterChef, bound to a specific deployed contract. +func NewMasterChefFilterer(address common.Address, filterer bind.ContractFilterer) (*MasterChefFilterer, error) { + contract, err := bindMasterChef(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MasterChefFilterer{contract: contract}, nil +} + +// bindMasterChef binds a generic wrapper to an already deployed contract. +func bindMasterChef(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(MasterChefABI)) + 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 (_MasterChef *MasterChefRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MasterChef.Contract.MasterChefCaller.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 (_MasterChef *MasterChefRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MasterChef.Contract.MasterChefTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MasterChef *MasterChefRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MasterChef.Contract.MasterChefTransactor.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 (_MasterChef *MasterChefCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MasterChef.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 (_MasterChef *MasterChefTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MasterChef.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MasterChef *MasterChefTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MasterChef.Contract.contract.Transact(opts, method, params...) +} + +// BONUSMULTIPLIER is a free data retrieval call binding the contract method 0x8aa28550. +// +// Solidity: function BONUS_MULTIPLIER() view returns(uint256) +func (_MasterChef *MasterChefCaller) BONUSMULTIPLIER(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MasterChef.contract.Call(opts, &out, "BONUS_MULTIPLIER") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BONUSMULTIPLIER is a free data retrieval call binding the contract method 0x8aa28550. +// +// Solidity: function BONUS_MULTIPLIER() view returns(uint256) +func (_MasterChef *MasterChefSession) BONUSMULTIPLIER() (*big.Int, error) { + return _MasterChef.Contract.BONUSMULTIPLIER(&_MasterChef.CallOpts) +} + +// BONUSMULTIPLIER is a free data retrieval call binding the contract method 0x8aa28550. +// +// Solidity: function BONUS_MULTIPLIER() view returns(uint256) +func (_MasterChef *MasterChefCallerSession) BONUSMULTIPLIER() (*big.Int, error) { + return _MasterChef.Contract.BONUSMULTIPLIER(&_MasterChef.CallOpts) +} + +// Cake is a free data retrieval call binding the contract method 0xdce17484. +// +// Solidity: function cake() view returns(address) +func (_MasterChef *MasterChefCaller) Cake(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MasterChef.contract.Call(opts, &out, "cake") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Cake is a free data retrieval call binding the contract method 0xdce17484. +// +// Solidity: function cake() view returns(address) +func (_MasterChef *MasterChefSession) Cake() (common.Address, error) { + return _MasterChef.Contract.Cake(&_MasterChef.CallOpts) +} + +// Cake is a free data retrieval call binding the contract method 0xdce17484. +// +// Solidity: function cake() view returns(address) +func (_MasterChef *MasterChefCallerSession) Cake() (common.Address, error) { + return _MasterChef.Contract.Cake(&_MasterChef.CallOpts) +} + +// CakePerBlock is a free data retrieval call binding the contract method 0x0755e0b6. +// +// Solidity: function cakePerBlock() view returns(uint256) +func (_MasterChef *MasterChefCaller) CakePerBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MasterChef.contract.Call(opts, &out, "cakePerBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CakePerBlock is a free data retrieval call binding the contract method 0x0755e0b6. +// +// Solidity: function cakePerBlock() view returns(uint256) +func (_MasterChef *MasterChefSession) CakePerBlock() (*big.Int, error) { + return _MasterChef.Contract.CakePerBlock(&_MasterChef.CallOpts) +} + +// CakePerBlock is a free data retrieval call binding the contract method 0x0755e0b6. +// +// Solidity: function cakePerBlock() view returns(uint256) +func (_MasterChef *MasterChefCallerSession) CakePerBlock() (*big.Int, error) { + return _MasterChef.Contract.CakePerBlock(&_MasterChef.CallOpts) +} + +// Devaddr is a free data retrieval call binding the contract method 0xd49e77cd. +// +// Solidity: function devaddr() view returns(address) +func (_MasterChef *MasterChefCaller) Devaddr(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MasterChef.contract.Call(opts, &out, "devaddr") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Devaddr is a free data retrieval call binding the contract method 0xd49e77cd. +// +// Solidity: function devaddr() view returns(address) +func (_MasterChef *MasterChefSession) Devaddr() (common.Address, error) { + return _MasterChef.Contract.Devaddr(&_MasterChef.CallOpts) +} + +// Devaddr is a free data retrieval call binding the contract method 0xd49e77cd. +// +// Solidity: function devaddr() view returns(address) +func (_MasterChef *MasterChefCallerSession) Devaddr() (common.Address, error) { + return _MasterChef.Contract.Devaddr(&_MasterChef.CallOpts) +} + +// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a. +// +// Solidity: function getMultiplier(uint256 _from, uint256 _to) view returns(uint256) +func (_MasterChef *MasterChefCaller) GetMultiplier(opts *bind.CallOpts, _from *big.Int, _to *big.Int) (*big.Int, error) { + var out []interface{} + err := _MasterChef.contract.Call(opts, &out, "getMultiplier", _from, _to) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a. +// +// Solidity: function getMultiplier(uint256 _from, uint256 _to) view returns(uint256) +func (_MasterChef *MasterChefSession) GetMultiplier(_from *big.Int, _to *big.Int) (*big.Int, error) { + return _MasterChef.Contract.GetMultiplier(&_MasterChef.CallOpts, _from, _to) +} + +// GetMultiplier is a free data retrieval call binding the contract method 0x8dbb1e3a. +// +// Solidity: function getMultiplier(uint256 _from, uint256 _to) view returns(uint256) +func (_MasterChef *MasterChefCallerSession) GetMultiplier(_from *big.Int, _to *big.Int) (*big.Int, error) { + return _MasterChef.Contract.GetMultiplier(&_MasterChef.CallOpts, _from, _to) +} + +// Migrator is a free data retrieval call binding the contract method 0x7cd07e47. +// +// Solidity: function migrator() view returns(address) +func (_MasterChef *MasterChefCaller) Migrator(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MasterChef.contract.Call(opts, &out, "migrator") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Migrator is a free data retrieval call binding the contract method 0x7cd07e47. +// +// Solidity: function migrator() view returns(address) +func (_MasterChef *MasterChefSession) Migrator() (common.Address, error) { + return _MasterChef.Contract.Migrator(&_MasterChef.CallOpts) +} + +// Migrator is a free data retrieval call binding the contract method 0x7cd07e47. +// +// Solidity: function migrator() view returns(address) +func (_MasterChef *MasterChefCallerSession) Migrator() (common.Address, error) { + return _MasterChef.Contract.Migrator(&_MasterChef.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MasterChef *MasterChefCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MasterChef.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 (_MasterChef *MasterChefSession) Owner() (common.Address, error) { + return _MasterChef.Contract.Owner(&_MasterChef.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MasterChef *MasterChefCallerSession) Owner() (common.Address, error) { + return _MasterChef.Contract.Owner(&_MasterChef.CallOpts) +} + +// PendingCake is a free data retrieval call binding the contract method 0x1175a1dd. +// +// Solidity: function pendingCake(uint256 _pid, address _user) view returns(uint256) +func (_MasterChef *MasterChefCaller) PendingCake(opts *bind.CallOpts, _pid *big.Int, _user common.Address) (*big.Int, error) { + var out []interface{} + err := _MasterChef.contract.Call(opts, &out, "pendingCake", _pid, _user) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PendingCake is a free data retrieval call binding the contract method 0x1175a1dd. +// +// Solidity: function pendingCake(uint256 _pid, address _user) view returns(uint256) +func (_MasterChef *MasterChefSession) PendingCake(_pid *big.Int, _user common.Address) (*big.Int, error) { + return _MasterChef.Contract.PendingCake(&_MasterChef.CallOpts, _pid, _user) +} + +// PendingCake is a free data retrieval call binding the contract method 0x1175a1dd. +// +// Solidity: function pendingCake(uint256 _pid, address _user) view returns(uint256) +func (_MasterChef *MasterChefCallerSession) PendingCake(_pid *big.Int, _user common.Address) (*big.Int, error) { + return _MasterChef.Contract.PendingCake(&_MasterChef.CallOpts, _pid, _user) +} + +// PoolInfo is a free data retrieval call binding the contract method 0x1526fe27. +// +// Solidity: function poolInfo(uint256 ) view returns(address lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint256 accCakePerShare) +func (_MasterChef *MasterChefCaller) PoolInfo(opts *bind.CallOpts, arg0 *big.Int) (struct { + LpToken common.Address + AllocPoint *big.Int + LastRewardBlock *big.Int + AccCakePerShare *big.Int +}, error) { + var out []interface{} + err := _MasterChef.contract.Call(opts, &out, "poolInfo", arg0) + + outstruct := new(struct { + LpToken common.Address + AllocPoint *big.Int + LastRewardBlock *big.Int + AccCakePerShare *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.LpToken = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.AllocPoint = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.LastRewardBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.AccCakePerShare = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// PoolInfo is a free data retrieval call binding the contract method 0x1526fe27. +// +// Solidity: function poolInfo(uint256 ) view returns(address lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint256 accCakePerShare) +func (_MasterChef *MasterChefSession) PoolInfo(arg0 *big.Int) (struct { + LpToken common.Address + AllocPoint *big.Int + LastRewardBlock *big.Int + AccCakePerShare *big.Int +}, error) { + return _MasterChef.Contract.PoolInfo(&_MasterChef.CallOpts, arg0) +} + +// PoolInfo is a free data retrieval call binding the contract method 0x1526fe27. +// +// Solidity: function poolInfo(uint256 ) view returns(address lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint256 accCakePerShare) +func (_MasterChef *MasterChefCallerSession) PoolInfo(arg0 *big.Int) (struct { + LpToken common.Address + AllocPoint *big.Int + LastRewardBlock *big.Int + AccCakePerShare *big.Int +}, error) { + return _MasterChef.Contract.PoolInfo(&_MasterChef.CallOpts, arg0) +} + +// PoolLength is a free data retrieval call binding the contract method 0x081e3eda. +// +// Solidity: function poolLength() view returns(uint256) +func (_MasterChef *MasterChefCaller) PoolLength(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MasterChef.contract.Call(opts, &out, "poolLength") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PoolLength is a free data retrieval call binding the contract method 0x081e3eda. +// +// Solidity: function poolLength() view returns(uint256) +func (_MasterChef *MasterChefSession) PoolLength() (*big.Int, error) { + return _MasterChef.Contract.PoolLength(&_MasterChef.CallOpts) +} + +// PoolLength is a free data retrieval call binding the contract method 0x081e3eda. +// +// Solidity: function poolLength() view returns(uint256) +func (_MasterChef *MasterChefCallerSession) PoolLength() (*big.Int, error) { + return _MasterChef.Contract.PoolLength(&_MasterChef.CallOpts) +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256) +func (_MasterChef *MasterChefCaller) StartBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MasterChef.contract.Call(opts, &out, "startBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256) +func (_MasterChef *MasterChefSession) StartBlock() (*big.Int, error) { + return _MasterChef.Contract.StartBlock(&_MasterChef.CallOpts) +} + +// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1. +// +// Solidity: function startBlock() view returns(uint256) +func (_MasterChef *MasterChefCallerSession) StartBlock() (*big.Int, error) { + return _MasterChef.Contract.StartBlock(&_MasterChef.CallOpts) +} + +// Syrup is a free data retrieval call binding the contract method 0x86a952c4. +// +// Solidity: function syrup() view returns(address) +func (_MasterChef *MasterChefCaller) Syrup(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MasterChef.contract.Call(opts, &out, "syrup") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Syrup is a free data retrieval call binding the contract method 0x86a952c4. +// +// Solidity: function syrup() view returns(address) +func (_MasterChef *MasterChefSession) Syrup() (common.Address, error) { + return _MasterChef.Contract.Syrup(&_MasterChef.CallOpts) +} + +// Syrup is a free data retrieval call binding the contract method 0x86a952c4. +// +// Solidity: function syrup() view returns(address) +func (_MasterChef *MasterChefCallerSession) Syrup() (common.Address, error) { + return _MasterChef.Contract.Syrup(&_MasterChef.CallOpts) +} + +// TotalAllocPoint is a free data retrieval call binding the contract method 0x17caf6f1. +// +// Solidity: function totalAllocPoint() view returns(uint256) +func (_MasterChef *MasterChefCaller) TotalAllocPoint(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MasterChef.contract.Call(opts, &out, "totalAllocPoint") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalAllocPoint is a free data retrieval call binding the contract method 0x17caf6f1. +// +// Solidity: function totalAllocPoint() view returns(uint256) +func (_MasterChef *MasterChefSession) TotalAllocPoint() (*big.Int, error) { + return _MasterChef.Contract.TotalAllocPoint(&_MasterChef.CallOpts) +} + +// TotalAllocPoint is a free data retrieval call binding the contract method 0x17caf6f1. +// +// Solidity: function totalAllocPoint() view returns(uint256) +func (_MasterChef *MasterChefCallerSession) TotalAllocPoint() (*big.Int, error) { + return _MasterChef.Contract.TotalAllocPoint(&_MasterChef.CallOpts) +} + +// UserInfo is a free data retrieval call binding the contract method 0x93f1a40b. +// +// Solidity: function userInfo(uint256 , address ) view returns(uint256 amount, uint256 rewardDebt) +func (_MasterChef *MasterChefCaller) UserInfo(opts *bind.CallOpts, arg0 *big.Int, arg1 common.Address) (struct { + Amount *big.Int + RewardDebt *big.Int +}, error) { + var out []interface{} + err := _MasterChef.contract.Call(opts, &out, "userInfo", arg0, arg1) + + outstruct := new(struct { + Amount *big.Int + RewardDebt *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.RewardDebt = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// UserInfo is a free data retrieval call binding the contract method 0x93f1a40b. +// +// Solidity: function userInfo(uint256 , address ) view returns(uint256 amount, uint256 rewardDebt) +func (_MasterChef *MasterChefSession) UserInfo(arg0 *big.Int, arg1 common.Address) (struct { + Amount *big.Int + RewardDebt *big.Int +}, error) { + return _MasterChef.Contract.UserInfo(&_MasterChef.CallOpts, arg0, arg1) +} + +// UserInfo is a free data retrieval call binding the contract method 0x93f1a40b. +// +// Solidity: function userInfo(uint256 , address ) view returns(uint256 amount, uint256 rewardDebt) +func (_MasterChef *MasterChefCallerSession) UserInfo(arg0 *big.Int, arg1 common.Address) (struct { + Amount *big.Int + RewardDebt *big.Int +}, error) { + return _MasterChef.Contract.UserInfo(&_MasterChef.CallOpts, arg0, arg1) +} + +// Add is a paid mutator transaction binding the contract method 0x1eaaa045. +// +// Solidity: function add(uint256 _allocPoint, address _lpToken, bool _withUpdate) returns() +func (_MasterChef *MasterChefTransactor) Add(opts *bind.TransactOpts, _allocPoint *big.Int, _lpToken common.Address, _withUpdate bool) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "add", _allocPoint, _lpToken, _withUpdate) +} + +// Add is a paid mutator transaction binding the contract method 0x1eaaa045. +// +// Solidity: function add(uint256 _allocPoint, address _lpToken, bool _withUpdate) returns() +func (_MasterChef *MasterChefSession) Add(_allocPoint *big.Int, _lpToken common.Address, _withUpdate bool) (*types.Transaction, error) { + return _MasterChef.Contract.Add(&_MasterChef.TransactOpts, _allocPoint, _lpToken, _withUpdate) +} + +// Add is a paid mutator transaction binding the contract method 0x1eaaa045. +// +// Solidity: function add(uint256 _allocPoint, address _lpToken, bool _withUpdate) returns() +func (_MasterChef *MasterChefTransactorSession) Add(_allocPoint *big.Int, _lpToken common.Address, _withUpdate bool) (*types.Transaction, error) { + return _MasterChef.Contract.Add(&_MasterChef.TransactOpts, _allocPoint, _lpToken, _withUpdate) +} + +// Deposit is a paid mutator transaction binding the contract method 0xe2bbb158. +// +// Solidity: function deposit(uint256 _pid, uint256 _amount) returns() +func (_MasterChef *MasterChefTransactor) Deposit(opts *bind.TransactOpts, _pid *big.Int, _amount *big.Int) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "deposit", _pid, _amount) +} + +// Deposit is a paid mutator transaction binding the contract method 0xe2bbb158. +// +// Solidity: function deposit(uint256 _pid, uint256 _amount) returns() +func (_MasterChef *MasterChefSession) Deposit(_pid *big.Int, _amount *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.Deposit(&_MasterChef.TransactOpts, _pid, _amount) +} + +// Deposit is a paid mutator transaction binding the contract method 0xe2bbb158. +// +// Solidity: function deposit(uint256 _pid, uint256 _amount) returns() +func (_MasterChef *MasterChefTransactorSession) Deposit(_pid *big.Int, _amount *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.Deposit(&_MasterChef.TransactOpts, _pid, _amount) +} + +// Dev is a paid mutator transaction binding the contract method 0x8d88a90e. +// +// Solidity: function dev(address _devaddr) returns() +func (_MasterChef *MasterChefTransactor) Dev(opts *bind.TransactOpts, _devaddr common.Address) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "dev", _devaddr) +} + +// Dev is a paid mutator transaction binding the contract method 0x8d88a90e. +// +// Solidity: function dev(address _devaddr) returns() +func (_MasterChef *MasterChefSession) Dev(_devaddr common.Address) (*types.Transaction, error) { + return _MasterChef.Contract.Dev(&_MasterChef.TransactOpts, _devaddr) +} + +// Dev is a paid mutator transaction binding the contract method 0x8d88a90e. +// +// Solidity: function dev(address _devaddr) returns() +func (_MasterChef *MasterChefTransactorSession) Dev(_devaddr common.Address) (*types.Transaction, error) { + return _MasterChef.Contract.Dev(&_MasterChef.TransactOpts, _devaddr) +} + +// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x5312ea8e. +// +// Solidity: function emergencyWithdraw(uint256 _pid) returns() +func (_MasterChef *MasterChefTransactor) EmergencyWithdraw(opts *bind.TransactOpts, _pid *big.Int) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "emergencyWithdraw", _pid) +} + +// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x5312ea8e. +// +// Solidity: function emergencyWithdraw(uint256 _pid) returns() +func (_MasterChef *MasterChefSession) EmergencyWithdraw(_pid *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.EmergencyWithdraw(&_MasterChef.TransactOpts, _pid) +} + +// EmergencyWithdraw is a paid mutator transaction binding the contract method 0x5312ea8e. +// +// Solidity: function emergencyWithdraw(uint256 _pid) returns() +func (_MasterChef *MasterChefTransactorSession) EmergencyWithdraw(_pid *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.EmergencyWithdraw(&_MasterChef.TransactOpts, _pid) +} + +// EnterStaking is a paid mutator transaction binding the contract method 0x41441d3b. +// +// Solidity: function enterStaking(uint256 _amount) returns() +func (_MasterChef *MasterChefTransactor) EnterStaking(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "enterStaking", _amount) +} + +// EnterStaking is a paid mutator transaction binding the contract method 0x41441d3b. +// +// Solidity: function enterStaking(uint256 _amount) returns() +func (_MasterChef *MasterChefSession) EnterStaking(_amount *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.EnterStaking(&_MasterChef.TransactOpts, _amount) +} + +// EnterStaking is a paid mutator transaction binding the contract method 0x41441d3b. +// +// Solidity: function enterStaking(uint256 _amount) returns() +func (_MasterChef *MasterChefTransactorSession) EnterStaking(_amount *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.EnterStaking(&_MasterChef.TransactOpts, _amount) +} + +// LeaveStaking is a paid mutator transaction binding the contract method 0x1058d281. +// +// Solidity: function leaveStaking(uint256 _amount) returns() +func (_MasterChef *MasterChefTransactor) LeaveStaking(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "leaveStaking", _amount) +} + +// LeaveStaking is a paid mutator transaction binding the contract method 0x1058d281. +// +// Solidity: function leaveStaking(uint256 _amount) returns() +func (_MasterChef *MasterChefSession) LeaveStaking(_amount *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.LeaveStaking(&_MasterChef.TransactOpts, _amount) +} + +// LeaveStaking is a paid mutator transaction binding the contract method 0x1058d281. +// +// Solidity: function leaveStaking(uint256 _amount) returns() +func (_MasterChef *MasterChefTransactorSession) LeaveStaking(_amount *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.LeaveStaking(&_MasterChef.TransactOpts, _amount) +} + +// MassUpdatePools is a paid mutator transaction binding the contract method 0x630b5ba1. +// +// Solidity: function massUpdatePools() returns() +func (_MasterChef *MasterChefTransactor) MassUpdatePools(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "massUpdatePools") +} + +// MassUpdatePools is a paid mutator transaction binding the contract method 0x630b5ba1. +// +// Solidity: function massUpdatePools() returns() +func (_MasterChef *MasterChefSession) MassUpdatePools() (*types.Transaction, error) { + return _MasterChef.Contract.MassUpdatePools(&_MasterChef.TransactOpts) +} + +// MassUpdatePools is a paid mutator transaction binding the contract method 0x630b5ba1. +// +// Solidity: function massUpdatePools() returns() +func (_MasterChef *MasterChefTransactorSession) MassUpdatePools() (*types.Transaction, error) { + return _MasterChef.Contract.MassUpdatePools(&_MasterChef.TransactOpts) +} + +// Migrate is a paid mutator transaction binding the contract method 0x454b0608. +// +// Solidity: function migrate(uint256 _pid) returns() +func (_MasterChef *MasterChefTransactor) Migrate(opts *bind.TransactOpts, _pid *big.Int) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "migrate", _pid) +} + +// Migrate is a paid mutator transaction binding the contract method 0x454b0608. +// +// Solidity: function migrate(uint256 _pid) returns() +func (_MasterChef *MasterChefSession) Migrate(_pid *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.Migrate(&_MasterChef.TransactOpts, _pid) +} + +// Migrate is a paid mutator transaction binding the contract method 0x454b0608. +// +// Solidity: function migrate(uint256 _pid) returns() +func (_MasterChef *MasterChefTransactorSession) Migrate(_pid *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.Migrate(&_MasterChef.TransactOpts, _pid) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MasterChef *MasterChefTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MasterChef *MasterChefSession) RenounceOwnership() (*types.Transaction, error) { + return _MasterChef.Contract.RenounceOwnership(&_MasterChef.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MasterChef *MasterChefTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _MasterChef.Contract.RenounceOwnership(&_MasterChef.TransactOpts) +} + +// Set is a paid mutator transaction binding the contract method 0x64482f79. +// +// Solidity: function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) returns() +func (_MasterChef *MasterChefTransactor) Set(opts *bind.TransactOpts, _pid *big.Int, _allocPoint *big.Int, _withUpdate bool) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "set", _pid, _allocPoint, _withUpdate) +} + +// Set is a paid mutator transaction binding the contract method 0x64482f79. +// +// Solidity: function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) returns() +func (_MasterChef *MasterChefSession) Set(_pid *big.Int, _allocPoint *big.Int, _withUpdate bool) (*types.Transaction, error) { + return _MasterChef.Contract.Set(&_MasterChef.TransactOpts, _pid, _allocPoint, _withUpdate) +} + +// Set is a paid mutator transaction binding the contract method 0x64482f79. +// +// Solidity: function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) returns() +func (_MasterChef *MasterChefTransactorSession) Set(_pid *big.Int, _allocPoint *big.Int, _withUpdate bool) (*types.Transaction, error) { + return _MasterChef.Contract.Set(&_MasterChef.TransactOpts, _pid, _allocPoint, _withUpdate) +} + +// SetMigrator is a paid mutator transaction binding the contract method 0x23cf3118. +// +// Solidity: function setMigrator(address _migrator) returns() +func (_MasterChef *MasterChefTransactor) SetMigrator(opts *bind.TransactOpts, _migrator common.Address) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "setMigrator", _migrator) +} + +// SetMigrator is a paid mutator transaction binding the contract method 0x23cf3118. +// +// Solidity: function setMigrator(address _migrator) returns() +func (_MasterChef *MasterChefSession) SetMigrator(_migrator common.Address) (*types.Transaction, error) { + return _MasterChef.Contract.SetMigrator(&_MasterChef.TransactOpts, _migrator) +} + +// SetMigrator is a paid mutator transaction binding the contract method 0x23cf3118. +// +// Solidity: function setMigrator(address _migrator) returns() +func (_MasterChef *MasterChefTransactorSession) SetMigrator(_migrator common.Address) (*types.Transaction, error) { + return _MasterChef.Contract.SetMigrator(&_MasterChef.TransactOpts, _migrator) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MasterChef *MasterChefTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MasterChef *MasterChefSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MasterChef.Contract.TransferOwnership(&_MasterChef.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MasterChef *MasterChefTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MasterChef.Contract.TransferOwnership(&_MasterChef.TransactOpts, newOwner) +} + +// UpdateMultiplier is a paid mutator transaction binding the contract method 0x5ffe6146. +// +// Solidity: function updateMultiplier(uint256 multiplierNumber) returns() +func (_MasterChef *MasterChefTransactor) UpdateMultiplier(opts *bind.TransactOpts, multiplierNumber *big.Int) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "updateMultiplier", multiplierNumber) +} + +// UpdateMultiplier is a paid mutator transaction binding the contract method 0x5ffe6146. +// +// Solidity: function updateMultiplier(uint256 multiplierNumber) returns() +func (_MasterChef *MasterChefSession) UpdateMultiplier(multiplierNumber *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.UpdateMultiplier(&_MasterChef.TransactOpts, multiplierNumber) +} + +// UpdateMultiplier is a paid mutator transaction binding the contract method 0x5ffe6146. +// +// Solidity: function updateMultiplier(uint256 multiplierNumber) returns() +func (_MasterChef *MasterChefTransactorSession) UpdateMultiplier(multiplierNumber *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.UpdateMultiplier(&_MasterChef.TransactOpts, multiplierNumber) +} + +// UpdatePool is a paid mutator transaction binding the contract method 0x51eb05a6. +// +// Solidity: function updatePool(uint256 _pid) returns() +func (_MasterChef *MasterChefTransactor) UpdatePool(opts *bind.TransactOpts, _pid *big.Int) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "updatePool", _pid) +} + +// UpdatePool is a paid mutator transaction binding the contract method 0x51eb05a6. +// +// Solidity: function updatePool(uint256 _pid) returns() +func (_MasterChef *MasterChefSession) UpdatePool(_pid *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.UpdatePool(&_MasterChef.TransactOpts, _pid) +} + +// UpdatePool is a paid mutator transaction binding the contract method 0x51eb05a6. +// +// Solidity: function updatePool(uint256 _pid) returns() +func (_MasterChef *MasterChefTransactorSession) UpdatePool(_pid *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.UpdatePool(&_MasterChef.TransactOpts, _pid) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x441a3e70. +// +// Solidity: function withdraw(uint256 _pid, uint256 _amount) returns() +func (_MasterChef *MasterChefTransactor) Withdraw(opts *bind.TransactOpts, _pid *big.Int, _amount *big.Int) (*types.Transaction, error) { + return _MasterChef.contract.Transact(opts, "withdraw", _pid, _amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x441a3e70. +// +// Solidity: function withdraw(uint256 _pid, uint256 _amount) returns() +func (_MasterChef *MasterChefSession) Withdraw(_pid *big.Int, _amount *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.Withdraw(&_MasterChef.TransactOpts, _pid, _amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x441a3e70. +// +// Solidity: function withdraw(uint256 _pid, uint256 _amount) returns() +func (_MasterChef *MasterChefTransactorSession) Withdraw(_pid *big.Int, _amount *big.Int) (*types.Transaction, error) { + return _MasterChef.Contract.Withdraw(&_MasterChef.TransactOpts, _pid, _amount) +} + +// MasterChefDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the MasterChef contract. +type MasterChefDepositIterator struct { + Event *MasterChefDeposit // 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 *MasterChefDepositIterator) 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(MasterChefDeposit) + 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(MasterChefDeposit) + 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 *MasterChefDepositIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefDepositIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefDeposit represents a Deposit event raised by the MasterChef contract. +type MasterChefDeposit struct { + User common.Address + Pid *big.Int + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDeposit is a free log retrieval operation binding the contract event 0x90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15. +// +// Solidity: event Deposit(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChef *MasterChefFilterer) FilterDeposit(opts *bind.FilterOpts, user []common.Address, pid []*big.Int) (*MasterChefDepositIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChef.contract.FilterLogs(opts, "Deposit", userRule, pidRule) + if err != nil { + return nil, err + } + return &MasterChefDepositIterator{contract: _MasterChef.contract, event: "Deposit", logs: logs, sub: sub}, nil +} + +// WatchDeposit is a free log subscription operation binding the contract event 0x90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15. +// +// Solidity: event Deposit(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChef *MasterChefFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *MasterChefDeposit, user []common.Address, pid []*big.Int) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChef.contract.WatchLogs(opts, "Deposit", userRule, pidRule) + 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(MasterChefDeposit) + if err := _MasterChef.contract.UnpackLog(event, "Deposit", 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 +} + +// ParseDeposit is a log parse operation binding the contract event 0x90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15. +// +// Solidity: event Deposit(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChef *MasterChefFilterer) ParseDeposit(log types.Log) (*MasterChefDeposit, error) { + event := new(MasterChefDeposit) + if err := _MasterChef.contract.UnpackLog(event, "Deposit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefEmergencyWithdrawIterator is returned from FilterEmergencyWithdraw and is used to iterate over the raw logs and unpacked data for EmergencyWithdraw events raised by the MasterChef contract. +type MasterChefEmergencyWithdrawIterator struct { + Event *MasterChefEmergencyWithdraw // 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 *MasterChefEmergencyWithdrawIterator) 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(MasterChefEmergencyWithdraw) + 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(MasterChefEmergencyWithdraw) + 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 *MasterChefEmergencyWithdrawIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefEmergencyWithdrawIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefEmergencyWithdraw represents a EmergencyWithdraw event raised by the MasterChef contract. +type MasterChefEmergencyWithdraw struct { + User common.Address + Pid *big.Int + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEmergencyWithdraw is a free log retrieval operation binding the contract event 0xbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595. +// +// Solidity: event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChef *MasterChefFilterer) FilterEmergencyWithdraw(opts *bind.FilterOpts, user []common.Address, pid []*big.Int) (*MasterChefEmergencyWithdrawIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChef.contract.FilterLogs(opts, "EmergencyWithdraw", userRule, pidRule) + if err != nil { + return nil, err + } + return &MasterChefEmergencyWithdrawIterator{contract: _MasterChef.contract, event: "EmergencyWithdraw", logs: logs, sub: sub}, nil +} + +// WatchEmergencyWithdraw is a free log subscription operation binding the contract event 0xbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595. +// +// Solidity: event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChef *MasterChefFilterer) WatchEmergencyWithdraw(opts *bind.WatchOpts, sink chan<- *MasterChefEmergencyWithdraw, user []common.Address, pid []*big.Int) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChef.contract.WatchLogs(opts, "EmergencyWithdraw", userRule, pidRule) + 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(MasterChefEmergencyWithdraw) + if err := _MasterChef.contract.UnpackLog(event, "EmergencyWithdraw", 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 +} + +// ParseEmergencyWithdraw is a log parse operation binding the contract event 0xbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595. +// +// Solidity: event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChef *MasterChefFilterer) ParseEmergencyWithdraw(log types.Log) (*MasterChefEmergencyWithdraw, error) { + event := new(MasterChefEmergencyWithdraw) + if err := _MasterChef.contract.UnpackLog(event, "EmergencyWithdraw", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the MasterChef contract. +type MasterChefOwnershipTransferredIterator struct { + Event *MasterChefOwnershipTransferred // 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 *MasterChefOwnershipTransferredIterator) 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(MasterChefOwnershipTransferred) + 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(MasterChefOwnershipTransferred) + 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 *MasterChefOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefOwnershipTransferred represents a OwnershipTransferred event raised by the MasterChef contract. +type MasterChefOwnershipTransferred 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 (_MasterChef *MasterChefFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MasterChefOwnershipTransferredIterator, 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 := _MasterChef.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &MasterChefOwnershipTransferredIterator{contract: _MasterChef.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 (_MasterChef *MasterChefFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MasterChefOwnershipTransferred, 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 := _MasterChef.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(MasterChefOwnershipTransferred) + if err := _MasterChef.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 (_MasterChef *MasterChefFilterer) ParseOwnershipTransferred(log types.Log) (*MasterChefOwnershipTransferred, error) { + event := new(MasterChefOwnershipTransferred) + if err := _MasterChef.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MasterChefWithdrawIterator is returned from FilterWithdraw and is used to iterate over the raw logs and unpacked data for Withdraw events raised by the MasterChef contract. +type MasterChefWithdrawIterator struct { + Event *MasterChefWithdraw // 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 *MasterChefWithdrawIterator) 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(MasterChefWithdraw) + 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(MasterChefWithdraw) + 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 *MasterChefWithdrawIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MasterChefWithdrawIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MasterChefWithdraw represents a Withdraw event raised by the MasterChef contract. +type MasterChefWithdraw struct { + User common.Address + Pid *big.Int + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdraw is a free log retrieval operation binding the contract event 0xf279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568. +// +// Solidity: event Withdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChef *MasterChefFilterer) FilterWithdraw(opts *bind.FilterOpts, user []common.Address, pid []*big.Int) (*MasterChefWithdrawIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChef.contract.FilterLogs(opts, "Withdraw", userRule, pidRule) + if err != nil { + return nil, err + } + return &MasterChefWithdrawIterator{contract: _MasterChef.contract, event: "Withdraw", logs: logs, sub: sub}, nil +} + +// WatchWithdraw is a free log subscription operation binding the contract event 0xf279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568. +// +// Solidity: event Withdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChef *MasterChefFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *MasterChefWithdraw, user []common.Address, pid []*big.Int) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + var pidRule []interface{} + for _, pidItem := range pid { + pidRule = append(pidRule, pidItem) + } + + logs, sub, err := _MasterChef.contract.WatchLogs(opts, "Withdraw", userRule, pidRule) + 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(MasterChefWithdraw) + if err := _MasterChef.contract.UnpackLog(event, "Withdraw", 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 +} + +// ParseWithdraw is a log parse operation binding the contract event 0xf279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568. +// +// Solidity: event Withdraw(address indexed user, uint256 indexed pid, uint256 amount) +func (_MasterChef *MasterChefFilterer) ParseWithdraw(log types.Log) (*MasterChefWithdraw, error) { + event := new(MasterChefWithdraw) + if err := _MasterChef.contract.UnpackLog(event, "Withdraw", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pancakeswap/contracts/nftmarket.abi b/pancakeswap/contracts/nftmarket.abi new file mode 100644 index 0000000..00f8d71 --- /dev/null +++ b/pancakeswap/contracts/nftmarket.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address","name":"_adminAddress","type":"address"},{"internalType":"address","name":"_treasuryAddress","type":"address"},{"internalType":"address","name":"_WBNBAddress","type":"address"},{"internalType":"uint256","name":"_minimumAskPrice","type":"uint256"},{"internalType":"uint256","name":"_maximumAskPrice","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"AskCancel","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"askPrice","type":"uint256"}],"name":"AskNew","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"askPrice","type":"uint256"}],"name":"AskUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"}],"name":"CollectionClose","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"address","name":"whitelistChecker","type":"address"},{"indexed":false,"internalType":"uint256","name":"tradingFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"creatorFee","type":"uint256"}],"name":"CollectionNew","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"address","name":"whitelistChecker","type":"address"},{"indexed":false,"internalType":"uint256","name":"tradingFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"creatorFee","type":"uint256"}],"name":"CollectionUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"admin","type":"address"},{"indexed":true,"internalType":"address","name":"treasury","type":"address"}],"name":"NewAdminAndTreasuryAddresses","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minimumAskPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maximumAskPrice","type":"uint256"}],"name":"NewMinimumAndMaximumAskPrices","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NonFungibleTokenRecovery","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":"claimer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RevenueClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenRecovery","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"askPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"netPrice","type":"uint256"},{"indexed":false,"internalType":"bool","name":"withBNB","type":"bool"}],"name":"Trade","type":"event"},{"inputs":[],"name":"TOTAL_MAX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WBNB","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"address","name":"_creator","type":"address"},{"internalType":"address","name":"_whitelistChecker","type":"address"},{"internalType":"uint256","name":"_tradingFee","type":"uint256"},{"internalType":"uint256","name":"_creatorFee","type":"uint256"}],"name":"addCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"adminAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"buyTokenUsingBNB","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"buyTokenUsingWBNB","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"calculatePriceAndFeesForCollection","outputs":[{"internalType":"uint256","name":"netPrice","type":"uint256"},{"internalType":"uint256","name":"tradingFee","type":"uint256"},{"internalType":"uint256","name":"creatorFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"canTokensBeListed","outputs":[{"internalType":"bool[]","name":"listingStatuses","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"cancelAskOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimPendingRevenue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"}],"name":"closeCollectionForTradingAndListing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_askPrice","type":"uint256"}],"name":"createAskOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maximumAskPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumAskPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"modifyAskOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"address","name":"_creator","type":"address"},{"internalType":"address","name":"_whitelistChecker","type":"address"},{"internalType":"uint256","name":"_tradingFee","type":"uint256"},{"internalType":"uint256","name":"_creatorFee","type":"uint256"}],"name":"modifyCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"pendingRevenue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverFungibleTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"recoverNonFungibleToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_adminAddress","type":"address"},{"internalType":"address","name":"_treasuryAddress","type":"address"}],"name":"setAdminAndTreasuryAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minimumAskPrice","type":"uint256"},{"internalType":"uint256","name":"_maximumAskPrice","type":"uint256"}],"name":"updateMinimumAndMaximumPrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"viewAsksByCollection","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"components":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct ERC721NFTMarketV1.Ask[]","name":"askInfo","type":"tuple[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"viewAsksByCollectionAndSeller","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"components":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct ERC721NFTMarketV1.Ask[]","name":"askInfo","type":"tuple[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"viewAsksByCollectionAndTokenIds","outputs":[{"internalType":"bool[]","name":"statuses","type":"bool[]"},{"components":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct ERC721NFTMarketV1.Ask[]","name":"askInfo","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"viewCollections","outputs":[{"internalType":"address[]","name":"collectionAddresses","type":"address[]"},{"components":[{"internalType":"enum ERC721NFTMarketV1.CollectionStatus","name":"status","type":"uint8"},{"internalType":"address","name":"creatorAddress","type":"address"},{"internalType":"address","name":"whitelistChecker","type":"address"},{"internalType":"uint256","name":"tradingFee","type":"uint256"},{"internalType":"uint256","name":"creatorFee","type":"uint256"}],"internalType":"struct ERC721NFTMarketV1.Collection[]","name":"collectionDetails","type":"tuple[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}] \ No newline at end of file diff --git a/pancakeswap/contracts/nftmarket.go b/pancakeswap/contracts/nftmarket.go new file mode 100644 index 0000000..012fbb7 --- /dev/null +++ b/pancakeswap/contracts/nftmarket.go @@ -0,0 +1,3014 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +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 +) + +// ERC721NFTMarketV1Ask is an auto generated low-level Go binding around an user-defined struct. +type ERC721NFTMarketV1Ask struct { + Seller common.Address + Price *big.Int +} + +// ERC721NFTMarketV1Collection is an auto generated low-level Go binding around an user-defined struct. +type ERC721NFTMarketV1Collection struct { + Status uint8 + CreatorAddress common.Address + WhitelistChecker common.Address + TradingFee *big.Int + CreatorFee *big.Int +} + +// NftMarketMetaData contains all meta data concerning the NftMarket contract. +var NftMarketMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_adminAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_treasuryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_WBNBAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minimumAskPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maximumAskPrice\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"seller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"AskCancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"seller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"askPrice\",\"type\":\"uint256\"}],\"name\":\"AskNew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"seller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"askPrice\",\"type\":\"uint256\"}],\"name\":\"AskUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"}],\"name\":\"CollectionClose\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"whitelistChecker\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tradingFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"creatorFee\",\"type\":\"uint256\"}],\"name\":\"CollectionNew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"whitelistChecker\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tradingFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"creatorFee\",\"type\":\"uint256\"}],\"name\":\"CollectionUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"}],\"name\":\"NewAdminAndTreasuryAddresses\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minimumAskPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maximumAskPrice\",\"type\":\"uint256\"}],\"name\":\"NewMinimumAndMaximumAskPrices\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"NonFungibleTokenRecovery\",\"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\":\"claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RevenueClaim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRecovery\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"seller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"askPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"netPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"withBNB\",\"type\":\"bool\"}],\"name\":\"Trade\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"TOTAL_MAX_FEE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WBNB\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collection\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_creator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_whitelistChecker\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tradingFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_creatorFee\",\"type\":\"uint256\"}],\"name\":\"addCollection\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"adminAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collection\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"buyTokenUsingBNB\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collection\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_price\",\"type\":\"uint256\"}],\"name\":\"buyTokenUsingWBNB\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"calculatePriceAndFeesForCollection\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"netPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tradingFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"creatorFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collection\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"canTokensBeListed\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"listingStatuses\",\"type\":\"bool[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collection\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"cancelAskOrder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimPendingRevenue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collection\",\"type\":\"address\"}],\"name\":\"closeCollectionForTradingAndListing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collection\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_askPrice\",\"type\":\"uint256\"}],\"name\":\"createAskOrder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maximumAskPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumAskPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collection\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_newPrice\",\"type\":\"uint256\"}],\"name\":\"modifyAskOrder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collection\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_creator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_whitelistChecker\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tradingFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_creatorFee\",\"type\":\"uint256\"}],\"name\":\"modifyCollection\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"pendingRevenue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"recoverFungibleTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"recoverNonFungibleToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_adminAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_treasuryAddress\",\"type\":\"address\"}],\"name\":\"setAdminAndTreasuryAddresses\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasuryAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minimumAskPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maximumAskPrice\",\"type\":\"uint256\"}],\"name\":\"updateMinimumAndMaximumPrices\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"cursor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"viewAsksByCollection\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"seller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"internalType\":\"structERC721NFTMarketV1.Ask[]\",\"name\":\"askInfo\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"seller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"cursor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"viewAsksByCollectionAndSeller\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"seller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"internalType\":\"structERC721NFTMarketV1.Ask[]\",\"name\":\"askInfo\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"viewAsksByCollectionAndTokenIds\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"statuses\",\"type\":\"bool[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"seller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"internalType\":\"structERC721NFTMarketV1.Ask[]\",\"name\":\"askInfo\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cursor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"viewCollections\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"collectionAddresses\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"enumERC721NFTMarketV1.CollectionStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"creatorAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"whitelistChecker\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tradingFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"creatorFee\",\"type\":\"uint256\"}],\"internalType\":\"structERC721NFTMarketV1.Collection[]\",\"name\":\"collectionDetails\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +} + +// NftMarketABI is the input ABI used to generate the binding from. +// Deprecated: Use NftMarketMetaData.ABI instead. +var NftMarketABI = NftMarketMetaData.ABI + +// NftMarket is an auto generated Go binding around an Ethereum contract. +type NftMarket struct { + NftMarketCaller // Read-only binding to the contract + NftMarketTransactor // Write-only binding to the contract + NftMarketFilterer // Log filterer for contract events +} + +// NftMarketCaller is an auto generated read-only Go binding around an Ethereum contract. +type NftMarketCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NftMarketTransactor is an auto generated write-only Go binding around an Ethereum contract. +type NftMarketTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NftMarketFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type NftMarketFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NftMarketSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type NftMarketSession struct { + Contract *NftMarket // 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 +} + +// NftMarketCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type NftMarketCallerSession struct { + Contract *NftMarketCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// NftMarketTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type NftMarketTransactorSession struct { + Contract *NftMarketTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// NftMarketRaw is an auto generated low-level Go binding around an Ethereum contract. +type NftMarketRaw struct { + Contract *NftMarket // Generic contract binding to access the raw methods on +} + +// NftMarketCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type NftMarketCallerRaw struct { + Contract *NftMarketCaller // Generic read-only contract binding to access the raw methods on +} + +// NftMarketTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type NftMarketTransactorRaw struct { + Contract *NftMarketTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewNftMarket creates a new instance of NftMarket, bound to a specific deployed contract. +func NewNftMarket(address common.Address, backend bind.ContractBackend) (*NftMarket, error) { + contract, err := bindNftMarket(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &NftMarket{NftMarketCaller: NftMarketCaller{contract: contract}, NftMarketTransactor: NftMarketTransactor{contract: contract}, NftMarketFilterer: NftMarketFilterer{contract: contract}}, nil +} + +// NewNftMarketCaller creates a new read-only instance of NftMarket, bound to a specific deployed contract. +func NewNftMarketCaller(address common.Address, caller bind.ContractCaller) (*NftMarketCaller, error) { + contract, err := bindNftMarket(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &NftMarketCaller{contract: contract}, nil +} + +// NewNftMarketTransactor creates a new write-only instance of NftMarket, bound to a specific deployed contract. +func NewNftMarketTransactor(address common.Address, transactor bind.ContractTransactor) (*NftMarketTransactor, error) { + contract, err := bindNftMarket(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &NftMarketTransactor{contract: contract}, nil +} + +// NewNftMarketFilterer creates a new log filterer instance of NftMarket, bound to a specific deployed contract. +func NewNftMarketFilterer(address common.Address, filterer bind.ContractFilterer) (*NftMarketFilterer, error) { + contract, err := bindNftMarket(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &NftMarketFilterer{contract: contract}, nil +} + +// bindNftMarket binds a generic wrapper to an already deployed contract. +func bindNftMarket(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(NftMarketABI)) + 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 (_NftMarket *NftMarketRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _NftMarket.Contract.NftMarketCaller.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 (_NftMarket *NftMarketRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NftMarket.Contract.NftMarketTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_NftMarket *NftMarketRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _NftMarket.Contract.NftMarketTransactor.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 (_NftMarket *NftMarketCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _NftMarket.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 (_NftMarket *NftMarketTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NftMarket.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_NftMarket *NftMarketTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _NftMarket.Contract.contract.Transact(opts, method, params...) +} + +// TOTALMAXFEE is a free data retrieval call binding the contract method 0x209cbe7e. +// +// Solidity: function TOTAL_MAX_FEE() view returns(uint256) +func (_NftMarket *NftMarketCaller) TOTALMAXFEE(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NftMarket.contract.Call(opts, &out, "TOTAL_MAX_FEE") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TOTALMAXFEE is a free data retrieval call binding the contract method 0x209cbe7e. +// +// Solidity: function TOTAL_MAX_FEE() view returns(uint256) +func (_NftMarket *NftMarketSession) TOTALMAXFEE() (*big.Int, error) { + return _NftMarket.Contract.TOTALMAXFEE(&_NftMarket.CallOpts) +} + +// TOTALMAXFEE is a free data retrieval call binding the contract method 0x209cbe7e. +// +// Solidity: function TOTAL_MAX_FEE() view returns(uint256) +func (_NftMarket *NftMarketCallerSession) TOTALMAXFEE() (*big.Int, error) { + return _NftMarket.Contract.TOTALMAXFEE(&_NftMarket.CallOpts) +} + +// WBNB is a free data retrieval call binding the contract method 0x8dd95002. +// +// Solidity: function WBNB() view returns(address) +func (_NftMarket *NftMarketCaller) WBNB(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NftMarket.contract.Call(opts, &out, "WBNB") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// WBNB is a free data retrieval call binding the contract method 0x8dd95002. +// +// Solidity: function WBNB() view returns(address) +func (_NftMarket *NftMarketSession) WBNB() (common.Address, error) { + return _NftMarket.Contract.WBNB(&_NftMarket.CallOpts) +} + +// WBNB is a free data retrieval call binding the contract method 0x8dd95002. +// +// Solidity: function WBNB() view returns(address) +func (_NftMarket *NftMarketCallerSession) WBNB() (common.Address, error) { + return _NftMarket.Contract.WBNB(&_NftMarket.CallOpts) +} + +// AdminAddress is a free data retrieval call binding the contract method 0xfc6f9468. +// +// Solidity: function adminAddress() view returns(address) +func (_NftMarket *NftMarketCaller) AdminAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NftMarket.contract.Call(opts, &out, "adminAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AdminAddress is a free data retrieval call binding the contract method 0xfc6f9468. +// +// Solidity: function adminAddress() view returns(address) +func (_NftMarket *NftMarketSession) AdminAddress() (common.Address, error) { + return _NftMarket.Contract.AdminAddress(&_NftMarket.CallOpts) +} + +// AdminAddress is a free data retrieval call binding the contract method 0xfc6f9468. +// +// Solidity: function adminAddress() view returns(address) +func (_NftMarket *NftMarketCallerSession) AdminAddress() (common.Address, error) { + return _NftMarket.Contract.AdminAddress(&_NftMarket.CallOpts) +} + +// CalculatePriceAndFeesForCollection is a free data retrieval call binding the contract method 0x9e0140c8. +// +// Solidity: function calculatePriceAndFeesForCollection(address collection, uint256 price) view returns(uint256 netPrice, uint256 tradingFee, uint256 creatorFee) +func (_NftMarket *NftMarketCaller) CalculatePriceAndFeesForCollection(opts *bind.CallOpts, collection common.Address, price *big.Int) (struct { + NetPrice *big.Int + TradingFee *big.Int + CreatorFee *big.Int +}, error) { + var out []interface{} + err := _NftMarket.contract.Call(opts, &out, "calculatePriceAndFeesForCollection", collection, price) + + outstruct := new(struct { + NetPrice *big.Int + TradingFee *big.Int + CreatorFee *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.NetPrice = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.TradingFee = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.CreatorFee = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// CalculatePriceAndFeesForCollection is a free data retrieval call binding the contract method 0x9e0140c8. +// +// Solidity: function calculatePriceAndFeesForCollection(address collection, uint256 price) view returns(uint256 netPrice, uint256 tradingFee, uint256 creatorFee) +func (_NftMarket *NftMarketSession) CalculatePriceAndFeesForCollection(collection common.Address, price *big.Int) (struct { + NetPrice *big.Int + TradingFee *big.Int + CreatorFee *big.Int +}, error) { + return _NftMarket.Contract.CalculatePriceAndFeesForCollection(&_NftMarket.CallOpts, collection, price) +} + +// CalculatePriceAndFeesForCollection is a free data retrieval call binding the contract method 0x9e0140c8. +// +// Solidity: function calculatePriceAndFeesForCollection(address collection, uint256 price) view returns(uint256 netPrice, uint256 tradingFee, uint256 creatorFee) +func (_NftMarket *NftMarketCallerSession) CalculatePriceAndFeesForCollection(collection common.Address, price *big.Int) (struct { + NetPrice *big.Int + TradingFee *big.Int + CreatorFee *big.Int +}, error) { + return _NftMarket.Contract.CalculatePriceAndFeesForCollection(&_NftMarket.CallOpts, collection, price) +} + +// CanTokensBeListed is a free data retrieval call binding the contract method 0xc5d4618e. +// +// Solidity: function canTokensBeListed(address _collection, uint256[] _tokenIds) view returns(bool[] listingStatuses) +func (_NftMarket *NftMarketCaller) CanTokensBeListed(opts *bind.CallOpts, _collection common.Address, _tokenIds []*big.Int) ([]bool, error) { + var out []interface{} + err := _NftMarket.contract.Call(opts, &out, "canTokensBeListed", _collection, _tokenIds) + + if err != nil { + return *new([]bool), err + } + + out0 := *abi.ConvertType(out[0], new([]bool)).(*[]bool) + + return out0, err + +} + +// CanTokensBeListed is a free data retrieval call binding the contract method 0xc5d4618e. +// +// Solidity: function canTokensBeListed(address _collection, uint256[] _tokenIds) view returns(bool[] listingStatuses) +func (_NftMarket *NftMarketSession) CanTokensBeListed(_collection common.Address, _tokenIds []*big.Int) ([]bool, error) { + return _NftMarket.Contract.CanTokensBeListed(&_NftMarket.CallOpts, _collection, _tokenIds) +} + +// CanTokensBeListed is a free data retrieval call binding the contract method 0xc5d4618e. +// +// Solidity: function canTokensBeListed(address _collection, uint256[] _tokenIds) view returns(bool[] listingStatuses) +func (_NftMarket *NftMarketCallerSession) CanTokensBeListed(_collection common.Address, _tokenIds []*big.Int) ([]bool, error) { + return _NftMarket.Contract.CanTokensBeListed(&_NftMarket.CallOpts, _collection, _tokenIds) +} + +// MaximumAskPrice is a free data retrieval call binding the contract method 0x98a5155a. +// +// Solidity: function maximumAskPrice() view returns(uint256) +func (_NftMarket *NftMarketCaller) MaximumAskPrice(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NftMarket.contract.Call(opts, &out, "maximumAskPrice") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MaximumAskPrice is a free data retrieval call binding the contract method 0x98a5155a. +// +// Solidity: function maximumAskPrice() view returns(uint256) +func (_NftMarket *NftMarketSession) MaximumAskPrice() (*big.Int, error) { + return _NftMarket.Contract.MaximumAskPrice(&_NftMarket.CallOpts) +} + +// MaximumAskPrice is a free data retrieval call binding the contract method 0x98a5155a. +// +// Solidity: function maximumAskPrice() view returns(uint256) +func (_NftMarket *NftMarketCallerSession) MaximumAskPrice() (*big.Int, error) { + return _NftMarket.Contract.MaximumAskPrice(&_NftMarket.CallOpts) +} + +// MinimumAskPrice is a free data retrieval call binding the contract method 0x4f06d441. +// +// Solidity: function minimumAskPrice() view returns(uint256) +func (_NftMarket *NftMarketCaller) MinimumAskPrice(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _NftMarket.contract.Call(opts, &out, "minimumAskPrice") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinimumAskPrice is a free data retrieval call binding the contract method 0x4f06d441. +// +// Solidity: function minimumAskPrice() view returns(uint256) +func (_NftMarket *NftMarketSession) MinimumAskPrice() (*big.Int, error) { + return _NftMarket.Contract.MinimumAskPrice(&_NftMarket.CallOpts) +} + +// MinimumAskPrice is a free data retrieval call binding the contract method 0x4f06d441. +// +// Solidity: function minimumAskPrice() view returns(uint256) +func (_NftMarket *NftMarketCallerSession) MinimumAskPrice() (*big.Int, error) { + return _NftMarket.Contract.MinimumAskPrice(&_NftMarket.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NftMarket *NftMarketCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NftMarket.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 (_NftMarket *NftMarketSession) Owner() (common.Address, error) { + return _NftMarket.Contract.Owner(&_NftMarket.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NftMarket *NftMarketCallerSession) Owner() (common.Address, error) { + return _NftMarket.Contract.Owner(&_NftMarket.CallOpts) +} + +// PendingRevenue is a free data retrieval call binding the contract method 0x20b6b2fc. +// +// Solidity: function pendingRevenue(address ) view returns(uint256) +func (_NftMarket *NftMarketCaller) PendingRevenue(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _NftMarket.contract.Call(opts, &out, "pendingRevenue", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PendingRevenue is a free data retrieval call binding the contract method 0x20b6b2fc. +// +// Solidity: function pendingRevenue(address ) view returns(uint256) +func (_NftMarket *NftMarketSession) PendingRevenue(arg0 common.Address) (*big.Int, error) { + return _NftMarket.Contract.PendingRevenue(&_NftMarket.CallOpts, arg0) +} + +// PendingRevenue is a free data retrieval call binding the contract method 0x20b6b2fc. +// +// Solidity: function pendingRevenue(address ) view returns(uint256) +func (_NftMarket *NftMarketCallerSession) PendingRevenue(arg0 common.Address) (*big.Int, error) { + return _NftMarket.Contract.PendingRevenue(&_NftMarket.CallOpts, arg0) +} + +// TreasuryAddress is a free data retrieval call binding the contract method 0xc5f956af. +// +// Solidity: function treasuryAddress() view returns(address) +func (_NftMarket *NftMarketCaller) TreasuryAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _NftMarket.contract.Call(opts, &out, "treasuryAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TreasuryAddress is a free data retrieval call binding the contract method 0xc5f956af. +// +// Solidity: function treasuryAddress() view returns(address) +func (_NftMarket *NftMarketSession) TreasuryAddress() (common.Address, error) { + return _NftMarket.Contract.TreasuryAddress(&_NftMarket.CallOpts) +} + +// TreasuryAddress is a free data retrieval call binding the contract method 0xc5f956af. +// +// Solidity: function treasuryAddress() view returns(address) +func (_NftMarket *NftMarketCallerSession) TreasuryAddress() (common.Address, error) { + return _NftMarket.Contract.TreasuryAddress(&_NftMarket.CallOpts) +} + +// ViewAsksByCollection is a free data retrieval call binding the contract method 0x84a40864. +// +// Solidity: function viewAsksByCollection(address collection, uint256 cursor, uint256 size) view returns(uint256[] tokenIds, (address,uint256)[] askInfo, uint256) +func (_NftMarket *NftMarketCaller) ViewAsksByCollection(opts *bind.CallOpts, collection common.Address, cursor *big.Int, size *big.Int) ([]*big.Int, []ERC721NFTMarketV1Ask, *big.Int, error) { + var out []interface{} + err := _NftMarket.contract.Call(opts, &out, "viewAsksByCollection", collection, cursor, size) + + if err != nil { + return *new([]*big.Int), *new([]ERC721NFTMarketV1Ask), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + out1 := *abi.ConvertType(out[1], new([]ERC721NFTMarketV1Ask)).(*[]ERC721NFTMarketV1Ask) + out2 := *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + + return out0, out1, out2, err + +} + +// ViewAsksByCollection is a free data retrieval call binding the contract method 0x84a40864. +// +// Solidity: function viewAsksByCollection(address collection, uint256 cursor, uint256 size) view returns(uint256[] tokenIds, (address,uint256)[] askInfo, uint256) +func (_NftMarket *NftMarketSession) ViewAsksByCollection(collection common.Address, cursor *big.Int, size *big.Int) ([]*big.Int, []ERC721NFTMarketV1Ask, *big.Int, error) { + return _NftMarket.Contract.ViewAsksByCollection(&_NftMarket.CallOpts, collection, cursor, size) +} + +// ViewAsksByCollection is a free data retrieval call binding the contract method 0x84a40864. +// +// Solidity: function viewAsksByCollection(address collection, uint256 cursor, uint256 size) view returns(uint256[] tokenIds, (address,uint256)[] askInfo, uint256) +func (_NftMarket *NftMarketCallerSession) ViewAsksByCollection(collection common.Address, cursor *big.Int, size *big.Int) ([]*big.Int, []ERC721NFTMarketV1Ask, *big.Int, error) { + return _NftMarket.Contract.ViewAsksByCollection(&_NftMarket.CallOpts, collection, cursor, size) +} + +// ViewAsksByCollectionAndSeller is a free data retrieval call binding the contract method 0xd286ef74. +// +// Solidity: function viewAsksByCollectionAndSeller(address collection, address seller, uint256 cursor, uint256 size) view returns(uint256[] tokenIds, (address,uint256)[] askInfo, uint256) +func (_NftMarket *NftMarketCaller) ViewAsksByCollectionAndSeller(opts *bind.CallOpts, collection common.Address, seller common.Address, cursor *big.Int, size *big.Int) ([]*big.Int, []ERC721NFTMarketV1Ask, *big.Int, error) { + var out []interface{} + err := _NftMarket.contract.Call(opts, &out, "viewAsksByCollectionAndSeller", collection, seller, cursor, size) + + if err != nil { + return *new([]*big.Int), *new([]ERC721NFTMarketV1Ask), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + out1 := *abi.ConvertType(out[1], new([]ERC721NFTMarketV1Ask)).(*[]ERC721NFTMarketV1Ask) + out2 := *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + + return out0, out1, out2, err + +} + +// ViewAsksByCollectionAndSeller is a free data retrieval call binding the contract method 0xd286ef74. +// +// Solidity: function viewAsksByCollectionAndSeller(address collection, address seller, uint256 cursor, uint256 size) view returns(uint256[] tokenIds, (address,uint256)[] askInfo, uint256) +func (_NftMarket *NftMarketSession) ViewAsksByCollectionAndSeller(collection common.Address, seller common.Address, cursor *big.Int, size *big.Int) ([]*big.Int, []ERC721NFTMarketV1Ask, *big.Int, error) { + return _NftMarket.Contract.ViewAsksByCollectionAndSeller(&_NftMarket.CallOpts, collection, seller, cursor, size) +} + +// ViewAsksByCollectionAndSeller is a free data retrieval call binding the contract method 0xd286ef74. +// +// Solidity: function viewAsksByCollectionAndSeller(address collection, address seller, uint256 cursor, uint256 size) view returns(uint256[] tokenIds, (address,uint256)[] askInfo, uint256) +func (_NftMarket *NftMarketCallerSession) ViewAsksByCollectionAndSeller(collection common.Address, seller common.Address, cursor *big.Int, size *big.Int) ([]*big.Int, []ERC721NFTMarketV1Ask, *big.Int, error) { + return _NftMarket.Contract.ViewAsksByCollectionAndSeller(&_NftMarket.CallOpts, collection, seller, cursor, size) +} + +// ViewAsksByCollectionAndTokenIds is a free data retrieval call binding the contract method 0x22f67b6d. +// +// Solidity: function viewAsksByCollectionAndTokenIds(address collection, uint256[] tokenIds) view returns(bool[] statuses, (address,uint256)[] askInfo) +func (_NftMarket *NftMarketCaller) ViewAsksByCollectionAndTokenIds(opts *bind.CallOpts, collection common.Address, tokenIds []*big.Int) (struct { + Statuses []bool + AskInfo []ERC721NFTMarketV1Ask +}, error) { + var out []interface{} + err := _NftMarket.contract.Call(opts, &out, "viewAsksByCollectionAndTokenIds", collection, tokenIds) + + outstruct := new(struct { + Statuses []bool + AskInfo []ERC721NFTMarketV1Ask + }) + if err != nil { + return *outstruct, err + } + + outstruct.Statuses = *abi.ConvertType(out[0], new([]bool)).(*[]bool) + outstruct.AskInfo = *abi.ConvertType(out[1], new([]ERC721NFTMarketV1Ask)).(*[]ERC721NFTMarketV1Ask) + + return *outstruct, err + +} + +// ViewAsksByCollectionAndTokenIds is a free data retrieval call binding the contract method 0x22f67b6d. +// +// Solidity: function viewAsksByCollectionAndTokenIds(address collection, uint256[] tokenIds) view returns(bool[] statuses, (address,uint256)[] askInfo) +func (_NftMarket *NftMarketSession) ViewAsksByCollectionAndTokenIds(collection common.Address, tokenIds []*big.Int) (struct { + Statuses []bool + AskInfo []ERC721NFTMarketV1Ask +}, error) { + return _NftMarket.Contract.ViewAsksByCollectionAndTokenIds(&_NftMarket.CallOpts, collection, tokenIds) +} + +// ViewAsksByCollectionAndTokenIds is a free data retrieval call binding the contract method 0x22f67b6d. +// +// Solidity: function viewAsksByCollectionAndTokenIds(address collection, uint256[] tokenIds) view returns(bool[] statuses, (address,uint256)[] askInfo) +func (_NftMarket *NftMarketCallerSession) ViewAsksByCollectionAndTokenIds(collection common.Address, tokenIds []*big.Int) (struct { + Statuses []bool + AskInfo []ERC721NFTMarketV1Ask +}, error) { + return _NftMarket.Contract.ViewAsksByCollectionAndTokenIds(&_NftMarket.CallOpts, collection, tokenIds) +} + +// ViewCollections is a free data retrieval call binding the contract method 0x51c383ea. +// +// Solidity: function viewCollections(uint256 cursor, uint256 size) view returns(address[] collectionAddresses, (uint8,address,address,uint256,uint256)[] collectionDetails, uint256) +func (_NftMarket *NftMarketCaller) ViewCollections(opts *bind.CallOpts, cursor *big.Int, size *big.Int) ([]common.Address, []ERC721NFTMarketV1Collection, *big.Int, error) { + var out []interface{} + err := _NftMarket.contract.Call(opts, &out, "viewCollections", cursor, size) + + if err != nil { + return *new([]common.Address), *new([]ERC721NFTMarketV1Collection), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + out1 := *abi.ConvertType(out[1], new([]ERC721NFTMarketV1Collection)).(*[]ERC721NFTMarketV1Collection) + out2 := *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + + return out0, out1, out2, err + +} + +// ViewCollections is a free data retrieval call binding the contract method 0x51c383ea. +// +// Solidity: function viewCollections(uint256 cursor, uint256 size) view returns(address[] collectionAddresses, (uint8,address,address,uint256,uint256)[] collectionDetails, uint256) +func (_NftMarket *NftMarketSession) ViewCollections(cursor *big.Int, size *big.Int) ([]common.Address, []ERC721NFTMarketV1Collection, *big.Int, error) { + return _NftMarket.Contract.ViewCollections(&_NftMarket.CallOpts, cursor, size) +} + +// ViewCollections is a free data retrieval call binding the contract method 0x51c383ea. +// +// Solidity: function viewCollections(uint256 cursor, uint256 size) view returns(address[] collectionAddresses, (uint8,address,address,uint256,uint256)[] collectionDetails, uint256) +func (_NftMarket *NftMarketCallerSession) ViewCollections(cursor *big.Int, size *big.Int) ([]common.Address, []ERC721NFTMarketV1Collection, *big.Int, error) { + return _NftMarket.Contract.ViewCollections(&_NftMarket.CallOpts, cursor, size) +} + +// AddCollection is a paid mutator transaction binding the contract method 0xe17734a3. +// +// Solidity: function addCollection(address _collection, address _creator, address _whitelistChecker, uint256 _tradingFee, uint256 _creatorFee) returns() +func (_NftMarket *NftMarketTransactor) AddCollection(opts *bind.TransactOpts, _collection common.Address, _creator common.Address, _whitelistChecker common.Address, _tradingFee *big.Int, _creatorFee *big.Int) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "addCollection", _collection, _creator, _whitelistChecker, _tradingFee, _creatorFee) +} + +// AddCollection is a paid mutator transaction binding the contract method 0xe17734a3. +// +// Solidity: function addCollection(address _collection, address _creator, address _whitelistChecker, uint256 _tradingFee, uint256 _creatorFee) returns() +func (_NftMarket *NftMarketSession) AddCollection(_collection common.Address, _creator common.Address, _whitelistChecker common.Address, _tradingFee *big.Int, _creatorFee *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.AddCollection(&_NftMarket.TransactOpts, _collection, _creator, _whitelistChecker, _tradingFee, _creatorFee) +} + +// AddCollection is a paid mutator transaction binding the contract method 0xe17734a3. +// +// Solidity: function addCollection(address _collection, address _creator, address _whitelistChecker, uint256 _tradingFee, uint256 _creatorFee) returns() +func (_NftMarket *NftMarketTransactorSession) AddCollection(_collection common.Address, _creator common.Address, _whitelistChecker common.Address, _tradingFee *big.Int, _creatorFee *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.AddCollection(&_NftMarket.TransactOpts, _collection, _creator, _whitelistChecker, _tradingFee, _creatorFee) +} + +// BuyTokenUsingBNB is a paid mutator transaction binding the contract method 0xfb9fe938. +// +// Solidity: function buyTokenUsingBNB(address _collection, uint256 _tokenId) payable returns() +func (_NftMarket *NftMarketTransactor) BuyTokenUsingBNB(opts *bind.TransactOpts, _collection common.Address, _tokenId *big.Int) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "buyTokenUsingBNB", _collection, _tokenId) +} + +// BuyTokenUsingBNB is a paid mutator transaction binding the contract method 0xfb9fe938. +// +// Solidity: function buyTokenUsingBNB(address _collection, uint256 _tokenId) payable returns() +func (_NftMarket *NftMarketSession) BuyTokenUsingBNB(_collection common.Address, _tokenId *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.BuyTokenUsingBNB(&_NftMarket.TransactOpts, _collection, _tokenId) +} + +// BuyTokenUsingBNB is a paid mutator transaction binding the contract method 0xfb9fe938. +// +// Solidity: function buyTokenUsingBNB(address _collection, uint256 _tokenId) payable returns() +func (_NftMarket *NftMarketTransactorSession) BuyTokenUsingBNB(_collection common.Address, _tokenId *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.BuyTokenUsingBNB(&_NftMarket.TransactOpts, _collection, _tokenId) +} + +// BuyTokenUsingWBNB is a paid mutator transaction binding the contract method 0xed140e86. +// +// Solidity: function buyTokenUsingWBNB(address _collection, uint256 _tokenId, uint256 _price) returns() +func (_NftMarket *NftMarketTransactor) BuyTokenUsingWBNB(opts *bind.TransactOpts, _collection common.Address, _tokenId *big.Int, _price *big.Int) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "buyTokenUsingWBNB", _collection, _tokenId, _price) +} + +// BuyTokenUsingWBNB is a paid mutator transaction binding the contract method 0xed140e86. +// +// Solidity: function buyTokenUsingWBNB(address _collection, uint256 _tokenId, uint256 _price) returns() +func (_NftMarket *NftMarketSession) BuyTokenUsingWBNB(_collection common.Address, _tokenId *big.Int, _price *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.BuyTokenUsingWBNB(&_NftMarket.TransactOpts, _collection, _tokenId, _price) +} + +// BuyTokenUsingWBNB is a paid mutator transaction binding the contract method 0xed140e86. +// +// Solidity: function buyTokenUsingWBNB(address _collection, uint256 _tokenId, uint256 _price) returns() +func (_NftMarket *NftMarketTransactorSession) BuyTokenUsingWBNB(_collection common.Address, _tokenId *big.Int, _price *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.BuyTokenUsingWBNB(&_NftMarket.TransactOpts, _collection, _tokenId, _price) +} + +// CancelAskOrder is a paid mutator transaction binding the contract method 0x95f42098. +// +// Solidity: function cancelAskOrder(address _collection, uint256 _tokenId) returns() +func (_NftMarket *NftMarketTransactor) CancelAskOrder(opts *bind.TransactOpts, _collection common.Address, _tokenId *big.Int) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "cancelAskOrder", _collection, _tokenId) +} + +// CancelAskOrder is a paid mutator transaction binding the contract method 0x95f42098. +// +// Solidity: function cancelAskOrder(address _collection, uint256 _tokenId) returns() +func (_NftMarket *NftMarketSession) CancelAskOrder(_collection common.Address, _tokenId *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.CancelAskOrder(&_NftMarket.TransactOpts, _collection, _tokenId) +} + +// CancelAskOrder is a paid mutator transaction binding the contract method 0x95f42098. +// +// Solidity: function cancelAskOrder(address _collection, uint256 _tokenId) returns() +func (_NftMarket *NftMarketTransactorSession) CancelAskOrder(_collection common.Address, _tokenId *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.CancelAskOrder(&_NftMarket.TransactOpts, _collection, _tokenId) +} + +// ClaimPendingRevenue is a paid mutator transaction binding the contract method 0xb6c1d2cf. +// +// Solidity: function claimPendingRevenue() returns() +func (_NftMarket *NftMarketTransactor) ClaimPendingRevenue(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "claimPendingRevenue") +} + +// ClaimPendingRevenue is a paid mutator transaction binding the contract method 0xb6c1d2cf. +// +// Solidity: function claimPendingRevenue() returns() +func (_NftMarket *NftMarketSession) ClaimPendingRevenue() (*types.Transaction, error) { + return _NftMarket.Contract.ClaimPendingRevenue(&_NftMarket.TransactOpts) +} + +// ClaimPendingRevenue is a paid mutator transaction binding the contract method 0xb6c1d2cf. +// +// Solidity: function claimPendingRevenue() returns() +func (_NftMarket *NftMarketTransactorSession) ClaimPendingRevenue() (*types.Transaction, error) { + return _NftMarket.Contract.ClaimPendingRevenue(&_NftMarket.TransactOpts) +} + +// CloseCollectionForTradingAndListing is a paid mutator transaction binding the contract method 0xddf9ba6f. +// +// Solidity: function closeCollectionForTradingAndListing(address _collection) returns() +func (_NftMarket *NftMarketTransactor) CloseCollectionForTradingAndListing(opts *bind.TransactOpts, _collection common.Address) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "closeCollectionForTradingAndListing", _collection) +} + +// CloseCollectionForTradingAndListing is a paid mutator transaction binding the contract method 0xddf9ba6f. +// +// Solidity: function closeCollectionForTradingAndListing(address _collection) returns() +func (_NftMarket *NftMarketSession) CloseCollectionForTradingAndListing(_collection common.Address) (*types.Transaction, error) { + return _NftMarket.Contract.CloseCollectionForTradingAndListing(&_NftMarket.TransactOpts, _collection) +} + +// CloseCollectionForTradingAndListing is a paid mutator transaction binding the contract method 0xddf9ba6f. +// +// Solidity: function closeCollectionForTradingAndListing(address _collection) returns() +func (_NftMarket *NftMarketTransactorSession) CloseCollectionForTradingAndListing(_collection common.Address) (*types.Transaction, error) { + return _NftMarket.Contract.CloseCollectionForTradingAndListing(&_NftMarket.TransactOpts, _collection) +} + +// CreateAskOrder is a paid mutator transaction binding the contract method 0x803b64a1. +// +// Solidity: function createAskOrder(address _collection, uint256 _tokenId, uint256 _askPrice) returns() +func (_NftMarket *NftMarketTransactor) CreateAskOrder(opts *bind.TransactOpts, _collection common.Address, _tokenId *big.Int, _askPrice *big.Int) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "createAskOrder", _collection, _tokenId, _askPrice) +} + +// CreateAskOrder is a paid mutator transaction binding the contract method 0x803b64a1. +// +// Solidity: function createAskOrder(address _collection, uint256 _tokenId, uint256 _askPrice) returns() +func (_NftMarket *NftMarketSession) CreateAskOrder(_collection common.Address, _tokenId *big.Int, _askPrice *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.CreateAskOrder(&_NftMarket.TransactOpts, _collection, _tokenId, _askPrice) +} + +// CreateAskOrder is a paid mutator transaction binding the contract method 0x803b64a1. +// +// Solidity: function createAskOrder(address _collection, uint256 _tokenId, uint256 _askPrice) returns() +func (_NftMarket *NftMarketTransactorSession) CreateAskOrder(_collection common.Address, _tokenId *big.Int, _askPrice *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.CreateAskOrder(&_NftMarket.TransactOpts, _collection, _tokenId, _askPrice) +} + +// ModifyAskOrder is a paid mutator transaction binding the contract method 0x9b2adcdc. +// +// Solidity: function modifyAskOrder(address _collection, uint256 _tokenId, uint256 _newPrice) returns() +func (_NftMarket *NftMarketTransactor) ModifyAskOrder(opts *bind.TransactOpts, _collection common.Address, _tokenId *big.Int, _newPrice *big.Int) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "modifyAskOrder", _collection, _tokenId, _newPrice) +} + +// ModifyAskOrder is a paid mutator transaction binding the contract method 0x9b2adcdc. +// +// Solidity: function modifyAskOrder(address _collection, uint256 _tokenId, uint256 _newPrice) returns() +func (_NftMarket *NftMarketSession) ModifyAskOrder(_collection common.Address, _tokenId *big.Int, _newPrice *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.ModifyAskOrder(&_NftMarket.TransactOpts, _collection, _tokenId, _newPrice) +} + +// ModifyAskOrder is a paid mutator transaction binding the contract method 0x9b2adcdc. +// +// Solidity: function modifyAskOrder(address _collection, uint256 _tokenId, uint256 _newPrice) returns() +func (_NftMarket *NftMarketTransactorSession) ModifyAskOrder(_collection common.Address, _tokenId *big.Int, _newPrice *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.ModifyAskOrder(&_NftMarket.TransactOpts, _collection, _tokenId, _newPrice) +} + +// ModifyCollection is a paid mutator transaction binding the contract method 0x6b248032. +// +// Solidity: function modifyCollection(address _collection, address _creator, address _whitelistChecker, uint256 _tradingFee, uint256 _creatorFee) returns() +func (_NftMarket *NftMarketTransactor) ModifyCollection(opts *bind.TransactOpts, _collection common.Address, _creator common.Address, _whitelistChecker common.Address, _tradingFee *big.Int, _creatorFee *big.Int) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "modifyCollection", _collection, _creator, _whitelistChecker, _tradingFee, _creatorFee) +} + +// ModifyCollection is a paid mutator transaction binding the contract method 0x6b248032. +// +// Solidity: function modifyCollection(address _collection, address _creator, address _whitelistChecker, uint256 _tradingFee, uint256 _creatorFee) returns() +func (_NftMarket *NftMarketSession) ModifyCollection(_collection common.Address, _creator common.Address, _whitelistChecker common.Address, _tradingFee *big.Int, _creatorFee *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.ModifyCollection(&_NftMarket.TransactOpts, _collection, _creator, _whitelistChecker, _tradingFee, _creatorFee) +} + +// ModifyCollection is a paid mutator transaction binding the contract method 0x6b248032. +// +// Solidity: function modifyCollection(address _collection, address _creator, address _whitelistChecker, uint256 _tradingFee, uint256 _creatorFee) returns() +func (_NftMarket *NftMarketTransactorSession) ModifyCollection(_collection common.Address, _creator common.Address, _whitelistChecker common.Address, _tradingFee *big.Int, _creatorFee *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.ModifyCollection(&_NftMarket.TransactOpts, _collection, _creator, _whitelistChecker, _tradingFee, _creatorFee) +} + +// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02. +// +// Solidity: function onERC721Received(address , address , uint256 , bytes ) returns(bytes4) +func (_NftMarket *NftMarketTransactor) OnERC721Received(opts *bind.TransactOpts, arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 []byte) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "onERC721Received", arg0, arg1, arg2, arg3) +} + +// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02. +// +// Solidity: function onERC721Received(address , address , uint256 , bytes ) returns(bytes4) +func (_NftMarket *NftMarketSession) OnERC721Received(arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 []byte) (*types.Transaction, error) { + return _NftMarket.Contract.OnERC721Received(&_NftMarket.TransactOpts, arg0, arg1, arg2, arg3) +} + +// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02. +// +// Solidity: function onERC721Received(address , address , uint256 , bytes ) returns(bytes4) +func (_NftMarket *NftMarketTransactorSession) OnERC721Received(arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 []byte) (*types.Transaction, error) { + return _NftMarket.Contract.OnERC721Received(&_NftMarket.TransactOpts, arg0, arg1, arg2, arg3) +} + +// RecoverFungibleTokens is a paid mutator transaction binding the contract method 0x3ffd1781. +// +// Solidity: function recoverFungibleTokens(address _token) returns() +func (_NftMarket *NftMarketTransactor) RecoverFungibleTokens(opts *bind.TransactOpts, _token common.Address) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "recoverFungibleTokens", _token) +} + +// RecoverFungibleTokens is a paid mutator transaction binding the contract method 0x3ffd1781. +// +// Solidity: function recoverFungibleTokens(address _token) returns() +func (_NftMarket *NftMarketSession) RecoverFungibleTokens(_token common.Address) (*types.Transaction, error) { + return _NftMarket.Contract.RecoverFungibleTokens(&_NftMarket.TransactOpts, _token) +} + +// RecoverFungibleTokens is a paid mutator transaction binding the contract method 0x3ffd1781. +// +// Solidity: function recoverFungibleTokens(address _token) returns() +func (_NftMarket *NftMarketTransactorSession) RecoverFungibleTokens(_token common.Address) (*types.Transaction, error) { + return _NftMarket.Contract.RecoverFungibleTokens(&_NftMarket.TransactOpts, _token) +} + +// RecoverNonFungibleToken is a paid mutator transaction binding the contract method 0xbb0fd147. +// +// Solidity: function recoverNonFungibleToken(address _token, uint256 _tokenId) returns() +func (_NftMarket *NftMarketTransactor) RecoverNonFungibleToken(opts *bind.TransactOpts, _token common.Address, _tokenId *big.Int) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "recoverNonFungibleToken", _token, _tokenId) +} + +// RecoverNonFungibleToken is a paid mutator transaction binding the contract method 0xbb0fd147. +// +// Solidity: function recoverNonFungibleToken(address _token, uint256 _tokenId) returns() +func (_NftMarket *NftMarketSession) RecoverNonFungibleToken(_token common.Address, _tokenId *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.RecoverNonFungibleToken(&_NftMarket.TransactOpts, _token, _tokenId) +} + +// RecoverNonFungibleToken is a paid mutator transaction binding the contract method 0xbb0fd147. +// +// Solidity: function recoverNonFungibleToken(address _token, uint256 _tokenId) returns() +func (_NftMarket *NftMarketTransactorSession) RecoverNonFungibleToken(_token common.Address, _tokenId *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.RecoverNonFungibleToken(&_NftMarket.TransactOpts, _token, _tokenId) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NftMarket *NftMarketTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NftMarket *NftMarketSession) RenounceOwnership() (*types.Transaction, error) { + return _NftMarket.Contract.RenounceOwnership(&_NftMarket.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NftMarket *NftMarketTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _NftMarket.Contract.RenounceOwnership(&_NftMarket.TransactOpts) +} + +// SetAdminAndTreasuryAddresses is a paid mutator transaction binding the contract method 0x791e8018. +// +// Solidity: function setAdminAndTreasuryAddresses(address _adminAddress, address _treasuryAddress) returns() +func (_NftMarket *NftMarketTransactor) SetAdminAndTreasuryAddresses(opts *bind.TransactOpts, _adminAddress common.Address, _treasuryAddress common.Address) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "setAdminAndTreasuryAddresses", _adminAddress, _treasuryAddress) +} + +// SetAdminAndTreasuryAddresses is a paid mutator transaction binding the contract method 0x791e8018. +// +// Solidity: function setAdminAndTreasuryAddresses(address _adminAddress, address _treasuryAddress) returns() +func (_NftMarket *NftMarketSession) SetAdminAndTreasuryAddresses(_adminAddress common.Address, _treasuryAddress common.Address) (*types.Transaction, error) { + return _NftMarket.Contract.SetAdminAndTreasuryAddresses(&_NftMarket.TransactOpts, _adminAddress, _treasuryAddress) +} + +// SetAdminAndTreasuryAddresses is a paid mutator transaction binding the contract method 0x791e8018. +// +// Solidity: function setAdminAndTreasuryAddresses(address _adminAddress, address _treasuryAddress) returns() +func (_NftMarket *NftMarketTransactorSession) SetAdminAndTreasuryAddresses(_adminAddress common.Address, _treasuryAddress common.Address) (*types.Transaction, error) { + return _NftMarket.Contract.SetAdminAndTreasuryAddresses(&_NftMarket.TransactOpts, _adminAddress, _treasuryAddress) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NftMarket *NftMarketTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NftMarket *NftMarketSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NftMarket.Contract.TransferOwnership(&_NftMarket.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NftMarket *NftMarketTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NftMarket.Contract.TransferOwnership(&_NftMarket.TransactOpts, newOwner) +} + +// UpdateMinimumAndMaximumPrices is a paid mutator transaction binding the contract method 0xb2ea3931. +// +// Solidity: function updateMinimumAndMaximumPrices(uint256 _minimumAskPrice, uint256 _maximumAskPrice) returns() +func (_NftMarket *NftMarketTransactor) UpdateMinimumAndMaximumPrices(opts *bind.TransactOpts, _minimumAskPrice *big.Int, _maximumAskPrice *big.Int) (*types.Transaction, error) { + return _NftMarket.contract.Transact(opts, "updateMinimumAndMaximumPrices", _minimumAskPrice, _maximumAskPrice) +} + +// UpdateMinimumAndMaximumPrices is a paid mutator transaction binding the contract method 0xb2ea3931. +// +// Solidity: function updateMinimumAndMaximumPrices(uint256 _minimumAskPrice, uint256 _maximumAskPrice) returns() +func (_NftMarket *NftMarketSession) UpdateMinimumAndMaximumPrices(_minimumAskPrice *big.Int, _maximumAskPrice *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.UpdateMinimumAndMaximumPrices(&_NftMarket.TransactOpts, _minimumAskPrice, _maximumAskPrice) +} + +// UpdateMinimumAndMaximumPrices is a paid mutator transaction binding the contract method 0xb2ea3931. +// +// Solidity: function updateMinimumAndMaximumPrices(uint256 _minimumAskPrice, uint256 _maximumAskPrice) returns() +func (_NftMarket *NftMarketTransactorSession) UpdateMinimumAndMaximumPrices(_minimumAskPrice *big.Int, _maximumAskPrice *big.Int) (*types.Transaction, error) { + return _NftMarket.Contract.UpdateMinimumAndMaximumPrices(&_NftMarket.TransactOpts, _minimumAskPrice, _maximumAskPrice) +} + +// NftMarketAskCancelIterator is returned from FilterAskCancel and is used to iterate over the raw logs and unpacked data for AskCancel events raised by the NftMarket contract. +type NftMarketAskCancelIterator struct { + Event *NftMarketAskCancel // 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 *NftMarketAskCancelIterator) 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(NftMarketAskCancel) + 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(NftMarketAskCancel) + 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 *NftMarketAskCancelIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NftMarketAskCancelIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NftMarketAskCancel represents a AskCancel event raised by the NftMarket contract. +type NftMarketAskCancel struct { + Collection common.Address + Seller common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAskCancel is a free log retrieval operation binding the contract event 0xa5764ea233325154a6388255c54b9f302ec2ed8586af0a9a606cd64e88298eb7. +// +// Solidity: event AskCancel(address indexed collection, address indexed seller, uint256 indexed tokenId) +func (_NftMarket *NftMarketFilterer) FilterAskCancel(opts *bind.FilterOpts, collection []common.Address, seller []common.Address, tokenId []*big.Int) (*NftMarketAskCancelIterator, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + var sellerRule []interface{} + for _, sellerItem := range seller { + sellerRule = append(sellerRule, sellerItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _NftMarket.contract.FilterLogs(opts, "AskCancel", collectionRule, sellerRule, tokenIdRule) + if err != nil { + return nil, err + } + return &NftMarketAskCancelIterator{contract: _NftMarket.contract, event: "AskCancel", logs: logs, sub: sub}, nil +} + +// WatchAskCancel is a free log subscription operation binding the contract event 0xa5764ea233325154a6388255c54b9f302ec2ed8586af0a9a606cd64e88298eb7. +// +// Solidity: event AskCancel(address indexed collection, address indexed seller, uint256 indexed tokenId) +func (_NftMarket *NftMarketFilterer) WatchAskCancel(opts *bind.WatchOpts, sink chan<- *NftMarketAskCancel, collection []common.Address, seller []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + var sellerRule []interface{} + for _, sellerItem := range seller { + sellerRule = append(sellerRule, sellerItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _NftMarket.contract.WatchLogs(opts, "AskCancel", collectionRule, sellerRule, tokenIdRule) + 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(NftMarketAskCancel) + if err := _NftMarket.contract.UnpackLog(event, "AskCancel", 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 +} + +// ParseAskCancel is a log parse operation binding the contract event 0xa5764ea233325154a6388255c54b9f302ec2ed8586af0a9a606cd64e88298eb7. +// +// Solidity: event AskCancel(address indexed collection, address indexed seller, uint256 indexed tokenId) +func (_NftMarket *NftMarketFilterer) ParseAskCancel(log types.Log) (*NftMarketAskCancel, error) { + event := new(NftMarketAskCancel) + if err := _NftMarket.contract.UnpackLog(event, "AskCancel", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NftMarketAskNewIterator is returned from FilterAskNew and is used to iterate over the raw logs and unpacked data for AskNew events raised by the NftMarket contract. +type NftMarketAskNewIterator struct { + Event *NftMarketAskNew // 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 *NftMarketAskNewIterator) 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(NftMarketAskNew) + 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(NftMarketAskNew) + 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 *NftMarketAskNewIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NftMarketAskNewIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NftMarketAskNew represents a AskNew event raised by the NftMarket contract. +type NftMarketAskNew struct { + Collection common.Address + Seller common.Address + TokenId *big.Int + AskPrice *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAskNew is a free log retrieval operation binding the contract event 0xaa0431463bb62c812c04a1e5310cf43dd9baedc7a8eab71e02f572c741467e8c. +// +// Solidity: event AskNew(address indexed collection, address indexed seller, uint256 indexed tokenId, uint256 askPrice) +func (_NftMarket *NftMarketFilterer) FilterAskNew(opts *bind.FilterOpts, collection []common.Address, seller []common.Address, tokenId []*big.Int) (*NftMarketAskNewIterator, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + var sellerRule []interface{} + for _, sellerItem := range seller { + sellerRule = append(sellerRule, sellerItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _NftMarket.contract.FilterLogs(opts, "AskNew", collectionRule, sellerRule, tokenIdRule) + if err != nil { + return nil, err + } + return &NftMarketAskNewIterator{contract: _NftMarket.contract, event: "AskNew", logs: logs, sub: sub}, nil +} + +// WatchAskNew is a free log subscription operation binding the contract event 0xaa0431463bb62c812c04a1e5310cf43dd9baedc7a8eab71e02f572c741467e8c. +// +// Solidity: event AskNew(address indexed collection, address indexed seller, uint256 indexed tokenId, uint256 askPrice) +func (_NftMarket *NftMarketFilterer) WatchAskNew(opts *bind.WatchOpts, sink chan<- *NftMarketAskNew, collection []common.Address, seller []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + var sellerRule []interface{} + for _, sellerItem := range seller { + sellerRule = append(sellerRule, sellerItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _NftMarket.contract.WatchLogs(opts, "AskNew", collectionRule, sellerRule, tokenIdRule) + 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(NftMarketAskNew) + if err := _NftMarket.contract.UnpackLog(event, "AskNew", 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 +} + +// ParseAskNew is a log parse operation binding the contract event 0xaa0431463bb62c812c04a1e5310cf43dd9baedc7a8eab71e02f572c741467e8c. +// +// Solidity: event AskNew(address indexed collection, address indexed seller, uint256 indexed tokenId, uint256 askPrice) +func (_NftMarket *NftMarketFilterer) ParseAskNew(log types.Log) (*NftMarketAskNew, error) { + event := new(NftMarketAskNew) + if err := _NftMarket.contract.UnpackLog(event, "AskNew", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NftMarketAskUpdateIterator is returned from FilterAskUpdate and is used to iterate over the raw logs and unpacked data for AskUpdate events raised by the NftMarket contract. +type NftMarketAskUpdateIterator struct { + Event *NftMarketAskUpdate // 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 *NftMarketAskUpdateIterator) 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(NftMarketAskUpdate) + 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(NftMarketAskUpdate) + 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 *NftMarketAskUpdateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NftMarketAskUpdateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NftMarketAskUpdate represents a AskUpdate event raised by the NftMarket contract. +type NftMarketAskUpdate struct { + Collection common.Address + Seller common.Address + TokenId *big.Int + AskPrice *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAskUpdate is a free log retrieval operation binding the contract event 0x492437c0ade072acdf12e63a19d8df68bb5e414e2098dc470239df87702343ea. +// +// Solidity: event AskUpdate(address indexed collection, address indexed seller, uint256 indexed tokenId, uint256 askPrice) +func (_NftMarket *NftMarketFilterer) FilterAskUpdate(opts *bind.FilterOpts, collection []common.Address, seller []common.Address, tokenId []*big.Int) (*NftMarketAskUpdateIterator, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + var sellerRule []interface{} + for _, sellerItem := range seller { + sellerRule = append(sellerRule, sellerItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _NftMarket.contract.FilterLogs(opts, "AskUpdate", collectionRule, sellerRule, tokenIdRule) + if err != nil { + return nil, err + } + return &NftMarketAskUpdateIterator{contract: _NftMarket.contract, event: "AskUpdate", logs: logs, sub: sub}, nil +} + +// WatchAskUpdate is a free log subscription operation binding the contract event 0x492437c0ade072acdf12e63a19d8df68bb5e414e2098dc470239df87702343ea. +// +// Solidity: event AskUpdate(address indexed collection, address indexed seller, uint256 indexed tokenId, uint256 askPrice) +func (_NftMarket *NftMarketFilterer) WatchAskUpdate(opts *bind.WatchOpts, sink chan<- *NftMarketAskUpdate, collection []common.Address, seller []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + var sellerRule []interface{} + for _, sellerItem := range seller { + sellerRule = append(sellerRule, sellerItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _NftMarket.contract.WatchLogs(opts, "AskUpdate", collectionRule, sellerRule, tokenIdRule) + 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(NftMarketAskUpdate) + if err := _NftMarket.contract.UnpackLog(event, "AskUpdate", 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 +} + +// ParseAskUpdate is a log parse operation binding the contract event 0x492437c0ade072acdf12e63a19d8df68bb5e414e2098dc470239df87702343ea. +// +// Solidity: event AskUpdate(address indexed collection, address indexed seller, uint256 indexed tokenId, uint256 askPrice) +func (_NftMarket *NftMarketFilterer) ParseAskUpdate(log types.Log) (*NftMarketAskUpdate, error) { + event := new(NftMarketAskUpdate) + if err := _NftMarket.contract.UnpackLog(event, "AskUpdate", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NftMarketCollectionCloseIterator is returned from FilterCollectionClose and is used to iterate over the raw logs and unpacked data for CollectionClose events raised by the NftMarket contract. +type NftMarketCollectionCloseIterator struct { + Event *NftMarketCollectionClose // 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 *NftMarketCollectionCloseIterator) 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(NftMarketCollectionClose) + 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(NftMarketCollectionClose) + 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 *NftMarketCollectionCloseIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NftMarketCollectionCloseIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NftMarketCollectionClose represents a CollectionClose event raised by the NftMarket contract. +type NftMarketCollectionClose struct { + Collection common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCollectionClose is a free log retrieval operation binding the contract event 0xf6df65a3d7d931af345d93f0420a22e8910de36c0d027c1d1ac93d5be509f5a9. +// +// Solidity: event CollectionClose(address indexed collection) +func (_NftMarket *NftMarketFilterer) FilterCollectionClose(opts *bind.FilterOpts, collection []common.Address) (*NftMarketCollectionCloseIterator, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + + logs, sub, err := _NftMarket.contract.FilterLogs(opts, "CollectionClose", collectionRule) + if err != nil { + return nil, err + } + return &NftMarketCollectionCloseIterator{contract: _NftMarket.contract, event: "CollectionClose", logs: logs, sub: sub}, nil +} + +// WatchCollectionClose is a free log subscription operation binding the contract event 0xf6df65a3d7d931af345d93f0420a22e8910de36c0d027c1d1ac93d5be509f5a9. +// +// Solidity: event CollectionClose(address indexed collection) +func (_NftMarket *NftMarketFilterer) WatchCollectionClose(opts *bind.WatchOpts, sink chan<- *NftMarketCollectionClose, collection []common.Address) (event.Subscription, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + + logs, sub, err := _NftMarket.contract.WatchLogs(opts, "CollectionClose", collectionRule) + 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(NftMarketCollectionClose) + if err := _NftMarket.contract.UnpackLog(event, "CollectionClose", 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 +} + +// ParseCollectionClose is a log parse operation binding the contract event 0xf6df65a3d7d931af345d93f0420a22e8910de36c0d027c1d1ac93d5be509f5a9. +// +// Solidity: event CollectionClose(address indexed collection) +func (_NftMarket *NftMarketFilterer) ParseCollectionClose(log types.Log) (*NftMarketCollectionClose, error) { + event := new(NftMarketCollectionClose) + if err := _NftMarket.contract.UnpackLog(event, "CollectionClose", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NftMarketCollectionNewIterator is returned from FilterCollectionNew and is used to iterate over the raw logs and unpacked data for CollectionNew events raised by the NftMarket contract. +type NftMarketCollectionNewIterator struct { + Event *NftMarketCollectionNew // 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 *NftMarketCollectionNewIterator) 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(NftMarketCollectionNew) + 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(NftMarketCollectionNew) + 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 *NftMarketCollectionNewIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NftMarketCollectionNewIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NftMarketCollectionNew represents a CollectionNew event raised by the NftMarket contract. +type NftMarketCollectionNew struct { + Collection common.Address + Creator common.Address + WhitelistChecker common.Address + TradingFee *big.Int + CreatorFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCollectionNew is a free log retrieval operation binding the contract event 0x4863c75720ebabd11e0cf1c60b58786b5572680a20fa1b568c203964ae56026a. +// +// Solidity: event CollectionNew(address indexed collection, address indexed creator, address indexed whitelistChecker, uint256 tradingFee, uint256 creatorFee) +func (_NftMarket *NftMarketFilterer) FilterCollectionNew(opts *bind.FilterOpts, collection []common.Address, creator []common.Address, whitelistChecker []common.Address) (*NftMarketCollectionNewIterator, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + var whitelistCheckerRule []interface{} + for _, whitelistCheckerItem := range whitelistChecker { + whitelistCheckerRule = append(whitelistCheckerRule, whitelistCheckerItem) + } + + logs, sub, err := _NftMarket.contract.FilterLogs(opts, "CollectionNew", collectionRule, creatorRule, whitelistCheckerRule) + if err != nil { + return nil, err + } + return &NftMarketCollectionNewIterator{contract: _NftMarket.contract, event: "CollectionNew", logs: logs, sub: sub}, nil +} + +// WatchCollectionNew is a free log subscription operation binding the contract event 0x4863c75720ebabd11e0cf1c60b58786b5572680a20fa1b568c203964ae56026a. +// +// Solidity: event CollectionNew(address indexed collection, address indexed creator, address indexed whitelistChecker, uint256 tradingFee, uint256 creatorFee) +func (_NftMarket *NftMarketFilterer) WatchCollectionNew(opts *bind.WatchOpts, sink chan<- *NftMarketCollectionNew, collection []common.Address, creator []common.Address, whitelistChecker []common.Address) (event.Subscription, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + var whitelistCheckerRule []interface{} + for _, whitelistCheckerItem := range whitelistChecker { + whitelistCheckerRule = append(whitelistCheckerRule, whitelistCheckerItem) + } + + logs, sub, err := _NftMarket.contract.WatchLogs(opts, "CollectionNew", collectionRule, creatorRule, whitelistCheckerRule) + 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(NftMarketCollectionNew) + if err := _NftMarket.contract.UnpackLog(event, "CollectionNew", 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 +} + +// ParseCollectionNew is a log parse operation binding the contract event 0x4863c75720ebabd11e0cf1c60b58786b5572680a20fa1b568c203964ae56026a. +// +// Solidity: event CollectionNew(address indexed collection, address indexed creator, address indexed whitelistChecker, uint256 tradingFee, uint256 creatorFee) +func (_NftMarket *NftMarketFilterer) ParseCollectionNew(log types.Log) (*NftMarketCollectionNew, error) { + event := new(NftMarketCollectionNew) + if err := _NftMarket.contract.UnpackLog(event, "CollectionNew", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NftMarketCollectionUpdateIterator is returned from FilterCollectionUpdate and is used to iterate over the raw logs and unpacked data for CollectionUpdate events raised by the NftMarket contract. +type NftMarketCollectionUpdateIterator struct { + Event *NftMarketCollectionUpdate // 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 *NftMarketCollectionUpdateIterator) 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(NftMarketCollectionUpdate) + 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(NftMarketCollectionUpdate) + 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 *NftMarketCollectionUpdateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NftMarketCollectionUpdateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NftMarketCollectionUpdate represents a CollectionUpdate event raised by the NftMarket contract. +type NftMarketCollectionUpdate struct { + Collection common.Address + Creator common.Address + WhitelistChecker common.Address + TradingFee *big.Int + CreatorFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCollectionUpdate is a free log retrieval operation binding the contract event 0x655bd8b9d972737b566ec5473b537d81d079c6e251d4986005bf3f36000eacef. +// +// Solidity: event CollectionUpdate(address indexed collection, address indexed creator, address indexed whitelistChecker, uint256 tradingFee, uint256 creatorFee) +func (_NftMarket *NftMarketFilterer) FilterCollectionUpdate(opts *bind.FilterOpts, collection []common.Address, creator []common.Address, whitelistChecker []common.Address) (*NftMarketCollectionUpdateIterator, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + var whitelistCheckerRule []interface{} + for _, whitelistCheckerItem := range whitelistChecker { + whitelistCheckerRule = append(whitelistCheckerRule, whitelistCheckerItem) + } + + logs, sub, err := _NftMarket.contract.FilterLogs(opts, "CollectionUpdate", collectionRule, creatorRule, whitelistCheckerRule) + if err != nil { + return nil, err + } + return &NftMarketCollectionUpdateIterator{contract: _NftMarket.contract, event: "CollectionUpdate", logs: logs, sub: sub}, nil +} + +// WatchCollectionUpdate is a free log subscription operation binding the contract event 0x655bd8b9d972737b566ec5473b537d81d079c6e251d4986005bf3f36000eacef. +// +// Solidity: event CollectionUpdate(address indexed collection, address indexed creator, address indexed whitelistChecker, uint256 tradingFee, uint256 creatorFee) +func (_NftMarket *NftMarketFilterer) WatchCollectionUpdate(opts *bind.WatchOpts, sink chan<- *NftMarketCollectionUpdate, collection []common.Address, creator []common.Address, whitelistChecker []common.Address) (event.Subscription, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + var whitelistCheckerRule []interface{} + for _, whitelistCheckerItem := range whitelistChecker { + whitelistCheckerRule = append(whitelistCheckerRule, whitelistCheckerItem) + } + + logs, sub, err := _NftMarket.contract.WatchLogs(opts, "CollectionUpdate", collectionRule, creatorRule, whitelistCheckerRule) + 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(NftMarketCollectionUpdate) + if err := _NftMarket.contract.UnpackLog(event, "CollectionUpdate", 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 +} + +// ParseCollectionUpdate is a log parse operation binding the contract event 0x655bd8b9d972737b566ec5473b537d81d079c6e251d4986005bf3f36000eacef. +// +// Solidity: event CollectionUpdate(address indexed collection, address indexed creator, address indexed whitelistChecker, uint256 tradingFee, uint256 creatorFee) +func (_NftMarket *NftMarketFilterer) ParseCollectionUpdate(log types.Log) (*NftMarketCollectionUpdate, error) { + event := new(NftMarketCollectionUpdate) + if err := _NftMarket.contract.UnpackLog(event, "CollectionUpdate", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NftMarketNewAdminAndTreasuryAddressesIterator is returned from FilterNewAdminAndTreasuryAddresses and is used to iterate over the raw logs and unpacked data for NewAdminAndTreasuryAddresses events raised by the NftMarket contract. +type NftMarketNewAdminAndTreasuryAddressesIterator struct { + Event *NftMarketNewAdminAndTreasuryAddresses // 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 *NftMarketNewAdminAndTreasuryAddressesIterator) 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(NftMarketNewAdminAndTreasuryAddresses) + 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(NftMarketNewAdminAndTreasuryAddresses) + 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 *NftMarketNewAdminAndTreasuryAddressesIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NftMarketNewAdminAndTreasuryAddressesIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NftMarketNewAdminAndTreasuryAddresses represents a NewAdminAndTreasuryAddresses event raised by the NftMarket contract. +type NftMarketNewAdminAndTreasuryAddresses struct { + Admin common.Address + Treasury common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNewAdminAndTreasuryAddresses is a free log retrieval operation binding the contract event 0x2a1b1d9b1cb634e511bbf940f66e95082249486cf37efdb4bccba1c5f4c00b9b. +// +// Solidity: event NewAdminAndTreasuryAddresses(address indexed admin, address indexed treasury) +func (_NftMarket *NftMarketFilterer) FilterNewAdminAndTreasuryAddresses(opts *bind.FilterOpts, admin []common.Address, treasury []common.Address) (*NftMarketNewAdminAndTreasuryAddressesIterator, error) { + + var adminRule []interface{} + for _, adminItem := range admin { + adminRule = append(adminRule, adminItem) + } + var treasuryRule []interface{} + for _, treasuryItem := range treasury { + treasuryRule = append(treasuryRule, treasuryItem) + } + + logs, sub, err := _NftMarket.contract.FilterLogs(opts, "NewAdminAndTreasuryAddresses", adminRule, treasuryRule) + if err != nil { + return nil, err + } + return &NftMarketNewAdminAndTreasuryAddressesIterator{contract: _NftMarket.contract, event: "NewAdminAndTreasuryAddresses", logs: logs, sub: sub}, nil +} + +// WatchNewAdminAndTreasuryAddresses is a free log subscription operation binding the contract event 0x2a1b1d9b1cb634e511bbf940f66e95082249486cf37efdb4bccba1c5f4c00b9b. +// +// Solidity: event NewAdminAndTreasuryAddresses(address indexed admin, address indexed treasury) +func (_NftMarket *NftMarketFilterer) WatchNewAdminAndTreasuryAddresses(opts *bind.WatchOpts, sink chan<- *NftMarketNewAdminAndTreasuryAddresses, admin []common.Address, treasury []common.Address) (event.Subscription, error) { + + var adminRule []interface{} + for _, adminItem := range admin { + adminRule = append(adminRule, adminItem) + } + var treasuryRule []interface{} + for _, treasuryItem := range treasury { + treasuryRule = append(treasuryRule, treasuryItem) + } + + logs, sub, err := _NftMarket.contract.WatchLogs(opts, "NewAdminAndTreasuryAddresses", adminRule, treasuryRule) + 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(NftMarketNewAdminAndTreasuryAddresses) + if err := _NftMarket.contract.UnpackLog(event, "NewAdminAndTreasuryAddresses", 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 +} + +// ParseNewAdminAndTreasuryAddresses is a log parse operation binding the contract event 0x2a1b1d9b1cb634e511bbf940f66e95082249486cf37efdb4bccba1c5f4c00b9b. +// +// Solidity: event NewAdminAndTreasuryAddresses(address indexed admin, address indexed treasury) +func (_NftMarket *NftMarketFilterer) ParseNewAdminAndTreasuryAddresses(log types.Log) (*NftMarketNewAdminAndTreasuryAddresses, error) { + event := new(NftMarketNewAdminAndTreasuryAddresses) + if err := _NftMarket.contract.UnpackLog(event, "NewAdminAndTreasuryAddresses", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NftMarketNewMinimumAndMaximumAskPricesIterator is returned from FilterNewMinimumAndMaximumAskPrices and is used to iterate over the raw logs and unpacked data for NewMinimumAndMaximumAskPrices events raised by the NftMarket contract. +type NftMarketNewMinimumAndMaximumAskPricesIterator struct { + Event *NftMarketNewMinimumAndMaximumAskPrices // 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 *NftMarketNewMinimumAndMaximumAskPricesIterator) 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(NftMarketNewMinimumAndMaximumAskPrices) + 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(NftMarketNewMinimumAndMaximumAskPrices) + 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 *NftMarketNewMinimumAndMaximumAskPricesIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NftMarketNewMinimumAndMaximumAskPricesIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NftMarketNewMinimumAndMaximumAskPrices represents a NewMinimumAndMaximumAskPrices event raised by the NftMarket contract. +type NftMarketNewMinimumAndMaximumAskPrices struct { + MinimumAskPrice *big.Int + MaximumAskPrice *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNewMinimumAndMaximumAskPrices is a free log retrieval operation binding the contract event 0xb25b7c478b617cc7fb07f97a49dc7dcba200dae3abbcb0aa17216e2ae6deaef7. +// +// Solidity: event NewMinimumAndMaximumAskPrices(uint256 minimumAskPrice, uint256 maximumAskPrice) +func (_NftMarket *NftMarketFilterer) FilterNewMinimumAndMaximumAskPrices(opts *bind.FilterOpts) (*NftMarketNewMinimumAndMaximumAskPricesIterator, error) { + + logs, sub, err := _NftMarket.contract.FilterLogs(opts, "NewMinimumAndMaximumAskPrices") + if err != nil { + return nil, err + } + return &NftMarketNewMinimumAndMaximumAskPricesIterator{contract: _NftMarket.contract, event: "NewMinimumAndMaximumAskPrices", logs: logs, sub: sub}, nil +} + +// WatchNewMinimumAndMaximumAskPrices is a free log subscription operation binding the contract event 0xb25b7c478b617cc7fb07f97a49dc7dcba200dae3abbcb0aa17216e2ae6deaef7. +// +// Solidity: event NewMinimumAndMaximumAskPrices(uint256 minimumAskPrice, uint256 maximumAskPrice) +func (_NftMarket *NftMarketFilterer) WatchNewMinimumAndMaximumAskPrices(opts *bind.WatchOpts, sink chan<- *NftMarketNewMinimumAndMaximumAskPrices) (event.Subscription, error) { + + logs, sub, err := _NftMarket.contract.WatchLogs(opts, "NewMinimumAndMaximumAskPrices") + 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(NftMarketNewMinimumAndMaximumAskPrices) + if err := _NftMarket.contract.UnpackLog(event, "NewMinimumAndMaximumAskPrices", 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 +} + +// ParseNewMinimumAndMaximumAskPrices is a log parse operation binding the contract event 0xb25b7c478b617cc7fb07f97a49dc7dcba200dae3abbcb0aa17216e2ae6deaef7. +// +// Solidity: event NewMinimumAndMaximumAskPrices(uint256 minimumAskPrice, uint256 maximumAskPrice) +func (_NftMarket *NftMarketFilterer) ParseNewMinimumAndMaximumAskPrices(log types.Log) (*NftMarketNewMinimumAndMaximumAskPrices, error) { + event := new(NftMarketNewMinimumAndMaximumAskPrices) + if err := _NftMarket.contract.UnpackLog(event, "NewMinimumAndMaximumAskPrices", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NftMarketNonFungibleTokenRecoveryIterator is returned from FilterNonFungibleTokenRecovery and is used to iterate over the raw logs and unpacked data for NonFungibleTokenRecovery events raised by the NftMarket contract. +type NftMarketNonFungibleTokenRecoveryIterator struct { + Event *NftMarketNonFungibleTokenRecovery // 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 *NftMarketNonFungibleTokenRecoveryIterator) 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(NftMarketNonFungibleTokenRecovery) + 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(NftMarketNonFungibleTokenRecovery) + 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 *NftMarketNonFungibleTokenRecoveryIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NftMarketNonFungibleTokenRecoveryIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NftMarketNonFungibleTokenRecovery represents a NonFungibleTokenRecovery event raised by the NftMarket contract. +type NftMarketNonFungibleTokenRecovery struct { + Token common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNonFungibleTokenRecovery is a free log retrieval operation binding the contract event 0x861c3ea25dbda3af0bf5d258ba8582c0276c9446b1479e817be3f1b4a89acf91. +// +// Solidity: event NonFungibleTokenRecovery(address indexed token, uint256 indexed tokenId) +func (_NftMarket *NftMarketFilterer) FilterNonFungibleTokenRecovery(opts *bind.FilterOpts, token []common.Address, tokenId []*big.Int) (*NftMarketNonFungibleTokenRecoveryIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _NftMarket.contract.FilterLogs(opts, "NonFungibleTokenRecovery", tokenRule, tokenIdRule) + if err != nil { + return nil, err + } + return &NftMarketNonFungibleTokenRecoveryIterator{contract: _NftMarket.contract, event: "NonFungibleTokenRecovery", logs: logs, sub: sub}, nil +} + +// WatchNonFungibleTokenRecovery is a free log subscription operation binding the contract event 0x861c3ea25dbda3af0bf5d258ba8582c0276c9446b1479e817be3f1b4a89acf91. +// +// Solidity: event NonFungibleTokenRecovery(address indexed token, uint256 indexed tokenId) +func (_NftMarket *NftMarketFilterer) WatchNonFungibleTokenRecovery(opts *bind.WatchOpts, sink chan<- *NftMarketNonFungibleTokenRecovery, token []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _NftMarket.contract.WatchLogs(opts, "NonFungibleTokenRecovery", tokenRule, tokenIdRule) + 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(NftMarketNonFungibleTokenRecovery) + if err := _NftMarket.contract.UnpackLog(event, "NonFungibleTokenRecovery", 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 +} + +// ParseNonFungibleTokenRecovery is a log parse operation binding the contract event 0x861c3ea25dbda3af0bf5d258ba8582c0276c9446b1479e817be3f1b4a89acf91. +// +// Solidity: event NonFungibleTokenRecovery(address indexed token, uint256 indexed tokenId) +func (_NftMarket *NftMarketFilterer) ParseNonFungibleTokenRecovery(log types.Log) (*NftMarketNonFungibleTokenRecovery, error) { + event := new(NftMarketNonFungibleTokenRecovery) + if err := _NftMarket.contract.UnpackLog(event, "NonFungibleTokenRecovery", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NftMarketOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the NftMarket contract. +type NftMarketOwnershipTransferredIterator struct { + Event *NftMarketOwnershipTransferred // 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 *NftMarketOwnershipTransferredIterator) 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(NftMarketOwnershipTransferred) + 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(NftMarketOwnershipTransferred) + 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 *NftMarketOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NftMarketOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NftMarketOwnershipTransferred represents a OwnershipTransferred event raised by the NftMarket contract. +type NftMarketOwnershipTransferred 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 (_NftMarket *NftMarketFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*NftMarketOwnershipTransferredIterator, 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 := _NftMarket.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &NftMarketOwnershipTransferredIterator{contract: _NftMarket.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 (_NftMarket *NftMarketFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *NftMarketOwnershipTransferred, 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 := _NftMarket.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(NftMarketOwnershipTransferred) + if err := _NftMarket.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 (_NftMarket *NftMarketFilterer) ParseOwnershipTransferred(log types.Log) (*NftMarketOwnershipTransferred, error) { + event := new(NftMarketOwnershipTransferred) + if err := _NftMarket.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NftMarketRevenueClaimIterator is returned from FilterRevenueClaim and is used to iterate over the raw logs and unpacked data for RevenueClaim events raised by the NftMarket contract. +type NftMarketRevenueClaimIterator struct { + Event *NftMarketRevenueClaim // 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 *NftMarketRevenueClaimIterator) 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(NftMarketRevenueClaim) + 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(NftMarketRevenueClaim) + 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 *NftMarketRevenueClaimIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NftMarketRevenueClaimIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NftMarketRevenueClaim represents a RevenueClaim event raised by the NftMarket contract. +type NftMarketRevenueClaim struct { + Claimer common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRevenueClaim is a free log retrieval operation binding the contract event 0xc6cb6f1a9d5212d4ee3819d9b175a85e8333a7327d53dfbc1b610e1fd8ec3cb5. +// +// Solidity: event RevenueClaim(address indexed claimer, uint256 amount) +func (_NftMarket *NftMarketFilterer) FilterRevenueClaim(opts *bind.FilterOpts, claimer []common.Address) (*NftMarketRevenueClaimIterator, error) { + + var claimerRule []interface{} + for _, claimerItem := range claimer { + claimerRule = append(claimerRule, claimerItem) + } + + logs, sub, err := _NftMarket.contract.FilterLogs(opts, "RevenueClaim", claimerRule) + if err != nil { + return nil, err + } + return &NftMarketRevenueClaimIterator{contract: _NftMarket.contract, event: "RevenueClaim", logs: logs, sub: sub}, nil +} + +// WatchRevenueClaim is a free log subscription operation binding the contract event 0xc6cb6f1a9d5212d4ee3819d9b175a85e8333a7327d53dfbc1b610e1fd8ec3cb5. +// +// Solidity: event RevenueClaim(address indexed claimer, uint256 amount) +func (_NftMarket *NftMarketFilterer) WatchRevenueClaim(opts *bind.WatchOpts, sink chan<- *NftMarketRevenueClaim, claimer []common.Address) (event.Subscription, error) { + + var claimerRule []interface{} + for _, claimerItem := range claimer { + claimerRule = append(claimerRule, claimerItem) + } + + logs, sub, err := _NftMarket.contract.WatchLogs(opts, "RevenueClaim", claimerRule) + 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(NftMarketRevenueClaim) + if err := _NftMarket.contract.UnpackLog(event, "RevenueClaim", 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 +} + +// ParseRevenueClaim is a log parse operation binding the contract event 0xc6cb6f1a9d5212d4ee3819d9b175a85e8333a7327d53dfbc1b610e1fd8ec3cb5. +// +// Solidity: event RevenueClaim(address indexed claimer, uint256 amount) +func (_NftMarket *NftMarketFilterer) ParseRevenueClaim(log types.Log) (*NftMarketRevenueClaim, error) { + event := new(NftMarketRevenueClaim) + if err := _NftMarket.contract.UnpackLog(event, "RevenueClaim", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NftMarketTokenRecoveryIterator is returned from FilterTokenRecovery and is used to iterate over the raw logs and unpacked data for TokenRecovery events raised by the NftMarket contract. +type NftMarketTokenRecoveryIterator struct { + Event *NftMarketTokenRecovery // 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 *NftMarketTokenRecoveryIterator) 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(NftMarketTokenRecovery) + 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(NftMarketTokenRecovery) + 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 *NftMarketTokenRecoveryIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NftMarketTokenRecoveryIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NftMarketTokenRecovery represents a TokenRecovery event raised by the NftMarket contract. +type NftMarketTokenRecovery struct { + Token common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokenRecovery is a free log retrieval operation binding the contract event 0x14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e98. +// +// Solidity: event TokenRecovery(address indexed token, uint256 amount) +func (_NftMarket *NftMarketFilterer) FilterTokenRecovery(opts *bind.FilterOpts, token []common.Address) (*NftMarketTokenRecoveryIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _NftMarket.contract.FilterLogs(opts, "TokenRecovery", tokenRule) + if err != nil { + return nil, err + } + return &NftMarketTokenRecoveryIterator{contract: _NftMarket.contract, event: "TokenRecovery", logs: logs, sub: sub}, nil +} + +// WatchTokenRecovery is a free log subscription operation binding the contract event 0x14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e98. +// +// Solidity: event TokenRecovery(address indexed token, uint256 amount) +func (_NftMarket *NftMarketFilterer) WatchTokenRecovery(opts *bind.WatchOpts, sink chan<- *NftMarketTokenRecovery, token []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + + logs, sub, err := _NftMarket.contract.WatchLogs(opts, "TokenRecovery", 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(NftMarketTokenRecovery) + if err := _NftMarket.contract.UnpackLog(event, "TokenRecovery", 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 +} + +// ParseTokenRecovery is a log parse operation binding the contract event 0x14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e98. +// +// Solidity: event TokenRecovery(address indexed token, uint256 amount) +func (_NftMarket *NftMarketFilterer) ParseTokenRecovery(log types.Log) (*NftMarketTokenRecovery, error) { + event := new(NftMarketTokenRecovery) + if err := _NftMarket.contract.UnpackLog(event, "TokenRecovery", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NftMarketTradeIterator is returned from FilterTrade and is used to iterate over the raw logs and unpacked data for Trade events raised by the NftMarket contract. +type NftMarketTradeIterator struct { + Event *NftMarketTrade // 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 *NftMarketTradeIterator) 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(NftMarketTrade) + 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(NftMarketTrade) + 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 *NftMarketTradeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NftMarketTradeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NftMarketTrade represents a Trade event raised by the NftMarket contract. +type NftMarketTrade struct { + Collection common.Address + TokenId *big.Int + Seller common.Address + Buyer common.Address + AskPrice *big.Int + NetPrice *big.Int + WithBNB bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTrade is a free log retrieval operation binding the contract event 0xdaac0e40b8f01e970d08d4e8ae57ac31a5845fffde104c43f05e19bbec78491e. +// +// Solidity: event Trade(address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, uint256 askPrice, uint256 netPrice, bool withBNB) +func (_NftMarket *NftMarketFilterer) FilterTrade(opts *bind.FilterOpts, collection []common.Address, tokenId []*big.Int, seller []common.Address) (*NftMarketTradeIterator, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + var sellerRule []interface{} + for _, sellerItem := range seller { + sellerRule = append(sellerRule, sellerItem) + } + + logs, sub, err := _NftMarket.contract.FilterLogs(opts, "Trade", collectionRule, tokenIdRule, sellerRule) + if err != nil { + return nil, err + } + return &NftMarketTradeIterator{contract: _NftMarket.contract, event: "Trade", logs: logs, sub: sub}, nil +} + +// WatchTrade is a free log subscription operation binding the contract event 0xdaac0e40b8f01e970d08d4e8ae57ac31a5845fffde104c43f05e19bbec78491e. +// +// Solidity: event Trade(address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, uint256 askPrice, uint256 netPrice, bool withBNB) +func (_NftMarket *NftMarketFilterer) WatchTrade(opts *bind.WatchOpts, sink chan<- *NftMarketTrade, collection []common.Address, tokenId []*big.Int, seller []common.Address) (event.Subscription, error) { + + var collectionRule []interface{} + for _, collectionItem := range collection { + collectionRule = append(collectionRule, collectionItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + var sellerRule []interface{} + for _, sellerItem := range seller { + sellerRule = append(sellerRule, sellerItem) + } + + logs, sub, err := _NftMarket.contract.WatchLogs(opts, "Trade", collectionRule, tokenIdRule, sellerRule) + 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(NftMarketTrade) + if err := _NftMarket.contract.UnpackLog(event, "Trade", 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 +} + +// ParseTrade is a log parse operation binding the contract event 0xdaac0e40b8f01e970d08d4e8ae57ac31a5845fffde104c43f05e19bbec78491e. +// +// Solidity: event Trade(address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, uint256 askPrice, uint256 netPrice, bool withBNB) +func (_NftMarket *NftMarketFilterer) ParseTrade(log types.Log) (*NftMarketTrade, error) { + event := new(NftMarketTrade) + if err := _NftMarket.contract.UnpackLog(event, "Trade", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/pancakeswap/contracts/router.abi b/pancakeswap/contracts/router.abi new file mode 100644 index 0000000..383ca61 --- /dev/null +++ b/pancakeswap/contracts/router.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountTokenDesired","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountIn","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsIn","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"reserveA","type":"uint256"},{"internalType":"uint256","name":"reserveB","type":"uint256"}],"name":"quote","outputs":[{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityETHSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityETHWithPermit","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityWithPermit","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapETHForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForETHSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}] \ No newline at end of file diff --git a/pancakeswap/contracts/router.go b/pancakeswap/contracts/router.go new file mode 100644 index 0000000..d501438 --- /dev/null +++ b/pancakeswap/contracts/router.go @@ -0,0 +1,767 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// RouterABI is the input ABI used to generate the binding from. +const RouterABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_WETH\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountADesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountIn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsIn\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveB\",\"type\":\"uint256\"}],\"name\":\"quote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityETHSupportingFeeOnTransferTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityETHWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapETHForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactETHForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactETHForTokensSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForETHSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForTokensSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]" + +// Router is an auto generated Go binding around an Ethereum contract. +type Router struct { + RouterCaller // Read-only binding to the contract + RouterTransactor // Write-only binding to the contract + RouterFilterer // Log filterer for contract events +} + +// RouterCaller is an auto generated read-only Go binding around an Ethereum contract. +type RouterCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// RouterTransactor is an auto generated write-only Go binding around an Ethereum contract. +type RouterTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// RouterFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type RouterFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// RouterSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type RouterSession struct { + Contract *Router // 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 +} + +// RouterCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type RouterCallerSession struct { + Contract *RouterCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// RouterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type RouterTransactorSession struct { + Contract *RouterTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// RouterRaw is an auto generated low-level Go binding around an Ethereum contract. +type RouterRaw struct { + Contract *Router // Generic contract binding to access the raw methods on +} + +// RouterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type RouterCallerRaw struct { + Contract *RouterCaller // Generic read-only contract binding to access the raw methods on +} + +// RouterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type RouterTransactorRaw struct { + Contract *RouterTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewRouter creates a new instance of Router, bound to a specific deployed contract. +func NewRouter(address common.Address, backend bind.ContractBackend) (*Router, error) { + contract, err := bindRouter(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Router{RouterCaller: RouterCaller{contract: contract}, RouterTransactor: RouterTransactor{contract: contract}, RouterFilterer: RouterFilterer{contract: contract}}, nil +} + +// NewRouterCaller creates a new read-only instance of Router, bound to a specific deployed contract. +func NewRouterCaller(address common.Address, caller bind.ContractCaller) (*RouterCaller, error) { + contract, err := bindRouter(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &RouterCaller{contract: contract}, nil +} + +// NewRouterTransactor creates a new write-only instance of Router, bound to a specific deployed contract. +func NewRouterTransactor(address common.Address, transactor bind.ContractTransactor) (*RouterTransactor, error) { + contract, err := bindRouter(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &RouterTransactor{contract: contract}, nil +} + +// NewRouterFilterer creates a new log filterer instance of Router, bound to a specific deployed contract. +func NewRouterFilterer(address common.Address, filterer bind.ContractFilterer) (*RouterFilterer, error) { + contract, err := bindRouter(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &RouterFilterer{contract: contract}, nil +} + +// bindRouter binds a generic wrapper to an already deployed contract. +func bindRouter(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(RouterABI)) + 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 (_Router *RouterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Router.Contract.RouterCaller.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 (_Router *RouterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Router.Contract.RouterTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Router *RouterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Router.Contract.RouterTransactor.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 (_Router *RouterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Router.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 (_Router *RouterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Router.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Router *RouterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Router.Contract.contract.Transact(opts, method, params...) +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() view returns(address) +func (_Router *RouterCaller) WETH(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Router.contract.Call(opts, &out, "WETH") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() view returns(address) +func (_Router *RouterSession) WETH() (common.Address, error) { + return _Router.Contract.WETH(&_Router.CallOpts) +} + +// WETH is a free data retrieval call binding the contract method 0xad5c4648. +// +// Solidity: function WETH() view returns(address) +func (_Router *RouterCallerSession) WETH() (common.Address, error) { + return _Router.Contract.WETH(&_Router.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_Router *RouterCaller) Factory(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Router.contract.Call(opts, &out, "factory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_Router *RouterSession) Factory() (common.Address, error) { + return _Router.Contract.Factory(&_Router.CallOpts) +} + +// Factory is a free data retrieval call binding the contract method 0xc45a0155. +// +// Solidity: function factory() view returns(address) +func (_Router *RouterCallerSession) Factory() (common.Address, error) { + return _Router.Contract.Factory(&_Router.CallOpts) +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_Router *RouterCaller) GetAmountIn(opts *bind.CallOpts, amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + var out []interface{} + err := _Router.contract.Call(opts, &out, "getAmountIn", amountOut, reserveIn, reserveOut) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_Router *RouterSession) GetAmountIn(amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _Router.Contract.GetAmountIn(&_Router.CallOpts, amountOut, reserveIn, reserveOut) +} + +// GetAmountIn is a free data retrieval call binding the contract method 0x85f8c259. +// +// Solidity: function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountIn) +func (_Router *RouterCallerSession) GetAmountIn(amountOut *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _Router.Contract.GetAmountIn(&_Router.CallOpts, amountOut, reserveIn, reserveOut) +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_Router *RouterCaller) GetAmountOut(opts *bind.CallOpts, amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + var out []interface{} + err := _Router.contract.Call(opts, &out, "getAmountOut", amountIn, reserveIn, reserveOut) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_Router *RouterSession) GetAmountOut(amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _Router.Contract.GetAmountOut(&_Router.CallOpts, amountIn, reserveIn, reserveOut) +} + +// GetAmountOut is a free data retrieval call binding the contract method 0x054d50d4. +// +// Solidity: function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns(uint256 amountOut) +func (_Router *RouterCallerSession) GetAmountOut(amountIn *big.Int, reserveIn *big.Int, reserveOut *big.Int) (*big.Int, error) { + return _Router.Contract.GetAmountOut(&_Router.CallOpts, amountIn, reserveIn, reserveOut) +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_Router *RouterCaller) GetAmountsIn(opts *bind.CallOpts, amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + var out []interface{} + err := _Router.contract.Call(opts, &out, "getAmountsIn", amountOut, path) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_Router *RouterSession) GetAmountsIn(amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + return _Router.Contract.GetAmountsIn(&_Router.CallOpts, amountOut, path) +} + +// GetAmountsIn is a free data retrieval call binding the contract method 0x1f00ca74. +// +// Solidity: function getAmountsIn(uint256 amountOut, address[] path) view returns(uint256[] amounts) +func (_Router *RouterCallerSession) GetAmountsIn(amountOut *big.Int, path []common.Address) ([]*big.Int, error) { + return _Router.Contract.GetAmountsIn(&_Router.CallOpts, amountOut, path) +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_Router *RouterCaller) GetAmountsOut(opts *bind.CallOpts, amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + var out []interface{} + err := _Router.contract.Call(opts, &out, "getAmountsOut", amountIn, path) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_Router *RouterSession) GetAmountsOut(amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + return _Router.Contract.GetAmountsOut(&_Router.CallOpts, amountIn, path) +} + +// GetAmountsOut is a free data retrieval call binding the contract method 0xd06ca61f. +// +// Solidity: function getAmountsOut(uint256 amountIn, address[] path) view returns(uint256[] amounts) +func (_Router *RouterCallerSession) GetAmountsOut(amountIn *big.Int, path []common.Address) ([]*big.Int, error) { + return _Router.Contract.GetAmountsOut(&_Router.CallOpts, amountIn, path) +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_Router *RouterCaller) Quote(opts *bind.CallOpts, amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + var out []interface{} + err := _Router.contract.Call(opts, &out, "quote", amountA, reserveA, reserveB) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_Router *RouterSession) Quote(amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + return _Router.Contract.Quote(&_Router.CallOpts, amountA, reserveA, reserveB) +} + +// Quote is a free data retrieval call binding the contract method 0xad615dec. +// +// Solidity: function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns(uint256 amountB) +func (_Router *RouterCallerSession) Quote(amountA *big.Int, reserveA *big.Int, reserveB *big.Int) (*big.Int, error) { + return _Router.Contract.Quote(&_Router.CallOpts, amountA, reserveA, reserveB) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_Router *RouterTransactor) AddLiquidity(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "addLiquidity", tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_Router *RouterSession) AddLiquidity(tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.AddLiquidity(&_Router.TransactOpts, tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidity is a paid mutator transaction binding the contract method 0xe8e33700. +// +// Solidity: function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB, uint256 liquidity) +func (_Router *RouterTransactorSession) AddLiquidity(tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.AddLiquidity(&_Router.TransactOpts, tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_Router *RouterTransactor) AddLiquidityETH(opts *bind.TransactOpts, token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "addLiquidityETH", token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_Router *RouterSession) AddLiquidityETH(token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.AddLiquidityETH(&_Router.TransactOpts, token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// AddLiquidityETH is a paid mutator transaction binding the contract method 0xf305d719. +// +// Solidity: function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns(uint256 amountToken, uint256 amountETH, uint256 liquidity) +func (_Router *RouterTransactorSession) AddLiquidityETH(token common.Address, amountTokenDesired *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.AddLiquidityETH(&_Router.TransactOpts, token, amountTokenDesired, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_Router *RouterTransactor) RemoveLiquidity(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "removeLiquidity", tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_Router *RouterSession) RemoveLiquidity(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.RemoveLiquidity(&_Router.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidity is a paid mutator transaction binding the contract method 0xbaa2abde. +// +// Solidity: function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns(uint256 amountA, uint256 amountB) +func (_Router *RouterTransactorSession) RemoveLiquidity(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.RemoveLiquidity(&_Router.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_Router *RouterTransactor) RemoveLiquidityETH(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "removeLiquidityETH", token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_Router *RouterSession) RemoveLiquidityETH(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.RemoveLiquidityETH(&_Router.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETH is a paid mutator transaction binding the contract method 0x02751cec. +// +// Solidity: function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountToken, uint256 amountETH) +func (_Router *RouterTransactorSession) RemoveLiquidityETH(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.RemoveLiquidityETH(&_Router.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xaf2979eb. +// +// Solidity: function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountETH) +func (_Router *RouterTransactor) RemoveLiquidityETHSupportingFeeOnTransferTokens(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "removeLiquidityETHSupportingFeeOnTransferTokens", token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xaf2979eb. +// +// Solidity: function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountETH) +func (_Router *RouterSession) RemoveLiquidityETHSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.RemoveLiquidityETHSupportingFeeOnTransferTokens(&_Router.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xaf2979eb. +// +// Solidity: function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns(uint256 amountETH) +func (_Router *RouterTransactorSession) RemoveLiquidityETHSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.RemoveLiquidityETHSupportingFeeOnTransferTokens(&_Router.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_Router *RouterTransactor) RemoveLiquidityETHWithPermit(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "removeLiquidityETHWithPermit", token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_Router *RouterSession) RemoveLiquidityETHWithPermit(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Router.Contract.RemoveLiquidityETHWithPermit(&_Router.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermit is a paid mutator transaction binding the contract method 0xded9382a. +// +// Solidity: function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountToken, uint256 amountETH) +func (_Router *RouterTransactorSession) RemoveLiquidityETHWithPermit(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Router.Contract.RemoveLiquidityETHWithPermit(&_Router.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5b0d5984. +// +// Solidity: function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountETH) +func (_Router *RouterTransactor) RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens", token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5b0d5984. +// +// Solidity: function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountETH) +func (_Router *RouterSession) RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Router.Contract.RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(&_Router.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5b0d5984. +// +// Solidity: function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountETH) +func (_Router *RouterTransactorSession) RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(token common.Address, liquidity *big.Int, amountTokenMin *big.Int, amountETHMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Router.Contract.RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(&_Router.TransactOpts, token, liquidity, amountTokenMin, amountETHMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_Router *RouterTransactor) RemoveLiquidityWithPermit(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "removeLiquidityWithPermit", tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_Router *RouterSession) RemoveLiquidityWithPermit(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Router.Contract.RemoveLiquidityWithPermit(&_Router.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// RemoveLiquidityWithPermit is a paid mutator transaction binding the contract method 0x2195995c. +// +// Solidity: function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns(uint256 amountA, uint256 amountB) +func (_Router *RouterTransactorSession) RemoveLiquidityWithPermit(tokenA common.Address, tokenB common.Address, liquidity *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int, approveMax bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Router.Contract.RemoveLiquidityWithPermit(&_Router.TransactOpts, tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline, approveMax, v, r, s) +} + +// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41. +// +// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_Router *RouterTransactor) SwapETHForExactTokens(opts *bind.TransactOpts, amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "swapETHForExactTokens", amountOut, path, to, deadline) +} + +// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41. +// +// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_Router *RouterSession) SwapETHForExactTokens(amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapETHForExactTokens(&_Router.TransactOpts, amountOut, path, to, deadline) +} + +// SwapETHForExactTokens is a paid mutator transaction binding the contract method 0xfb3bdb41. +// +// Solidity: function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_Router *RouterTransactorSession) SwapETHForExactTokens(amountOut *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapETHForExactTokens(&_Router.TransactOpts, amountOut, path, to, deadline) +} + +// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5. +// +// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_Router *RouterTransactor) SwapExactETHForTokens(opts *bind.TransactOpts, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "swapExactETHForTokens", amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5. +// +// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_Router *RouterSession) SwapExactETHForTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapExactETHForTokens(&_Router.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokens is a paid mutator transaction binding the contract method 0x7ff36ab5. +// +// Solidity: function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns(uint256[] amounts) +func (_Router *RouterTransactorSession) SwapExactETHForTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapExactETHForTokens(&_Router.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xb6f9de95. +// +// Solidity: function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns() +func (_Router *RouterTransactor) SwapExactETHForTokensSupportingFeeOnTransferTokens(opts *bind.TransactOpts, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "swapExactETHForTokensSupportingFeeOnTransferTokens", amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xb6f9de95. +// +// Solidity: function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns() +func (_Router *RouterSession) SwapExactETHForTokensSupportingFeeOnTransferTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapExactETHForTokensSupportingFeeOnTransferTokens(&_Router.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactETHForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0xb6f9de95. +// +// Solidity: function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns() +func (_Router *RouterTransactorSession) SwapExactETHForTokensSupportingFeeOnTransferTokens(amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapExactETHForTokensSupportingFeeOnTransferTokens(&_Router.TransactOpts, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5. +// +// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_Router *RouterTransactor) SwapExactTokensForETH(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "swapExactTokensForETH", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5. +// +// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_Router *RouterSession) SwapExactTokensForETH(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapExactTokensForETH(&_Router.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETH is a paid mutator transaction binding the contract method 0x18cbafe5. +// +// Solidity: function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_Router *RouterTransactorSession) SwapExactTokensForETH(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapExactTokensForETH(&_Router.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x791ac947. +// +// Solidity: function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_Router *RouterTransactor) SwapExactTokensForETHSupportingFeeOnTransferTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "swapExactTokensForETHSupportingFeeOnTransferTokens", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x791ac947. +// +// Solidity: function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_Router *RouterSession) SwapExactTokensForETHSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapExactTokensForETHSupportingFeeOnTransferTokens(&_Router.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForETHSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x791ac947. +// +// Solidity: function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_Router *RouterTransactorSession) SwapExactTokensForETHSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapExactTokensForETHSupportingFeeOnTransferTokens(&_Router.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739. +// +// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_Router *RouterTransactor) SwapExactTokensForTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "swapExactTokensForTokens", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739. +// +// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_Router *RouterSession) SwapExactTokensForTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapExactTokensForTokens(&_Router.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokens is a paid mutator transaction binding the contract method 0x38ed1739. +// +// Solidity: function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_Router *RouterTransactorSession) SwapExactTokensForTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapExactTokensForTokens(&_Router.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5c11d795. +// +// Solidity: function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_Router *RouterTransactor) SwapExactTokensForTokensSupportingFeeOnTransferTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "swapExactTokensForTokensSupportingFeeOnTransferTokens", amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5c11d795. +// +// Solidity: function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_Router *RouterSession) SwapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapExactTokensForTokensSupportingFeeOnTransferTokens(&_Router.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapExactTokensForTokensSupportingFeeOnTransferTokens is a paid mutator transaction binding the contract method 0x5c11d795. +// +// Solidity: function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns() +func (_Router *RouterTransactorSession) SwapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapExactTokensForTokensSupportingFeeOnTransferTokens(&_Router.TransactOpts, amountIn, amountOutMin, path, to, deadline) +} + +// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a. +// +// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_Router *RouterTransactor) SwapTokensForExactETH(opts *bind.TransactOpts, amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "swapTokensForExactETH", amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a. +// +// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_Router *RouterSession) SwapTokensForExactETH(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapTokensForExactETH(&_Router.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactETH is a paid mutator transaction binding the contract method 0x4a25d94a. +// +// Solidity: function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_Router *RouterTransactorSession) SwapTokensForExactETH(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapTokensForExactETH(&_Router.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee. +// +// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_Router *RouterTransactor) SwapTokensForExactTokens(opts *bind.TransactOpts, amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.contract.Transact(opts, "swapTokensForExactTokens", amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee. +// +// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_Router *RouterSession) SwapTokensForExactTokens(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapTokensForExactTokens(&_Router.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// SwapTokensForExactTokens is a paid mutator transaction binding the contract method 0x8803dbee. +// +// Solidity: function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns(uint256[] amounts) +func (_Router *RouterTransactorSession) SwapTokensForExactTokens(amountOut *big.Int, amountInMax *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) { + return _Router.Contract.SwapTokensForExactTokens(&_Router.TransactOpts, amountOut, amountInMax, path, to, deadline) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Router *RouterTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Router.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 (_Router *RouterSession) Receive() (*types.Transaction, error) { + return _Router.Contract.Receive(&_Router.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Router *RouterTransactorSession) Receive() (*types.Transaction, error) { + return _Router.Contract.Receive(&_Router.TransactOpts) +} diff --git a/pancakeswap/masterchef.go b/pancakeswap/masterchef.go new file mode 100644 index 0000000..48db338 --- /dev/null +++ b/pancakeswap/masterchef.go @@ -0,0 +1,69 @@ +package pancakeswap + +import ( + "context" + "math/big" + + "git.lehouerou.net/laurent/evm" + "git.lehouerou.net/laurent/evm/pancakeswap/contracts" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/pkg/errors" + "github.com/shopspring/decimal" +) + +const MasterChefAddress = "0x73feaa1eE314F8c655E354234017bE2193C9E24E" + +type MasterChef struct { + client evm.Client + contract *contracts.MasterChef + + cake evm.Token +} + +func NewMasterChef(client evm.Client) (*MasterChef, error) { + c, err := contracts.NewMasterChef(common.HexToAddress(MasterChefAddress), client) + if err != nil { + return nil, errors.Wrap(err, "init contract") + } + cake, err := client.TokenService().TokenBySymbol("CAKE") + if err != nil { + return nil, errors.Wrap(err, "finding cake token") + } + return &MasterChef{ + contract: c, + client: client, + cake: cake, + }, nil +} + +func (m *MasterChef) PendingCake(pid int64) (decimal.Decimal, error) { + return m.PendingCakeOfAddress(pid, m.client.PublicAddress()) +} + +func (m *MasterChef) PendingCakeOfAddress(pid int64, address common.Address) (decimal.Decimal, error) { + raw, err := m.contract.PendingCake(&bind.CallOpts{}, big.NewInt(pid), address) + if err != nil { + return decimal.Zero, errors.Wrap(err, "calling contract") + } + return m.cake.ValueFromBigInt(raw), nil +} + +func (m *MasterChef) EnterStaking(ctx context.Context, amount decimal.Decimal) (evm.Transaction, error) { + return m.client.Execute(ctx, func(ctx context.Context, opts *evm.TransactOpts) (*types.Transaction, error) { + return m.contract.EnterStaking(opts.TransactOpts, m.cake.ValueToBigInt(amount)) + }) +} + +func (m *MasterChef) CompoundAndAddCakeBalance(ctx context.Context) (evm.Transaction, error) { + pending, err := m.PendingCake(0) + if err != nil { + return nil, errors.Wrap(err, "getting pending cake reward") + } + balance, err := m.cake.Balance() + if err != nil { + return nil, errors.Wrap(err, "getting cake balance") + } + return m.EnterStaking(ctx, pending.Add(balance)) +} diff --git a/pancakeswap/nftmarket.go b/pancakeswap/nftmarket.go new file mode 100644 index 0000000..59e47b6 --- /dev/null +++ b/pancakeswap/nftmarket.go @@ -0,0 +1,75 @@ +package pancakeswap + +import ( + "context" + "math/big" + + "git.lehouerou.net/laurent/evm" + "git.lehouerou.net/laurent/evm/pancakeswap/contracts" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/pkg/errors" + "github.com/shopspring/decimal" +) + +const ( + MarketAddress = "0x17539cCa21C7933Df5c980172d22659B8C345C5A" +) + +type NftMarket struct { + client evm.Client + contract *contracts.NftMarket + wbnb evm.Token +} + +func NewNftMarket(client evm.Client) (*NftMarket, error) { + contract, err := contracts.NewNftMarket(common.HexToAddress(MarketAddress), client) + if err != nil { + return nil, errors.Wrap(err, "init contract") + } + wbnb, err := client.TokenService().TokenBySymbol("WBNB") + if err != nil { + return nil, errors.Wrap(err, "init wbnb contract") + } + return &NftMarket{ + client: client, + contract: contract, + wbnb: wbnb, + }, nil +} + +func (m *NftMarket) GetAskPriceForToken(collection common.Address, tokenid int) (decimal.Decimal, error) { + res, err := m.contract.ViewAsksByCollectionAndTokenIds(&bind.CallOpts{}, collection, []*big.Int{big.NewInt(int64(tokenid))}) + if err != nil { + return decimal.Zero, errors.Wrap(err, "calling contract") + } + if len(res.AskInfo) == 0 { + return decimal.Zero, errors.New("no info found for this token") + } + return m.wbnb.ValueFromBigInt(res.AskInfo[0].Price), nil +} + +func (m *NftMarket) BuyTokenWithBNB(ctx context.Context, collection common.Address, tokenid int, price decimal.Decimal, gas decimal.Decimal) (evm.Transaction, error) { + return m.client.Execute(ctx, func(ctx context.Context, opts *evm.TransactOpts) (*types.Transaction, error) { + opts.SetValue(price) + opts.SetGasPrice(gas) + opts.SetGasLimit(1000000) + return m.contract.BuyTokenUsingBNB(opts.TransactOpts, collection, big.NewInt(int64(tokenid))) + }) +} + +func (m *NftMarket) BuyTokenWithWBNB(ctx context.Context, collection common.Address, tokenid int, price decimal.Decimal, gas decimal.Decimal) (evm.Transaction, error) { + return m.client.Execute(ctx, func(ctx context.Context, opts *evm.TransactOpts) (*types.Transaction, error) { + opts.SetGasPrice(gas) + opts.SetGasLimit(1000000) + return m.contract.BuyTokenUsingWBNB(opts.TransactOpts, collection, big.NewInt(int64(tokenid)), m.wbnb.ValueToBigInt(price)) + }) +} + +func (m *NftMarket) CreateAskOrder(ctx context.Context, collection common.Address, tokenid int, price decimal.Decimal) (evm.Transaction, error) { + return m.client.Execute(ctx, func(ctx context.Context, opts *evm.TransactOpts) (*types.Transaction, error) { + return m.contract.CreateAskOrder(opts.TransactOpts, collection, big.NewInt(int64(tokenid)), m.wbnb.ValueToBigInt(price)) + }) +} diff --git a/pancakeswap/router.go b/pancakeswap/router.go new file mode 100644 index 0000000..1fbd320 --- /dev/null +++ b/pancakeswap/router.go @@ -0,0 +1,20 @@ +package pancakeswap + +import ( + "git.lehouerou.net/laurent/evm" + "git.lehouerou.net/laurent/evm/pancakeswap/contracts" + "github.com/ethereum/go-ethereum/common" + "github.com/pkg/errors" +) + +const ( + RouterAddress = "0x10ED43C718714eb63d5aA57B78B54704E256024E" +) + +func NewRouter(client evm.Client) (*evm.UniswapRouter, error) { + contract, err := contracts.NewRouter(common.HexToAddress(RouterAddress), client) + if err != nil { + return nil, errors.Wrap(err, "init contract") + } + return evm.NewUniswapRouter("pancakeswap", client, contract), nil +} diff --git a/token.go b/token.go new file mode 100644 index 0000000..30c6f68 --- /dev/null +++ b/token.go @@ -0,0 +1,134 @@ +package evm + +import ( + "context" + "math/big" + + "git.lehouerou.net/laurent/evm/contracts" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/pkg/errors" + "github.com/shopspring/decimal" +) + +type Token interface { + Address() common.Address + Name() string + Symbol() string + Decimals() uint8 + TotalSupply() (decimal.Decimal, error) + BalanceOf(common.Address) (decimal.Decimal, error) + Balance() (decimal.Decimal, error) + Allowance(owner common.Address, spender common.Address) (decimal.Decimal, error) + Approve(ctx context.Context, spender common.Address, value decimal.Decimal) (Transaction, error) + Transfer(ctx context.Context, to common.Address, value decimal.Decimal) (Transaction, error) + + ValueToBigInt(value decimal.Decimal) *big.Int + ValueFromBigInt(value *big.Int) decimal.Decimal +} + +type baseToken struct { + client Client + contract *contracts.Token + + address common.Address + name string + symbol string + decimals uint8 +} + +func NewToken(client Client, address common.Address) (Token, error) { + contract, err := contracts.NewToken(address, client) + if err != nil { + return nil, errors.WithStack(err) + } + name, err := contract.Name(&bind.CallOpts{}) + if err != nil { + return nil, errors.WithStack(err) + } + symbol, err := contract.Symbol(&bind.CallOpts{}) + if err != nil { + return nil, errors.WithStack(err) + } + decimals, err := contract.Decimals(&bind.CallOpts{}) + if err != nil { + return nil, errors.WithStack(err) + } + return &baseToken{ + address: address, + name: name, + symbol: symbol, + decimals: decimals, + client: client, + contract: contract, + }, nil +} + +func (t *baseToken) TotalSupply() (decimal.Decimal, error) { + s, err := t.contract.TotalSupply(&bind.CallOpts{}) + if err != nil { + return decimal.Zero, errors.Wrap(err, "calling contract") + } + return t.ValueFromBigInt(s), nil +} + +func (t *baseToken) BalanceOf(address common.Address) (decimal.Decimal, error) { + b, err := t.contract.BalanceOf(&bind.CallOpts{}, address) + if err != nil { + return decimal.Zero, errors.Wrap(err, "getting balance from contract") + } + return t.ValueFromBigInt(b), nil +} + +func (t *baseToken) Allowance(owner common.Address, spender common.Address) (decimal.Decimal, error) { + a, err := t.contract.Allowance(&bind.CallOpts{}, owner, spender) + if err != nil { + return decimal.Zero, errors.Wrap(err, "calling contract") + } + return t.ValueFromBigInt(a), nil +} + +func (t *baseToken) Approve(ctx context.Context, spender common.Address, value decimal.Decimal) (Transaction, error) { + return t.client.Execute(ctx, func(ctx context.Context, options *TransactOpts) (*types.Transaction, error) { + return t.contract.Approve(options.TransactOpts, spender, t.ValueToBigInt(value)) + }) +} + +func (t *baseToken) Transfer(ctx context.Context, to common.Address, value decimal.Decimal) (Transaction, error) { + return t.client.Execute(ctx, func(ctx context.Context, options *TransactOpts) (*types.Transaction, error) { + return t.contract.Transfer(options.TransactOpts, to, t.ValueToBigInt(value)) + }) +} + +func (t *baseToken) Address() common.Address { + return t.address +} + +func (t *baseToken) Name() string { + return t.name +} + +func (t *baseToken) Symbol() string { + return t.symbol +} + +func (t *baseToken) Decimals() uint8 { + return t.decimals +} + +func (t *baseToken) DecimalsAsInt32() int32 { + return int32(t.decimals) +} + +func (t *baseToken) ValueFromBigInt(val *big.Int) decimal.Decimal { + return decimal.NewFromBigInt(val, -t.DecimalsAsInt32()) +} + +func (t *baseToken) ValueToBigInt(val decimal.Decimal) *big.Int { + return val.Shift(t.DecimalsAsInt32()).BigInt() +} + +func (t *baseToken) Balance() (decimal.Decimal, error) { + return t.BalanceOf(t.client.PublicAddress()) +} diff --git a/tokenmapper.go b/tokenmapper.go new file mode 100644 index 0000000..0e5489b --- /dev/null +++ b/tokenmapper.go @@ -0,0 +1,60 @@ +package evm + +import ( + "fmt" + "strings" + "sync" + + "github.com/ethereum/go-ethereum/common" + "github.com/pkg/errors" +) + +type TokenMapper interface { + AddToken(symbol string, address common.Address) + AddAlias(alias string, symbol string) + GetTokenAddress(symbol string) (common.Address, error) +} + +type tokenMapper struct { + aliases map[string]string + tokens map[string]common.Address + lock *sync.Mutex +} + +func NewTokenMapper() TokenMapper { + return &tokenMapper{ + aliases: make(map[string]string), + tokens: make(map[string]common.Address), + lock: &sync.Mutex{}, + } +} + +func (t *tokenMapper) AddToken(symbol string, address common.Address) { + t.lock.Lock() + defer t.lock.Unlock() + t.tokens[strings.ToUpper(symbol)] = address +} +func (t *tokenMapper) AddAlias(alias string, symbol string) { + t.lock.Lock() + defer t.lock.Unlock() + t.aliases[strings.ToUpper(alias)] = strings.ToUpper(symbol) +} + +func (t *tokenMapper) GetTokenAddress(symbol string) (common.Address, error) { + t.lock.Lock() + defer t.lock.Unlock() + symbol = strings.ToUpper(symbol) + lsymbol := symbol + if alias, ok := t.aliases[symbol]; ok { + lsymbol = alias + } + address, ok := t.tokens[lsymbol] + if !ok { + aliasmsg := "" + if lsymbol != symbol { + aliasmsg = fmt.Sprintf(" (alias of %s", symbol) + } + return common.Address{}, errors.Errorf("no address registered for symbol %s%s", lsymbol, aliasmsg) + } + return address, nil +} diff --git a/tokenservice.go b/tokenservice.go new file mode 100644 index 0000000..6bf0acc --- /dev/null +++ b/tokenservice.go @@ -0,0 +1,57 @@ +package evm + +import ( + "sync" + + "github.com/ethereum/go-ethereum/common" + "github.com/pkg/errors" +) + +type TokenService interface { + TokenBySymbol(symbol string) (Token, error) + TokenAddressBySymbol(symbol string) (common.Address, error) + TokenByAddress(address common.Address) (Token, error) +} + +type tokenService struct { + client Client + cache map[common.Address]Token + cachelock *sync.Mutex + tokenmapper TokenMapper +} + +func NewTokenService(client Client, tm TokenMapper) TokenService { + return &tokenService{ + client: client, + cache: make(map[common.Address]Token), + cachelock: &sync.Mutex{}, + tokenmapper: tm, + } +} + +func (s *tokenService) TokenBySymbol(symbol string) (Token, error) { + address, err := s.tokenmapper.GetTokenAddress(symbol) + if err != nil { + return nil, errors.Wrapf(err, "getting address for symbol %s", symbol) + } + return s.TokenByAddress(address) +} + +func (s *tokenService) TokenAddressBySymbol(symbol string) (common.Address, error) { + return s.tokenmapper.GetTokenAddress(symbol) +} + +func (s *tokenService) TokenByAddress(address common.Address) (Token, error) { + s.cachelock.Lock() + defer s.cachelock.Unlock() + if t, ok := s.cache[address]; ok { + return t, nil + } + t, err := NewToken(s.client, address) + if err != nil { + return nil, errors.Wrap(err, "getting token from blockchain") + } + s.cache[address] = t + return t, nil + +} diff --git a/transaction.go b/transaction.go new file mode 100644 index 0000000..8d2abe6 --- /dev/null +++ b/transaction.go @@ -0,0 +1,59 @@ +package evm + +import ( + "context" + "time" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/core/types" + "github.com/pkg/errors" + "github.com/rs/zerolog/log" +) + +type Transaction interface { + Wait() error +} + +type transaction struct { + *types.Transaction + ctx context.Context + client Client + pendingCheckPeriod time.Duration +} + +func NewTransaction(ctx context.Context, client Client, pendingCheckPeriod time.Duration, tx *types.Transaction) Transaction { + return &transaction{ + Transaction: tx, + ctx: ctx, + client: client, + pendingCheckPeriod: pendingCheckPeriod, + } +} + +func (t *transaction) Wait() error { + hash := t.Hash() + notfoundmax := 10 + notfoundcount := 0 + ticker := time.NewTicker(t.pendingCheckPeriod) + for { + select { + case <-t.ctx.Done(): + return errors.New("context canceled") + case <-ticker.C: + _, pending, err := t.client.TransactionByHash(t.ctx, hash) + if err != nil { + if err == ethereum.NotFound && notfoundcount < notfoundmax { + notfoundcount++ + log.Debug().Msgf("%d/%d - tx not found %s", notfoundcount, notfoundmax, hash) + continue + } + return errors.Wrapf(err, "retrieving transaction state for hash %s", hash) + } + if pending { + continue + } + log.Debug().Msg("//TX// tx done") + return nil + } + } +} diff --git a/transactionoptions.go b/transactionoptions.go new file mode 100644 index 0000000..e1135ef --- /dev/null +++ b/transactionoptions.go @@ -0,0 +1,39 @@ +package evm + +import ( + "context" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/shopspring/decimal" +) + +type TransactOpts struct { + *bind.TransactOpts +} + +func NewTransactOpts(ctx context.Context, client Client) (*TransactOpts, error) { + auth, err := client.NewTransactor() + if err != nil { + return nil, err + } + auth.Context = ctx + + return &TransactOpts{ + auth, + }, nil + +} + +func (o *TransactOpts) SetValue(value decimal.Decimal) *TransactOpts { + o.Value = value.Shift(18).BigInt() + return o +} + +func (o *TransactOpts) SetGasLimit(limit uint64) *TransactOpts { + o.GasLimit = limit + return o +} + +func (o *TransactOpts) SetGasPrice(gasprice decimal.Decimal) *TransactOpts { + o.GasPrice = gasprice.Shift(9).BigInt() + return o +} diff --git a/uniswaprouter.go b/uniswaprouter.go new file mode 100644 index 0000000..6623200 --- /dev/null +++ b/uniswaprouter.go @@ -0,0 +1,150 @@ +package evm + +import ( + "context" + "math/big" + "time" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/pkg/errors" + "github.com/rs/zerolog/log" + "github.com/shopspring/decimal" +) + +type UniswapRouterContract interface { + SwapExactTokensForTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error) + GetAmountsOut(opts *bind.CallOpts, amountIn *big.Int, path []common.Address) ([]*big.Int, error) + AddLiquidity(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) +} + +type UniswapRouter struct { + name string + client Client + contract UniswapRouterContract + + deadline time.Duration +} + +type UniswapRouterOption func(s *UniswapRouter) *UniswapRouter + +func (s *UniswapRouter) WithOperationDeadline(deadline time.Duration) UniswapRouterOption { + return func(s *UniswapRouter) *UniswapRouter { + s.deadline = deadline + return s + } +} + +func NewUniswapRouter(name string, client Client, contract UniswapRouterContract) *UniswapRouter { + return &UniswapRouter{ + name: name, + client: client, + contract: contract, + deadline: 15 * time.Minute, + } +} + +func (s *UniswapRouter) Name() string { + return s.name +} + +func (s *UniswapRouter) SwapTokenToToken(ctx context.Context, path []common.Address, amount decimal.Decimal, slippage decimal.Decimal) (Transaction, error) { + if len(path) < 2 { + return nil, errors.Errorf("swap path must contain at least 2 addresses, currently %d", len(path)) + } + + tokenInput, err := s.client.TokenService().TokenByAddress(path[0]) + if err != nil { + return nil, errors.WithStack(err) + } + + tokenOutput, err := s.client.TokenService().TokenByAddress(path[len(path)-1]) + if err != nil { + return nil, errors.WithStack(err) + } + + log.Debug().Msgf("[SWAP] swaping %s %s to %s with path %v", amount, tokenInput.Symbol(), tokenOutput.Symbol(), path) + + inputBalance, err := tokenInput.Balance() + if err != nil { + return nil, errors.Wrap(err, "getting from token balance") + } + + log.Debug().Msgf("[SWAP] balance of token to swap : %s", inputBalance) + if inputBalance.LessThan(amount) { + return nil, errors.Errorf("token balance %s is less than swap amount asked %s", inputBalance, amount) + } + + expectedout, err := s.contract.GetAmountsOut(&bind.CallOpts{}, tokenInput.ValueToBigInt(amount), path) + if err != nil { + return nil, errors.Wrap(err, "getting expected amount in target token") + } + decexp := tokenOutput.ValueFromBigInt(expectedout[len(expectedout)-1]) + expectedwithslippage := decexp.Sub(decexp.Mul(slippage).Div(decimal.NewFromInt(100))) + log.Debug().Msgf("[SWAP] expected amounts : %v", expectedout) + log.Debug().Msgf("[SWAP] expected ratio : %s", decexp.Div(amount)) + log.Debug().Msgf("[SWAP] expected out with slippage : %s (slippage %s%%)", expectedwithslippage, slippage) + log.Debug().Msgf("[SWAP] swaping...") + tx, err := s.client.Execute(ctx, func(ctx context.Context, options *TransactOpts) (*types.Transaction, error) { + return s.contract.SwapExactTokensForTokens( + options.TransactOpts, + tokenInput.ValueToBigInt(amount), + tokenOutput.ValueToBigInt(expectedwithslippage), + path, + s.client.PublicAddress(), + s.getDeadline()) + }) + if err != nil { + return nil, errors.Wrap(err, "swaping") + } + log.Debug().Msgf("[SWAP] swaping done") + + return tx, nil +} + +func (s *UniswapRouter) getDeadline() *big.Int { + return big.NewInt(time.Now().Add(s.deadline).Unix()) +} + +func (s *UniswapRouter) GetPriceInUSDC(token Token) (decimal.Decimal, error) { + return s.GetTokenQuoteInUSDC(token, decimal.NewFromInt(1)) +} + +func (s *UniswapRouter) GetTokenQuoteInUSDC(token Token, amount decimal.Decimal) (decimal.Decimal, error) { + usdc, err := s.client.TokenService().TokenBySymbol("USDC") + if err != nil { + return decimal.Zero, errors.Wrap(err, "getting usdc token") + } + return s.GetAmountRate(token, usdc, amount) +} + +func (s *UniswapRouter) GetRate(token0 Token, token1 Token) (decimal.Decimal, error) { + return s.GetAmountRate(token0, token1, decimal.NewFromInt(1)) +} + +func (s *UniswapRouter) GetAmountRate(token0 Token, token1 Token, amount decimal.Decimal) (decimal.Decimal, error) { + if amount.LessThanOrEqual(decimal.Zero) { + return decimal.Zero, nil + } + expectedout, err := s.contract.GetAmountsOut(&bind.CallOpts{}, token0.ValueToBigInt(amount), []common.Address{token0.Address(), token1.Address()}) + if err != nil { + return decimal.Zero, errors.Wrap(err, "getting expected amount in quote token") + } + return token1.ValueFromBigInt(expectedout[len(expectedout)-1]), nil +} + +func (s *UniswapRouter) AddLiquidity(ctx context.Context, token1 Token, token2 Token, amounttoken1 decimal.Decimal, amounttoken2 decimal.Decimal) (Transaction, error) { + return s.client.Execute(ctx, func(ctx context.Context, options *TransactOpts) (*types.Transaction, error) { + return s.contract.AddLiquidity( + options.TransactOpts, + token1.Address(), + token2.Address(), + token1.ValueToBigInt(amounttoken1), + token2.ValueToBigInt(amounttoken2), + token1.ValueToBigInt(amounttoken1.Sub(amounttoken1.Mul(decimal.NewFromFloat(0.01)))), + token2.ValueToBigInt(amounttoken2.Sub(amounttoken2.Mul(decimal.NewFromFloat(0.01)))), + s.client.PublicAddress(), + s.getDeadline()) + }) +}