Documentation ¶
Index ¶
- Constants
- Variables
- func SuggestedGasPrice(txSpeed TxExecutionSpeed) (*big.Int, error)
- type Account
- type AddressBook
- type Client
- func (client *Client) BalanceOf(ctx context.Context, addr common.Address) (val *big.Int, err error)
- func (client *Client) CurrentBlockNumber(ctx context.Context) (*big.Int, error)
- func (client *Client) EthClient() *ethclient.Client
- func (client *Client) Get(ctx context.Context, f func() error) (err error)
- func (client *Client) ReadAddress(key string) (common.Address, error)
- func (client *Client) TxBlockNumber(ctx context.Context, hash string) (*big.Int, error)
- func (client *Client) WaitMined(ctx context.Context, tx *types.Transaction) (*types.Receipt, error)
- func (client *Client) WriteAddress(key string, address common.Address)
- type CompatibleERC20
- type CompatibleERC20Approval
- type CompatibleERC20ApprovalIterator
- type CompatibleERC20Caller
- func (_CompatibleERC20 *CompatibleERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error)
- func (_CompatibleERC20 *CompatibleERC20Caller) BalanceOf(opts *bind.CallOpts, who common.Address) (*big.Int, error)
- func (_CompatibleERC20 *CompatibleERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error)
- type CompatibleERC20CallerRaw
- type CompatibleERC20CallerSession
- func (_CompatibleERC20 *CompatibleERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error)
- func (_CompatibleERC20 *CompatibleERC20CallerSession) BalanceOf(who common.Address) (*big.Int, error)
- func (_CompatibleERC20 *CompatibleERC20CallerSession) TotalSupply() (*big.Int, error)
- type CompatibleERC20Filterer
- func (_CompatibleERC20 *CompatibleERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*CompatibleERC20ApprovalIterator, error)
- func (_CompatibleERC20 *CompatibleERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CompatibleERC20TransferIterator, error)
- func (_CompatibleERC20 *CompatibleERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *CompatibleERC20Approval, ...) (event.Subscription, error)
- func (_CompatibleERC20 *CompatibleERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *CompatibleERC20Transfer, ...) (event.Subscription, error)
- type CompatibleERC20Raw
- func (_CompatibleERC20 *CompatibleERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
- func (_CompatibleERC20 *CompatibleERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_CompatibleERC20 *CompatibleERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type CompatibleERC20Session
- func (_CompatibleERC20 *CompatibleERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error)
- func (_CompatibleERC20 *CompatibleERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error)
- func (_CompatibleERC20 *CompatibleERC20Session) BalanceOf(who common.Address) (*big.Int, error)
- func (_CompatibleERC20 *CompatibleERC20Session) TotalSupply() (*big.Int, error)
- func (_CompatibleERC20 *CompatibleERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error)
- func (_CompatibleERC20 *CompatibleERC20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error)
- type CompatibleERC20Transactor
- func (_CompatibleERC20 *CompatibleERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error)
- func (_CompatibleERC20 *CompatibleERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error)
- func (_CompatibleERC20 *CompatibleERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, ...) (*types.Transaction, error)
- type CompatibleERC20TransactorRaw
- type CompatibleERC20TransactorSession
- func (_CompatibleERC20 *CompatibleERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error)
- func (_CompatibleERC20 *CompatibleERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error)
- func (_CompatibleERC20 *CompatibleERC20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error)
- type CompatibleERC20Transfer
- type CompatibleERC20TransferIterator
- type ERC20
- type TxExecutionSpeed
Constants ¶
const ( Nil = TxExecutionSpeed(iota) SafeLow Average Fast Fastest )
TxExecutionSpeed values.
const CompatibleERC20ABI = "" /* 1894-byte string literal not displayed */
CompatibleERC20ABI is the input ABI used to generate the binding from.
const CompatibleERC20Bin = `0x`
CompatibleERC20Bin is the compiled bytecode used for deploying new contracts.
Variables ¶
var ErrAddressNotFound = errors.New("key does not have an entry in the address book")
ErrAddressNotFound indicates that the given key is not present in the address book.
var ErrCannotConvertToBigInt = errors.New("cannot convert hex string to int: invalid format")
ErrCannotConvertToBigInt is returned when string cannot be parsed into a big.Int format.
var ErrDuplicateAddress = errors.New("the key has already been mapped to another address")
ErrDuplicateAddress indicates that there exists another address that has been mapped to the same key.
var ErrNonceIsOutOfSync = errors.New("nonce is out of sync")
ErrNonceIsOutOfSync indicates that there exists another transaction with the same nonce and a higher or equal gas price as the present transaction.
var ErrPostConditionCheckFailed = errors.New("post-condition check failed")
ErrPostConditionCheckFailed indicates that the post-condition for executing a transaction failed.
var ErrPreConditionCheckFailed = errors.New("pre-condition check failed")
ErrPreConditionCheckFailed indicates that the pre-condition for executing a transaction failed.
var KovanAddressBook = AddressBook{ "RenExOrderbook": common.HexToAddress("0x0000000000000000000000000000000000000000"), "RenExSettlement": common.HexToAddress("0x0000000000000000000000000000000000000000"), "DarknodeRegistry": common.HexToAddress("0x75Fa8349fc9C7C640A4e9F1A1496fBB95D2Dc3d5"), "ETHSwapContract": common.HexToAddress("0x94ab22cffb9cc1ee4097ff17ef9c02fbb26fdfa4"), "WBTCSwapContract": common.HexToAddress("0xad29a79ae4863ea605b14a6be730e29bcd5f2294"), "RENSwapContract": common.HexToAddress("0x7708a58e7c1fdc6d9e092e4270f15f30ffffbbaf"), "TUSDSwapContract": common.HexToAddress("0x61ba8c2d07d701056df3e6038d9abc25f6b86da6"), "OMGSwapContract": common.HexToAddress("0x07ca0635574a191a7e63ce1d67c295cafbcf1e87"), "ZRXSwapContract": common.HexToAddress("0x3f9032cd9bb2233694e7b51ada014345216c6a90"), "DGXSwapContract": common.HexToAddress("0x9f6aee6c3d03dc3274c5ba511e4637f156ea1ed6"), "USDCSwapContract": common.HexToAddress("0x4cc61223b5308ff6b48b43d0a2c425b5f11f9bca"), "GUSDSwapContract": common.HexToAddress("0xb9efa9dc4306ae3a5abe652db65361d13765c0d6"), "DAISwapContract": common.HexToAddress("0x233fdd9253fda1f616bfd382633ca74e4824b703"), "PAXSwapContract": common.HexToAddress("0xd819014e74df5b718cd7826f81139bdec106a9cb"), "WBTC": common.HexToAddress("0xA1D3EEcb76285B4435550E4D963B8042A8bffbF0"), "REN": common.HexToAddress("0x2CD647668494c1B15743AB283A0f980d90a87394"), "ZRX": common.HexToAddress("0x6EB628dCeFA95802899aD3A9EE0C7650Ac63d543"), "OMG": common.HexToAddress("0x66497ba75dD127b46316d806c077B06395918064"), "USDC": common.HexToAddress("0x3f0a4aed397c66d7b7dde1d170321f87656b14cc"), "GUSD": common.HexToAddress("0xA9CF366E9fb4F7959452d7a17A6F88ee2A20e9DA"), "DAI": common.HexToAddress("0xc4375b7de8af5a38a93548eb8453a498222c4ff2"), "TUSD": common.HexToAddress("0x525389752ffe6487d33EF53FBcD4E5D3AD7937a0"), "DGX": common.HexToAddress("0x7d6D31326b12B6CBd7f054231D47CbcD16082b71"), "PAX": common.HexToAddress("0x3584087444dabf2e0d29284766142ac5c3a9a2b7"), }
var MainnetAddressBook = AddressBook{ "DarknodeRegistry": common.HexToAddress("0x34bd421C7948Bc16f826Fd99f9B785929b121633"), "DGX": common.HexToAddress("0x4f3AfEC4E5a3F2A6a1A411DEF7D7dFe50eE057bF"), "TUSD": common.HexToAddress("0x8dd5fbCe2F6a956C3022bA3663759011Dd51e73E"), "REN": common.HexToAddress("0x21C482f153D0317fe85C60bE1F7fa079019fcEbD"), "WBTC": common.HexToAddress("0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"), "ZRX": common.HexToAddress("0xE41d2489571d322189246DaFA5ebDe1F4699F498"), "OMG": common.HexToAddress("0xd26114cd6EE289AccF82350c8d8487fedB8A0C07"), "USDC": common.HexToAddress("0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"), "GUSD": common.HexToAddress("0x056fd409e1d7a124bd7017459dfea2f387b6d5cd"), "DAI": common.HexToAddress("0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"), "PAX": common.HexToAddress("0x8e870d67f660d95d5be530380d0ec0bd388289e1"), "ETHSwapContract": common.HexToAddress("0x4Bc1d23a8c00Ac87c57B6a32d5fb82aA5346950d"), "WBTCSwapContract": common.HexToAddress("0x15c10c51d86a51021d0683b8359fb20a8ba40b45"), "RENSwapContract": common.HexToAddress("0xd633db90e6b017484ac08b711ed9f641c038141e"), "TUSDSwapContract": common.HexToAddress("0x0850ce7608313a957a52ef1536cdc0d87189d0e3"), "DGXSwapContract": common.HexToAddress("0x42021bb8b52eae41a4bfed6af824f0a0d752d312"), "ZRXSwapContract": common.HexToAddress("0x8a92e4f744460cb42e346636c3db48a940327107"), "OMGSwapContract": common.HexToAddress("0x0f980ffa044bc28a0352a2282136bb61e2460ee4"), }
var RopstenAddressBook = AddressBook{}
Functions ¶
func SuggestedGasPrice ¶
func SuggestedGasPrice(txSpeed TxExecutionSpeed) (*big.Int, error)
SuggestedGasPrice returns the gas price that ethGasStation recommends for transactions to be mined on Ethereum blockchain based on the speed provided.
Types ¶
type Account ¶
type Account interface { // Client that the account is connected to. Using the Client, read-only // operations can be executed on Ethereum. Client() Client // EthClient returns the actual Ethereum client. EthClient() *ethclient.Client // Address returns the ethereum address of the account holder. Address() common.Address // BalanceAt returns the wei balance of the account. The block number can be // nil, in which case the balance is taken from the latest known block. BalanceAt(ctx context.Context, blockNumber *big.Int) (*big.Int, error) // Store address in address book. WriteAddress(key string, address common.Address) // ReadAddress returns address mapped to the given key in the address book. ReadAddress(key string) (common.Address, error) // Transfer sends the specified value of Eth to the given address. Transfer(ctx context.Context, to common.Address, value, gasPrice *big.Int, confirmBlocks int64, sendAll bool) (*types.Transaction, error) // Transact performs a write operation on the Ethereum blockchain. It will // first conduct a preConditionCheck and if the check passes, it will // repeatedly execute the transaction followed by a postConditionCheck, // until the transaction passes and the postConditionCheck returns true. // Transact will immediately stop retrying if an ErrReplaceUnderpriced is // returned from ethereum. Transact(ctx context.Context, preConditionCheck func() bool, f func(*bind.TransactOpts) (*types.Transaction, error), postConditionCheck func() bool, confirmBlocks int64) (*types.Transaction, error) // Sign the given message with the account's private key. Sign(msgHash []byte) ([]byte, error) // SetGasPrice allows the account holder to set the gasPrice to a specific // value. SetGasPrice(gasPrice float64) // ResetToPendingNonce will wait for a 'coolDown' time (in milliseconds) // before updating transaction nonce to current pending nonce. ResetToPendingNonce(ctx context.Context, coolDown time.Duration) error // FormatTransactionView returns the formatted string with the URL at which // the transaction can be viewed. FormatTransactionView(msg, txHash string) (string, error) NewERC20(addressOrAlias string) (ERC20, error) }
Account is an Ethereum external account that can submit write transactions to the Ethereum blockchain. An Account is defined by its public address and respective private key.
func NewAccount ¶
func NewAccount(url string, privateKey *ecdsa.PrivateKey) (Account, error)
NewAccount returns a user account for the provided private key which is connected to an Ethereum client.
type AddressBook ¶
func DefaultAddressBook ¶
func DefaultAddressBook(network int64) AddressBook
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client will have a connection to an ethereum client (specified by the url)
func (*Client) CurrentBlockNumber ¶
CurrentBlockNumber will retrieve the current block that is confirmed by infura.
func (*Client) ReadAddress ¶
ReadAddress from the address book, return an error if the address does not exist
func (*Client) TxBlockNumber ¶
TxBlockNumber retrieves tx's block number using the tx hash.
type CompatibleERC20 ¶
type CompatibleERC20 struct { CompatibleERC20Caller // Read-only binding to the contract CompatibleERC20Transactor // Write-only binding to the contract CompatibleERC20Filterer // Log filterer for contract events }
CompatibleERC20 is an auto generated Go binding around an Ethereum contract.
func DeployCompatibleERC20 ¶
func DeployCompatibleERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *CompatibleERC20, error)
DeployCompatibleERC20 deploys a new Ethereum contract, binding an instance of CompatibleERC20 to it.
func NewCompatibleERC20 ¶
func NewCompatibleERC20(address common.Address, backend bind.ContractBackend) (*CompatibleERC20, error)
NewCompatibleERC20 creates a new instance of CompatibleERC20, bound to a specific deployed contract.
type CompatibleERC20Approval ¶
type CompatibleERC20Approval struct { Owner common.Address Spender common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos }
CompatibleERC20Approval represents a Approval event raised by the CompatibleERC20 contract.
type CompatibleERC20ApprovalIterator ¶
type CompatibleERC20ApprovalIterator struct { Event *CompatibleERC20Approval // Event containing the contract specifics and raw log // contains filtered or unexported fields }
CompatibleERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the CompatibleERC20 contract.
func (*CompatibleERC20ApprovalIterator) Close ¶
func (it *CompatibleERC20ApprovalIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*CompatibleERC20ApprovalIterator) Error ¶
func (it *CompatibleERC20ApprovalIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*CompatibleERC20ApprovalIterator) Next ¶
func (it *CompatibleERC20ApprovalIterator) 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 CompatibleERC20Caller ¶
type CompatibleERC20Caller struct {
// contains filtered or unexported fields
}
CompatibleERC20Caller is an auto generated read-only Go binding around an Ethereum contract.
func NewCompatibleERC20Caller ¶
func NewCompatibleERC20Caller(address common.Address, caller bind.ContractCaller) (*CompatibleERC20Caller, error)
NewCompatibleERC20Caller creates a new read-only instance of CompatibleERC20, bound to a specific deployed contract.
func (*CompatibleERC20Caller) Allowance ¶
func (_CompatibleERC20 *CompatibleERC20Caller) 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(owner address, spender address) constant returns(uint256)
func (*CompatibleERC20Caller) BalanceOf ¶
func (_CompatibleERC20 *CompatibleERC20Caller) BalanceOf(opts *bind.CallOpts, who common.Address) (*big.Int, error)
BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
Solidity: function balanceOf(who address) constant returns(uint256)
func (*CompatibleERC20Caller) TotalSupply ¶
TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
Solidity: function totalSupply() constant returns(uint256)
type CompatibleERC20CallerRaw ¶
type CompatibleERC20CallerRaw struct {
Contract *CompatibleERC20Caller // Generic read-only contract binding to access the raw methods on
}
CompatibleERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*CompatibleERC20CallerRaw) Call ¶
func (_CompatibleERC20 *CompatibleERC20CallerRaw) 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 CompatibleERC20CallerSession ¶
type CompatibleERC20CallerSession struct { Contract *CompatibleERC20Caller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
CompatibleERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*CompatibleERC20CallerSession) Allowance ¶
func (_CompatibleERC20 *CompatibleERC20CallerSession) 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(owner address, spender address) constant returns(uint256)
func (*CompatibleERC20CallerSession) BalanceOf ¶
func (_CompatibleERC20 *CompatibleERC20CallerSession) BalanceOf(who common.Address) (*big.Int, error)
BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
Solidity: function balanceOf(who address) constant returns(uint256)
func (*CompatibleERC20CallerSession) TotalSupply ¶
func (_CompatibleERC20 *CompatibleERC20CallerSession) TotalSupply() (*big.Int, error)
TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
Solidity: function totalSupply() constant returns(uint256)
type CompatibleERC20Filterer ¶
type CompatibleERC20Filterer struct {
// contains filtered or unexported fields
}
CompatibleERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewCompatibleERC20Filterer ¶
func NewCompatibleERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*CompatibleERC20Filterer, error)
NewCompatibleERC20Filterer creates a new log filterer instance of CompatibleERC20, bound to a specific deployed contract.
func (*CompatibleERC20Filterer) FilterApproval ¶
func (_CompatibleERC20 *CompatibleERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*CompatibleERC20ApprovalIterator, error)
FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
Solidity: e Approval(owner indexed address, spender indexed address, value uint256)
func (*CompatibleERC20Filterer) FilterTransfer ¶
func (_CompatibleERC20 *CompatibleERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*CompatibleERC20TransferIterator, error)
FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
Solidity: e Transfer(from indexed address, to indexed address, value uint256)
func (*CompatibleERC20Filterer) WatchApproval ¶
func (_CompatibleERC20 *CompatibleERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *CompatibleERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error)
WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
Solidity: e Approval(owner indexed address, spender indexed address, value uint256)
func (*CompatibleERC20Filterer) WatchTransfer ¶
func (_CompatibleERC20 *CompatibleERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *CompatibleERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error)
WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
Solidity: e Transfer(from indexed address, to indexed address, value uint256)
type CompatibleERC20Raw ¶
type CompatibleERC20Raw struct {
Contract *CompatibleERC20 // Generic contract binding to access the raw methods on
}
CompatibleERC20Raw is an auto generated low-level Go binding around an Ethereum contract.
func (*CompatibleERC20Raw) Call ¶
func (_CompatibleERC20 *CompatibleERC20Raw) 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 (*CompatibleERC20Raw) Transact ¶
func (_CompatibleERC20 *CompatibleERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*CompatibleERC20Raw) Transfer ¶
func (_CompatibleERC20 *CompatibleERC20Raw) 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 CompatibleERC20Session ¶
type CompatibleERC20Session struct { Contract *CompatibleERC20 // 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 }
CompatibleERC20Session is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*CompatibleERC20Session) Allowance ¶
func (_CompatibleERC20 *CompatibleERC20Session) 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(owner address, spender address) constant returns(uint256)
func (*CompatibleERC20Session) Approve ¶
func (_CompatibleERC20 *CompatibleERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error)
Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
Solidity: function approve(spender address, value uint256) returns()
func (*CompatibleERC20Session) BalanceOf ¶
BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
Solidity: function balanceOf(who address) constant returns(uint256)
func (*CompatibleERC20Session) TotalSupply ¶
func (_CompatibleERC20 *CompatibleERC20Session) TotalSupply() (*big.Int, error)
TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
Solidity: function totalSupply() constant returns(uint256)
func (*CompatibleERC20Session) Transfer ¶
func (_CompatibleERC20 *CompatibleERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error)
Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
Solidity: function transfer(to address, value uint256) returns()
func (*CompatibleERC20Session) TransferFrom ¶
func (_CompatibleERC20 *CompatibleERC20Session) 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(from address, to address, value uint256) returns()
type CompatibleERC20Transactor ¶
type CompatibleERC20Transactor struct {
// contains filtered or unexported fields
}
CompatibleERC20Transactor is an auto generated write-only Go binding around an Ethereum contract.
func NewCompatibleERC20Transactor ¶
func NewCompatibleERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*CompatibleERC20Transactor, error)
NewCompatibleERC20Transactor creates a new write-only instance of CompatibleERC20, bound to a specific deployed contract.
func (*CompatibleERC20Transactor) Approve ¶
func (_CompatibleERC20 *CompatibleERC20Transactor) 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(spender address, value uint256) returns()
func (*CompatibleERC20Transactor) Transfer ¶
func (_CompatibleERC20 *CompatibleERC20Transactor) 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(to address, value uint256) returns()
func (*CompatibleERC20Transactor) TransferFrom ¶
func (_CompatibleERC20 *CompatibleERC20Transactor) 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(from address, to address, value uint256) returns()
type CompatibleERC20TransactorRaw ¶
type CompatibleERC20TransactorRaw struct {
Contract *CompatibleERC20Transactor // Generic write-only contract binding to access the raw methods on
}
CompatibleERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*CompatibleERC20TransactorRaw) Transact ¶
func (_CompatibleERC20 *CompatibleERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*CompatibleERC20TransactorRaw) Transfer ¶
func (_CompatibleERC20 *CompatibleERC20TransactorRaw) 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 CompatibleERC20TransactorSession ¶
type CompatibleERC20TransactorSession struct { Contract *CompatibleERC20Transactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
CompatibleERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*CompatibleERC20TransactorSession) Approve ¶
func (_CompatibleERC20 *CompatibleERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error)
Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
Solidity: function approve(spender address, value uint256) returns()
func (*CompatibleERC20TransactorSession) Transfer ¶
func (_CompatibleERC20 *CompatibleERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error)
Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
Solidity: function transfer(to address, value uint256) returns()
func (*CompatibleERC20TransactorSession) TransferFrom ¶
func (_CompatibleERC20 *CompatibleERC20TransactorSession) 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(from address, to address, value uint256) returns()
type CompatibleERC20Transfer ¶
type CompatibleERC20Transfer struct { From common.Address To common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos }
CompatibleERC20Transfer represents a Transfer event raised by the CompatibleERC20 contract.
type CompatibleERC20TransferIterator ¶
type CompatibleERC20TransferIterator struct { Event *CompatibleERC20Transfer // Event containing the contract specifics and raw log // contains filtered or unexported fields }
CompatibleERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the CompatibleERC20 contract.
func (*CompatibleERC20TransferIterator) Close ¶
func (it *CompatibleERC20TransferIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*CompatibleERC20TransferIterator) Error ¶
func (it *CompatibleERC20TransferIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*CompatibleERC20TransferIterator) Next ¶
func (it *CompatibleERC20TransferIterator) 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 ERC20 ¶
type ERC20 interface { BalanceOf(ctx context.Context, who common.Address) (*big.Int, error) Allowance(ctx context.Context, owner, spender common.Address) (*big.Int, error) Transfer(ctx context.Context, to common.Address, amount, gasPrice *big.Int, sendAll bool) (*types.Transaction, error) Approve(ctx context.Context, spender common.Address, amount, gasPrice *big.Int) (*types.Transaction, error) TransferFrom(ctx context.Context, from, to common.Address, amount, gasPrice *big.Int) (*types.Transaction, error) }
type TxExecutionSpeed ¶
type TxExecutionSpeed uint8
The TxExecutionSpeed indicates the tier of speed that the transaction falls under while writing to the blockchain.