test

package
v0.0.0-...-6d19cb1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EthToWei

func EthToWei(ethAmount *big.Float) (weiAmount *big.Int)

func LogAccountBalance

func LogAccountBalance(clients ...*client.Client)

func WeiToEth

func WeiToEth(weiAmount *big.Int) (ethAmount *big.Float)

Types

type ContractAddresses

type ContractAddresses struct {
	Adjudicator, AssetHolder, App common.Address
}

type Environment

type Environment struct {
	Holder, Issuer *client.Client
	Ganache        *ganache.Ganache
}

func Setup

func Setup(t *testing.T) *Environment

func (*Environment) LogAccountBalances

func (e *Environment) LogAccountBalances()

type EthClient

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

func NewEthClient

func NewEthClient(ctx context.Context, nodeURL string, key *ecdsa.PrivateKey, chainID *big.Int) (*EthClient, error)

func (*EthClient) AccountBalance

func (c *EthClient) AccountBalance(a common.Address) (b *big.Int, err error)

func (*EthClient) DeployAdjudicator

func (c *EthClient) DeployAdjudicator(ctx context.Context) (addr common.Address, tx *types.Transaction, err error)

func (*EthClient) DeployApp

func (c *EthClient) DeployApp(ctx context.Context, adjudicatorAddr common.Address) (addr common.Address, tx *types.Transaction, err error)

func (*EthClient) DeployAssetHolderETH

func (c *EthClient) DeployAssetHolderETH(ctx context.Context, adjudicatorAddr common.Address, appAddr common.Address) (addr common.Address, tx *types.Transaction, err error)

func (*EthClient) WaitDeployment

func (c *EthClient) WaitDeployment(ctx context.Context, txs ...*types.Transaction) (err error)

Jump to

Keyboard shortcuts

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