contract

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ERC20ABI = ERC20MetaData.ABI

ERC20ABI is the input ABI used to generate the binding from. Deprecated: Use ERC20MetaData.ABI instead.

View Source
var ERC20MetaData = &bind.MetaData{
	ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"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\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"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\":\"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\":\"pure\",\"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\"}]",
}

ERC20MetaData contains all meta data concerning the ERC20 contract.

View Source
var FreeMulticall2ABI = FreeMulticall2MetaData.ABI

FreeMulticall2ABI is the input ABI used to generate the binding from. Deprecated: Use FreeMulticall2MetaData.ABI instead.

View Source
var FreeMulticall2MetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall2.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\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall2.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\":\"structMulticall2.Result[]\",\"name\":\"returnData\",\"type\":\"tuple[]\"}],\"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\":\"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\":\"structMulticall2.Call[]\",\"name\":\"calls\",\"type\":\"tuple[]\"}],\"name\":\"tryAggregate\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"internalType\":\"structMulticall2.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\":\"structMulticall2.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\":\"structMulticall2.Result[]\",\"name\":\"returnData\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
}

FreeMulticall2MetaData contains all meta data concerning the FreeMulticall2 contract.

View Source
var PriceOracleABI = PriceOracleMetaData.ABI

PriceOracleABI is the input ABI used to generate the binding from. Deprecated: Use PriceOracleMetaData.ABI instead.

View Source
var PriceOracleMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"amm\",\"type\":\"address\"}],\"name\":\"getIndexPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"amm\",\"type\":\"address\"}],\"name\":\"getMarkPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isIndexPrice\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"amm\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"beta\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"quoteAmount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"negative\",\"type\":\"bool\"}],\"name\":\"getMarkPriceAcc\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"amm\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quoteAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"}],\"name\":\"getMarkPriceAfterSwap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isIndexPrice\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"amm\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quoteAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"}],\"name\":\"getMarkPriceInRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"resultBaseAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultQuoteAmount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isIndexPrice\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"amm\",\"type\":\"address\"}],\"name\":\"getMarketPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"baseToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"quoteToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"}],\"name\":\"quote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"quoteAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"source\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"amm\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"}],\"name\":\"quoteFromAmmTwap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"quoteAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"amm\",\"type\":\"address\"}],\"name\":\"setupTwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"}],\"name\":\"updateAmmTwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}

PriceOracleMetaData contains all meta data concerning the PriceOracle contract.

Functions

This section is empty.

Types

type ERC20

type ERC20 struct {
	ERC20Caller     // Read-only binding to the contract
	ERC20Transactor // Write-only binding to the contract
	ERC20Filterer   // Log filterer for contract events
}

ERC20 is an auto generated Go binding around an Ethereum contract.

func NewERC20

func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error)

NewERC20 creates a new instance of ERC20, bound to a specific deployed contract.

type ERC20Approval

type ERC20Approval struct {
	Owner   common.Address
	Spender common.Address
	Value   *big.Int
	Raw     types.Log // Blockchain specific contextual infos
}

ERC20Approval represents a Approval event raised by the ERC20 contract.

type ERC20ApprovalIterator

type ERC20ApprovalIterator struct {
	Event *ERC20Approval // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract.

func (*ERC20ApprovalIterator) Close

func (it *ERC20ApprovalIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*ERC20ApprovalIterator) Error

func (it *ERC20ApprovalIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*ERC20ApprovalIterator) Next

func (it *ERC20ApprovalIterator) Next() bool

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.

type ERC20Caller

type ERC20Caller struct {
	// contains filtered or unexported fields
}

ERC20Caller is an auto generated read-only Go binding around an Ethereum contract.

func NewERC20Caller

func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error)

NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract.

func (*ERC20Caller) Allowance

func (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(address owner, address spender) view returns(uint256)

func (*ERC20Caller) BalanceOf

func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address owner) view returns(uint256)

func (*ERC20Caller) Decimals

func (_ERC20 *ERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() pure returns(uint8)

func (*ERC20Caller) Name

func (_ERC20 *ERC20Caller) Name(opts *bind.CallOpts) (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() view returns(string)

func (*ERC20Caller) Symbol

func (_ERC20 *ERC20Caller) Symbol(opts *bind.CallOpts) (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() view returns(string)

func (*ERC20Caller) TotalSupply

func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() view returns(uint256)

type ERC20CallerRaw

type ERC20CallerRaw struct {
	Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on
}

ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*ERC20CallerRaw) Call

func (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

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.

type ERC20CallerSession

type ERC20CallerSession struct {
	Contract *ERC20Caller  // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts // Call options to use throughout this session
}

ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*ERC20CallerSession) Allowance

func (_ERC20 *ERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(address owner, address spender) view returns(uint256)

func (*ERC20CallerSession) BalanceOf

func (_ERC20 *ERC20CallerSession) BalanceOf(owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address owner) view returns(uint256)

func (*ERC20CallerSession) Decimals

func (_ERC20 *ERC20CallerSession) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() pure returns(uint8)

func (*ERC20CallerSession) Name

func (_ERC20 *ERC20CallerSession) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() view returns(string)

func (*ERC20CallerSession) Symbol

func (_ERC20 *ERC20CallerSession) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() view returns(string)

func (*ERC20CallerSession) TotalSupply

func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() view returns(uint256)

type ERC20Filterer

type ERC20Filterer struct {
	// contains filtered or unexported fields
}

ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewERC20Filterer

func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error)

NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract.

func (*ERC20Filterer) FilterApproval

func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, error)

FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)

