Documentation ¶
Index ¶
- type Contract
- func (c *Contract) Addr() web3.Address
- func (c *Contract) Call(method string, block web3.BlockNumber, args ...interface{}) (map[string]interface{}, error)
- func (c *Contract) EstimateGas(method string, args ...interface{}) (uint64, error)
- func (c *Contract) Event(name string) (*Event, bool)
- func (c *Contract) SetFrom(addr web3.Address)
- func (c *Contract) Txn(method string, args ...interface{}) *Txn
- type Event
- type NodeProvider
- type Txn
- func (t *Txn) AddArgs(args ...interface{}) *Txn
- func (t *Txn) Do() error
- func (t *Txn) DoAndWait() error
- func (t *Txn) EstimateGas() (uint64, error)
- func (t *Txn) Receipt() *web3.Receipt
- func (t *Txn) SetGasLimit(gasLimit uint64) *Txn
- func (t *Txn) SetGasPrice(gasPrice uint64) *Txn
- func (t *Txn) SetValue(v *big.Int) *Txn
- func (t *Txn) Validate() error
- func (t *Txn) Wait() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contract ¶
type Contract struct {
// contains filtered or unexported fields
}
Contract is an Ethereum contract
func NewContract ¶
NewContract creates a new contract instance
func (*Contract) Addr ¶
func (c *Contract) Addr() web3.Address
Addr returns the address of the contract
func (*Contract) Call ¶
func (c *Contract) Call(method string, block web3.BlockNumber, args ...interface{}) (map[string]interface{}, error)
Call calls a method in the contract
func (*Contract) EstimateGas ¶
EstimateGas estimates the gas for a contract call
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event is a solidity event
type NodeProvider ¶
type NodeProvider interface { }
NodeProvider handles the interactions with the Ethereum 1x node
type Txn ¶
type Txn struct {
// contains filtered or unexported fields
}
Txn is a transaction object
func DeployContract ¶
func DeployContract(provider *jsonrpc.Client, from web3.Address, abi *abi.ABI, bin []byte, args ...interface{}) *Txn
DeployContract deploys a contract
func (*Txn) EstimateGas ¶
EstimateGas estimates the gas for the call
func (*Txn) Receipt ¶
func (t *Txn) Receipt() *web3.Receipt
Receipt returns the receipt of the transaction after wait
func (*Txn) SetGasLimit ¶
SetGasLimit sets the gas limit of the transaction
func (*Txn) SetGasPrice ¶
SetGasPrice sets the gas price of the transaction
Click to show internal directories.
Click to hide internal directories.