ethereum

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bool    = "bool"
	Address = "address"
	Int64   = "int64"
	Uint64  = "uint64"
	Int32   = "int32"
	Uint32  = "uint32"
	Int8    = "int8"
	Uint8   = "uint8"
	Bytes32 = "bytes32"
	String  = "string"
)

Variables

This section is empty.

Functions

func ABIUnmarshal

func ABIUnmarshal(abi abi.ABI, args [][]byte, funcName string) ([]interface{}, error)

func UnpackOutput

func UnpackOutput(abi abi.ABI, method string, receipt string) ([]interface{}, error)

Types

type CompileResult

type CompileResult struct {
	Abi   []string
	Bins  []string
	Types []string
}

type Config

type Config struct {
	Ether Ether `toml:"ether" json:"ether"`
}

func UnmarshalConfig

func UnmarshalConfig(configRoot string) (*Config, error)

type EthClient

type EthClient struct {
	Client *ethclient.Client
	// contains filtered or unexported fields
}

func New

func New(configPath string) (*EthClient, error)

New returns EthClient with ethereum addr and private key path

func (*EthClient) Deploy

func (client *EthClient) Deploy(codePath string) (string, string, error)

func (*EthClient) Invoke

func (client *EthClient) Invoke(abiPath string, dstAddr string, function string, args ...string) (string, error)

type Ether

type Ether struct {
	Addr            string `toml:"addr" json:"addr"`
	Name            string `toml:"name" json:"name"`
	ContractAddress string `mapstructure:"contract_address" json:"contract_address"`
	AbiPath         string `mapstructure:"abi_path" json:"abi_path"`
	KeyPath         string `mapstructure:"key_path" json:"key_path"`
	Password        string `toml:"password" json:"password"`
}

type EtherSession

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

Jump to

Keyboard shortcuts

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