Versions in this module Expand all Collapse all v1 v1.1.1 Feb 22, 2026 v1.1.0 Feb 19, 2026 Changes in this version + const NativeTokenMintableTestCfg + var ProxyContractAdminAddr = "0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed" + func CopyDir(source, destination string) error + func RunEdgeCommand(args []string, stdout io.Writer) error + type ClusterOption func(*TestClusterConfig) + func WithBlockGasLimit(blockGasLimit uint64) ClusterOption + func WithBlockTime(blockTime time.Duration) ClusterOption + func WithBootnodeCount(cnt int) ClusterOption + func WithBridgeAllowListAdmin(addr types.Address) ClusterOption + func WithBridgeAllowListEnabled(addr types.Address) ClusterOption + func WithBridgeBlockListAdmin(addr types.Address) ClusterOption + func WithBridgeBlockListEnabled(addr types.Address) ClusterOption + func WithBurnContract(burnContract *polybft.BurnContractInfo) ClusterOption + func WithContractDeployerAllowListAdmin(addr types.Address) ClusterOption + func WithContractDeployerAllowListEnabled(addr types.Address) ClusterOption + func WithContractDeployerBlockListAdmin(addr types.Address) ClusterOption + func WithContractDeployerBlockListEnabled(addr types.Address) ClusterOption + func WithEpochReward(epochReward int) ClusterOption + func WithEpochSize(epochSize int) ClusterOption + func WithGenesisState(databasePath string, stateRoot types.Hash) ClusterOption + func WithNativeTokenConfig(tokenConfigRaw string) ClusterOption + func WithNonValidators(num int) ClusterOption + func WithNumBlockConfirmations(numBlockConfirmations uint64) ClusterOption + func WithPremine(addresses ...types.Address) ClusterOption + func WithPropertyTestLogging() ClusterOption + func WithProxyContractsAdmin(address string) ClusterOption + func WithRootTrackerPollInterval(pollInterval time.Duration) ClusterOption + func WithSecretsCallback(fn func([]types.Address, *TestClusterConfig)) ClusterOption + func WithTestRewardToken() ClusterOption + func WithTransactionsAllowListAdmin(addr types.Address) ClusterOption + func WithTransactionsAllowListEnabled(addr types.Address) ClusterOption + func WithTransactionsBlockListAdmin(addr types.Address) ClusterOption + func WithTransactionsBlockListEnabled(addr types.Address) ClusterOption + func WithValidatorSnapshot(validatorsLen uint64) ClusterOption + type NodeType int + const None + const Relayer + const Validator + func (nt *NodeType) Append(value NodeType) + func (nt NodeType) IsSet(value NodeType) bool + type TestBridge struct + func NewTestBridge(t *testing.T, clusterConfig *TestClusterConfig) (*TestBridge, error) + func (t *TestBridge) Deposit(token bridgeCommon.TokenType, rootTokenAddr, rootPredicateAddr types.Address, ...) error + func (t *TestBridge) FundValidators(tokenAddress types.Address, secretsPaths []string, amounts []*big.Int) error + func (t *TestBridge) JSONRPCAddr() string + func (t *TestBridge) SendExitTransaction(exitHelper types.Address, exitID uint64, childJSONRPCAddr string) error + func (t *TestBridge) Start() error + func (t *TestBridge) Stop() + func (t *TestBridge) WaitUntil(pollFrequency, timeout time.Duration, handler func() (bool, error)) error + func (t *TestBridge) Withdraw(token bridgeCommon.TokenType, ...) error + type TestCluster struct + Bridge *TestBridge + Config *TestClusterConfig + Servers []*TestServer + func NewPropertyTestCluster(t *testing.T, validatorsCount int, opts ...ClusterOption) *TestCluster + func NewTestCluster(t *testing.T, validatorsCount int, opts ...ClusterOption) *TestCluster + func (c *TestCluster) Call(t *testing.T, to types.Address, method *abi.Method, args ...interface{}) map[string]interface{} + func (c *TestCluster) Deploy(t *testing.T, sender ethgo.Key, bytecode []byte) *TestTxn + func (c *TestCluster) ExistsCode(t *testing.T, addr ethgo.Address) bool + func (c *TestCluster) Fail(err error) + func (c *TestCluster) InitSecrets(prefix string, count int) ([]types.Address, error) + func (c *TestCluster) InitTestServer(t *testing.T, dataDir string, bridgeJSONRPC string, nodeType NodeType) + func (c *TestCluster) MethodTxn(t *testing.T, sender ethgo.Key, target types.Address, input []byte) *TestTxn + func (c *TestCluster) SendTxn(t *testing.T, sender ethgo.Key, txn *ethgo.Transaction) *TestTxn + func (c *TestCluster) Stats(t *testing.T) + func (c *TestCluster) Stop() + func (c *TestCluster) Transfer(t *testing.T, sender ethgo.Key, target types.Address, value *big.Int) *TestTxn + func (c *TestCluster) WaitForBlock(n uint64, timeout time.Duration) error + func (c *TestCluster) WaitForGeneric(dur time.Duration, fn func(*TestServer) bool) error + func (c *TestCluster) WaitForReady(t *testing.T) + func (c *TestCluster) WaitUntil(timeout, pollFrequency time.Duration, handler func() bool) error + type TestClusterConfig struct + Binary string + BlockGasLimit uint64 + BlockTime time.Duration + BootnodeCount int + BridgeAllowListAdmin []types.Address + BridgeAllowListEnabled []types.Address + BridgeBlockListAdmin []types.Address + BridgeBlockListEnabled []types.Address + BurnContract *polybft.BurnContractInfo + ContractDeployerAllowListAdmin []types.Address + ContractDeployerAllowListEnabled []types.Address + ContractDeployerBlockListAdmin []types.Address + ContractDeployerBlockListEnabled []types.Address + EpochReward int + EpochSize int + InitialStateRoot types.Hash + InitialTrieDB string + IsPropertyTest bool + LogsDir string + Name string + NativeTokenConfigRaw string + NonValidatorCount int + NumBlockConfirmations uint64 + Premine []string + ProxyContractsAdmin string + RootTrackerPollInterval time.Duration + SecretsCallback func([]types.Address, *TestClusterConfig) + StakeAmounts []*big.Int + TestRewardToken string + TmpDir string + TransactionsAllowListAdmin []types.Address + TransactionsAllowListEnabled []types.Address + TransactionsBlockListAdmin []types.Address + TransactionsBlockListEnabled []types.Address + ValidatorPrefix string + ValidatorSetSize uint64 + WithLogs bool + WithStdout bool + func (c *TestClusterConfig) Dir(name string) string + func (c *TestClusterConfig) GetProxyContractsAdmin() string + func (c *TestClusterConfig) GetStdout(name string, custom ...io.Writer) io.Writer + type TestServer struct + func NewTestServer(t *testing.T, clusterConfig *TestClusterConfig, bridgeJSONRPC string, ...) *TestServer + func (t *TestServer) BridgeJSONRPCAddr() string + func (t *TestServer) Conn() proto.SystemClient + func (t *TestServer) DataDir() string + func (t *TestServer) GrpcAddr() string + func (t *TestServer) HasValidatorSealed(firstBlock, lastBlock uint64, validators validator.AccountSet, ...) (bool, error) + func (t *TestServer) JSONRPC() *jsonrpc.Client + func (t *TestServer) JSONRPCAddr() string + func (t *TestServer) RegisterValidator(supernetManagerAddr types.Address) error + func (t *TestServer) RootchainFund(stakeToken types.Address, amount *big.Int) error + func (t *TestServer) RootchainFundFor(accounts []types.Address, amounts []*big.Int, stakeToken types.Address) error + func (t *TestServer) Stake(polybftConfig polybft.PolyBFTConfig, amount *big.Int) error + func (t *TestServer) Start() + func (t *TestServer) Stop() + func (t *TestServer) TxnPoolOperator() txpoolProto.TxnPoolOperatorClient + func (t *TestServer) Unstake(amount *big.Int) error + func (t *TestServer) WaitForNonZeroBalance(address ethgo.Address, dur time.Duration) (*big.Int, error) + func (t *TestServer) WhitelistValidators(addresses []string, supernetManager types.Address) error + func (t *TestServer) WithdrawChildChain() error + func (t *TestServer) WithdrawRewards() error + func (t *TestServer) WithdrawRootChain(recipient string, amount *big.Int, stakeManager ethgo.Address, ...) error + type TestServerConfig struct + BridgeJSONRPC string + Chain string + DataDir string + GRPCPort int64 + JSONRPCPort int64 + LogLevel string + Name string + NumBlockConfirmations uint64 + P2PPort int64 + Relayer bool + Validator bool + type TestServerConfigCallback func(*TestServerConfig) + type TestTxn struct + func (t *TestTxn) Failed() bool + func (t *TestTxn) Receipt() *ethgo.Receipt + func (t *TestTxn) Reverted() bool + func (t *TestTxn) Succeed() bool + func (t *TestTxn) Txn() *ethgo.Transaction + func (t *TestTxn) Wait() error