Documentation ¶
Overview ¶
Package abi implements smart contract call helper
Index ¶
- func Call(abi abi.ABI, to, name string, inputs []interface{}) (resp json.RPCResponse, err error)
- func DummySendTransaction(abi abi.ABI, to, name string, inputs []interface{}, gas int) (resp json.RPCResponse, err error)
- func DummySendTransactionWithSign(abi abi.ABI, to, name string, inputs []interface{}, gasLimit, gasPrice uint64) (resp json.RPCResponse, err error)
- func GetAbiFromJSON(raw string) (abi.ABI, error)
- func Pack(abi abi.ABI, name string, args ...interface{}) (string, error)
- func SendTransaction(abi abi.ABI, to, name string, inputs []interface{}, gas int) (resp json.RPCResponse, err error)
- func SendTransactionWithSign(abi abi.ABI, to, name string, inputs []interface{}, gasLimit, gasPrice uint64) (resp json.RPCResponse, err error)
- func Unpack(abi abi.ABI, v interface{}, name string, output string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DummySendTransaction ¶
func DummySendTransaction(abi abi.ABI, to, name string, inputs []interface{}, gas int) (resp json.RPCResponse, err error)
DummySendTransaction invokes abi.SendTransaction with dummy of Crypto struct
func DummySendTransactionWithSign ¶
func DummySendTransactionWithSign(abi abi.ABI, to, name string, inputs []interface{}, gasLimit, gasPrice uint64) (resp json.RPCResponse, err error)
DummySendTransactionWithSign invokes abi.SendTransactionWithSign with dummy of Crypto struct
func GetAbiFromJSON ¶
GetAbiFromJSON returns ABI object from JSON string
func SendTransaction ¶
func SendTransaction(abi abi.ABI, to, name string, inputs []interface{}, gas int) (resp json.RPCResponse, err error)
SendTransaction calls smart contract with ABI using eth_sendTransaction
func SendTransactionWithSign ¶
func SendTransactionWithSign(abi abi.ABI, to, name string, inputs []interface{}, gasLimit, gasPrice uint64) (resp json.RPCResponse, err error)
SendTransactionWithSign calls smart contract with ABI using eth_sendRawTransaction
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.