txserver

package
v0.0.0-...-2da98db Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const EmissionsPoolAddress = "zeta1w43fn2ze2wyhu5hfmegr6vp52c3dgn0srdgymy"

EmissionsPoolAddress is the address of the emissions pool This address is constant for all networks because it is derived from emissions name

Variables

This section is empty.

Functions

func FetchAttributeFromTxResponse

func FetchAttributeFromTxResponse(res *sdktypes.TxResponse, key string) (string, error)

FetchAttributeFromTxResponse fetches the attribute from the tx response

Types

type ZetaTxServer

type ZetaTxServer struct {
	// contains filtered or unexported fields
}

ZetaTxServer is a ZetaChain tx server for E2E test

func NewZetaTxServer

func NewZetaTxServer(rpcAddr string, names []string, privateKeys []string, chainID string) (*ZetaTxServer, error)

NewZetaTxServer returns a new TxServer with provided account

func (ZetaTxServer) BroadcastTx

func (zts ZetaTxServer) BroadcastTx(account string, msg sdktypes.Msg) (*sdktypes.TxResponse, error)

BroadcastTx broadcasts a tx to ZetaChain with the provided msg from the account and waiting for blockTime for tx to be included in the block

func (ZetaTxServer) DeploySystemContractsAndZRC20

func (zts ZetaTxServer) DeploySystemContractsAndZRC20(
	account, erc20Addr string,
) (string, string, string, string, string, error)

DeploySystemContractsAndZRC20 deploys the system contracts and ZRC20 contracts returns the addresses of uniswap factory, router and erc20 zrc20

func (ZetaTxServer) EnableHeaderVerification

func (zts ZetaTxServer) EnableHeaderVerification(account string, chainIDList []int64) error

EnableHeaderVerification enables the header verification for the given chain IDs

func (ZetaTxServer) FundEmissionsPool

func (zts ZetaTxServer) FundEmissionsPool(account string, amount *big.Int) error

FundEmissionsPool funds the emissions pool with the given amount

func (ZetaTxServer) GetAccountAddress

func (zts ZetaTxServer) GetAccountAddress(index int) string

GetAccountAddress returns the account address from the given index returns empty string if index is out of bound, error should be handled by caller

func (ZetaTxServer) GetAccountAddressFromName

func (zts ZetaTxServer) GetAccountAddressFromName(name string) (string, error)

GetAccountAddressFromName returns the account address from the given name

func (ZetaTxServer) GetAccountMnemonic

func (zts ZetaTxServer) GetAccountMnemonic(index int) string

GetAccountMnemonic returns the account name from the given index returns empty string if index is out of bound, error should be handled by caller

func (ZetaTxServer) GetAccountName

func (zts ZetaTxServer) GetAccountName(index int) string

GetAccountName returns the account name from the given index returns empty string if index is out of bound, error should be handled by caller

func (ZetaTxServer) GetAllAccountAddress

func (zts ZetaTxServer) GetAllAccountAddress() []string

GetAllAccountAddress returns all account addresses

func (ZetaTxServer) MustGetAccountAddressFromName

func (zts ZetaTxServer) MustGetAccountAddressFromName(name string) string

MustGetAccountAddressFromName returns the account address from the given name.It panics on error and should be used in tests only

func (ZetaTxServer) UpdateKeygen

func (zts ZetaTxServer) UpdateKeygen(height int64) error

UpdateKeygen sets a new keygen height . The new height is the current height + 30

Jump to

Keyboard shortcuts

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