Documentation
¶
Index ¶
- Constants
- type ArgDefinition
- type E2ETest
- type E2ETestFunc
- type E2ETestRunConfig
- type EVMChain
- type EvmContracts
- type Logger
- func (l *Logger) EVMReceipt(receipt ethtypes.Receipt, name string)
- func (l *Logger) EVMTransaction(tx ethtypes.Transaction, name string)
- func (l *Logger) Error(message string, args ...interface{})
- func (l *Logger) Info(message string, args ...interface{})
- func (l *Logger) InfoLoud(message string, args ...interface{})
- func (l *Logger) Prefix() string
- func (l *Logger) Print(message string, args ...interface{})
- func (l *Logger) PrintNoPrefix(message string, args ...interface{})
- func (l *Logger) SetColor(printColor color.Attribute)
- func (l *Logger) Xmsg(xmsg xmsgtypes.Xmsg, name string)
- type PellClients
- type PellContracts
- type Response
- type Result
- type Runner
- func (r *Runner) AddAllowXmsgSender(addr string) (*sdktypes.TxResponse, error)
- func (r *Runner) DeployConnectorContract() (*sdktypes.TxResponse, error)
- func (r *Runner) DeployGatewayContract() (*sdktypes.TxResponse, error)
- func (runner *Runner) GetE2ETestsByConfig(availableTests []E2ETest, testConfigs []E2ETestRunConfig) ([]E2ETest, error)
- func (runner *Runner) GetE2ETestsByName(availableTests []E2ETest, testNames ...string) ([]E2ETest, error)
- func (runner *Runner) GetE2ETestsToRunByConfig(availableTests []E2ETest, testConfigs []E2ETestRunConfig) ([]E2ETest, error)
- func (runner *Runner) GetE2ETestsToRunByName(availableTests []E2ETest, testNames ...string) ([]E2ETest, error)
- func (r *Runner) LSTAddPools(poolParams []*restakingtypes.PoolParams) (*sdktypes.TxResponse, error)
- func (r *Runner) LSTCreateGroup(operatorSetParam *restakingtypes.OperatorSetParam, ...) (*sdktypes.TxResponse, error)
- func (r *Runner) LSTCreateRegistryRouter(chainApprover, churnApprover, ejector, pauser, unpauser string, ...) (*sdktypes.TxResponse, error)
- func (r *Runner) LSTQueryGroupInfo() (*xsecuritytypes.QueryGroupInfoResponse, error)
- func (r *Runner) LSTQueryLSTStakingEnabled() (*xsecuritytypes.QueryLSTStakingEnabledResponse, error)
- func (r *Runner) LSTQueryRegistryRouter() (*xsecuritytypes.QueryRegistryRouterAddressResponse, error)
- func (r *Runner) LSTQueryValidator() ([]Validator, error)
- func (r *Runner) LSTQueryVotingPowerRatio() (*xsecuritytypes.QueryVotingPowerRatioResponse, error)
- func (r *Runner) LSTRegisterOperator(param *xsecuritytypes.RegisterOperatorParam, operatorAddress string) (*sdktypes.TxResponse, error)
- func (r *Runner) LSTRemovePools(poolParams []*restakingtypes.PoolParams) (*sdktypes.TxResponse, error)
- func (r *Runner) LSTSetGroupParam(param *restakingtypes.OperatorSetParam) (*sdktypes.TxResponse, error)
- func (r *Runner) LSTUpdateLSTStakingEnabled(enable bool) (*sdktypes.TxResponse, error)
- func (r *Runner) LSTUpdateVotingPowerRatio(numerator, denominator uint64) (*sdktypes.TxResponse, error)
- func (r *Runner) Lock()
- func (r *Runner) QueryDVSGroupSyncStatus(txHash string) (*restakingtypes.QueryDVSGroupSyncStatusResponse, error)
- func (r *Runner) QueryDVSSupportedChainStatus(registryRouterAddress string, chaindID uint64) *restakingtypes.QueryDVSSupportedChainStatusResponse
- func (runner *Runner) RunPellTest(e2eTest E2ETest, checkAccounting bool) (err error)
- func (runner *Runner) RunPellTests(e2eTests []E2ETest) (err error)
- func (runner *Runner) RunTest(e2eTest E2ETest, checkAccounting bool) (err error)
- func (runner *Runner) RunTests(e2eTests []E2ETest) (err error)
- func (runner *Runner) SendERC20OnEvm(erc20 *erc20.ERC20, adminTransact *bind.TransactOpts, ...) *ethtypes.Transaction
- func (runner *Runner) SendEther(chainId int64, to ethcommon.Address, value *big.Int, gasLimit uint64, ...) (*ethtypes.Transaction, error)
- func (r *Runner) Unlock()
- func (r *Runner) UpdateChainParamsEnableGasTokenRecharge()
- func (r *Runner) UpdateChainParamsEnablePellTokenRecharge()
- func (r *Runner) UpdateChainParamsGateway()
- func (r *Runner) UpdateChainParamsLargerGasLimit()
- func (r *Runner) UpgradeSystemContract() (*sdktypes.TxResponse, error)
- func (runner *Runner) WaitForTxReceiptOnEvm(chainId int64, tx *ethtypes.Transaction)
- func (runner *Runner) WaitForTxReceiptOnPEVM(tx *ethtypes.Transaction)
- type Validator
Constants ¶
const ( ReceiptTimeout = 20 * time.Second LOG_NAME = "pell-e2e" )
const MAX_WAITING_PREPARE_TIME = 90
Waiting for the network to be ready
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgDefinition ¶
ArgDefinition defines a structure for holding an argument's description along with it's default value.
type E2ETest ¶
type E2ETest struct {
Name string
Description string
Args []string
ArgsDefinition []ArgDefinition
E2ETest E2ETestFunc
}
E2ETest represents a E2E test with a name, args, description and test func
func NewE2ETest ¶
func NewE2ETest(name, description string, argsDefinition []ArgDefinition, e2eTestFunc E2ETestFunc) E2ETest
NewE2ETest creates a new instance of E2ETest with specified parameters.
func (E2ETest) DefaultArgs ¶
DefaultArgs extracts and returns array of default arguments from the ArgsDefinition.
type E2ETestFunc ¶
E2ETestFunc is a function representing a E2E test It takes a Runner as an argument
type E2ETestRunConfig ¶
E2ETestRunConfig defines the basic configuration for initiating an E2E test, including its name and optional runtime arguments.
type EVMChain ¶
type EVMChain struct {
EVMClient *ethclient.Client
EVMAuth *bind.TransactOpts
EvmContracts EvmContracts
E2ETestConfig config.E2ETestConfig
}
type EvmContracts ¶
type EvmContracts struct {
AdminTransact *bind.TransactOpts
// evm related contract
STERC20Addr ethcommon.Address
STERC20 *erc20.ERC20
StrategyManagerAddr ethcommon.Address
StrategyManager *strategymanager.StrategyManager
StrategyAddr ethcommon.Address
DelegationManagerAddr ethcommon.Address
DelegationManager *delegationmanager.DelegationManager
TssManagerAddr ethcommon.Address
TssManager *tssManager.TSSManager
EvmPellConnectorAddr ethcommon.Address
EvmPellConnector *pellconnector.PellConnector
PellTokenContractAddr ethcommon.Address
PellTokenContract *erc20.ERC20
GatewayContractAddr ethcommon.Address
GatewayContract *gatewayevm.GatewayEVM
GasSwapContractAddr ethcommon.Address
GasSwapContract *gasswapevm.GasSwapEVM
CentralSchedulerAddr ethcommon.Address
CentralScheduler *centralscheduler.CentralScheduler
StakeManagerAddr ethcommon.Address
StakeManager *operatorstakemanager.OperatorStakeManager
EjectionManagerAddr ethcommon.Address
EjectionManager *ejectionmanager.EjectionManager
RegistryRouterAddr ethcommon.Address
RegistryRouter *registryrouter.RegistryRouter
StakeRegistryRouterAddr ethcommon.Address
StakeRegistryRouter *stakeregistryrouter.StakeRegistryRouter
}
evm contracts
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a wrapper around log.Logger that adds verbosity
func (*Logger) EVMReceipt ¶
EVMReceipt prints a receipt
func (*Logger) EVMTransaction ¶
func (l *Logger) EVMTransaction(tx ethtypes.Transaction, name string)
EVMTransaction prints a transaction
func (*Logger) PrintNoPrefix ¶
PrintNoPrefix prints a message to the logger without the prefix
type PellClients ¶
type PellClients struct {
XmsgClient xmsgtypes.QueryClient
FungibleClient pevmtypes.QueryClient
AuthClient authtypes.QueryClient
BankClient banktypes.QueryClient
RelayerClient relayertypes.QueryClient
StakingClient stakingtypes.QueryClient
LightclientClient lightclienttypes.QueryClient
RestakingClient restakingtypes.QueryClient
XSecurityClient xsecuritytypes.QueryClient
RPCClientURL string
}
type PellContracts ¶
type PellContracts struct {
PellDelegationManager *pellDelegationManager.PellDelegationManager
PellDelegationManagerAddr ethcommon.Address
PellStrategyManager *pellStrategyManager.PellStrategyManager
PellStrategyManagerAddr ethcommon.Address
Gateway *gatewaypevm.GatewayPEVM
GatewayAddr ethcommon.Address
PellRegistryRouterFactory *registryrouterfactory.RegistryRouterFactory
PellRegistryRouterFactoryAddr ethcommon.Address
PellDvsDirectory *dvsdirectory.DVSDirectory
PellDvsDirectoryAddr ethcommon.Address
PellRegistryRouter *registryrouter.RegistryRouter
PellRegistryRouterAddr ethcommon.Address
}
pevm contracts
type Runner ¶
type Runner struct {
PellChainId int64
DeployerAddress ethcommon.Address
DeployerPrivateKey string
TSSAddress ethcommon.Address
FungibleAdminMnemonic string
// pell
PEVMClient *ethclient.Client
PellClients PellClients
TxServer txserver.PellTxServer
TxServerPellCore0 txserver.PellTxServer
PellContracts PellContracts
PEVMAuth *bind.TransactOpts
// multi evm
MultiEVM map[int64]*EVMChain
Logger *Logger
Ctx context.Context
CtxCancel context.CancelFunc
ReceiptTimeout time.Duration
// contains filtered or unexported fields
}
func NewFromConfig ¶
func NewFromConfig(conf *config.PellConfig) *Runner
func (*Runner) AddAllowXmsgSender ¶
func (r *Runner) AddAllowXmsgSender(addr string) (*sdktypes.TxResponse, error)
func (*Runner) DeployConnectorContract ¶
func (r *Runner) DeployConnectorContract() (*sdktypes.TxResponse, error)
func (*Runner) DeployGatewayContract ¶
func (r *Runner) DeployGatewayContract() (*sdktypes.TxResponse, error)
func (*Runner) GetE2ETestsByConfig ¶
func (runner *Runner) GetE2ETestsByConfig(availableTests []E2ETest, testConfigs []E2ETestRunConfig) ([]E2ETest, error)
GetE2ETestsToRunByConfig prepares a list of E2ETests to run based on provided test names and their corresponding arguments
func (*Runner) GetE2ETestsByName ¶
func (runner *Runner) GetE2ETestsByName(availableTests []E2ETest, testNames ...string) ([]E2ETest, error)
GetE2ETestsToRunByName prepares a list of E2ETests to run based on given test names without arguments
func (*Runner) GetE2ETestsToRunByConfig ¶
func (runner *Runner) GetE2ETestsToRunByConfig(availableTests []E2ETest, testConfigs []E2ETestRunConfig) ([]E2ETest, error)
GetE2ETestsToRunByConfig prepares a list of E2ETests to run based on provided test names and their corresponding arguments
func (*Runner) GetE2ETestsToRunByName ¶
func (runner *Runner) GetE2ETestsToRunByName(availableTests []E2ETest, testNames ...string) ([]E2ETest, error)
GetE2ETestsToRunByName prepares a list of E2ETests to run based on given test names without arguments
func (*Runner) LSTAddPools ¶
func (r *Runner) LSTAddPools(poolParams []*restakingtypes.PoolParams) (*sdktypes.TxResponse, error)
LSTAddPools send a tx to add pools
func (*Runner) LSTCreateGroup ¶
func (r *Runner) LSTCreateGroup(operatorSetParam *restakingtypes.OperatorSetParam, poolParams []*restakingtypes.PoolParams, groupEjectionParam *restakingtypes.GroupEjectionParam, minStake int64) (*sdktypes.TxResponse, error)
LSTCreateGroup send a tx to create a DVS group
func (*Runner) LSTCreateRegistryRouter ¶
func (r *Runner) LSTCreateRegistryRouter(chainApprover, churnApprover, ejector, pauser, unpauser string, initialPausedStatus int64) (*sdktypes.TxResponse, error)
LSTCreateRegistryRouter send a tx to create registry router
func (*Runner) LSTQueryGroupInfo ¶
func (r *Runner) LSTQueryGroupInfo() (*xsecuritytypes.QueryGroupInfoResponse, error)
LSTQueryGroupInfo query group info
func (*Runner) LSTQueryLSTStakingEnabled ¶
func (r *Runner) LSTQueryLSTStakingEnabled() (*xsecuritytypes.QueryLSTStakingEnabledResponse, error)
LSTQueryLSTStakingEnabled query LST staking enabled
func (*Runner) LSTQueryRegistryRouter ¶
func (r *Runner) LSTQueryRegistryRouter() (*xsecuritytypes.QueryRegistryRouterAddressResponse, error)
LSTQueryRegistryRouter query registry router address
func (*Runner) LSTQueryValidator ¶
LSTQueryValidator query validator info from staking module
func (*Runner) LSTQueryVotingPowerRatio ¶
func (r *Runner) LSTQueryVotingPowerRatio() (*xsecuritytypes.QueryVotingPowerRatioResponse, error)
LSTQueryVotingPowerRatio query voting power ratio
func (*Runner) LSTRegisterOperator ¶
func (r *Runner) LSTRegisterOperator(param *xsecuritytypes.RegisterOperatorParam, operatorAddress string) (*sdktypes.TxResponse, error)
LSTRegisterOperator send a tx to register an operator
func (*Runner) LSTRemovePools ¶
func (r *Runner) LSTRemovePools(poolParams []*restakingtypes.PoolParams) (*sdktypes.TxResponse, error)
LSTRemovePools send a tx to remove pools
func (*Runner) LSTSetGroupParam ¶
func (r *Runner) LSTSetGroupParam(param *restakingtypes.OperatorSetParam) (*sdktypes.TxResponse, error)
LSTSetGroupParam send a tx to set group param
func (*Runner) LSTUpdateLSTStakingEnabled ¶
func (r *Runner) LSTUpdateLSTStakingEnabled(enable bool) (*sdktypes.TxResponse, error)
LSTUpdateLSTStakingEnabled send a tx to update LST staking enabled
func (*Runner) LSTUpdateVotingPowerRatio ¶
func (r *Runner) LSTUpdateVotingPowerRatio(numerator, denominator uint64) (*sdktypes.TxResponse, error)
LSTUpdateVotingPowerRatio send a tx to update voting power ratio
func (*Runner) QueryDVSGroupSyncStatus ¶
func (r *Runner) QueryDVSGroupSyncStatus(txHash string) (*restakingtypes.QueryDVSGroupSyncStatusResponse, error)
func (*Runner) QueryDVSSupportedChainStatus ¶
func (r *Runner) QueryDVSSupportedChainStatus(registryRouterAddress string, chaindID uint64) *restakingtypes.QueryDVSSupportedChainStatusResponse
func (*Runner) RunPellTest ¶
RunE2ETest runs a e2e test
func (*Runner) RunPellTests ¶
RunE2ETests runs a list of e2e tests
func (*Runner) SendERC20OnEvm ¶
func (runner *Runner) SendERC20OnEvm(erc20 *erc20.ERC20, adminTransact *bind.TransactOpts, address ethcommon.Address, amountERC20 int64) *ethtypes.Transaction
SendERC20OnEvm sends ERC20 to an address on EVM this allows the ERC20 contract deployer to funds other accounts on EVM amountERC20 is a multiple of 1e18
func (*Runner) SendEther ¶
func (runner *Runner) SendEther(chainId int64, to ethcommon.Address, value *big.Int, gasLimit uint64, data []byte) (*ethtypes.Transaction, error)
SendEther sends ethers to the TSS on EVM
func (*Runner) UpdateChainParamsEnableGasTokenRecharge ¶
func (r *Runner) UpdateChainParamsEnableGasTokenRecharge()
func (*Runner) UpdateChainParamsEnablePellTokenRecharge ¶
func (r *Runner) UpdateChainParamsEnablePellTokenRecharge()
func (*Runner) UpdateChainParamsGateway ¶
func (r *Runner) UpdateChainParamsGateway()
func (*Runner) UpdateChainParamsLargerGasLimit ¶
func (r *Runner) UpdateChainParamsLargerGasLimit()
func (*Runner) UpgradeSystemContract ¶
func (r *Runner) UpgradeSystemContract() (*sdktypes.TxResponse, error)
func (*Runner) WaitForTxReceiptOnEvm ¶
func (runner *Runner) WaitForTxReceiptOnEvm(chainId int64, tx *ethtypes.Transaction)
WaitForTxReceiptOnEvm waits for a tx receipt on EVM
func (*Runner) WaitForTxReceiptOnPEVM ¶
func (runner *Runner) WaitForTxReceiptOnPEVM(tx *ethtypes.Transaction)
WaitForTxReceiptOnPEVM waits for a tx receipt on EVM