Documentation ¶
Index ¶
- Constants
- func EventOfType[T proto.Message](events []abci.Event) (T, bool)
- func EventsOfType[T proto.Message](events []abci.Event) ([]T, bool)
- type SystemContractAddresses
- type ZRC20Addresses
- type ZRC20Deployment
- type ZetaTxServer
- func (zts ZetaTxServer) AddAuthorization(msgURL string) error
- func (zts ZetaTxServer) BroadcastTx(account string, msgs ...sdktypes.Msg) (*sdktypes.TxResponse, error)
- func (zts ZetaTxServer) DeploySystemContracts(accountOperational, accountAdmin string) (SystemContractAddresses, error)
- func (zts ZetaTxServer) DeployZRC20s(zrc20Deployment ZRC20Deployment, skipChain func(chainID int64) bool) (*ZRC20Addresses, error)
- func (zts ZetaTxServer) EnableHeaderVerification(account string, chainIDList []int64) error
- func (zts ZetaTxServer) FundEmissionsPool(account string, amount *big.Int) error
- func (zts ZetaTxServer) GetAccountAddress(index int) string
- func (zts ZetaTxServer) GetAccountAddressFromName(name string) (string, error)
- func (zts ZetaTxServer) GetAccountMnemonic(index int) string
- func (zts ZetaTxServer) GetAccountName(index int) string
- func (zts ZetaTxServer) GetAllAccountAddress() []string
- func (zts ZetaTxServer) InitializeLiquidityCaps(zrc20s ...string) error
- func (zts ZetaTxServer) MustGetAccountAddressFromName(name string) string
- func (zts *ZetaTxServer) SetAuthorityClient(authorityClient authoritytypes.QueryClient)
- func (zts ZetaTxServer) UpdateGatewayAddress(account, gatewayAddr string) error
- func (zts ZetaTxServer) UpdateKeygen(height int64) error
- func (zts ZetaTxServer) WithdrawAllEmissions(withdrawAmount sdkmath.Int, account, observer string) error
Constants ¶
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 EventOfType ¶
EventOfType gets one event of a specific type
Types ¶
type SystemContractAddresses ¶
type SystemContractAddresses struct {
UniswapV2FactoryAddr, UniswapV2RouterAddr, ZEVMConnectorAddr, WZETAAddr, ERC20zrc20Addr string
}
SystemContractAddresses contains the addresses of the system contracts deployed
type ZRC20Addresses ¶
ZRC20Addresses contains the addresses of deployed ZRC20 contracts
type ZRC20Deployment ¶
type ZRC20Deployment struct { ERC20Addr common.Address SPLAddr *solana.PublicKey // if nil - no SPL ZRC20 is deployed }
ZRC20Deployment configures deployment of ZRC20 contracts
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) AddAuthorization ¶
func (zts ZetaTxServer) AddAuthorization(msgURL string) error
AddAuthorization adds a new authorization in the authority module for admin message
func (ZetaTxServer) BroadcastTx ¶
func (zts ZetaTxServer) BroadcastTx(account string, msgs ...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) DeploySystemContracts ¶
func (zts ZetaTxServer) DeploySystemContracts( accountOperational, accountAdmin string, ) (SystemContractAddresses, error)
DeploySystemContracts deploys the system contracts returns the addresses of uniswap factory, router
func (ZetaTxServer) DeployZRC20s ¶
func (zts ZetaTxServer) DeployZRC20s( zrc20Deployment ZRC20Deployment, skipChain func(chainID int64) bool, ) (*ZRC20Addresses, error)
DeployZRC20s deploys the ZRC20 contracts returns the addresses of erc20 and spl 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) InitializeLiquidityCaps ¶
func (zts ZetaTxServer) InitializeLiquidityCaps(zrc20s ...string) error
InitializeLiquidityCaps initializes the liquidity cap for the given coin with a large value
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) SetAuthorityClient ¶
func (zts *ZetaTxServer) SetAuthorityClient(authorityClient authoritytypes.QueryClient)
SetAuthorityClient sets the authority client
func (ZetaTxServer) UpdateGatewayAddress ¶
func (zts ZetaTxServer) UpdateGatewayAddress(account, gatewayAddr string) error
UpdateGatewayAddress updates the gateway address
func (ZetaTxServer) UpdateKeygen ¶
func (zts ZetaTxServer) UpdateKeygen(height int64) error
UpdateKeygen sets a new keygen height . The new height is the current height + 30
func (ZetaTxServer) WithdrawAllEmissions ¶
func (zts ZetaTxServer) WithdrawAllEmissions(withdrawAmount sdkmath.Int, account, observer string) error