ethtest

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NonExistentTokenError = errors.New("VM Exception while processing transaction: revert ERC721: owner query for nonexistent token")

Functions

func AssertGenericResourceAddress

func AssertGenericResourceAddress(t *testing.T, client *utils.Client, handler common.Address, rId msg.ResourceId, expected common.Address)

func AssertHashExistence

func AssertHashExistence(t *testing.T, client *utils.Client, hash [32]byte, contract common.Address)

func DeployAssetStore

func DeployAssetStore(t *testing.T, client *utils.Client) common.Address

func DeployMintApproveErc20

func DeployMintApproveErc20(t *testing.T, client *utils.Client, erc20Handler common.Address, amount *big.Int) common.Address

func Erc20AddMinter

func Erc20AddMinter(t *testing.T, client *utils.Client, erc20Contract, handler common.Address)

func Erc20Approve

func Erc20Approve(t *testing.T, client *utils.Client, erc20Contract, recipient common.Address, amount *big.Int)

func Erc20AssertAllowance

func Erc20AssertAllowance(t *testing.T, client *utils.Client, erc20Contract, owner, spender common.Address, expected *big.Int)

func Erc20AssertBalance

func Erc20AssertBalance(t *testing.T, client *utils.Client, amount *big.Int, erc20Contract, account common.Address)

func Erc20AssertResourceMapping

func Erc20AssertResourceMapping(t *testing.T, client *utils.Client, handler common.Address, rId msg.ResourceId, expected common.Address)

func Erc20BalanceOf

func Erc20BalanceOf(t *testing.T, client *utils.Client, erc20Contract, acct common.Address) *big.Int

func Erc20DeployMint

func Erc20DeployMint(t *testing.T, client *utils.Client, amount *big.Int) common.Address

func Erc20Mint

func Erc20Mint(t *testing.T, client *utils.Client, erc20Contract, recipient common.Address, amount *big.Int)

func Erc721AddMinter

func Erc721AddMinter(t *testing.T, client *utils.Client, erc721Contract common.Address, minter common.Address)

func Erc721Approve

func Erc721Approve(t *testing.T, client *utils.Client, erc721Contract, recipient common.Address, tokenId *big.Int)

func Erc721ApproveMany

func Erc721ApproveMany(t *testing.T, client *utils.Client, erc721Contract, recipient common.Address, tokens []Erc721)

func Erc721AssertMetadata

func Erc721AssertMetadata(t *testing.T, client *utils.Client, erc721Contract common.Address, tokenId *big.Int, expected string)

func Erc721AssertNonExistence

func Erc721AssertNonExistence(t *testing.T, client *utils.Client, erc721Contract common.Address, id *big.Int)

func Erc721AssertOwner

func Erc721AssertOwner(t *testing.T, client *utils.Client, erc721Contract common.Address, tokenId *big.Int, expected common.Address)

func Erc721Deploy

func Erc721Deploy(t *testing.T, client *utils.Client) common.Address

func Erc721FundHandler

func Erc721FundHandler(t *testing.T, client *utils.Client, handler, erc721Contract common.Address, tokenId *big.Int)

func Erc721FundHandlerMany

func Erc721FundHandlerMany(t *testing.T, client *utils.Client, handler, erc721Contract common.Address, start, numberOfTokens int)

func Erc721Mint

func Erc721Mint(t *testing.T, client *utils.Client, erc721Contract common.Address, id *big.Int, metadata []byte)

func Erc721MintMany

func Erc721MintMany(t *testing.T, client *utils.Client, erc721Contract common.Address, tokens []Erc721)

func FundErc20Handler

func FundErc20Handler(t *testing.T, client *utils.Client, handlerAddress, erc20Address common.Address, amount *big.Int)

func GetDepositNonce

func GetDepositNonce(t *testing.T, client *utils.Client, bridge common.Address, chain msg.ChainId) uint64

func GetLatestBlock

func GetLatestBlock(t *testing.T, client *utils.Client) *big.Int

func LockNonceAndUpdate

func LockNonceAndUpdate(t *testing.T, client *utils.Client)

func NewClient

func NewClient(t *testing.T, endpoint string, kp *secp256k1.Keypair) *utils.Client

func RegisterGenericResource

func RegisterGenericResource(t *testing.T, client *utils.Client, bridge, handler common.Address, rId msg.ResourceId, addr common.Address, depositSig, executeSig [4]byte)

func RegisterResource

func RegisterResource(t *testing.T, client *utils.Client, bridge, handler common.Address, rId msg.ResourceId, addr common.Address)

func SetBurnable

func SetBurnable(t *testing.T, client *utils.Client, bridge, handler, contract common.Address)

func WatchEvent

func WatchEvent(client *utils.Client, bridge common.Address, subStr utils.EventSig)

Types

type Erc721

type Erc721 struct {
	Id       *big.Int
	Metadata [32]byte
}

Erc721 is used for convenience to represent an Erc721

func GenerateErc721Tokens

func GenerateErc721Tokens(start int, numOfTokens int) []Erc721

Jump to

Keyboard shortcuts

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