Versions in this module Expand all Collapse all v0 v0.1.2 Jan 9, 2020 v0.1.1 Sep 3, 2019 Changes in this version + type BaseBlockchain struct + func NewBaseBlockchain(rpcClient *rpc.Client, client *ethclient.Client, ...) *BaseBlockchain + func (b *BaseBlockchain) BuildSendERC20Tx(opts TxOpts, amount *big.Int, to ethereum.Address, ...) (*types.Transaction, error) + func (b *BaseBlockchain) BuildSendETHTx(opts TxOpts, to ethereum.Address) (*types.Transaction, error) + func (b *BaseBlockchain) BuildTx(context context.Context, opts TxOpts, contract *Contract, method string, ...) (*types.Transaction, error) + func (b *BaseBlockchain) Call(timeOut time.Duration, opts CallOpts, contract *Contract, result interface{}, ...) error + func (b *BaseBlockchain) CurrentBlock() (uint64, error) + func (b *BaseBlockchain) GetCallOpts(block uint64) CallOpts + func (b *BaseBlockchain) GetLogs(param ether.FilterQuery) ([]types.Log, error) + func (b *BaseBlockchain) GetMinedNonce(operator string) (uint64, error) + func (b *BaseBlockchain) GetNextNonce(operator string) (*big.Int, error) + func (b *BaseBlockchain) GetTxOpts(op string, nonce *big.Int, gasPrice *big.Int, value *big.Int) (TxOpts, error) + func (b *BaseBlockchain) MustGetOperator(name string) *Operator + func (b *BaseBlockchain) MustRegisterOperator(name string, op *Operator) + func (b *BaseBlockchain) OperatorAddresses() map[string]ethereum.Address + func (b *BaseBlockchain) PackERC20Data(method string, params ...interface{}) ([]byte, error) + func (b *BaseBlockchain) RecommendedGasPriceFromNode() (*big.Int, error) + func (b *BaseBlockchain) SignAndBroadcast(tx *types.Transaction, from string) (*types.Transaction, error) + func (b *BaseBlockchain) TransactionByHash(ctx context.Context, hash ethereum.Hash) (tx *RPCTransaction, isPending bool, err error) + func (b *BaseBlockchain) TxStatus(hash ethereum.Hash) (string, uint64, error) + type Broadcaster struct + func NewBroadcaster(clients map[string]*ethclient.Client) *Broadcaster + func (b Broadcaster) Broadcast(tx *types.Transaction) (map[string]error, bool) + type CallOpts struct + Block *big.Int + type Contract struct + ABI abi.ABI + Address ethereum.Address + func NewContract(address ethereum.Address, abipath string) *Contract + type ContractCaller struct + func NewContractCaller(clients []*ethclient.Client, urls []string) *ContractCaller + func (c ContractCaller) CallContract(msg ether.CallMsg, blockNo *big.Int, timeOut time.Duration) ([]byte, error) + type EthereumSigner struct + func NewEthereumSigner(keyPath string, passphrase string) *EthereumSigner + func (es EthereumSigner) GetAddress() ethereum.Address + func (es EthereumSigner) Sign(tx *types.Transaction) (*types.Transaction, error) + type NonceCorpus interface + GetAddress func() ethereum.Address + GetNextNonce func(ethclient *ethclient.Client) (*big.Int, error) + MinedNonce func(ethclient *ethclient.Client) (*big.Int, error) + type Operator struct + Address ethereum.Address + NonceCorpus NonceCorpus + Signer Signer + func NewOperator(signer Signer, nonce NonceCorpus) *Operator + type RPCTransaction struct + func (tx *RPCTransaction) BlockNumber() *big.Int + func (tx *RPCTransaction) UnmarshalJSON(msg []byte) error + type Signer interface + GetAddress func() ethereum.Address + Sign func(*types.Transaction) (*types.Transaction, error) + type TxOpts struct + GasLimit uint64 + GasPrice *big.Int + Nonce *big.Int + Operator *Operator + Value *big.Int