Documentation ¶
Index ¶
- Variables
- func AccAddress() string
- func AppState(t *testing.T) map[string]json.RawMessage
- func AssetRate() types.AssetRate
- func Authorization() authoritytypes.Authorization
- func AuthorizationList(val string) authoritytypes.AuthorizationList
- func Ballot(t *testing.T, index string) *types.Ballot
- func BallotList(n int, observerSet []string) []types.Ballot
- func Bech32AccAddress() sdk.AccAddress
- func BlameRecord(t *testing.T, index string) types.Blame
- func BlameRecordsList(t *testing.T, n int) []types.Blame
- func BlockHeader(blockHash []byte) proofs.BlockHeader
- func BlockHeaderVerification() lightclienttypes.BlockHeaderVerification
- func BtcHash() chainhash.Hash
- func Bytes() []byte
- func Chain(chainID int64) chains.Chain
- func ChainInfo(startChainID int64) authoritytypes.ChainInfo
- func ChainNonces(t *testing.T, index string) types.ChainNonces
- func ChainNoncesList(t *testing.T, n int) []types.ChainNonces
- func ChainParams(chainID int64) *types.ChainParams
- func ChainParamsList() (cpl types.ChainParamsList)
- func ChainParamsSupported(chainID int64) *types.ChainParams
- func ChainState(chainID int64) lightclienttypes.ChainState
- func Coins() sdk.Coins
- func CreateTempDir(t *testing.T) string
- func CrossChainTx(t *testing.T, index string) *types.CrossChainTx
- func CrosschainFlags() *types.CrosschainFlags
- func CustomAssetRate(chainID int64, asset string, decimals uint32, coinType coin.CoinType, ...) types.AssetRate
- func CustomCctxsInBlockRange(t *testing.T, lowBlock uint64, highBlock uint64, senderChainID int64, ...) (cctxs []*types.CrossChainTx)
- func CustomRateLimiterFlags(enabled bool, window int64, rate math.Uint, conversions []types.Conversion) types.RateLimiterFlags
- func EthAddress() ethcommon.Address
- func EthTx(t *testing.T, chainID int64, to ethcommon.Address, nonce uint64) (*ethtypes.Transaction, []byte)
- func EthTxSigned(t *testing.T, chainID int64, to ethcommon.Address, nonce uint64) (*ethtypes.Transaction, []byte, ethcommon.Address)
- func EventIndex() uint64
- func ForeignCoinList(t *testing.T, zrc20ETH, zrc20BTC, zrc20ERC20, erc20Asset string) []types.ForeignCoins
- func ForeignCoins(t *testing.T, address string) types.ForeignCoins
- func GasPrice(t *testing.T, index string) *types.GasPrice
- func GasPriceIncreaseFlags() types.GasPriceIncreaseFlags
- func GenDoc(t *testing.T) *types.GenesisDoc
- func GetCctxIndexFromString(index string) string
- func GetInvalidZRC20WithdrawToExternal(t *testing.T) (receipt ethtypes.Receipt)
- func GetValidZRC20WithdrawToBTC(t *testing.T) (receipt ethtypes.Receipt)
- func GetValidZetaSentDestinationExternal(t *testing.T) (receipt ethtypes.Receipt)
- func GetValidZrc20WithdrawToETH(t *testing.T) (receipt ethtypes.Receipt)
- func Hash() ethcommon.Hash
- func HeaderSupportedChains() []lightclienttypes.HeaderSupportedChain
- func InboundHashToCctx(t *testing.T, inboundHash string) types.InboundHashToCctx
- func InboundParams(r *rand.Rand) *types.InboundParams
- func InboundParamsValidChainID(r *rand.Rand) *types.InboundParams
- func InboundTracker(t *testing.T, index string) types.InboundTracker
- func InboundVote(coinType coin.CoinType, from, to int64) types.MsgVoteInbound
- func Int64InRange(low, high int64) int64
- func IntInRange(low, high int64) sdkmath.Int
- func Keygen(t *testing.T) *types.Keygen
- func LastBlockHeight(t *testing.T, index string) *types.LastBlockHeight
- func LastObserverCount(lastChangeHeight int64) *types.LastObserverCount
- func NodeAccount() *types.NodeAccount
- func NonceToCCTX(t *testing.T, seed string) types.NonceToCctx
- func NonceToCctxList(t *testing.T, index string, count int) []types.NonceToCctx
- func ObserverSet(n int) types.ObserverSet
- func OutboundParams(r *rand.Rand) *types.OutboundParams
- func OutboundParamsValidChainID(r *rand.Rand) *types.OutboundParams
- func OutboundTracker(t *testing.T, index string) types.OutboundTracker
- func PendingNoncesList(t *testing.T, index string, count int) []types.PendingNonces
- func Policies() authoritytypes.Policies
- func PrivKeyAddressPair() (*ed25519.PrivKey, sdk.AccAddress)
- func Proof(t *testing.T) (*proofs.Proof, proofs.BlockHeader, string, int64, int64, ethcommon.Hash)
- func PubKey(r *rand.Rand) cryptotypes.PubKey
- func PubKeySet() *crypto.PubKeySet
- func PubKeyString() string
- func Rand() *rand.Rand
- func RateLimiterFlags() types.RateLimiterFlags
- func Status(t *testing.T, index string) *types.Status
- func String() string
- func StringRandom(r *rand.Rand, length int) string
- func SystemContract() *types.SystemContract
- func Tss() types.TSS
- func TssFundsMigrator(chainID int64) types.TssFundMigratorInfo
- func TssList(n int) (tssList []types.TSS)
- func Uint64InRange(low, high uint64) uint64
- func UintInRange(low, high uint64) sdkmath.Uint
- func ValAddress(r *rand.Rand) sdk.ValAddress
- func Validator(t testing.TB, r *rand.Rand) stakingtypes.Validator
- func VotesSuccessOnly(voteCount int) []types.VoteType
- func WithdrawableEmissions(t *testing.T) types.WithdrawableEmissions
- func ZetaAccounting(t *testing.T, index string) types.ZetaAccounting
- func ZetaIndex(t *testing.T) string
- type MultipleSignerMessage
Constants ¶
This section is empty.
Variables ¶
var ErrSample = errors.New("sample error")
Functions ¶
func Authorization ¶
func Authorization() authoritytypes.Authorization
func AuthorizationList ¶
func AuthorizationList(val string) authoritytypes.AuthorizationList
func Bech32AccAddress ¶
func Bech32AccAddress() sdk.AccAddress
Bech32AccAddress returns a sample account address
func BlockHeader ¶
func BlockHeader(blockHash []byte) proofs.BlockHeader
func BlockHeaderVerification ¶
func BlockHeaderVerification() lightclienttypes.BlockHeaderVerification
func ChainInfo ¶
func ChainInfo(startChainID int64) authoritytypes.ChainInfo
func ChainNonces ¶
func ChainNonces(t *testing.T, index string) types.ChainNonces
func ChainNoncesList ¶
func ChainNoncesList(t *testing.T, n int) []types.ChainNonces
func ChainParams ¶
func ChainParams(chainID int64) *types.ChainParams
func ChainParamsList ¶
func ChainParamsList() (cpl types.ChainParamsList)
func ChainParamsSupported ¶
func ChainParamsSupported(chainID int64) *types.ChainParams
func ChainState ¶
func ChainState(chainID int64) lightclienttypes.ChainState
func CreateTempDir ¶
create a temporary directory for testing
func CrossChainTx ¶
func CrossChainTx(t *testing.T, index string) *types.CrossChainTx
func CrosschainFlags ¶
func CrosschainFlags() *types.CrosschainFlags
func CustomAssetRate ¶
func CustomAssetRate( chainID int64, asset string, decimals uint32, coinType coin.CoinType, rate sdk.Dec, ) types.AssetRate
CustomAssetRate creates a custom asset rate with the given parameters
func CustomCctxsInBlockRange ¶
func CustomCctxsInBlockRange( t *testing.T, lowBlock uint64, highBlock uint64, senderChainID int64, receiverChainID int64, coinType coin.CoinType, asset string, amount uint64, status types.CctxStatus, ) (cctxs []*types.CrossChainTx)
CustomCctxsInBlockRange create 1 cctx per block in block range [lowBlock, highBlock] (inclusive)
func CustomRateLimiterFlags ¶
func CustomRateLimiterFlags( enabled bool, window int64, rate math.Uint, conversions []types.Conversion, ) types.RateLimiterFlags
CustomRateLimiterFlags creates a custom rate limiter flags with the given parameters
func EthTx ¶
func EthTx(t *testing.T, chainID int64, to ethcommon.Address, nonce uint64) (*ethtypes.Transaction, []byte)
EthTx returns a sample ethereum transaction with the associated tx data bytes
func EthTxSigned ¶
func EthTxSigned( t *testing.T, chainID int64, to ethcommon.Address, nonce uint64, ) (*ethtypes.Transaction, []byte, ethcommon.Address)
EthTxSigned returns a sample signed ethereum transaction with the address of the sender
func EventIndex ¶
func EventIndex() uint64
func ForeignCoinList ¶
func ForeignCoinList(t *testing.T, zrc20ETH, zrc20BTC, zrc20ERC20, erc20Asset string) []types.ForeignCoins
func ForeignCoins ¶
func ForeignCoins(t *testing.T, address string) types.ForeignCoins
func GasPriceIncreaseFlags ¶
func GasPriceIncreaseFlags() types.GasPriceIncreaseFlags
func GetCctxIndexFromString ¶
func GetInvalidZRC20WithdrawToExternal ¶
receiver is 1EYVvXLusCxtVuEwoYvWRyN5EZTXwPVvo3
func GetValidZRC20WithdrawToBTC ¶
receiver is bc1qysd4sp9q8my59ul9wsf5rvs9p387hf8vfwatzu
func HeaderSupportedChains ¶
func HeaderSupportedChains() []lightclienttypes.HeaderSupportedChain
func InboundHashToCctx ¶
func InboundHashToCctx(t *testing.T, inboundHash string) types.InboundHashToCctx
func InboundParams ¶
func InboundParams(r *rand.Rand) *types.InboundParams
func InboundParamsValidChainID ¶
func InboundParamsValidChainID(r *rand.Rand) *types.InboundParams
func InboundTracker ¶
func InboundTracker(t *testing.T, index string) types.InboundTracker
func InboundVote ¶
func InboundVote(coinType coin.CoinType, from, to int64) types.MsgVoteInbound
func Int64InRange ¶
Int64InRange returns a sample int64 in the given ranges
func IntInRange ¶
func LastBlockHeight ¶
func LastBlockHeight(t *testing.T, index string) *types.LastBlockHeight
func LastObserverCount ¶
func LastObserverCount(lastChangeHeight int64) *types.LastObserverCount
func NodeAccount ¶
func NodeAccount() *types.NodeAccount
func NonceToCCTX ¶
func NonceToCCTX(t *testing.T, seed string) types.NonceToCctx
func NonceToCctxList ¶
func ObserverSet ¶
func ObserverSet(n int) types.ObserverSet
func OutboundParams ¶
func OutboundParams(r *rand.Rand) *types.OutboundParams
func OutboundParamsValidChainID ¶
func OutboundParamsValidChainID(r *rand.Rand) *types.OutboundParams
func OutboundTracker ¶
func OutboundTracker(t *testing.T, index string) types.OutboundTracker
func PendingNoncesList ¶
func Policies ¶
func Policies() authoritytypes.Policies
func PrivKeyAddressPair ¶
func PrivKeyAddressPair() (*ed25519.PrivKey, sdk.AccAddress)
PrivKeyAddressPair returns a private key, address pair
func Proof ¶
Proof generates a proof and block header returns the proof, block header, block hash, tx index, chain id, and tx hash
func RateLimiterFlags ¶
func RateLimiterFlags() types.RateLimiterFlags
func StringRandom ¶
StringRandom returns a sample string with random alphanumeric characters
func SystemContract ¶
func SystemContract() *types.SystemContract
func TssFundsMigrator ¶
func TssFundsMigrator(chainID int64) types.TssFundMigratorInfo
func Uint64InRange ¶
Uint64InRange returns a sample uint64 in the given ranges
func UintInRange ¶
func ValAddress ¶
func ValAddress(r *rand.Rand) sdk.ValAddress
ValAddress returns a sample validator operator address
func VotesSuccessOnly ¶
func WithdrawableEmissions ¶
func WithdrawableEmissions(t *testing.T) types.WithdrawableEmissions
func ZetaAccounting ¶
func ZetaAccounting(t *testing.T, index string) types.ZetaAccounting
Types ¶
type MultipleSignerMessage ¶
type MultipleSignerMessage struct{}
MultipleSignerMessage is a sample message which has two signers instead of one. This is used to test cases when we have checks for number of signers such as authorized transactions.
func (*MultipleSignerMessage) GetSigners ¶
func (m *MultipleSignerMessage) GetSigners() []sdk.AccAddress
func (*MultipleSignerMessage) ProtoMessage ¶
func (m *MultipleSignerMessage) ProtoMessage()
func (*MultipleSignerMessage) Reset ¶
func (m *MultipleSignerMessage) Reset()
func (*MultipleSignerMessage) String ¶
func (m *MultipleSignerMessage) String() string
func (*MultipleSignerMessage) ValidateBasic ¶
func (m *MultipleSignerMessage) ValidateBasic() error