abi

package
v0.0.0-...-5a544cf Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package abi implements smart contract call helper

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(abi abi.ABI, to, name string, inputs []interface{}) (resp json.RPCResponse, err error)

Call gets contract value with contract address and name

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

func GetAbiFromJSON(raw string) (abi.ABI, error)

GetAbiFromJSON returns ABI object from JSON string

func Pack

func Pack(abi abi.ABI, name string, args ...interface{}) (string, error)

Pack makes packed data with inputs on ABI

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

func Unpack

func Unpack(abi abi.ABI, v interface{}, name string, output string) error

Unpack fills output into given ABI

Types

This section is empty.

Jump to

Keyboard shortcuts

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