app

package
v0.0.41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 242 Imported by: 0

README

Core Validator

Push Chain's L1 node binary (pchaind). Four custom Cosmos SDK modules and one custom EVM precompile turn the chain into the universal-execution layer that coordinates inbounds, outbounds, and TSS-signed crosschain transactions.

  • Produces blocks via CometBFT consensus and runs the EVM execution engine for both standard and universal traffic
  • Coordinates the crosschain protocol — collects votes from Universal Validators on inbounds/outbounds/chain meta, finalizes ballots, drives TSS keygen and fund migration, and rewards UV operators with a boosted fee share
  • Hosts Universal Executor Accounts (UEAs) and the chain-meta oracle on its EVM, giving any source-chain user a deterministic Push Chain identity and predictable gas pricing across networks

Architecture

app/
|-- app.go               ChainApp wiring (4 custom modules + usigverifier)
|-- precompiles.go       Baseline EVM precompile registration (bech32, p256, staking, ...)
|-- ante/                Custom AnteHandler chain (gasless support)
|   |-- ante.go          Routes Ethereum vs Cosmos txs by extension option
|   |-- ante_cosmos.go   Cosmos decorator chain
|   |-- ante_evm.go      EVM mono-decorator wrapper
|   |-- fee.go           Custom DeductFeeDecorator (skips fee for gasless txs)
|   +-- account_init_decorator.go   Creates accounts mid-pipeline for first-time gasless signers
|-- cosmos/
|   +-- min_gas_price.go MinGasPriceDecorator (skips min-fee check for gasless txs)
|-- decorators/          Generic message-filter decorator template
|-- txpolicy/
|   +-- gasless.go       IsGaslessTx — single source of truth for the gasless message whitelist
|-- params/              Test encoding configuration
+-- config.go, encoding.go, genesis.go, token_pair.go, wasm.go

x/                       Custom Cosmos SDK modules (only what Push adds)
|-- uexecutor/           Universal transaction execution layer
|-- uregistry/           Chain & token registry
|-- uvalidator/          Universal validator set + ballot voting + UV reward boost
+-- utss/                TSS keygen / refresh / quorum-change / fund migration

precompiles/
+-- usigverifier/        Ed25519 signature verification precompile (Solana sig verification on EVM)

cmd/pchaind/             Binary entry point, root command, key/EVM CLI wiring
proto/                   Protobuf definitions for the four custom modules
config/                  Per-chain JSON registry configs (mainnet/, testnet-donut/)

What It Does

The Hub-and-Spoke Picture

Push Chain is the coordination layer in a hub-and-spoke crosschain model. Universal Validators (the off-chain puniversald worker — see universalClient/README.md) watch external chains, observe events, run TSS, and vote those observations onto Push Chain. The core validator is the hub: it tallies those votes, executes the resulting Push Chain logic, and emits the next round of work.

    Ethereum ----\                            /---- Ethereum
    Arbitrum -----\    +------------------+  /---- Arbitrum
    Base ---------->---|   Push Chain     |--<---- Base
    BSC ----------/    | (core validator) |  \---- BSC
    Solana ------/     +------------------+   \--- Solana

         Inbound           Tally + Execute        Outbound
    (UV votes inbound)    (PC executes UTX)   (UV signs + relays)

