Documentation ¶
Index ¶
- Constants
- Variables
- func AccAddress() string
- func AppState(t *testing.T) map[string]json.RawMessage
- 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 BtcAddressP2WPKH(t *testing.T, net *chaincfg.Params) string
- func BtcHash() chainhash.Hash
- func Bytes() []byte
- func Chain(chainID int64) chains.Chain
- func ChainInfo(startChainID int64) authoritytypes.ChainInfo
- func ChainNonces(chainID int64) types.ChainNonces
- func ChainNoncesList(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 ComplianceConfig() config.ComplianceConfig
- func CreateTempDir(t *testing.T) string
- func CrossChainTx(t *testing.T, index string) *types.CrossChainTx
- func CrossChainTxV2(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 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 GasPriceWithChainID(t *testing.T, chainID int64) types.GasPrice
- func GenDoc(t *testing.T) *types.GenesisDoc
- func GenerateTONAccountID() ton.AccountID
- func GetCctxIndexFromString(index string) string
- func Hash() ethcommon.Hash
- func HeaderSupportedChains() []lightclienttypes.HeaderSupportedChain
- func InboundEvent(chainID int64, sender string, receiver string, amount uint64, memo []byte) *types.InboundEvent
- 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 InvalidZRC20WithdrawToExternalReceipt(t *testing.T) (receipt ethtypes.Receipt)
- 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 SolanaAddress(t *testing.T) string
- func SolanaPrivateKey(t *testing.T) solana.PrivateKey
- func SolanaSignature(t *testing.T) solana.Signature
- 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 TONDeposit(t *testing.T, acc ton.AccountID, d toncontracts.Deposit) ton.Transaction
- func TONDepositAndCall(t *testing.T, acc ton.AccountID, d toncontracts.DepositAndCall) ton.Transaction
- func TONDonation(t *testing.T, acc ton.AccountID, d toncontracts.Donation) ton.Transaction
- func TONTransaction(t *testing.T, p TONTransactionProps) ton.Transaction
- func TONWithdrawal(t *testing.T, acc ton.AccountID, w toncontracts.Withdrawal) ton.Transaction
- 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 ValidZRC20WithdrawToBTCReceipt(t *testing.T) (receipt ethtypes.Receipt)
- func ValidZetaSentDestinationExternalReceipt(t *testing.T) (receipt ethtypes.Receipt)
- func ValidZrc20WithdrawToETHReceipt(t *testing.T) (receipt ethtypes.Receipt)
- func Validator(t testing.TB, r *rand.Rand) stakingtypes.Validator
- func VotesSuccessOnly(voteCount int) []types.VoteType
- func WithdrawableEmissions(t *testing.T) types.WithdrawableEmissions
- func ZRC20Withdrawal(to []byte, value *big.Int) *zrc20.ZRC20Withdrawal
- func ZetaAccounting(t *testing.T, index string) types.ZetaAccounting
- func ZetaIndex(t *testing.T) string
- type MultipleSignerMessage
- type TONTransactionProps
- func TONDepositAndCallProps(t *testing.T, acc ton.AccountID, d toncontracts.DepositAndCall) TONTransactionProps
- func TONDepositProps(t *testing.T, acc ton.AccountID, d toncontracts.Deposit) TONTransactionProps
- func TONDonateProps(t *testing.T, acc ton.AccountID, d toncontracts.Donation) TONTransactionProps
- func TONWithdrawalProps(t *testing.T, acc ton.AccountID, w toncontracts.Withdrawal) TONTransactionProps
Constants ¶
const ( // These are sample restricted addresses for e2e tests. RestrictedEVMAddressTest = "0x8a81Ba8eCF2c418CAe624be726F505332DF119C6" RestrictedBtcAddressTest = "bcrt1qzp4gt6fc7zkds09kfzaf9ln9c5rvrzxmy6qmpp" RestrictedSolAddressTest = "9fA4vYZfCa9k9UHjnvYCk4YoipsooapGciKMgaTBw9UH" )
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 BtcAddressP2WPKH ¶
BtcAddressP2WPKH returns a sample btc P2WPKH address
func ChainInfo ¶
func ChainInfo(startChainID int64) authoritytypes.ChainInfo
func ChainNonces ¶
func ChainNonces(chainID int64) types.ChainNonces
func ChainNoncesList ¶
func ChainNoncesList(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 ComplianceConfig ¶
func ComplianceConfig() config.ComplianceConfig
ComplianceConfig returns a sample compliance config
func CreateTempDir ¶
create a temporary directory for testing
func CrossChainTx ¶
func CrossChainTx(t *testing.T, index string) *types.CrossChainTx
func CrossChainTxV2 ¶
func CrossChainTxV2(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 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 GenerateTONAccountID ¶
func GetCctxIndexFromString ¶
func HeaderSupportedChains ¶
func HeaderSupportedChains() []lightclienttypes.HeaderSupportedChain
func InboundEvent ¶
func InboundEvent(chainID int64, sender string, receiver string, amount uint64, memo []byte) *types.InboundEvent
InboundEvent returns a sample InboundEvent.
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 InvalidZRC20WithdrawToExternalReceipt ¶
InvalidZRC20WithdrawToExternalReceipt is a receipt for a invalid ZRC20 withdrawal to an external address receiver is 1EYVvXLusCxtVuEwoYvWRyN5EZTXwPVvo3
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 SolanaAddress ¶
SolanaAddress returns a sample solana address
func SolanaPrivateKey ¶
SolanaPrivateKey returns a sample solana private key
func SolanaSignature ¶
SolanaSignature returns a sample solana signature
func StringRandom ¶
StringRandom returns a sample string with random alphanumeric characters
func SystemContract ¶
func SystemContract() *types.SystemContract
func TONDeposit ¶
func TONDeposit(t *testing.T, acc ton.AccountID, d toncontracts.Deposit) ton.Transaction
func TONDepositAndCall ¶
func TONDepositAndCall(t *testing.T, acc ton.AccountID, d toncontracts.DepositAndCall) ton.Transaction
func TONDonation ¶
func TONDonation(t *testing.T, acc ton.AccountID, d toncontracts.Donation) ton.Transaction
func TONTransaction ¶
func TONTransaction(t *testing.T, p TONTransactionProps) ton.Transaction
TONTransaction creates a sample TON transaction.
func TONWithdrawal ¶
func TONWithdrawal(t *testing.T, acc ton.AccountID, w toncontracts.Withdrawal) ton.Transaction
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 ValidZRC20WithdrawToBTCReceipt ¶
ValidZRC20WithdrawToBTCReceipt is a receipt for a ZRC20 withdrawal to a BTC address receiver is bc1qysd4sp9q8my59ul9wsf5rvs9p387hf8vfwatzu
func ValidZetaSentDestinationExternalReceipt ¶
ValidZetaSentDestinationExternalReceipt is a receipt for a Zeta sent to an external destination
func ValidZrc20WithdrawToETHReceipt ¶
ValidZrc20WithdrawToETHReceipt is a receipt for a ZRC20 withdrawal to an external address
func VotesSuccessOnly ¶
func WithdrawableEmissions ¶
func WithdrawableEmissions(t *testing.T) types.WithdrawableEmissions
func ZRC20Withdrawal ¶
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
type TONTransactionProps ¶
type TONTransactionProps struct { Account ton.AccountID GasUsed uint64 TotalTONFees uint64 BlockID ton.BlockIDExt // For simplicity let's have only one input // and one output (both optional) Input *tlb.Message Output *tlb.Message }
func TONDepositAndCallProps ¶
func TONDepositAndCallProps(t *testing.T, acc ton.AccountID, d toncontracts.DepositAndCall) TONTransactionProps
func TONDepositProps ¶
func TONDepositProps(t *testing.T, acc ton.AccountID, d toncontracts.Deposit) TONTransactionProps
func TONDonateProps ¶
func TONDonateProps(t *testing.T, acc ton.AccountID, d toncontracts.Donation) TONTransactionProps
func TONWithdrawalProps ¶
func TONWithdrawalProps(t *testing.T, acc ton.AccountID, w toncontracts.Withdrawal) TONTransactionProps