Versions in this module Expand all Collapse all v1 v1.0.0 Sep 27, 2020 Changes in this version + const DefaultGasLimit + const DefaultMaxGasPrice + var ExpectedBlockTime = time.Second + var RelayerAddresses = []common.Address + var StoreFunctionSig = CreateFunctionSignature("store(bytes32)") + var ZeroAddress = common.HexToAddress("0x0000000000000000000000000000000000000000") + func ApproveErc721(client *Client, contractAddress, recipient common.Address, tokenId *big.Int) error + func ConstructErc20DepositData(destRecipient []byte, amount *big.Int) []byte + func ConstructErc721DepositData(tokenId *big.Int, destRecipient []byte) []byte + func ConstructGenericDepositData(metadata []byte) []byte + func CreateFunctionSignature(sig string) [4]byte + func DeployAndMintErc20(client *Client, amount *big.Int) (common.Address, error) + func DeployAssetStore(client *Client) (common.Address, error) + func DeployErc721(client *Client) (common.Address, error) + func DeployMintApproveErc20(client *Client, erc20Handler common.Address, amount *big.Int) (common.Address, error) + func Erc20AddMinter(client *Client, erc20Contract, handler common.Address) error + func Erc20Approve(client *Client, erc20Contract, recipient common.Address, amount *big.Int) error + func Erc20GetAllowance(client *Client, erc20Contract, owner, spender common.Address) (*big.Int, error) + func Erc20GetBalance(client *Client, erc20Contract, account common.Address) (*big.Int, error) + func Erc20GetResourceId(client *Client, handler common.Address, rId msg.ResourceId) (common.Address, error) + func Erc20Mint(client *Client, erc20Address, recipient common.Address, amount *big.Int) error + func Erc721AddMinter(client *Client, erc721Contract common.Address, minter common.Address) error + func Erc721GetTokenURI(client *Client, erc721Contract common.Address, tokenId *big.Int) (string, error) + func Erc721Mint(client *Client, erc721Contract common.Address, id *big.Int, metadata []byte) error + func FundErc20Handler(client *Client, handlerAddress, erc20Address common.Address, amount *big.Int) error + func FundErc721Handler(client *Client, handlerAddress, erc721Address common.Address, tokenId *big.Int) error + func GetDepositNonce(client *Client, bridge common.Address, chain msg.ChainId) (uint64, error) + func GetGenericResourceAddress(client *Client, handler common.Address, rId msg.ResourceId) (common.Address, error) + func Hash(data []byte) [32]byte + func HashExists(client *Client, hash [32]byte, contract common.Address) (bool, error) + func IDAndNonce(srcId msg.ChainId, nonce msg.Nonce) *big.Int + func IsActive(status uint8) bool + func IsExecuted(status uint8) bool + func IsFinalized(status uint8) bool + func OwnerOf(client *Client, erc721Contract common.Address, tokenId *big.Int) (common.Address, error) + func RegisterGenericResource(client *Client, bridge, handler common.Address, rId msg.ResourceId, ...) error + func RegisterResource(client *Client, bridge, handler common.Address, rId msg.ResourceId, ...) error + func SetBurnable(client *Client, bridge, handler, contract common.Address) error + func UpdateNonce(client *Client) error + func WaitForTx(client *Client, tx *ethtypes.Transaction) error + type Client struct + CallOpts *bind.CallOpts + Client *ethclient.Client + Opts *bind.TransactOpts + func NewClient(endpoint string, kp *secp256k1.Keypair) (*Client, error) + func (c *Client) LockNonceAndUpdate() error + func (c *Client) UnlockNonce() + type DeployedContracts struct + BridgeAddress common.Address + ERC20HandlerAddress common.Address + ERC721HandlerAddress common.Address + GenericHandlerAddress common.Address + func DeployContracts(client *Client, chainID uint8, initialRelayerThreshold *big.Int) (*DeployedContracts, error) + type EventSig string + const Deposit + const ProposalEvent + const ProposalVote + func (es EventSig) GetTopic() common.Hash + type ProposalStatus int + const Active + const Cancelled + const Executed + const Inactive + const Passed