mirror of
https://github.com/forta-network/go-multicall.git
synced 2026-02-26 07:37:23 +00:00
756 lines
35 KiB
Go
756 lines
35 KiB
Go
// Code generated - DO NOT EDIT.
|
|
// This file is a generated binding and any manual changes will be lost.
|
|
|
|
package contract_multicall
|
|
|
|
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
|
|
_ = abi.ConvertType
|
|
)
|
|
|
|
// Multicall3Call is an auto generated low-level Go binding around an user-defined struct.
|
|
type Multicall3Call struct {
|
|
Target common.Address
|
|
CallData []byte
|
|
}
|
|
|
|
// Multicall3Call3 is an auto generated low-level Go binding around an user-defined struct.
|
|
type Multicall3Call3 struct {
|
|
Target common.Address
|
|
AllowFailure bool
|
|
CallData []byte
|
|
}
|
|
|
|
// Multicall3Call3Value is an auto generated low-level Go binding around an user-defined struct.
|
|
type Multicall3Call3Value struct {
|
|
Target common.Address
|
|
AllowFailure bool
|
|
Value *big.Int
|
|
CallData []byte
|
|
}
|
|
|
|
// Multicall3Result is an auto generated low-level Go binding around an user-defined struct.
|
|
type Multicall3Result struct {
|
|
Success bool
|
|
ReturnData []byte
|
|
}
|
|
|
|
// MulticallMetaData contains all meta data concerning the Multicall contract.
|
|
var MulticallMetaData = &bind.MetaData{
|
|
ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall3.Call[]\",\"name\":\"calls\",\"type\":\"tuple[]\"}],\"name\":\"aggregate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"returnData\",\"type\":\"bytes[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowFailure\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall3.Call3[]\",\"name\":\"calls\",\"type\":\"tuple[]\"}],\"name\":\"aggregate3\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall3.Result[]\",\"name\":\"returnData\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowFailure\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall3.Call3Value[]\",\"name\":\"calls\",\"type\":\"tuple[]\"}],\"name\":\"aggregate3Value\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall3.Result[]\",\"name\":\"returnData\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall3.Call[]\",\"name\":\"calls\",\"type\":\"tuple[]\"}],\"name\":\"blockAndAggregate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall3.Result[]\",\"name\":\"returnData\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBasefee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"basefee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"chainid\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentBlockCoinbase\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentBlockDifficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentBlockGasLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"gaslimit\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentBlockTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getEthBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"requireSuccess\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall3.Call[]\",\"name\":\"calls\",\"type\":\"tuple[]\"}],\"name\":\"tryAggregate\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall3.Result[]\",\"name\":\"returnData\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"requireSuccess\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall3.Call[]\",\"name\":\"calls\",\"type\":\"tuple[]\"}],\"name\":\"tryBlockAndAggregate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall3.Result[]\",\"name\":\"returnData\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
|
|
}
|
|
|
|
// MulticallABI is the input ABI used to generate the binding from.
|
|
// Deprecated: Use MulticallMetaData.ABI instead.
|
|
var MulticallABI = MulticallMetaData.ABI
|
|
|
|
// Multicall is an auto generated Go binding around an Ethereum contract.
|
|
type Multicall struct {
|
|
MulticallCaller // Read-only binding to the contract
|
|
MulticallTransactor // Write-only binding to the contract
|
|
MulticallFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// MulticallCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type MulticallCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// MulticallTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type MulticallTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// MulticallFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type MulticallFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// MulticallSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type MulticallSession struct {
|
|
Contract *Multicall // 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
|
|
}
|
|
|
|
// MulticallCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type MulticallCallerSession struct {
|
|
Contract *MulticallCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// MulticallTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type MulticallTransactorSession struct {
|
|
Contract *MulticallTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// MulticallRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type MulticallRaw struct {
|
|
Contract *Multicall // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// MulticallCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type MulticallCallerRaw struct {
|
|
Contract *MulticallCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// MulticallTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type MulticallTransactorRaw struct {
|
|
Contract *MulticallTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewMulticall creates a new instance of Multicall, bound to a specific deployed contract.
|
|
func NewMulticall(address common.Address, backend bind.ContractBackend) (*Multicall, error) {
|
|
contract, err := bindMulticall(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &Multicall{MulticallCaller: MulticallCaller{contract: contract}, MulticallTransactor: MulticallTransactor{contract: contract}, MulticallFilterer: MulticallFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewMulticallCaller creates a new read-only instance of Multicall, bound to a specific deployed contract.
|
|
func NewMulticallCaller(address common.Address, caller bind.ContractCaller) (*MulticallCaller, error) {
|
|
contract, err := bindMulticall(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &MulticallCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewMulticallTransactor creates a new write-only instance of Multicall, bound to a specific deployed contract.
|
|
func NewMulticallTransactor(address common.Address, transactor bind.ContractTransactor) (*MulticallTransactor, error) {
|
|
contract, err := bindMulticall(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &MulticallTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewMulticallFilterer creates a new log filterer instance of Multicall, bound to a specific deployed contract.
|
|
func NewMulticallFilterer(address common.Address, filterer bind.ContractFilterer) (*MulticallFilterer, error) {
|
|
contract, err := bindMulticall(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &MulticallFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindMulticall binds a generic wrapper to an already deployed contract.
|
|
func bindMulticall(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := MulticallMetaData.GetAbi()
|
|
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 (_Multicall *MulticallRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _Multicall.Contract.MulticallCaller.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 (_Multicall *MulticallRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _Multicall.Contract.MulticallTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_Multicall *MulticallRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _Multicall.Contract.MulticallTransactor.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 (_Multicall *MulticallCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _Multicall.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 (_Multicall *MulticallTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _Multicall.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_Multicall *MulticallTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _Multicall.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// Aggregate is a free data retrieval call binding the contract method 0x252dba42.
|
|
//
|
|
// Solidity: function aggregate((address,bytes)[] calls) view returns(uint256 blockNumber, bytes[] returnData)
|
|
func (_Multicall *MulticallCaller) Aggregate(opts *bind.CallOpts, calls []Multicall3Call) (struct {
|
|
BlockNumber *big.Int
|
|
ReturnData [][]byte
|
|
}, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "aggregate", calls)
|
|
|
|
outstruct := new(struct {
|
|
BlockNumber *big.Int
|
|
ReturnData [][]byte
|
|
})
|
|
if err != nil {
|
|
return *outstruct, err
|
|
}
|
|
|
|
outstruct.BlockNumber = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
outstruct.ReturnData = *abi.ConvertType(out[1], new([][]byte)).(*[][]byte)
|
|
|
|
return *outstruct, err
|
|
|
|
}
|
|
|
|
// Aggregate is a free data retrieval call binding the contract method 0x252dba42.
|
|
//
|
|
// Solidity: function aggregate((address,bytes)[] calls) view returns(uint256 blockNumber, bytes[] returnData)
|
|
func (_Multicall *MulticallSession) Aggregate(calls []Multicall3Call) (struct {
|
|
BlockNumber *big.Int
|
|
ReturnData [][]byte
|
|
}, error) {
|
|
return _Multicall.Contract.Aggregate(&_Multicall.CallOpts, calls)
|
|
}
|
|
|
|
// Aggregate is a free data retrieval call binding the contract method 0x252dba42.
|
|
//
|
|
// Solidity: function aggregate((address,bytes)[] calls) view returns(uint256 blockNumber, bytes[] returnData)
|
|
func (_Multicall *MulticallCallerSession) Aggregate(calls []Multicall3Call) (struct {
|
|
BlockNumber *big.Int
|
|
ReturnData [][]byte
|
|
}, error) {
|
|
return _Multicall.Contract.Aggregate(&_Multicall.CallOpts, calls)
|
|
}
|
|
|
|
// Aggregate3 is a free data retrieval call binding the contract method 0x82ad56cb.
|
|
//
|
|
// Solidity: function aggregate3((address,bool,bytes)[] calls) view returns((bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallCaller) Aggregate3(opts *bind.CallOpts, calls []Multicall3Call3) ([]Multicall3Result, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "aggregate3", calls)
|
|
|
|
if err != nil {
|
|
return *new([]Multicall3Result), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new([]Multicall3Result)).(*[]Multicall3Result)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// Aggregate3 is a free data retrieval call binding the contract method 0x82ad56cb.
|
|
//
|
|
// Solidity: function aggregate3((address,bool,bytes)[] calls) view returns((bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallSession) Aggregate3(calls []Multicall3Call3) ([]Multicall3Result, error) {
|
|
return _Multicall.Contract.Aggregate3(&_Multicall.CallOpts, calls)
|
|
}
|
|
|
|
// Aggregate3 is a free data retrieval call binding the contract method 0x82ad56cb.
|
|
//
|
|
// Solidity: function aggregate3((address,bool,bytes)[] calls) view returns((bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallCallerSession) Aggregate3(calls []Multicall3Call3) ([]Multicall3Result, error) {
|
|
return _Multicall.Contract.Aggregate3(&_Multicall.CallOpts, calls)
|
|
}
|
|
|
|
// Aggregate3Value is a free data retrieval call binding the contract method 0x174dea71.
|
|
//
|
|
// Solidity: function aggregate3Value((address,bool,uint256,bytes)[] calls) view returns((bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallCaller) Aggregate3Value(opts *bind.CallOpts, calls []Multicall3Call3Value) ([]Multicall3Result, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "aggregate3Value", calls)
|
|
|
|
if err != nil {
|
|
return *new([]Multicall3Result), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new([]Multicall3Result)).(*[]Multicall3Result)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// Aggregate3Value is a free data retrieval call binding the contract method 0x174dea71.
|
|
//
|
|
// Solidity: function aggregate3Value((address,bool,uint256,bytes)[] calls) view returns((bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallSession) Aggregate3Value(calls []Multicall3Call3Value) ([]Multicall3Result, error) {
|
|
return _Multicall.Contract.Aggregate3Value(&_Multicall.CallOpts, calls)
|
|
}
|
|
|
|
// Aggregate3Value is a free data retrieval call binding the contract method 0x174dea71.
|
|
//
|
|
// Solidity: function aggregate3Value((address,bool,uint256,bytes)[] calls) view returns((bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallCallerSession) Aggregate3Value(calls []Multicall3Call3Value) ([]Multicall3Result, error) {
|
|
return _Multicall.Contract.Aggregate3Value(&_Multicall.CallOpts, calls)
|
|
}
|
|
|
|
// BlockAndAggregate is a free data retrieval call binding the contract method 0xc3077fa9.
|
|
//
|
|
// Solidity: function blockAndAggregate((address,bytes)[] calls) view returns(uint256 blockNumber, bytes32 blockHash, (bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallCaller) BlockAndAggregate(opts *bind.CallOpts, calls []Multicall3Call) (struct {
|
|
BlockNumber *big.Int
|
|
BlockHash [32]byte
|
|
ReturnData []Multicall3Result
|
|
}, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "blockAndAggregate", calls)
|
|
|
|
outstruct := new(struct {
|
|
BlockNumber *big.Int
|
|
BlockHash [32]byte
|
|
ReturnData []Multicall3Result
|
|
})
|
|
if err != nil {
|
|
return *outstruct, err
|
|
}
|
|
|
|
outstruct.BlockNumber = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
outstruct.BlockHash = *abi.ConvertType(out[1], new([32]byte)).(*[32]byte)
|
|
outstruct.ReturnData = *abi.ConvertType(out[2], new([]Multicall3Result)).(*[]Multicall3Result)
|
|
|
|
return *outstruct, err
|
|
|
|
}
|
|
|
|
// BlockAndAggregate is a free data retrieval call binding the contract method 0xc3077fa9.
|
|
//
|
|
// Solidity: function blockAndAggregate((address,bytes)[] calls) view returns(uint256 blockNumber, bytes32 blockHash, (bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallSession) BlockAndAggregate(calls []Multicall3Call) (struct {
|
|
BlockNumber *big.Int
|
|
BlockHash [32]byte
|
|
ReturnData []Multicall3Result
|
|
}, error) {
|
|
return _Multicall.Contract.BlockAndAggregate(&_Multicall.CallOpts, calls)
|
|
}
|
|
|
|
// BlockAndAggregate is a free data retrieval call binding the contract method 0xc3077fa9.
|
|
//
|
|
// Solidity: function blockAndAggregate((address,bytes)[] calls) view returns(uint256 blockNumber, bytes32 blockHash, (bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallCallerSession) BlockAndAggregate(calls []Multicall3Call) (struct {
|
|
BlockNumber *big.Int
|
|
BlockHash [32]byte
|
|
ReturnData []Multicall3Result
|
|
}, error) {
|
|
return _Multicall.Contract.BlockAndAggregate(&_Multicall.CallOpts, calls)
|
|
}
|
|
|
|
// GetBasefee is a free data retrieval call binding the contract method 0x3e64a696.
|
|
//
|
|
// Solidity: function getBasefee() view returns(uint256 basefee)
|
|
func (_Multicall *MulticallCaller) GetBasefee(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "getBasefee")
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// GetBasefee is a free data retrieval call binding the contract method 0x3e64a696.
|
|
//
|
|
// Solidity: function getBasefee() view returns(uint256 basefee)
|
|
func (_Multicall *MulticallSession) GetBasefee() (*big.Int, error) {
|
|
return _Multicall.Contract.GetBasefee(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetBasefee is a free data retrieval call binding the contract method 0x3e64a696.
|
|
//
|
|
// Solidity: function getBasefee() view returns(uint256 basefee)
|
|
func (_Multicall *MulticallCallerSession) GetBasefee() (*big.Int, error) {
|
|
return _Multicall.Contract.GetBasefee(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetBlockHash is a free data retrieval call binding the contract method 0xee82ac5e.
|
|
//
|
|
// Solidity: function getBlockHash(uint256 blockNumber) view returns(bytes32 blockHash)
|
|
func (_Multicall *MulticallCaller) GetBlockHash(opts *bind.CallOpts, blockNumber *big.Int) ([32]byte, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "getBlockHash", blockNumber)
|
|
|
|
if err != nil {
|
|
return *new([32]byte), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// GetBlockHash is a free data retrieval call binding the contract method 0xee82ac5e.
|
|
//
|
|
// Solidity: function getBlockHash(uint256 blockNumber) view returns(bytes32 blockHash)
|
|
func (_Multicall *MulticallSession) GetBlockHash(blockNumber *big.Int) ([32]byte, error) {
|
|
return _Multicall.Contract.GetBlockHash(&_Multicall.CallOpts, blockNumber)
|
|
}
|
|
|
|
// GetBlockHash is a free data retrieval call binding the contract method 0xee82ac5e.
|
|
//
|
|
// Solidity: function getBlockHash(uint256 blockNumber) view returns(bytes32 blockHash)
|
|
func (_Multicall *MulticallCallerSession) GetBlockHash(blockNumber *big.Int) ([32]byte, error) {
|
|
return _Multicall.Contract.GetBlockHash(&_Multicall.CallOpts, blockNumber)
|
|
}
|
|
|
|
// GetBlockNumber is a free data retrieval call binding the contract method 0x42cbb15c.
|
|
//
|
|
// Solidity: function getBlockNumber() view returns(uint256 blockNumber)
|
|
func (_Multicall *MulticallCaller) GetBlockNumber(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "getBlockNumber")
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// GetBlockNumber is a free data retrieval call binding the contract method 0x42cbb15c.
|
|
//
|
|
// Solidity: function getBlockNumber() view returns(uint256 blockNumber)
|
|
func (_Multicall *MulticallSession) GetBlockNumber() (*big.Int, error) {
|
|
return _Multicall.Contract.GetBlockNumber(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetBlockNumber is a free data retrieval call binding the contract method 0x42cbb15c.
|
|
//
|
|
// Solidity: function getBlockNumber() view returns(uint256 blockNumber)
|
|
func (_Multicall *MulticallCallerSession) GetBlockNumber() (*big.Int, error) {
|
|
return _Multicall.Contract.GetBlockNumber(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetChainId is a free data retrieval call binding the contract method 0x3408e470.
|
|
//
|
|
// Solidity: function getChainId() view returns(uint256 chainid)
|
|
func (_Multicall *MulticallCaller) GetChainId(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "getChainId")
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// GetChainId is a free data retrieval call binding the contract method 0x3408e470.
|
|
//
|
|
// Solidity: function getChainId() view returns(uint256 chainid)
|
|
func (_Multicall *MulticallSession) GetChainId() (*big.Int, error) {
|
|
return _Multicall.Contract.GetChainId(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetChainId is a free data retrieval call binding the contract method 0x3408e470.
|
|
//
|
|
// Solidity: function getChainId() view returns(uint256 chainid)
|
|
func (_Multicall *MulticallCallerSession) GetChainId() (*big.Int, error) {
|
|
return _Multicall.Contract.GetChainId(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetCurrentBlockCoinbase is a free data retrieval call binding the contract method 0xa8b0574e.
|
|
//
|
|
// Solidity: function getCurrentBlockCoinbase() view returns(address coinbase)
|
|
func (_Multicall *MulticallCaller) GetCurrentBlockCoinbase(opts *bind.CallOpts) (common.Address, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "getCurrentBlockCoinbase")
|
|
|
|
if err != nil {
|
|
return *new(common.Address), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// GetCurrentBlockCoinbase is a free data retrieval call binding the contract method 0xa8b0574e.
|
|
//
|
|
// Solidity: function getCurrentBlockCoinbase() view returns(address coinbase)
|
|
func (_Multicall *MulticallSession) GetCurrentBlockCoinbase() (common.Address, error) {
|
|
return _Multicall.Contract.GetCurrentBlockCoinbase(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetCurrentBlockCoinbase is a free data retrieval call binding the contract method 0xa8b0574e.
|
|
//
|
|
// Solidity: function getCurrentBlockCoinbase() view returns(address coinbase)
|
|
func (_Multicall *MulticallCallerSession) GetCurrentBlockCoinbase() (common.Address, error) {
|
|
return _Multicall.Contract.GetCurrentBlockCoinbase(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetCurrentBlockDifficulty is a free data retrieval call binding the contract method 0x72425d9d.
|
|
//
|
|
// Solidity: function getCurrentBlockDifficulty() view returns(uint256 difficulty)
|
|
func (_Multicall *MulticallCaller) GetCurrentBlockDifficulty(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "getCurrentBlockDifficulty")
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// GetCurrentBlockDifficulty is a free data retrieval call binding the contract method 0x72425d9d.
|
|
//
|
|
// Solidity: function getCurrentBlockDifficulty() view returns(uint256 difficulty)
|
|
func (_Multicall *MulticallSession) GetCurrentBlockDifficulty() (*big.Int, error) {
|
|
return _Multicall.Contract.GetCurrentBlockDifficulty(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetCurrentBlockDifficulty is a free data retrieval call binding the contract method 0x72425d9d.
|
|
//
|
|
// Solidity: function getCurrentBlockDifficulty() view returns(uint256 difficulty)
|
|
func (_Multicall *MulticallCallerSession) GetCurrentBlockDifficulty() (*big.Int, error) {
|
|
return _Multicall.Contract.GetCurrentBlockDifficulty(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetCurrentBlockGasLimit is a free data retrieval call binding the contract method 0x86d516e8.
|
|
//
|
|
// Solidity: function getCurrentBlockGasLimit() view returns(uint256 gaslimit)
|
|
func (_Multicall *MulticallCaller) GetCurrentBlockGasLimit(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "getCurrentBlockGasLimit")
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// GetCurrentBlockGasLimit is a free data retrieval call binding the contract method 0x86d516e8.
|
|
//
|
|
// Solidity: function getCurrentBlockGasLimit() view returns(uint256 gaslimit)
|
|
func (_Multicall *MulticallSession) GetCurrentBlockGasLimit() (*big.Int, error) {
|
|
return _Multicall.Contract.GetCurrentBlockGasLimit(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetCurrentBlockGasLimit is a free data retrieval call binding the contract method 0x86d516e8.
|
|
//
|
|
// Solidity: function getCurrentBlockGasLimit() view returns(uint256 gaslimit)
|
|
func (_Multicall *MulticallCallerSession) GetCurrentBlockGasLimit() (*big.Int, error) {
|
|
return _Multicall.Contract.GetCurrentBlockGasLimit(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetCurrentBlockTimestamp is a free data retrieval call binding the contract method 0x0f28c97d.
|
|
//
|
|
// Solidity: function getCurrentBlockTimestamp() view returns(uint256 timestamp)
|
|
func (_Multicall *MulticallCaller) GetCurrentBlockTimestamp(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "getCurrentBlockTimestamp")
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// GetCurrentBlockTimestamp is a free data retrieval call binding the contract method 0x0f28c97d.
|
|
//
|
|
// Solidity: function getCurrentBlockTimestamp() view returns(uint256 timestamp)
|
|
func (_Multicall *MulticallSession) GetCurrentBlockTimestamp() (*big.Int, error) {
|
|
return _Multicall.Contract.GetCurrentBlockTimestamp(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetCurrentBlockTimestamp is a free data retrieval call binding the contract method 0x0f28c97d.
|
|
//
|
|
// Solidity: function getCurrentBlockTimestamp() view returns(uint256 timestamp)
|
|
func (_Multicall *MulticallCallerSession) GetCurrentBlockTimestamp() (*big.Int, error) {
|
|
return _Multicall.Contract.GetCurrentBlockTimestamp(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetEthBalance is a free data retrieval call binding the contract method 0x4d2301cc.
|
|
//
|
|
// Solidity: function getEthBalance(address addr) view returns(uint256 balance)
|
|
func (_Multicall *MulticallCaller) GetEthBalance(opts *bind.CallOpts, addr common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "getEthBalance", addr)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// GetEthBalance is a free data retrieval call binding the contract method 0x4d2301cc.
|
|
//
|
|
// Solidity: function getEthBalance(address addr) view returns(uint256 balance)
|
|
func (_Multicall *MulticallSession) GetEthBalance(addr common.Address) (*big.Int, error) {
|
|
return _Multicall.Contract.GetEthBalance(&_Multicall.CallOpts, addr)
|
|
}
|
|
|
|
// GetEthBalance is a free data retrieval call binding the contract method 0x4d2301cc.
|
|
//
|
|
// Solidity: function getEthBalance(address addr) view returns(uint256 balance)
|
|
func (_Multicall *MulticallCallerSession) GetEthBalance(addr common.Address) (*big.Int, error) {
|
|
return _Multicall.Contract.GetEthBalance(&_Multicall.CallOpts, addr)
|
|
}
|
|
|
|
// GetLastBlockHash is a free data retrieval call binding the contract method 0x27e86d6e.
|
|
//
|
|
// Solidity: function getLastBlockHash() view returns(bytes32 blockHash)
|
|
func (_Multicall *MulticallCaller) GetLastBlockHash(opts *bind.CallOpts) ([32]byte, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "getLastBlockHash")
|
|
|
|
if err != nil {
|
|
return *new([32]byte), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// GetLastBlockHash is a free data retrieval call binding the contract method 0x27e86d6e.
|
|
//
|
|
// Solidity: function getLastBlockHash() view returns(bytes32 blockHash)
|
|
func (_Multicall *MulticallSession) GetLastBlockHash() ([32]byte, error) {
|
|
return _Multicall.Contract.GetLastBlockHash(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// GetLastBlockHash is a free data retrieval call binding the contract method 0x27e86d6e.
|
|
//
|
|
// Solidity: function getLastBlockHash() view returns(bytes32 blockHash)
|
|
func (_Multicall *MulticallCallerSession) GetLastBlockHash() ([32]byte, error) {
|
|
return _Multicall.Contract.GetLastBlockHash(&_Multicall.CallOpts)
|
|
}
|
|
|
|
// TryAggregate is a free data retrieval call binding the contract method 0xbce38bd7.
|
|
//
|
|
// Solidity: function tryAggregate(bool requireSuccess, (address,bytes)[] calls) view returns((bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallCaller) TryAggregate(opts *bind.CallOpts, requireSuccess bool, calls []Multicall3Call) ([]Multicall3Result, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "tryAggregate", requireSuccess, calls)
|
|
|
|
if err != nil {
|
|
return *new([]Multicall3Result), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new([]Multicall3Result)).(*[]Multicall3Result)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TryAggregate is a free data retrieval call binding the contract method 0xbce38bd7.
|
|
//
|
|
// Solidity: function tryAggregate(bool requireSuccess, (address,bytes)[] calls) view returns((bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallSession) TryAggregate(requireSuccess bool, calls []Multicall3Call) ([]Multicall3Result, error) {
|
|
return _Multicall.Contract.TryAggregate(&_Multicall.CallOpts, requireSuccess, calls)
|
|
}
|
|
|
|
// TryAggregate is a free data retrieval call binding the contract method 0xbce38bd7.
|
|
//
|
|
// Solidity: function tryAggregate(bool requireSuccess, (address,bytes)[] calls) view returns((bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallCallerSession) TryAggregate(requireSuccess bool, calls []Multicall3Call) ([]Multicall3Result, error) {
|
|
return _Multicall.Contract.TryAggregate(&_Multicall.CallOpts, requireSuccess, calls)
|
|
}
|
|
|
|
// TryBlockAndAggregate is a free data retrieval call binding the contract method 0x399542e9.
|
|
//
|
|
// Solidity: function tryBlockAndAggregate(bool requireSuccess, (address,bytes)[] calls) view returns(uint256 blockNumber, bytes32 blockHash, (bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallCaller) TryBlockAndAggregate(opts *bind.CallOpts, requireSuccess bool, calls []Multicall3Call) (struct {
|
|
BlockNumber *big.Int
|
|
BlockHash [32]byte
|
|
ReturnData []Multicall3Result
|
|
}, error) {
|
|
var out []interface{}
|
|
err := _Multicall.contract.Call(opts, &out, "tryBlockAndAggregate", requireSuccess, calls)
|
|
|
|
outstruct := new(struct {
|
|
BlockNumber *big.Int
|
|
BlockHash [32]byte
|
|
ReturnData []Multicall3Result
|
|
})
|
|
if err != nil {
|
|
return *outstruct, err
|
|
}
|
|
|
|
outstruct.BlockNumber = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
outstruct.BlockHash = *abi.ConvertType(out[1], new([32]byte)).(*[32]byte)
|
|
outstruct.ReturnData = *abi.ConvertType(out[2], new([]Multicall3Result)).(*[]Multicall3Result)
|
|
|
|
return *outstruct, err
|
|
|
|
}
|
|
|
|
// TryBlockAndAggregate is a free data retrieval call binding the contract method 0x399542e9.
|
|
//
|
|
// Solidity: function tryBlockAndAggregate(bool requireSuccess, (address,bytes)[] calls) view returns(uint256 blockNumber, bytes32 blockHash, (bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallSession) TryBlockAndAggregate(requireSuccess bool, calls []Multicall3Call) (struct {
|
|
BlockNumber *big.Int
|
|
BlockHash [32]byte
|
|
ReturnData []Multicall3Result
|
|
}, error) {
|
|
return _Multicall.Contract.TryBlockAndAggregate(&_Multicall.CallOpts, requireSuccess, calls)
|
|
}
|
|
|
|
// TryBlockAndAggregate is a free data retrieval call binding the contract method 0x399542e9.
|
|
//
|
|
// Solidity: function tryBlockAndAggregate(bool requireSuccess, (address,bytes)[] calls) view returns(uint256 blockNumber, bytes32 blockHash, (bool,bytes)[] returnData)
|
|
func (_Multicall *MulticallCallerSession) TryBlockAndAggregate(requireSuccess bool, calls []Multicall3Call) (struct {
|
|
BlockNumber *big.Int
|
|
BlockHash [32]byte
|
|
ReturnData []Multicall3Result
|
|
}, error) {
|
|
return _Multicall.Contract.TryBlockAndAggregate(&_Multicall.CallOpts, requireSuccess, calls)
|
|
}
|