Documentation ¶
Index ¶
- func DeployToken(ctx context.Context, network *Network, supply int64) error
- func Run(t *testing.T, numNetworks, numAccounts int, ...)
- type Network
- func (network *Network) Accounts() []accounts.Account
- func (network *Network) ChainID() *big.Int
- func (network *Network) Close() error
- func (network *Network) Dial() *ethclient.Client
- func (network *Network) Ethereum() *eth.Ethereum
- func (network *Network) HTTPEndpoint() string
- func (network *Network) Start() error
- func (network *Network) TokenAddress() common.Address
- func (network *Network) TransactOptions(ctx context.Context, account accounts.Account, nonce int64) *bind.TransactOpts
- func (network *Network) WaitForTx(ctx context.Context, hash common.Hash) (*types.Receipt, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeployToken ¶
DeployToken deploys test token to provided network using coinbase account.
Types ¶
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
Network - test Ethererum network.
func NewNetwork ¶
func NewNetwork(nodeConfig node.Config, ethConfig ethconfig.Config, numAccounts int) (*Network, error)
NewNetwork creates new test Ethereum network with PoS and inmemory DBs.
func (*Network) Accounts ¶
Accounts returns available accounts, with first one being coinbase account.
func (*Network) HTTPEndpoint ¶
HTTPEndpoint returns HTTP RPC API endpoint address.
func (*Network) Start ¶
Start starts all registered lifecycles, RPC services, p2p networking and starts mining.
func (*Network) TokenAddress ¶ added in v1.0.5
TokenAddress returns address of deployed test token.
func (*Network) TransactOptions ¶
func (network *Network) TransactOptions(ctx context.Context, account accounts.Account, nonce int64) *bind.TransactOpts
TransactOptions creates new key store transaction opts for given account with provided nonce and context.
Click to show internal directories.
Click to hide internal directories.