Documentation
¶
Index ¶
- func ApproveTokens(t *testing.T, ac *accounts.Account, spender common.Address, tokenABI abi.ABI) (*types.Transaction, common.Hash, error)
- func DefaultApproveTokens(ctx context.Context, ac *accounts.Account, spender common.Address, ...) (*types.Transaction, common.Hash, error)
- func SendBridgeTx(t *testing.T, ac1 *accounts.Account, ac2 *accounts.Account, amount *big.Int, ...) (*types.Transaction, *types.Transaction, error)
- func SendBridgeTxWithNonce(t *testing.T, ac1 *accounts.Account, ac1_nonce uint64, ac2 *accounts.Account, ...) (*types.Transaction, *types.Transaction, error)
- func SendMintTx(t *testing.T, ac *accounts.Account, amount *big.Int, tokenABI abi.ABI) (*types.Transaction, common.Hash, error)
- func SendSelfMoveBalanceTx(ctx context.Context, ac *accounts.Account, amount *big.Int) (*types.Transaction, common.Hash, error)
- func SendSelfMoveBalanceTxWithNonce(ctx context.Context, ac *accounts.Account, nonce uint64, amount *big.Int) (*types.Transaction, common.Hash, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApproveTokens ¶ added in v0.0.2
func ApproveTokens( t *testing.T, ac *accounts.Account, spender common.Address, tokenABI abi.ABI, ) (*types.Transaction, common.Hash, error)
ApproveTokens approves max uint256 of tokens to the spender. It is used in normal tests for approving tokens from spawned accounts for the bridge contract.
func DefaultApproveTokens ¶ added in v0.0.2
func DefaultApproveTokens( ctx context.Context, ac *accounts.Account, spender common.Address, tokenABI abi.ABI, ) (*types.Transaction, common.Hash, error)
DefaultApproveTokens approves for the main accounts the maximum amount of tokens to the spender. It is used in config.go without testing context to be sure the main accounts always have the maximum amount of tokens approved.
func SendBridgeTx ¶
func SendBridgeTx( t *testing.T, ac1 *accounts.Account, ac2 *accounts.Account, amount *big.Int, tokenABI abi.ABI, bridgeABI abi.ABI, ) (*types.Transaction, *types.Transaction, error)
SendBridgeTx sends a bridge transaction from ac1 to ac2 with the given amount
func SendBridgeTxWithNonce ¶
func SendBridgeTxWithNonce( t *testing.T, ac1 *accounts.Account, ac1_nonce uint64, ac2 *accounts.Account, ac2_nonce uint64, amount *big.Int, tokenABI abi.ABI, bridgeABI abi.ABI, ) (*types.Transaction, *types.Transaction, error)
SendBridgeTxWithStartingNonce sends a bridge transaction from ac1 to ac2 with the given amount and starting nonce. Can be used to send multiple bridge txs from same account with different nonces.
func SendMintTx ¶
func SendMintTx(t *testing.T, ac *accounts.Account, amount *big.Int, tokenABI abi.ABI) (*types.Transaction, common.Hash, error)
MintTokens mints tokens to the given account
func SendSelfMoveBalanceTx ¶ added in v0.0.2
Types ¶
This section is empty.