Two primitives drive this:

  • Inbound — A gateway event observed on an external chain. Universal Validators wait for finality, then vote it via MsgVoteInbound on x/uexecutor. Once 2/3 vote the same observation, the core validator executes it on Push Chain (mints PRC20s, runs the user's payload through their UEA).
  • Outbound — A transaction the core validator needs broadcast to an external chain (e.g. funds being unlocked from a vault). The pending outbound is picked up by Universal Validators, signed via TSS, broadcast, and the result is voted back via MsgVoteOutbound.

A single inbound's payload can spawn multiple outbounds; each outbound's destination event can become a new inbound. The core validator is the consistency point that keeps the whole graph deterministic.

Custom Modules

Push Chain registers four custom Cosmos SDK modules.

x/uexecutor — Universal Transaction Executor

Lifecycle owner of every crosschain transaction (UniversalTx). Tallies inbound/outbound/chain-meta votes from Universal Validators, executes inbound payloads through the UEA factory, tracks pending outbounds, and writes chain-meta back to the EVM oracle.

Messages

  • MsgVoteInbound, MsgVoteOutbound, MsgVoteChainMeta — bonded UV-only, gasless
  • MsgExecutePayload — any user, gasless (the UEA itself authenticates the request)
  • MsgUpdateParams — gov-only

State

  • UniversalTx — the canonical UTX record (inbound, PC tx, outbounds, status)
  • PendingInbounds — secondary index of inbounds awaiting tally/execution
  • PendingOutbounds — secondary index of outbounds in PENDING status
  • ChainMetas — aggregated gas price + block height per CAIP-2 chain
  • ModuleAccountNonce — manually managed nonce so the module can issue DerivedEVMCalls
  • GasPrices — legacy, kept only for genesis import compatibility

EVM integration — Deploys the UEA factory on fresh genesis, then drives all on-chain crosschain logic (mint PRC20, swap quotes, refund gas, push chain meta) through DerivedEVMCall with manual nonce tracking. See x/uexecutor/README.md.

x/uregistry — Chain & Token Registry

Source of truth for which external chains and tokens Push Chain talks to. Admin-curated.

Messages (admin-only, where admin is params.Admin)

  • MsgAddChainConfig, MsgUpdateChainConfig
  • MsgAddTokenConfig, MsgUpdateTokenConfig, MsgRemoveTokenConfig
  • MsgUpdateParams — gov-only

State

  • ChainConfigs — per-CAIP-2 chain config (RPC URL, gateway, vault methods, block confirmations, inbound/outbound enabled flags, gas oracle interval)
  • TokenConfigs — token whitelist by chain:address, with native representation, decimals, and liquidity cap

Deploys the universal system contracts (UniversalGatewayPC and reserved proxy slots) on fresh genesis. See x/uregistry/README.md.

x/uvalidator — Universal Validator Management & Ballot Voting

The consensus layer for crosschain observations. Maintains the Universal Validator set, runs the generic ballot machine that all four modules vote through, and distributes a boosted reward share to active UVs.

Messages

  • MsgAddUniversalValidator, MsgRemoveUniversalValidator, MsgUpdateUniversalValidatorStatus — admin-only
  • MsgUpdateUniversalValidator — self (the validator updates its own crosschain identity)
  • MsgUpdateParams — gov-only

State

  • UniversalValidatorSet — registered UVs, keyed by sdk.ValAddress, with lifecycle status (PENDING_JOIN -> ACTIVE -> PENDING_LEAVE)
  • Ballots — every ballot ever created (vote results, status, expiry)
  • ActiveBallotIDs, ExpiredBallotIDs, FinalizedBallotIDs — index sets for fast lookup

Generic ballot machine — used by x/uexecutor (inbound/outbound/chain-meta) and x/utss (TSS events, fund migrations). A ballot is created on the first vote, finalizes as PASSED once votingThreshold matching votes are in, or REJECTED once enough opposite votes make the threshold unreachable.

UV Reward Boost (BeginBlocker) — Before the standard distribution module runs, x/uvalidator intercepts the FeeCollector balance and inflates effective voting power for active UVs by a 1.148x multiplier. The extra 0.148x portion is allocated proportionally to UVs and forwarded to the distribution module; the remaining fees flow back to the FeeCollector for normal proposer + community-pool + delegator distribution. Net effect: validators that also run a Universal Validator earn ~14.8% more block rewards. See x/uvalidator/README.md.

x/utss — Threshold Signature Scheme

Coordinates the lifecycle of the TSS key that signs every outbound transaction.

Messages

  • MsgInitiateTssKeyProcess, MsgInitiateFundMigration — admin-only
  • MsgVoteTssKeyProcess, MsgVoteFundMigration — bonded UV-only, gasless
  • MsgUpdateParams — gov-only

State

  • CurrentTssProcess / ProcessHistory — active and historical keygen/refresh/quorum-change processes
  • CurrentTssKey / TssKeyHistory — finalized active key + every key that has ever existed
  • TssEvents / PendingTssEvents — fine-grained events emitted during a process (used for vote routing)
  • FundMigrations / PendingMigrations — old-key -> new-key fund moves on each external chain

Process types

  • KEYGEN — produce a brand-new key with new on-chain addresses (triggers fund migration on every connected chain)
  • REFRESH — redistribute fresh keyshares without changing the public key
  • QUORUM_CHANGE — add/remove participants without changing the public key

See x/utss/README.md.

Custom EVM Precompile

Push Chain ships exactly one custom precompile:

Address Name Purpose
0x00000000000000000000000000000000000000ca usigverifier (legacy) Ed25519 signature verification (Solana signatures over bytes32 digests)
0xEC00000000000000000000000000000000000001 usigverifier (v2) Same implementation, registered at the reserved Push range

Both addresses are registered simultaneously for backward compatibility with deployed contracts that have the legacy address hardcoded. Gas cost: 4000 per verifyEd25519 call. See precompiles/usigverifier/README.md.

The baseline EVM precompiles (bech32, p256, staking, distribution, ics20, bank, gov, slashing, evidence) are wired in via app/precompiles.go:NewAvailableStaticPrecompiles.

Transaction Pipeline — Gasless Support

Push Chain extends the Cosmos AnteHandler with three custom decorators that together enable gasless transactions for Universal Validators and UEA users. Without this, every Universal Validator would need to hold and manage gas tokens just to vote — defeating the point of having a permissioned UV set.

The gasless whitelist (app/txpolicy/gasless.go) — only these message types qualify:

/uexecutor.v1.MsgExecutePayload
/uexecutor.v1.MsgVoteInbound
/uexecutor.v1.MsgVoteOutbound
/uexecutor.v1.MsgVoteChainMeta
/utss.v1.MsgVoteTssKeyProcess
/utss.v1.MsgVoteFundMigration

A tx is gasless only if every message (including those nested inside authz.MsgExec) is in the whitelist.

Custom decorators

Decorator File Behavior on gasless tx
MinGasPriceDecorator app/cosmos/min_gas_price.go Skips the FeeMarket minimum-fee check entirely
DeductFeeDecorator app/ante/fee.go Skips fee deduction (no balance required)
AccountInitDecorator app/ante/account_init_decorator.go If signer has no on-chain account yet, creates it mid-pipeline with account_number=0, sequence=0, verifies the signature against those values, and short-circuits the rest of the ante chain

The third decorator is what lets a freshly-keygen'd Universal Validator hot key vote on its very first tx, without anyone first having to fund it.

Configuration

Binary name pchaind
Node home ~/.pchain
Bech32 prefixes push (account) / pushvaloper (validator operator) / pushvalcons (consensus)
Coin type 60 (Ethereum-compatible HD path)
Base denom upc (18 decimals, EVM-aligned)
Default chain ID localchain_9000-1 (devnet); testnet uses push_42101-1
Exposed ports (Docker) 1317 REST, 26656 P2P, 26657 Tendermint RPC, 8545 EVM JSON-RPC, 8546 EVM WS

app.toml includes the standard [evm], [json-rpc], [tls], and [wasm] sections required by the embedded EVM and JSON-RPC server. There are no Push-specific configuration knobs beyond those.

Getting Started

Prerequisites

  • Go 1.23+
  • Docker — required for make proto-gen and integration tests
  • Rust — required to build the DKLS23 native library that the Universal Validator binary links against (the core validator binary itself doesn't depend on it, but make build produces both)
  • jq — used by setup scripts
# One-time: build the DKLS23 native library
make build-dkls23

# Build pchaind (and puniversald) into ./build/
make build

# Or install both into $GOPATH/bin
make install

# Spin up a single-node local chain (uses scripts/test_node.sh + Cosmovisor)
make sh-testnet

# Run unit tests (sets LD_LIBRARY_PATH for the native TSS lib)
make test-unit

# Run with race detector
make test-race

# Regenerate protobuf bindings (must be inside Docker)
make proto-gen
CLI
pchaind init <moniker> --chain-id push_42101-1   # initialize node home
pchaind start                                     # run validator/full node
pchaind status                                    # health check
pchaind export                                    # export app state to JSON

# Keys (cosmos-evm flavored — uses coin type 60)
pchaind keys add <name>
pchaind keys list
pchaind keys show <name>

# Custom module queries
pchaind q uexecutor params
pchaind q uregistry all-chain-configs
pchaind q uvalidator all-universal-validators
pchaind q uvalidator all-active-ballots
pchaind q utss current-key
pchaind q utss current-process

The full CLI surface is pchaind <module> <tx|q> --help — autocli definitions live in each module's autocli.go.

Documentation

Index

Constants

View Source
const (
	NodeDir      = ".pchain"
	Bech32Prefix = "push"

	ChainID    = "push_42101-1"
	EVMChainID = uint64(42101)
)
View Source
const WTokenContractMainnet = "0xD4949664cD82660AaE99bEdc034a0deA8A0bd517"

WTokenContractMainnet is the WrappedToken contract address for mainnet

Variables

View Source
var (
	// DefaultNodeHome default home directories for appd
	DefaultNodeHome = os.ExpandEnv("$HOME/") + NodeDir

	CoinType uint32 = 60

	BaseDenomUnit int64 = 18

	BaseDenom    = pushtypes.BaseDenom
	DisplayDenom = pushtypes.DisplayDenom

	// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
	Bech32PrefixAccAddr = Bech32Prefix
	// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key
	Bech32PrefixAccPub = Bech32Prefix + sdk.PrefixPublic
	// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address
	Bech32PrefixValAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator
	// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key
	Bech32PrefixValPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic
	// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address
	Bech32PrefixConsAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus
	// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key
	Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic
)

These constants are derived from the above variables. These are the ones we will want to use in the code, based on any overrides above

View Source
var ChainsCoinInfo = map[string]evmtypes.EvmCoinInfo{
	ChainID: {
		Denom:         BaseDenom,
		ExtendedDenom: BaseDenom,
		DisplayDenom:  DisplayDenom,
		Decimals:      evmtypes.EighteenDecimals.Uint32(),
	},
}

ChainsCoinInfo is a map of the chain id and its corresponding EvmCoinInfo that allows initializing the app with different coin info based on the chain id

View Source
var ExampleTokenPairs = []erc20types.TokenPair{
	{
		Erc20Address:  WTokenContractMainnet,
		Denom:         BaseDenom,
		Enabled:       true,
		ContractOwner: erc20types.OWNER_MODULE,
	},
}

ExampleTokenPairs creates a slice of token pairs, that contains a pair for the native denom of the example chain implementation.

Upgrades list of chain upgrades

Functions

func AddTestAddrsIncremental

func AddTestAddrsIncremental(app *ChainApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int) []sdk.AccAddress

AddTestAddrsIncremental constructs and returns accNum amount of accounts with an initial balance of accAmt in random order

func AllCapabilities

func AllCapabilities() []string

AllCapabilities returns all capabilities available with the current wasmvm See https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md This functionality is going to be moved upstream: https://github.com/CosmWasm/wasmvm/issues/425

func BlockedAddresses

func BlockedAddresses() map[string]bool

BlockedAddresses returns all the app's blocked account addresses.

func EVMAppOptions

func EVMAppOptions(chainID string) error

EVMAppOptions allows to setup the global configuration for the chain.

func GenAccount

func GenAccount() account

func GenesisStateWithValSet

func GenesisStateWithValSet(
	codec codec.Codec,
	genesisState map[string]json.RawMessage,
	valSet *cmttypes.ValidatorSet,
	genAccs []authtypes.GenesisAccount,
	balances ...banktypes.Balance,
) (map[string]json.RawMessage, error)

GenesisStateWithValSet returns a new genesis state with the validator set copied from simtestutil with delegation not added to supply

func GetInterfaceRegistry

func GetInterfaceRegistry() types.InterfaceRegistry

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

NOTE: This is solely to be used for testing purposes.

func MakeEncodingConfig

func MakeEncodingConfig(t testing.TB) params.EncodingConfig

MakeEncodingConfig creates a new EncodingConfig with all modules registered. For testing only

func NewAvailableStaticPrecompiles

func NewAvailableStaticPrecompiles(
	stakingKeeper stakingkeeper.Keeper,
	distributionKeeper distributionkeeper.Keeper,
	bankKeeper cmn.BankKeeper,
	erc20Kpr *erc20Keeper.Keeper,
	transferKeeper *transferkeeper.Keeper,
	channelKeeper *channelkeeper.Keeper,
	govKeeper govkeeper.Keeper,
	slashingKeeper slashingkeeper.Keeper,
	appCodec codec.Codec,
	opts ...Option,
) map[common.Address]vm.PrecompiledContract

NewAvailableStaticPrecompiles returns the list of all available static precompiled contracts.

NOTE: this should only be used during initialization of the Keeper.

func NewTestNetworkFixture

func NewTestNetworkFixture() network.TestFixture

NewTestNetworkFixture returns a new ChainApp AppConstructor for network simulation tests

func NoOpEVMOptions

func NoOpEVMOptions(_ string) error

NoOpEVMOptions is a no-op function that can be used when the app does not need any specific configuration.

func SignAndDeliverWithoutCommit

func SignAndDeliverWithoutCommit(t *testing.T, txCfg client.TxConfig, app *bam.BaseApp, msgs []sdk.Msg, fees sdk.Coins, chainID string, accNums, accSeqs []uint64, blockTime time.Time, priv ...cryptotypes.PrivKey) (*abci.ResponseFinalizeBlock, error)

SignAndDeliverWithoutCommit signs and delivers a transaction. No commit

Types

type CallbacksCompatibleModule

type CallbacksCompatibleModule interface {
	porttypes.IBCModule
	porttypes.PacketDataUnmarshaler
}

type ChainApp

type ChainApp struct {
	*baseapp.BaseApp

	// keepers
	AccountKeeper         authkeeper.AccountKeeper
	BankKeeper            bankkeeper.BaseKeeper
	StakingKeeper         *stakingkeeper.Keeper
	SlashingKeeper        slashingkeeper.Keeper
	MintKeeper            mintkeeper.Keeper
	DistrKeeper           distrkeeper.Keeper
	GovKeeper             govkeeper.Keeper
	CrisisKeeper          *crisiskeeper.Keeper
	UpgradeKeeper         *upgradekeeper.Keeper
	ParamsKeeper          paramskeeper.Keeper
	AuthzKeeper           authzkeeper.Keeper
	EvidenceKeeper        evidencekeeper.Keeper
	FeeGrantKeeper        feegrantkeeper.Keeper
	GroupKeeper           groupkeeper.Keeper
	NFTKeeper             nftkeeper.Keeper
	ConsensusParamsKeeper consensusparamkeeper.Keeper
	CircuitKeeper         circuitkeeper.Keeper

	IBCKeeper           *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	ICAControllerKeeper icacontrollerkeeper.Keeper
	ICAHostKeeper       icahostkeeper.Keeper
	TransferKeeper      ibctransferkeeper.Keeper

	// Custom
	WasmKeeper          wasmkeeper.Keeper
	TokenFactoryKeeper  tokenfactorykeeper.Keeper
	PacketForwardKeeper *packetforwardkeeper.Keeper
	WasmClientKeeper    wasmlckeeper.Keeper
	RatelimitKeeper     ratelimitkeeper.Keeper
	FeeMarketKeeper     feemarketkeeper.Keeper
	EVMKeeper           *evmkeeper.Keeper
	Erc20Keeper         erc20keeper.Keeper

	ScopedWasmKeeper capabilitykeeper.ScopedKeeper
	UexecutorKeeper  uexecutorkeeper.Keeper
	UregistryKeeper  uregistrykeeper.Keeper
	UvalidatorKeeper uvalidatorkeeper.Keeper
	UtssKeeper       utsskeeper.Keeper

	// the module manager
	ModuleManager      *module.Manager
	BasicModuleManager module.BasicManager
	// contains filtered or unexported fields
}

ChainApp extended ABCI application

func NewChainApp

func NewChainApp(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	appOpts servertypes.AppOptions,
	wasmOpts []wasmkeeper.Option,
	cosmosevmAppOptions EVMOptionsFn,
	baseAppOptions ...func(*baseapp.BaseApp),
) *ChainApp

NewChainApp returns a reference to an initialized ChainApp.

func NewChainAppWithCustomOptions

func NewChainAppWithCustomOptions(t *testing.T, isCheckTx bool, options SetupOptions) *ChainApp

NewChainAppWithCustomOptions initializes a new ChainApp with custom options.

func Setup

func Setup(
	t *testing.T,
	wasmOpts ...wasmkeeper.Option,
) *ChainApp

Setup initializes a new ChainApp. A Nop logger is set in ChainApp.

func SetupWithEmptyStore

func SetupWithEmptyStore(t testing.TB) *ChainApp

SetupWithEmptyStore set up a chain app instance with empty DB

func SetupWithGenesisValSet

func SetupWithGenesisValSet(
	t *testing.T,
	valSet *cmttypes.ValidatorSet,
	genAccs []authtypes.GenesisAccount,
	chainID string,
	wasmOpts []wasmkeeper.Option,
	balances ...banktypes.Balance,
) *ChainApp

SetupWithGenesisValSet initializes a new ChainApp with a validator set and genesis accounts that also act as delegators. For simplicity, each validator is bonded with a delegation of one consensus engine unit in the default token of the ChainApp from first genesis account. A Nop logger is set in ChainApp.

func (*ChainApp) AppCodec

func (app *ChainApp) AppCodec() codec.Codec

AppCodec returns app codec.

NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.

func (*ChainApp) AutoCliOpts

func (app *ChainApp) AutoCliOpts() autocli.AppOptions

AutoCliOpts returns the autocli options for the app.

func (*ChainApp) BeginBlocker

func (app *ChainApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)

BeginBlocker application updates every begin block

func (*ChainApp) Configurator

func (a *ChainApp) Configurator() module.Configurator

func (*ChainApp) DefaultGenesis

func (a *ChainApp) DefaultGenesis() map[string]json.RawMessage

DefaultGenesis returns a default genesis from the registered AppModuleBasic's.

func (*ChainApp) EndBlocker

func (app *ChainApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)

EndBlocker application updates every end block

func (*ChainApp) ExportAppStateAndValidators

func (app *ChainApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error)

ExportAppStateAndValidators exports the state of the application for a genesis file.

func (*ChainApp) FinalizeBlock

func (app *ChainApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error)

func (*ChainApp) GetAccountKeeper

func (app *ChainApp) GetAccountKeeper() authkeeper.AccountKeeper

func (*ChainApp) GetBankKeeper

func (app *ChainApp) GetBankKeeper() bankkeeper.Keeper

func (*ChainApp) GetBaseApp

func (app *ChainApp) GetBaseApp() *baseapp.BaseApp

func (*ChainApp) GetIBCKeeper

func (app *ChainApp) GetIBCKeeper() *ibckeeper.Keeper

func (*ChainApp) GetKey

func (app *ChainApp) GetKey(storeKey string) *storetypes.KVStoreKey

GetKey returns the KVStoreKey for the provided store key.

NOTE: This is solely to be used for testing purposes.

func (*ChainApp) GetMemKey

func (app *ChainApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*ChainApp) GetMempool added in v0.0.39

func (app *ChainApp) GetMempool() sdkmempool.ExtMempool

GetMempool returns nil — push-chain does not use the EVM experimental mempool. This satisfies the evmserver.Application interface added in cosmos/evm v0.5.

func (*ChainApp) GetStakingKeeper

func (app *ChainApp) GetStakingKeeper() *stakingkeeper.Keeper

func (*ChainApp) GetStoreKeys

func (app *ChainApp) GetStoreKeys() []storetypes.StoreKey

GetStoreKeys returns all the stored store keys.

func (*ChainApp) GetSubspace

func (app *ChainApp) GetSubspace(moduleName string) paramstypes.Subspace

GetSubspace returns a param subspace for a given module name.

NOTE: This is solely to be used for testing purposes.

func (*ChainApp) GetTKey

func (app *ChainApp) GetTKey(storeKey string) *storetypes.TransientStoreKey

GetTKey returns the TransientStoreKey for the provided store key.

NOTE: This is solely to be used for testing purposes.

func (*ChainApp) GetWasmKeeper

func (app *ChainApp) GetWasmKeeper() wasmkeeper.Keeper

func (*ChainApp) InitChainer

func (app *ChainApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)

InitChainer application update at chain initialization

func (*ChainApp) InterfaceRegistry

func (app *ChainApp) InterfaceRegistry() types.InterfaceRegistry

InterfaceRegistry returns ChainApp's InterfaceRegistry

func (*ChainApp) LegacyAmino

func (app *ChainApp) LegacyAmino() *codec.LegacyAmino

LegacyAmino returns legacy amino codec.

NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.

func (*ChainApp) LoadHeight

func (app *ChainApp) LoadHeight(height int64) error

LoadHeight loads a particular height

func (*ChainApp) Name

func (app *ChainApp) Name() string

Name returns the name of the App

func (*ChainApp) PreBlocker

func (app *ChainApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)

PreBlocker application updates every pre block

func (*ChainApp) RegisterAPIRoutes

func (app *ChainApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)

RegisterAPIRoutes registers all application module routes with the provided API server.

func (*ChainApp) RegisterNodeService

func (app *ChainApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)

func (*ChainApp) RegisterPendingTxListener added in v0.0.37

func (app *ChainApp) RegisterPendingTxListener(listener func(common.Hash))

RegisterPendingTxListener registers a listener for pending EVM transactions (required by evmserver.Application).

func (*ChainApp) RegisterTendermintService

func (app *ChainApp) RegisterTendermintService(clientCtx client.Context)

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*ChainApp) RegisterTxService

func (app *ChainApp) RegisterTxService(clientCtx client.Context)

RegisterTxService implements the Application.RegisterTxService method.

func (*ChainApp) RegisterUpgradeHandlers

func (app *ChainApp) RegisterUpgradeHandlers()

RegisterUpgradeHandlers registers the chain upgrade handlers

func (*ChainApp) SetClientCtx added in v0.0.37

func (app *ChainApp) SetClientCtx(clientCtx client.Context)

SetClientCtx sets the client context on the app (required by evmserver.Application).

func (*ChainApp) SimulationManager

func (app *ChainApp) SimulationManager() *module.SimulationManager

SimulationManager implements the SimulationApp interface

func (*ChainApp) TxConfig

func (app *ChainApp) TxConfig() client.TxConfig

TxConfig returns ChainApp's TxConfig

type EVMOptionsFn

type EVMOptionsFn func(string) error

EVMOptionsFn defines a function type for setting app options specifically for the app. The function should receive the chainID and return an error if any.

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState of the blockchain is represented here as a map of raw json messages key'd by a identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.

func GenesisStateWithSingleValidator

func GenesisStateWithSingleValidator(t *testing.T, app *ChainApp) GenesisState

GenesisStateWithSingleValidator initializes GenesisState with a single validator and genesis accounts that also act as delegators.

type Option added in v0.0.37

type Option func(opts *Optionals)

func WithAddressCodec added in v0.0.37

func WithAddressCodec(c address.Codec) Option

func WithConsensusAddrCodec added in v0.0.37

func WithConsensusAddrCodec(c address.Codec) Option

func WithValidatorAddrCodec added in v0.0.37

func WithValidatorAddrCodec(c address.Codec) Option

type Optionals added in v0.0.37

type Optionals struct {
	AddressCodec       address.Codec
	ValidatorAddrCodec address.Codec
	ConsensusAddrCodec address.Codec
}

Optionals define some optional params that can be applied to _some_ precompiles.

type PacketDataUnmarshaler

type PacketDataUnmarshaler interface {
	UnmarshalPacketData(ctx sdk.Context, portID, channelID string, bz []byte) (interface{}, string, error)
}

type SetupOptions

type SetupOptions struct {
	Logger   log.Logger
	DB       *dbm.MemDB
	AppOpts  servertypes.AppOptions
	WasmOpts []wasmkeeper.Option
}

SetupOptions defines arguments that are passed into `ChainApp` constructor.

Directories

Path Synopsis
Package params defines the simulation parameters in the gaia.
Package params defines the simulation parameters in the gaia.
evm-params-migration
Package evmparamsmigration contains the upgrade handler that migrates the x/vm module's on-chain Params from the v0.2.x proto layout to the v0.3.x layout.
Package evmparamsmigration contains the upgrade handler that migrates the x/vm module's on-chain Params from the v0.2.x proto layout to the v0.3.x layout.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL