Documentation ¶
Index ¶
- Constants
- Variables
- func DecodePrivateKey(privateKey string) *ecdsa.PrivateKey
- func EncodePrivateKey(priv *ecdsa.PrivateKey) string
- func GetKeystore(backupFile string, keystoreDir string, passwordFile string) (string, string, string)
- func LoadContracts(abi string, config string) (map[string]*Contract, error)
- type Contract
- func (contract *Contract) Call(web3 *Web3, contractAddress string, method string, params ...interface{}) (interface{}, error)
- func (contract *Contract) Deploy(web3 *Web3, bin []byte, private string, val int64, params ...interface{}) (string, error)
- func (contract *Contract) Get() abi.ABI
- func (contract *Contract) ParseData(data []byte) (map[string]interface{}, error)
- func (contract *Contract) ParseLogs(logs []*types.Log) []map[string]interface{}
- func (contract *Contract) Transact(web3 *Web3, private string, val int64, contractAddress string, method string, ...) (*types.Transaction, *types.Receipt, error)
- type Web3
Constants ¶
View Source
const ( Empty = "0x0000000000000000000000000000000000000000" Wei = 1000000000000000000 )
Variables ¶
View Source
var DefaultAddress = "0x1005388e1649240036d199b6ad71eafc0164edad"
View Source
var DefaultPrivateKey = "b45c2d049b489a5d7f5a1b5212a0c262472a28b241e73e3e465d3133036a1c2f"
Functions ¶
func DecodePrivateKey ¶
func DecodePrivateKey(privateKey string) *ecdsa.PrivateKey
func EncodePrivateKey ¶
func EncodePrivateKey(priv *ecdsa.PrivateKey) string
Types ¶
type Contract ¶
type Web3 ¶
func (*Web3) LoadContracts ¶
Click to show internal directories.
Click to hide internal directories.