func (*ERC20Filterer) FilterTransfer

func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TransferIterator, error)

FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed from, address indexed to, uint256 value)

func (*ERC20Filterer) ParseApproval

func (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error)

ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)

func (*ERC20Filterer) ParseTransfer

func (_ERC20 *ERC20Filterer) ParseTransfer(log types.Log) (*ERC20Transfer, error)

ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed from, address indexed to, uint256 value)

func (*ERC20Filterer) WatchApproval

func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error)

WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)

func (*ERC20Filterer) WatchTransfer

func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error)

WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed from, address indexed to, uint256 value)

type ERC20Raw

type ERC20Raw struct {
	Contract *ERC20 // Generic contract binding to access the raw methods on
}

ERC20Raw is an auto generated low-level Go binding around an Ethereum contract.

func (*ERC20Raw) Call

func (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

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 (*ERC20Raw) Transact

func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*ERC20Raw) Transfer

func (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type ERC20Session

type ERC20Session struct {
	Contract     *ERC20            // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

ERC20Session is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*ERC20Session) Allowance

func (_ERC20 *ERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(address owner, address spender) view returns(uint256)

func (*ERC20Session) Approve

func (_ERC20 *ERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(address spender, uint256 value) returns(bool)

func (*ERC20Session) BalanceOf

func (_ERC20 *ERC20Session) BalanceOf(owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address owner) view returns(uint256)

func (*ERC20Session) Decimals

func (_ERC20 *ERC20Session) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() pure returns(uint8)

func (*ERC20Session) Name

func (_ERC20 *ERC20Session) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() view returns(string)

func (*ERC20Session) Symbol

func (_ERC20 *ERC20Session) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() view returns(string)

func (*ERC20Session) TotalSupply

func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() view returns(uint256)

func (*ERC20Session) Transfer

func (_ERC20 *ERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(address to, uint256 value) returns(bool)

func (*ERC20Session) TransferFrom

func (_ERC20 *ERC20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(address from, address to, uint256 value) returns(bool)

type ERC20Transactor

type ERC20Transactor struct {
	// contains filtered or unexported fields
}

ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract.

func NewERC20Transactor

func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error)

NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract.

func (*ERC20Transactor) Approve

func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(address spender, uint256 value) returns(bool)

func (*ERC20Transactor) Transfer

func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(address to, uint256 value) returns(bool)

func (*ERC20Transactor) TransferFrom

func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(address from, address to, uint256 value) returns(bool)

type ERC20TransactorRaw

type ERC20TransactorRaw struct {
	Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on
}

ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*ERC20TransactorRaw) Transact

func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*ERC20TransactorRaw) Transfer

func (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type ERC20TransactorSession

type ERC20TransactorSession struct {
	Contract     *ERC20Transactor  // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*ERC20TransactorSession) Approve

func (_ERC20 *ERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(address spender, uint256 value) returns(bool)

func (*ERC20TransactorSession) Transfer

func (_ERC20 *ERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(address to, uint256 value) returns(bool)

func (*ERC20TransactorSession) TransferFrom

func (_ERC20 *ERC20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(address from, address to, uint256 value) returns(bool)

type ERC20Transfer

type ERC20Transfer struct {
	From  common.Address
	To    common.Address
	Value *big.Int
	Raw   types.Log // Blockchain specific contextual infos
}

ERC20Transfer represents a Transfer event raised by the ERC20 contract.

type ERC20TransferIterator

type ERC20TransferIterator struct {
	Event *ERC20Transfer // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20 contract.

func (*ERC20TransferIterator) Close

func (it *ERC20TransferIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*ERC20TransferIterator) Error

func (it *ERC20TransferIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*ERC20TransferIterator) Next

func (it *ERC20TransferIterator) Next() bool

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.

type FreeMulticall2

type FreeMulticall2 struct {
	FreeMulticall2Caller     // Read-only binding to the contract
	FreeMulticall2Transactor // Write-only binding to the contract
	FreeMulticall2Filterer   // Log filterer for contract events
}

FreeMulticall2 is an auto generated Go binding around an Ethereum contract.

func NewFreeMulticall2

func NewFreeMulticall2(address common.Address, backend bind.ContractBackend) (*FreeMulticall2, error)

NewFreeMulticall2 creates a new instance of FreeMulticall2, bound to a specific deployed contract.

type FreeMulticall2Caller

type FreeMulticall2Caller struct {
	// contains filtered or unexported fields
}

FreeMulticall2Caller is an auto generated read-only Go binding around an Ethereum contract.

func NewFreeMulticall2Caller

func NewFreeMulticall2Caller(address common.Address, caller bind.ContractCaller) (*FreeMulticall2Caller, error)

NewFreeMulticall2Caller creates a new read-only instance of FreeMulticall2, bound to a specific deployed contract.

func (*FreeMulticall2Caller) Aggregate

func (_FreeMulticall2 *FreeMulticall2Caller) Aggregate(opts *bind.CallOpts, calls []Multicall2Call) (struct {
	BlockNumber *big.Int
	ReturnData  [][]byte
}, error)

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 (*FreeMulticall2Caller) BlockAndAggregate

func (_FreeMulticall2 *FreeMulticall2Caller) BlockAndAggregate(opts *bind.CallOpts, calls []Multicall2Call) (struct {
	BlockNumber *big.Int
	BlockHash   [32]byte
	ReturnData  []Multicall2Result
}, error)

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 (*FreeMulticall2Caller) GetBlockHash

func (_FreeMulticall2 *FreeMulticall2Caller) GetBlockHash(opts *bind.CallOpts, blockNumber *big.Int) ([32]byte, error)

GetBlockHash is a free data retrieval call binding the contract method 0xee82ac5e.

Solidity: function getBlockHash(uint256 blockNumber) view returns(bytes32 blockHash)

func (*FreeMulticall2Caller) GetBlockNumber

func (_FreeMulticall2 *FreeMulticall2Caller) GetBlockNumber(opts *bind.CallOpts) (*big.Int, error)

GetBlockNumber is a free data retrieval call binding the contract method 0x42cbb15c.

Solidity: function getBlockNumber() view returns(uint256 blockNumber)

func (*FreeMulticall2Caller) GetCurrentBlockCoinbase

func (_FreeMulticall2 *FreeMulticall2Caller) GetCurrentBlockCoinbase(opts *bind.CallOpts) (common.Address, error)

GetCurrentBlockCoinbase is a free data retrieval call binding the contract method 0xa8b0574e.

Solidity: function getCurrentBlockCoinbase() view returns(address coinbase)

func (*FreeMulticall2Caller) GetCurrentBlockDifficulty

func (_FreeMulticall2 *FreeMulticall2Caller) GetCurrentBlockDifficulty(opts *bind.CallOpts) (*big.Int, error)

GetCurrentBlockDifficulty is a free data retrieval call binding the contract method 0x72425d9d.

Solidity: function getCurrentBlockDifficulty() view returns(uint256 difficulty)

func (*FreeMulticall2Caller) GetCurrentBlockGasLimit

func (_FreeMulticall2 *FreeMulticall2Caller) GetCurrentBlockGasLimit(opts *bind.CallOpts) (*big.Int, error)

GetCurrentBlockGasLimit is a free data retrieval call binding the contract method 0x86d516e8.

Solidity: function getCurrentBlockGasLimit() view returns(uint256 gaslimit)

func (*FreeMulticall2Caller) GetCurrentBlockTimestamp

func (_FreeMulticall2 *FreeMulticall2Caller) GetCurrentBlockTimestamp(opts *bind.CallOpts) (*big.Int, error)

GetCurrentBlockTimestamp is a free data retrieval call binding the contract method 0x0f28c97d.

Solidity: function getCurrentBlockTimestamp() view returns(uint256 timestamp)

func (*FreeMulticall2Caller) GetEthBalance

func (_FreeMulticall2 *FreeMulticall2Caller) GetEthBalance(opts *bind.CallOpts, addr common.Address) (*big.Int, error)

GetEthBalance is a free data retrieval call binding the contract method 0x4d2301cc.

Solidity: function getEthBalance(address addr) view returns(uint256 balance)

func (*FreeMulticall2Caller) GetLastBlockHash

func (_FreeMulticall2 *FreeMulticall2Caller) GetLastBlockHash(opts *bind.CallOpts) ([32]byte, error)

GetLastBlockHash is a free data retrieval call binding the contract method 0x27e86d6e.

Solidity: function getLastBlockHash() view returns(bytes32 blockHash)

func (*FreeMulticall2Caller) TryAggregate

func (_FreeMulticall2 *FreeMulticall2Caller) TryAggregate(opts *bind.CallOpts, requireSuccess bool, calls []Multicall2Call) ([]Multicall2Result, error)

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 (*FreeMulticall2Caller) TryBlockAndAggregate

func (_FreeMulticall2 *FreeMulticall2Caller) TryBlockAndAggregate(opts *bind.CallOpts, requireSuccess bool, calls []Multicall2Call) (struct {
	BlockNumber *big.Int
	BlockHash   [32]byte
	ReturnData  []Multicall2Result
}, error)

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)

type FreeMulticall2CallerRaw

type FreeMulticall2CallerRaw struct {
	Contract *FreeMulticall2Caller // Generic read-only contract binding to access the raw methods on
}

FreeMulticall2CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*FreeMulticall2CallerRaw) Call

func (_FreeMulticall2 *FreeMulticall2CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

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.

type FreeMulticall2CallerSession

type FreeMulticall2CallerSession struct {
	Contract *FreeMulticall2Caller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts         // Call options to use throughout this session
}

FreeMulticall2CallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*FreeMulticall2CallerSession) Aggregate

func (_FreeMulticall2 *FreeMulticall2CallerSession) Aggregate(calls []Multicall2Call) (struct {
	BlockNumber *big.Int
	ReturnData  [][]byte
}, error)

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 (*FreeMulticall2CallerSession) BlockAndAggregate

func (_FreeMulticall2 *FreeMulticall2CallerSession) BlockAndAggregate(calls []Multicall2Call) (struct {
	BlockNumber *big.Int
	BlockHash   [32]byte
	ReturnData  []Multicall2Result
}, error)

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 (*FreeMulticall2CallerSession) GetBlockHash

func (_FreeMulticall2 *FreeMulticall2CallerSession) GetBlockHash(blockNumber *big.Int) ([32]byte, error)

GetBlockHash is a free data retrieval call binding the contract method 0xee82ac5e.

Solidity: function getBlockHash(uint256 blockNumber) view returns(bytes32 blockHash)

func (*FreeMulticall2CallerSession) GetBlockNumber

func (_FreeMulticall2 *FreeMulticall2CallerSession) GetBlockNumber() (*big.Int, error)

GetBlockNumber is a free data retrieval call binding the contract method 0x42cbb15c.

Solidity: function getBlockNumber() view returns(uint256 blockNumber)

func (*FreeMulticall2CallerSession) GetCurrentBlockCoinbase

func (_FreeMulticall2 *FreeMulticall2CallerSession) GetCurrentBlockCoinbase() (common.Address, error)

GetCurrentBlockCoinbase is a free data retrieval call binding the contract method 0xa8b0574e.

Solidity: function getCurrentBlockCoinbase() view returns(address coinbase)

func (*FreeMulticall2CallerSession) GetCurrentBlockDifficulty

func (_FreeMulticall2 *FreeMulticall2CallerSession) GetCurrentBlockDifficulty() (*big.Int, error)

GetCurrentBlockDifficulty is a free data retrieval call binding the contract method 0x72425d9d.

Solidity: function getCurrentBlockDifficulty() view returns(uint256 difficulty)

func (*FreeMulticall2CallerSession) GetCurrentBlockGasLimit

func (_FreeMulticall2 *FreeMulticall2CallerSession) GetCurrentBlockGasLimit() (*big.Int, error)

GetCurrentBlockGasLimit is a free data retrieval call binding the contract method 0x86d516e8.

Solidity: function getCurrentBlockGasLimit() view returns(uint256 gaslimit)

func (*FreeMulticall2CallerSession) GetCurrentBlockTimestamp

func (_FreeMulticall2 *FreeMulticall2CallerSession) GetCurrentBlockTimestamp() (*big.Int, error)

GetCurrentBlockTimestamp is a free data retrieval call binding the contract method 0x0f28c97d.

Solidity: function getCurrentBlockTimestamp() view returns(uint256 timestamp)

func (*FreeMulticall2CallerSession) GetEthBalance

func (_FreeMulticall2 *FreeMulticall2CallerSession) GetEthBalance(addr common.Address) (*big.Int, error)

GetEthBalance is a free data retrieval call binding the contract method 0x4d2301cc.

Solidity: function getEthBalance(address addr) view returns(uint256 balance)

func (*FreeMulticall2CallerSession) GetLastBlockHash

func (_FreeMulticall2 *FreeMulticall2CallerSession) GetLastBlockHash() ([32]byte, error)

GetLastBlockHash is a free data retrieval call binding the contract method 0x27e86d6e.

Solidity: function getLastBlockHash() view returns(bytes32 blockHash)

func (*FreeMulticall2CallerSession) TryAggregate

func (_FreeMulticall2 *FreeMulticall2CallerSession) TryAggregate(requireSuccess bool, calls []Multicall2Call) ([]Multicall2Result, error)

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 (*FreeMulticall2CallerSession) TryBlockAndAggregate

func (_FreeMulticall2 *FreeMulticall2CallerSession) TryBlockAndAggregate(requireSuccess bool, calls []Multicall2Call) (struct {
	BlockNumber *big.Int
	BlockHash   [32]byte
	ReturnData  []Multicall2Result
}, error)

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)

type FreeMulticall2Filterer

type FreeMulticall2Filterer struct {
	// contains filtered or unexported fields
}

FreeMulticall2Filterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewFreeMulticall2Filterer

func NewFreeMulticall2Filterer(address common.Address, filterer bind.ContractFilterer) (*FreeMulticall2Filterer, error)

NewFreeMulticall2Filterer creates a new log filterer instance of FreeMulticall2, bound to a specific deployed contract.

type FreeMulticall2Raw

type FreeMulticall2Raw struct {
	Contract *FreeMulticall2 // Generic contract binding to access the raw methods on
}

FreeMulticall2Raw is an auto generated low-level Go binding around an Ethereum contract.

func (*FreeMulticall2Raw) Call

func (_FreeMulticall2 *FreeMulticall2Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

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 (*FreeMulticall2Raw) Transact

func (_FreeMulticall2 *FreeMulticall2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*FreeMulticall2Raw) Transfer

func (_FreeMulticall2 *FreeMulticall2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type FreeMulticall2Session

type FreeMulticall2Session struct {
	Contract     *FreeMulticall2   // 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
}

FreeMulticall2Session is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*FreeMulticall2Session) Aggregate

func (_FreeMulticall2 *FreeMulticall2Session) Aggregate(calls []Multicall2Call) (struct {
	BlockNumber *big.Int
	ReturnData  [][]byte
}, error)

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 (*FreeMulticall2Session) BlockAndAggregate

func (_FreeMulticall2 *FreeMulticall2Session) BlockAndAggregate(calls []Multicall2Call) (struct {
	BlockNumber *big.Int
	BlockHash   [32]byte
	ReturnData  []Multicall2Result
}, error)

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 (*FreeMulticall2Session) GetBlockHash

func (_FreeMulticall2 *FreeMulticall2Session) GetBlockHash(blockNumber *big.Int) ([32]byte, error)

GetBlockHash is a free data retrieval call binding the contract method 0xee82ac5e.

Solidity: function getBlockHash(uint256 blockNumber) view returns(bytes32 blockHash)

func (*FreeMulticall2Session) GetBlockNumber

func (_FreeMulticall2 *FreeMulticall2Session) GetBlockNumber() (*big.Int, error)

GetBlockNumber is a free data retrieval call binding the contract method 0x42cbb15c.

Solidity: function getBlockNumber() view returns(uint256 blockNumber)

func (*FreeMulticall2Session) GetCurrentBlockCoinbase

func (_FreeMulticall2 *FreeMulticall2Session) GetCurrentBlockCoinbase() (common.Address, error)

GetCurrentBlockCoinbase is a free data retrieval call binding the contract method 0xa8b0574e.

Solidity: function getCurrentBlockCoinbase() view returns(address coinbase)

func (*FreeMulticall2Session) GetCurrentBlockDifficulty

func (_FreeMulticall2 *FreeMulticall2Session) GetCurrentBlockDifficulty() (*big.Int, error)

GetCurrentBlockDifficulty is a free data retrieval call binding the contract method 0x72425d9d.

Solidity: function getCurrentBlockDifficulty() view returns(uint256 difficulty)

func (*FreeMulticall2Session) GetCurrentBlockGasLimit

func (_FreeMulticall2 *FreeMulticall2Session) GetCurrentBlockGasLimit() (*big.Int, error)

GetCurrentBlockGasLimit is a free data retrieval call binding the contract method 0x86d516e8.

Solidity: function getCurrentBlockGasLimit() view returns(uint256 gaslimit)

func (*FreeMulticall2Session) GetCurrentBlockTimestamp

func (_FreeMulticall2 *FreeMulticall2Session) GetCurrentBlockTimestamp() (*big.Int, error)

GetCurrentBlockTimestamp is a free data retrieval call binding the contract method 0x0f28c97d.

Solidity: function getCurrentBlockTimestamp() view returns(uint256 timestamp)

func (*FreeMulticall2Session) GetEthBalance

func (_FreeMulticall2 *FreeMulticall2Session) GetEthBalance(addr common.Address) (*big.Int, error)

GetEthBalance is a free data retrieval call binding the contract method 0x4d2301cc.

Solidity: function getEthBalance(address addr) view returns(uint256 balance)

func (*FreeMulticall2Session) GetLastBlockHash

func (_FreeMulticall2 *FreeMulticall2Session) GetLastBlockHash() ([32]byte, error)

GetLastBlockHash is a free data retrieval call binding the contract method 0x27e86d6e.

Solidity: function getLastBlockHash() view returns(bytes32 blockHash)

func (*FreeMulticall2Session) TryAggregate

func (_FreeMulticall2 *FreeMulticall2Session) TryAggregate(requireSuccess bool, calls []Multicall2Call) ([]Multicall2Result, error)

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 (*FreeMulticall2Session) TryBlockAndAggregate

func (_FreeMulticall2 *FreeMulticall2Session) TryBlockAndAggregate(requireSuccess bool, calls []Multicall2Call) (struct {
	BlockNumber *big.Int
	BlockHash   [32]byte
	ReturnData  []Multicall2Result
}, error)

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)

type FreeMulticall2Transactor

type FreeMulticall2Transactor struct {
	// contains filtered or unexported fields
}

FreeMulticall2Transactor is an auto generated write-only Go binding around an Ethereum contract.

func NewFreeMulticall2Transactor

func NewFreeMulticall2Transactor(address common.Address, transactor bind.ContractTransactor) (*FreeMulticall2Transactor, error)

NewFreeMulticall2Transactor creates a new write-only instance of FreeMulticall2, bound to a specific deployed contract.

type FreeMulticall2TransactorRaw

type FreeMulticall2TransactorRaw struct {
	Contract *FreeMulticall2Transactor // Generic write-only contract binding to access the raw methods on
}

FreeMulticall2TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*FreeMulticall2TransactorRaw) Transact

func (_FreeMulticall2 *FreeMulticall2TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*FreeMulticall2TransactorRaw) Transfer

func (_FreeMulticall2 *FreeMulticall2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type FreeMulticall2TransactorSession

type FreeMulticall2TransactorSession struct {
	Contract     *FreeMulticall2Transactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts         // Transaction auth options to use throughout this session
}

FreeMulticall2TransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

type Multicall2Call

type Multicall2Call struct {
	Target   common.Address
	CallData []byte
}

Multicall2Call is an auto generated low-level Go binding around an user-defined struct.

type Multicall2Result

type Multicall2Result struct {
	Success    bool
	ReturnData []byte
}

Multicall2Result is an auto generated low-level Go binding around an user-defined struct.

type PriceOracle

type PriceOracle struct {
	PriceOracleCaller     // Read-only binding to the contract
	PriceOracleTransactor // Write-only binding to the contract
	PriceOracleFilterer   // Log filterer for contract events
}

PriceOracle is an auto generated Go binding around an Ethereum contract.

func NewPriceOracle

func NewPriceOracle(address common.Address, backend bind.ContractBackend) (*PriceOracle, error)

NewPriceOracle creates a new instance of PriceOracle, bound to a specific deployed contract.

type PriceOracleCaller

type PriceOracleCaller struct {
	// contains filtered or unexported fields
}

PriceOracleCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewPriceOracleCaller

func NewPriceOracleCaller(address common.Address, caller bind.ContractCaller) (*PriceOracleCaller, error)

NewPriceOracleCaller creates a new read-only instance of PriceOracle, bound to a specific deployed contract.

func (*PriceOracleCaller) GetIndexPrice

func (_PriceOracle *PriceOracleCaller) GetIndexPrice(opts *bind.CallOpts, amm common.Address) (*big.Int, error)

GetIndexPrice is a free data retrieval call binding the contract method 0xb263e010.

Solidity: function getIndexPrice(address amm) view returns(uint256)

func (*PriceOracleCaller) GetMarkPrice

func (_PriceOracle *PriceOracleCaller) GetMarkPrice(opts *bind.CallOpts, amm common.Address) (struct {
	Price        *big.Int
	IsIndexPrice bool
}, error)

GetMarkPrice is a free data retrieval call binding the contract method 0x5d6f9c14.

Solidity: function getMarkPrice(address amm) view returns(uint256 price, bool isIndexPrice)

func (*PriceOracleCaller) GetMarkPriceAcc

func (_PriceOracle *PriceOracleCaller) GetMarkPriceAcc(opts *bind.CallOpts, amm common.Address, beta uint8, quoteAmount *big.Int, negative bool) (*big.Int, error)

GetMarkPriceAcc is a free data retrieval call binding the contract method 0x4c0000dc.

Solidity: function getMarkPriceAcc(address amm, uint8 beta, uint256 quoteAmount, bool negative) view returns(uint256 baseAmount)

func (*PriceOracleCaller) GetMarkPriceAfterSwap

func (_PriceOracle *PriceOracleCaller) GetMarkPriceAfterSwap(opts *bind.CallOpts, amm common.Address, quoteAmount *big.Int, baseAmount *big.Int) (struct {
	Price        *big.Int
	IsIndexPrice bool
}, error)

GetMarkPriceAfterSwap is a free data retrieval call binding the contract method 0xba4433c0.

Solidity: function getMarkPriceAfterSwap(address amm, uint256 quoteAmount, uint256 baseAmount) view returns(uint256 price, bool isIndexPrice)

func (*PriceOracleCaller) GetMarkPriceInRatio

func (_PriceOracle *PriceOracleCaller) GetMarkPriceInRatio(opts *bind.CallOpts, amm common.Address, quoteAmount *big.Int, baseAmount *big.Int) (struct {
	ResultBaseAmount  *big.Int
	ResultQuoteAmount *big.Int
	IsIndexPrice      bool
}, error)

GetMarkPriceInRatio is a free data retrieval call binding the contract method 0x7e650a05.

Solidity: function getMarkPriceInRatio(address amm, uint256 quoteAmount, uint256 baseAmount) view returns(uint256 resultBaseAmount, uint256 resultQuoteAmount, bool isIndexPrice)

func (*PriceOracleCaller) GetMarketPrice

func (_PriceOracle *PriceOracleCaller) GetMarketPrice(opts *bind.CallOpts, amm common.Address) (*big.Int, error)

GetMarketPrice is a free data retrieval call binding the contract method 0x9c6f3026.

Solidity: function getMarketPrice(address amm) view returns(uint256)

func (*PriceOracleCaller) Quote

func (_PriceOracle *PriceOracleCaller) Quote(opts *bind.CallOpts, baseToken common.Address, quoteToken common.Address, baseAmount *big.Int) (struct {
	QuoteAmount *big.Int
	Source      uint8
}, error)

Quote is a free data retrieval call binding the contract method 0xb6466384.

Solidity: function quote(address baseToken, address quoteToken, uint256 baseAmount) view returns(uint256 quoteAmount, uint8 source)

func (*PriceOracleCaller) QuoteFromAmmTwap

func (_PriceOracle *PriceOracleCaller) QuoteFromAmmTwap(opts *bind.CallOpts, amm common.Address, baseAmount *big.Int) (*big.Int, error)

QuoteFromAmmTwap is a free data retrieval call binding the contract method 0xd480731c.

Solidity: function quoteFromAmmTwap(address amm, uint256 baseAmount) view returns(uint256 quoteAmount)

type PriceOracleCallerRaw

type PriceOracleCallerRaw struct {
	Contract *PriceOracleCaller // Generic read-only contract binding to access the raw methods on
}

PriceOracleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*PriceOracleCallerRaw) Call

func (_PriceOracle *PriceOracleCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

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.

type PriceOracleCallerSession

type PriceOracleCallerSession struct {
	Contract *PriceOracleCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts      // Call options to use throughout this session
}

PriceOracleCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*PriceOracleCallerSession) GetIndexPrice

func (_PriceOracle *PriceOracleCallerSession) GetIndexPrice(amm common.Address) (*big.Int, error)

GetIndexPrice is a free data retrieval call binding the contract method 0xb263e010.

Solidity: function getIndexPrice(address amm) view returns(uint256)

func (*PriceOracleCallerSession) GetMarkPrice

func (_PriceOracle *PriceOracleCallerSession) GetMarkPrice(amm common.Address) (struct {
	Price        *big.Int
	IsIndexPrice bool
}, error)

GetMarkPrice is a free data retrieval call binding the contract method 0x5d6f9c14.

Solidity: function getMarkPrice(address amm) view returns(uint256 price, bool isIndexPrice)

func (*PriceOracleCallerSession) GetMarkPriceAcc

func (_PriceOracle *PriceOracleCallerSession) GetMarkPriceAcc(amm common.Address, beta uint8, quoteAmount *big.Int, negative bool) (*big.Int, error)

GetMarkPriceAcc is a free data retrieval call binding the contract method 0x4c0000dc.

Solidity: function getMarkPriceAcc(address amm, uint8 beta, uint256 quoteAmount, bool negative) view returns(uint256 baseAmount)

func (*PriceOracleCallerSession) GetMarkPriceAfterSwap

func (_PriceOracle *PriceOracleCallerSession) GetMarkPriceAfterSwap(amm common.Address, quoteAmount *big.Int, baseAmount *big.Int) (struct {
	Price        *big.Int
	IsIndexPrice bool
}, error)

GetMarkPriceAfterSwap is a free data retrieval call binding the contract method 0xba4433c0.

Solidity: function getMarkPriceAfterSwap(address amm, uint256 quoteAmount, uint256 baseAmount) view returns(uint256 price, bool isIndexPrice)

func (*PriceOracleCallerSession) GetMarkPriceInRatio

func (_PriceOracle *PriceOracleCallerSession) GetMarkPriceInRatio(amm common.Address, quoteAmount *big.Int, baseAmount *big.Int) (struct {
	ResultBaseAmount  *big.Int
	ResultQuoteAmount *big.Int
	IsIndexPrice      bool
}, error)

GetMarkPriceInRatio is a free data retrieval call binding the contract method 0x7e650a05.

Solidity: function getMarkPriceInRatio(address amm, uint256 quoteAmount, uint256 baseAmount) view returns(uint256 resultBaseAmount, uint256 resultQuoteAmount, bool isIndexPrice)

func (*PriceOracleCallerSession) GetMarketPrice

func (_PriceOracle *PriceOracleCallerSession) GetMarketPrice(amm common.Address) (*big.Int, error)

GetMarketPrice is a free data retrieval call binding the contract method 0x9c6f3026.

Solidity: function getMarketPrice(address amm) view returns(uint256)

func (*PriceOracleCallerSession) Quote

func (_PriceOracle *PriceOracleCallerSession) Quote(baseToken common.Address, quoteToken common.Address, baseAmount *big.Int) (struct {
	QuoteAmount *big.Int
	Source      uint8
}, error)

Quote is a free data retrieval call binding the contract method 0xb6466384.

Solidity: function quote(address baseToken, address quoteToken, uint256 baseAmount) view returns(uint256 quoteAmount, uint8 source)

func (*PriceOracleCallerSession) QuoteFromAmmTwap

func (_PriceOracle *PriceOracleCallerSession) QuoteFromAmmTwap(amm common.Address, baseAmount *big.Int) (*big.Int, error)

QuoteFromAmmTwap is a free data retrieval call binding the contract method 0xd480731c.

Solidity: function quoteFromAmmTwap(address amm, uint256 baseAmount) view returns(uint256 quoteAmount)

type PriceOracleFilterer

type PriceOracleFilterer struct {
	// contains filtered or unexported fields
}

PriceOracleFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewPriceOracleFilterer

func NewPriceOracleFilterer(address common.Address, filterer bind.ContractFilterer) (*PriceOracleFilterer, error)

NewPriceOracleFilterer creates a new log filterer instance of PriceOracle, bound to a specific deployed contract.

type PriceOracleRaw

type PriceOracleRaw struct {
	Contract *PriceOracle // Generic contract binding to access the raw methods on
}

PriceOracleRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*PriceOracleRaw) Call

func (_PriceOracle *PriceOracleRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

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 (*PriceOracleRaw) Transact

func (_PriceOracle *PriceOracleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*PriceOracleRaw) Transfer

func (_PriceOracle *PriceOracleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type PriceOracleSession

type PriceOracleSession struct {
	Contract     *PriceOracle      // 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
}

PriceOracleSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*PriceOracleSession) GetIndexPrice

func (_PriceOracle *PriceOracleSession) GetIndexPrice(amm common.Address) (*big.Int, error)

GetIndexPrice is a free data retrieval call binding the contract method 0xb263e010.

Solidity: function getIndexPrice(address amm) view returns(uint256)

func (*PriceOracleSession) GetMarkPrice

func (_PriceOracle *PriceOracleSession) GetMarkPrice(amm common.Address) (struct {
	Price        *big.Int
	IsIndexPrice bool
}, error)

GetMarkPrice is a free data retrieval call binding the contract method 0x5d6f9c14.

Solidity: function getMarkPrice(address amm) view returns(uint256 price, bool isIndexPrice)

func (*PriceOracleSession) GetMarkPriceAcc

func (_PriceOracle *PriceOracleSession) GetMarkPriceAcc(amm common.Address, beta uint8, quoteAmount *big.Int, negative bool) (*big.Int, error)

GetMarkPriceAcc is a free data retrieval call binding the contract method 0x4c0000dc.

Solidity: function getMarkPriceAcc(address amm, uint8 beta, uint256 quoteAmount, bool negative) view returns(uint256 baseAmount)

func (*PriceOracleSession) GetMarkPriceAfterSwap

func (_PriceOracle *PriceOracleSession) GetMarkPriceAfterSwap(amm common.Address, quoteAmount *big.Int, baseAmount *big.Int) (struct {
	Price        *big.Int
	IsIndexPrice bool
}, error)

GetMarkPriceAfterSwap is a free data retrieval call binding the contract method 0xba4433c0.

Solidity: function getMarkPriceAfterSwap(address amm, uint256 quoteAmount, uint256 baseAmount) view returns(uint256 price, bool isIndexPrice)

func (*PriceOracleSession) GetMarkPriceInRatio

func (_PriceOracle *PriceOracleSession) GetMarkPriceInRatio(amm common.Address, quoteAmount *big.Int, baseAmount *big.Int) (struct {
	ResultBaseAmount  *big.Int
	ResultQuoteAmount *big.Int
	IsIndexPrice      bool
}, error)

GetMarkPriceInRatio is a free data retrieval call binding the contract method 0x7e650a05.

Solidity: function getMarkPriceInRatio(address amm, uint256 quoteAmount, uint256 baseAmount) view returns(uint256 resultBaseAmount, uint256 resultQuoteAmount, bool isIndexPrice)

func (*PriceOracleSession) GetMarketPrice

func (_PriceOracle *PriceOracleSession) GetMarketPrice(amm common.Address) (*big.Int, error)

GetMarketPrice is a free data retrieval call binding the contract method 0x9c6f3026.

Solidity: function getMarketPrice(address amm) view returns(uint256)

func (*PriceOracleSession) Quote

func (_PriceOracle *PriceOracleSession) Quote(baseToken common.Address, quoteToken common.Address, baseAmount *big.Int) (struct {
	QuoteAmount *big.Int
	Source      uint8
}, error)

Quote is a free data retrieval call binding the contract method 0xb6466384.

Solidity: function quote(address baseToken, address quoteToken, uint256 baseAmount) view returns(uint256 quoteAmount, uint8 source)

func (*PriceOracleSession) QuoteFromAmmTwap

func (_PriceOracle *PriceOracleSession) QuoteFromAmmTwap(amm common.Address, baseAmount *big.Int) (*big.Int, error)

QuoteFromAmmTwap is a free data retrieval call binding the contract method 0xd480731c.

Solidity: function quoteFromAmmTwap(address amm, uint256 baseAmount) view returns(uint256 quoteAmount)

func (*PriceOracleSession) SetupTwap

func (_PriceOracle *PriceOracleSession) SetupTwap(amm common.Address) (*types.Transaction, error)

SetupTwap is a paid mutator transaction binding the contract method 0xf65770ba.

Solidity: function setupTwap(address amm) returns()

func (*PriceOracleSession) UpdateAmmTwap

func (_PriceOracle *PriceOracleSession) UpdateAmmTwap(pair common.Address) (*types.Transaction, error)

UpdateAmmTwap is a paid mutator transaction binding the contract method 0x422bb010.

Solidity: function updateAmmTwap(address pair) returns()

type PriceOracleTransactor

type PriceOracleTransactor struct {
	// contains filtered or unexported fields
}

PriceOracleTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewPriceOracleTransactor

func NewPriceOracleTransactor(address common.Address, transactor bind.ContractTransactor) (*PriceOracleTransactor, error)

NewPriceOracleTransactor creates a new write-only instance of PriceOracle, bound to a specific deployed contract.

func (*PriceOracleTransactor) SetupTwap

func (_PriceOracle *PriceOracleTransactor) SetupTwap(opts *bind.TransactOpts, amm common.Address) (*types.Transaction, error)

SetupTwap is a paid mutator transaction binding the contract method 0xf65770ba.

Solidity: function setupTwap(address amm) returns()

func (*PriceOracleTransactor) UpdateAmmTwap

func (_PriceOracle *PriceOracleTransactor) UpdateAmmTwap(opts *bind.TransactOpts, pair common.Address) (*types.Transaction, error)

UpdateAmmTwap is a paid mutator transaction binding the contract method 0x422bb010.

Solidity: function updateAmmTwap(address pair) returns()

type PriceOracleTransactorRaw

type PriceOracleTransactorRaw struct {
	Contract *PriceOracleTransactor // Generic write-only contract binding to access the raw methods on
}

PriceOracleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*PriceOracleTransactorRaw) Transact

func (_PriceOracle *PriceOracleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*PriceOracleTransactorRaw) Transfer

func (_PriceOracle *PriceOracleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type PriceOracleTransactorSession

type PriceOracleTransactorSession struct {
	Contract     *PriceOracleTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts      // Transaction auth options to use throughout this session
}

PriceOracleTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*PriceOracleTransactorSession) SetupTwap

func (_PriceOracle *PriceOracleTransactorSession) SetupTwap(amm common.Address) (*types.Transaction, error)

SetupTwap is a paid mutator transaction binding the contract method 0xf65770ba.

Solidity: function setupTwap(address amm) returns()

func (*PriceOracleTransactorSession) UpdateAmmTwap

func (_PriceOracle *PriceOracleTransactorSession) UpdateAmmTwap(pair common.Address) (*types.Transaction, error)

UpdateAmmTwap is a paid mutator transaction binding the contract method 0x422bb010.

Solidity: function updateAmmTwap(address pair) returns()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL