Documentation
¶
Index ¶
- Constants
- func DeployContract(t *testing.T, app *app.ChainApp, ctx sdk.Context, contractAddr common.Address, ...) common.Address
- func DeployMigrationContract(t *testing.T, app *app.ChainApp, ctx sdk.Context) (common.Address, common.Address)
- func EncodeUniversalPayloadBorsh(up *uexecutortypes.UniversalPayload) (string, error)
- func ExecVoteChainMeta(t *testing.T, ctx sdk.Context, app *app.ChainApp, universalAddr string, ...) error
- func ExecVoteInbound(t *testing.T, ctx sdk.Context, app *app.ChainApp, universalAddr string, ...) error
- func ExecVoteOutbound(t *testing.T, ctx sdk.Context, app *app.ChainApp, universalAddr string, ...) error
- func GetHandlerBytecode() string
- func GetUEAEVMBytecode() string
- func GetUEAProxyBytecode() string
- func SetAppWithMultipleValidators(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []sdk.AccountI, []stakingtypes.Validator)
- func SetAppWithValidators(t *testing.T) (*app.ChainApp, sdk.Context, sdk.AccountI)
- func SetupApp(t *testing.T) *app.ChainApp
- func SetupValidators(t *testing.T, chainApp *app.ChainApp, ctx sdk.Context, accounts []sdk.AccountI, ...) ([]stakingtypes.Validator, []cryptotypes.PubKey)
- type Addresses
- type AppSetupOptions
- type TestAccounts
- type TestConfig
Constants ¶
const ABI_MIGRATION = `` /* 726-byte string literal not displayed */
const HANDLER_CONTRACT_BYTECODE = "" /* 47886-byte string literal not displayed */
const MOCK_ERC20_BYTECODE = "" /* 13614-byte string literal not displayed */
MOCK_ERC20_BYTECODE is a minimal ERC20 (public mint) used as the PC20 source token so VaultPC20 can hold a real balance for recordLock/unlock.
const MOCK_GATEWAY_PC_PC20_BYTECODE = "" /* 1870-byte string literal not displayed */
MOCK_GATEWAY_PC_PC20_BYTECODE is a TEST-ONLY minimal UniversalGatewayPC used by the PC20 true-integration test. It mirrors the real gateway's payload-based PC20 detection and the exact UniversalTxOutbound event (push-chain-gateway-contracts branch cea-pc20-consistency-fix, sendUniversalTxOutbound) but performs none of the heavy work — no VaultPC20 lock, no PRC20 burn, no UniversalCore fee quote, no gas swap. Deploying it at the UNIVERSAL_GATEWAY_PC address lets a real EVM call emit a real PC20 UniversalTxOutbound log the chain hook can decode. A PC20-prefixed payload emits txType FUNDS_AND_PAYLOAD; otherwise FUNDS. Chain/gas fields are hardcoded (eip155:11155111, gasFee 111, gasLimit 21000), like the pre-existing test gateway blob. Entry point selector: sendUniversalTxOutbound((bytes,address,uint256,uint256,uint256,uint256,bytes,address)) = 0x77b86bec.
const MintModule string = "mint"
const PRC20_CREATION_BYTECODE = "" /* 13512-byte string literal not displayed */
const UEA_EVM_BYTECODE = "" /* 16116-byte string literal not displayed */
const UEA_MIGRATION_BYTECODE = "" /* 1392-byte string literal not displayed */
const UEA_PROXY_BYTECODE = "" /* 1968-byte string literal not displayed */
const UEA_SVM_BYTECODE = "" /* 14558-byte string literal not displayed */
const UNIVERSAL_CORE_PC20_BYTECODE = "" /* 50316-byte string literal not displayed */
UNIVERSAL_CORE_PC20_BYTECODE is the REAL UniversalCore runtime (push-smart-account-v1 @ pc20-3rd-iteration) with the onlyUEModule modifier stripped from setWrapperDeployed, for PC20 round-trip integration tests. SetCode this over 0xC0. It really stores the pc20WrapperBySource (slot 19) / pc20SourceByWrapper (slot 20) mappings; setWrapperDeployed is idempotent and reverts on a zero source/wrapper.
const UNIVERSAL_GATEWAY_PC_BYTECODE = "" /* 1968-byte string literal not displayed */
const VAULT_PC20_TEST_BYTECODE = "" /* 24808-byte string literal not displayed */
VAULT_PC20_TEST_BYTECODE is the REAL VaultPC20 runtime (gateway @ cea-pc20-consistency-fix logic; onlyUEModule/whenNotPaused/onlyRole gates stripped) for tests. unlock/revertExport keep the isExecuted replay guard, totalLocked accounting, and real ERC20 transfer, so the vault must be funded + recordLock'd first.
Variables ¶
This section is empty.
Functions ¶
func DeployContract ¶
func DeployMigrationContract ¶
func EncodeUniversalPayloadBorsh ¶ added in v0.0.29
func EncodeUniversalPayloadBorsh(up *uexecutortypes.UniversalPayload) (string, error)
EncodeUniversalPayloadBorsh Borsh-encodes a UniversalPayload into a hex string. Matches the Rust Anchor/Borsh layout used by the Solana gateway program.
func ExecVoteChainMeta ¶ added in v0.0.19
func ExecVoteChainMeta( t *testing.T, ctx sdk.Context, app *app.ChainApp, universalAddr string, coreValAddr string, chainID string, price uint64, blockNumber uint64, ) error
ExecVoteChainMeta executes a MsgVoteChainMeta on behalf of the core validator through the universal validator using authz Exec.
func ExecVoteInbound ¶
func ExecVoteOutbound ¶ added in v0.0.13
func GetHandlerBytecode ¶
func GetHandlerBytecode() string
GetHandlerBytecode returns the Handler contract bytecode
func GetUEAEVMBytecode ¶
func GetUEAEVMBytecode() string
GetUEAEVMBytecode returns the UEA EVM implementation contract bytecode
func GetUEAProxyBytecode ¶
func GetUEAProxyBytecode() string
GetUEAProxyBytecode returns the UEA proxy contract bytecode
func SetAppWithValidators ¶
func SetupValidators ¶
Types ¶
type Addresses ¶
type Addresses struct {
// Contract addresses
FactoryAddr common.Address
UEProxyAddr common.Address
EVMImplAddr common.Address
SVMImplAddr common.Address
NewEVMImplAddr common.Address
NewSVMImplAddr common.Address
MigratedUEAAddr common.Address
HandlerAddr common.Address
PRC20USDCAddr common.Address
ExternalUSDCAddr common.Address
UniversalGatewayPCAddr common.Address
// Account addresses (hex format)
DefaultTestAddr string
CosmosTestAddr string
TargetAddr string
TargetAddr2 string
}
func GetDefaultAddresses ¶
func GetDefaultAddresses() Addresses
type AppSetupOptions ¶
type AppSetupOptions struct {
TestConfig TestConfig
Addresses Addresses
}
type TestAccounts ¶
type TestAccounts struct {
DefaultAccount sdk.AccountI
CosmosAccount sdk.AccountI
TargetAccount sdk.AccountI
}
func SetupTestAccounts ¶
func SetupTestAccounts(t *testing.T, app *app.ChainApp, ctx sdk.Context, opt AppSetupOptions) TestAccounts
type TestConfig ¶
func GetDefaultTestConfig ¶
func GetDefaultTestConfig() TestConfig