Documentation
¶
Index ¶
- func NewMsgApproveAction(creator string, actionID string) *actiontypes.MsgApproveAction
- func NewMsgClaimLegacyAccount(newAddress, legacyAddress string, ...) *evmigrationtypes.MsgClaimLegacyAccount
- func NewMsgConvertCoin(coin sdk.Coin, receiver common.Address, sender string) *erc20types.MsgConvertCoin
- func NewMsgConvertERC20(amount sdkmath.Int, receiver string, contract, sender common.Address) *erc20types.MsgConvertERC20
- func NewMsgDeregisterSupernode(creator, validatorAddress string) *supernodetypes.MsgDeregisterSupernode
- func NewMsgFinalizeAction(creator string, actionID string, actionType actiontypes.ActionType, ...) *actiontypes.MsgFinalizeAction
- func NewMsgMigrateValidator(newAddress, legacyAddress string, ...) *evmigrationtypes.MsgMigrateValidator
- func NewMsgRegisterERC20(signer string, contracts []common.Address) *erc20types.MsgRegisterERC20
- func NewMsgRegisterSupernode(creator, validatorAddress, ipAddress, supernodeAccount, p2pPort string) *supernodetypes.MsgRegisterSupernode
- func NewMsgRequestAction(creator string, actionType actiontypes.ActionType, metadata string, ...) *actiontypes.MsgRequestAction
- func NewMsgStartSupernode(creator, validatorAddress string) *supernodetypes.MsgStartSupernode
- func NewMsgStopSupernode(creator, validatorAddress, reason string) *supernodetypes.MsgStopSupernode
- func NewMsgToggleConversion(authority, token string) *erc20types.MsgToggleConversion
- func NewMsgUpdateParams(authority string, params actiontypes.Params) *actiontypes.MsgUpdateParams
- func NewMsgUpdateSupernode(creator, validatorAddress, ipAddress, note, supernodeAccount, p2pPort string) *supernodetypes.MsgUpdateSupernode
- func NewSuperNodeMsgUpdateParams(authority string, params supernodetypes.Params) *supernodetypes.MsgUpdateParams
- type ActionClient
- func (a *ActionClient) GetAction(ctx context.Context, actionID string) (*types.Action, error)
- func (a *ActionClient) GetActionFee(ctx context.Context, dataSize int64) (string, error)
- func (a *ActionClient) ListActions(ctx context.Context, opts ...QueryOption) ([]*types.Action, error)
- func (a *ActionClient) ListActionsByBlockHeight(ctx context.Context, blockHeight int64, limit, offset uint64) ([]*types.Action, error)
- func (a *ActionClient) ListActionsBySuperNode(ctx context.Context, superNodeAddress string, limit, offset uint64) ([]*types.Action, error)
- func (a *ActionClient) ListActionsByType(ctx context.Context, actionType string, limit, offset uint64) ([]*types.Action, error)
- func (a *ActionClient) ListExpiredActions(ctx context.Context, limit, offset uint64) ([]*types.Action, error)
- func (a *ActionClient) Params(ctx context.Context) (*actiontypes.Params, error)
- func (a *ActionClient) QueryActionByMetadata(ctx context.Context, actionTypeStr, metadataQuery string, limit, offset uint64) ([]*types.Action, error)
- func (a *ActionClient) QueryActionByMetadataEnum(ctx context.Context, actionType actiontypes.ActionType, metadataQuery string, ...) ([]*types.Action, error)
- func (a *ActionClient) WaitForState(ctx context.Context, actionID string, state types.ActionState, ...) (*types.Action, error)
- type AuditClient
- type ClaimClient
- type Client
- func (c *Client) ApproveActionTx(ctx context.Context, creator, actionID, memo string) (*types.ActionResult, error)
- func (c *Client) ClaimLegacyAccountTx(ctx context.Context, msg *evmigrationtypes.MsgClaimLegacyAccount, memo string) (*MigrationResult, error)
- func (c *Client) ConvertCoinToERC20(ctx context.Context, coin sdk.Coin, receiver common.Address, memo string) (*ConversionResult, error)
- func (c *Client) ConvertERC20ToCoin(ctx context.Context, contract common.Address, amount sdkmath.Int, ...) (*ConversionResult, error)
- func (c *Client) DeregisterSupernodeTx(ctx context.Context, creator, validatorAddress, memo string) (*types.ActionResult, error)
- func (c *Client) FinalizeActionTx(ctx context.Context, creator, actionID string, ...) (*types.ActionResult, error)
- func (c *Client) MigrateValidatorTx(ctx context.Context, msg *evmigrationtypes.MsgMigrateValidator, memo string) (*MigrationResult, error)
- func (c *Client) RegisterERC20Tx(ctx context.Context, contracts []common.Address, memo string) (string, error)
- func (c *Client) RegisterSupernodeTx(ctx context.Context, ...) (*types.ActionResult, error)
- func (c *Client) RequestActionTx(ctx context.Context, creator string, actionType actiontypes.ActionType, ...) (*types.ActionResult, error)
- func (c *Client) StartSupernodeTx(ctx context.Context, creator, validatorAddress, memo string) (*types.ActionResult, error)
- func (c *Client) StopSupernodeTx(ctx context.Context, creator, validatorAddress, reason, memo string) (*types.ActionResult, error)
- func (c *Client) ToggleConversionTx(ctx context.Context, authority, token, memo string) (string, error)
- func (c *Client) UpdateActionParamsTx(ctx context.Context, authority string, params actiontypes.Params, memo string) (*types.ActionResult, error)
- func (c *Client) UpdateSuperNodeParamsTx(ctx context.Context, authority string, params supernodetypes.Params, ...) (*types.ActionResult, error)
- func (c *Client) UpdateSupernodeTx(ctx context.Context, ...) (*types.ActionResult, error)
- type Config
- type ConversionResult
- type ERC20Client
- func (c *ERC20Client) Erc20Allowance(ctx context.Context, contract, owner, spender common.Address) (*big.Int, error)
- func (c *ERC20Client) Erc20Balance(ctx context.Context, contract, holder common.Address) (*big.Int, error)
- func (c *ERC20Client) Erc20Metadata(ctx context.Context, contract common.Address) (Erc20Metadata, error)
- func (c *ERC20Client) Erc20TotalSupply(ctx context.Context, contract common.Address) (*big.Int, error)
- func (c *ERC20Client) Params(ctx context.Context) (*erc20types.QueryParamsResponse, error)
- func (c *ERC20Client) TokenPair(ctx context.Context, token string) (erc20types.TokenPair, error)
- func (c *ERC20Client) TokenPairs(ctx context.Context, pagination *query.PageRequest) ([]erc20types.TokenPair, *query.PageResponse, error)
- type EVMClient
- func (c *EVMClient) Balance(ctx context.Context, addr common.Address) (*big.Int, error)
- func (c *EVMClient) BaseFee(ctx context.Context) (*big.Int, error)
- func (c *EVMClient) CallContract(ctx context.Context, to common.Address, data []byte) ([]byte, error)
- func (c *EVMClient) Code(ctx context.Context, addr common.Address) ([]byte, error)
- func (c *EVMClient) Config(ctx context.Context) (*evmtypes.QueryConfigResponse, error)
- func (c *EVMClient) CosmosAccount(ctx context.Context, addr common.Address) (*evmtypes.QueryCosmosAccountResponse, error)
- func (c *EVMClient) DeployContract(ctx context.Context, bytecode []byte, opts *EthereumTxOptions) (common.Address, *EthereumTransactionResult, error)
- func (c *EVMClient) EstimateGas(ctx context.Context, from common.Address, to *common.Address, data []byte, ...) (uint64, error)
- func (c *EVMClient) EthAccount(ctx context.Context, addr common.Address) (*evmtypes.QueryAccountResponse, error)
- func (c *EVMClient) EthCall(ctx context.Context, from common.Address, to *common.Address, data []byte, ...) (*evmtypes.MsgEthereumTxResponse, error)
- func (c *EVMClient) GlobalMinGasPrice(ctx context.Context) (*big.Int, error)
- func (c *EVMClient) Params(ctx context.Context) (*evmtypes.QueryParamsResponse, error)
- func (c *EVMClient) RawEthereumTx(ctx context.Context, signed *ethtypes.Transaction) (*EthereumTransactionResult, error)
- func (c *EVMClient) SendEthereumTransaction(ctx context.Context, to *common.Address, data []byte, opts *EthereumTxOptions) (*EthereumTransactionResult, error)
- func (c *EVMClient) Storage(ctx context.Context, addr common.Address, key common.Hash) (common.Hash, error)
- func (c *EVMClient) TraceTx(ctx context.Context, req *evmtypes.QueryTraceTxRequest) ([]byte, error)
- type EVMigrationClient
- func (c *EVMigrationClient) MigrationEstimate(ctx context.Context, legacyAddress string) (*evmigrationtypes.QueryMigrationEstimateResponse, error)
- func (c *EVMigrationClient) MigrationRecord(ctx context.Context, legacyAddress string) (*evmigrationtypes.QueryMigrationRecordResponse, error)
- func (c *EVMigrationClient) MigrationRecordByNewAddress(ctx context.Context, newAddress string) (*evmigrationtypes.QueryMigrationRecordByNewAddressResponse, error)
- func (c *EVMigrationClient) MigrationStats(ctx context.Context) (*evmigrationtypes.QueryMigrationStatsResponse, error)
- func (c *EVMigrationClient) Params(ctx context.Context) (*evmigrationtypes.QueryParamsResponse, error)
- type Erc20Metadata
- type EthereumTransactionResult
- type EthereumTxOptions
- type FeeMarketClient
- type MigrationResult
- type PreciseBankClient
- type PrecompileClient
- func (p *PrecompileClient) ABI() abi.ABI
- func (p *PrecompileClient) Address() common.Address
- func (p *PrecompileClient) Call(ctx context.Context, method string, args ...any) ([]any, error)
- func (p *PrecompileClient) Send(ctx context.Context, method string, opts *EthereumTxOptions, args ...any) (*EthereumTransactionResult, error)
- type QueryOption
- func WithActionState(state actiontypes.ActionState) QueryOption
- func WithActionStateEnum(st actiontypes.ActionState) QueryOption
- func WithActionStateStr(s string) QueryOption
- func WithActionType(actionType actiontypes.ActionType) QueryOption
- func WithActionTypeEnum(t actiontypes.ActionType) QueryOption
- func WithActionTypeStr(s string) QueryOption
- func WithPagination(limit, offset uint64) QueryOption
- type SuperNodeClient
- func (s *SuperNodeClient) GetSuperNode(ctx context.Context, validatorAddr string) (*types.SuperNode, error)
- func (s *SuperNodeClient) GetSuperNodeBySuperNodeAddress(ctx context.Context, supernodeAddress string) (*types.SuperNode, error)
- func (s *SuperNodeClient) GetTopSuperNodesForBlock(ctx context.Context, blockHeight int32) ([]*supernodetypes.SuperNode, error)
- func (s *SuperNodeClient) GetTopSuperNodesForBlockWithOptions(ctx context.Context, blockHeight int32, limit int32, state string) ([]*types.SuperNode, error)
- func (s *SuperNodeClient) ListSuperNodes(ctx context.Context, limit, offset uint64) ([]*types.SuperNode, error)
- func (s *SuperNodeClient) Params(ctx context.Context) (*supernodetypes.Params, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgApproveAction ¶
func NewMsgApproveAction( creator string, actionID string, ) *actiontypes.MsgApproveAction
NewMsgApproveAction constructs a MsgApproveAction with the provided creator and actionID.
func NewMsgClaimLegacyAccount ¶ added in v1.2.0
func NewMsgClaimLegacyAccount(newAddress, legacyAddress string, legacyProof, newProof evmigrationtypes.MigrationProof) *evmigrationtypes.MsgClaimLegacyAccount
NewMsgClaimLegacyAccount constructs a MsgClaimLegacyAccount.
func NewMsgConvertCoin ¶ added in v1.2.0
func NewMsgConvertCoin(coin sdk.Coin, receiver common.Address, sender string) *erc20types.MsgConvertCoin
NewMsgConvertCoin builds a MsgConvertCoin (cosmos coin -> ERC20).
func NewMsgConvertERC20 ¶ added in v1.2.0
func NewMsgConvertERC20(amount sdkmath.Int, receiver string, contract, sender common.Address) *erc20types.MsgConvertERC20
NewMsgConvertERC20 builds a MsgConvertERC20 (ERC20 -> cosmos coin).
func NewMsgDeregisterSupernode ¶
func NewMsgDeregisterSupernode( creator, validatorAddress string, ) *supernodetypes.MsgDeregisterSupernode
NewMsgDeregisterSupernode constructs a MsgDeregisterSupernode.
func NewMsgFinalizeAction ¶
func NewMsgFinalizeAction( creator string, actionID string, actionType actiontypes.ActionType, metadata string, ) *actiontypes.MsgFinalizeAction
NewMsgFinalizeAction constructs a MsgFinalizeAction with the provided parameters.
func NewMsgMigrateValidator ¶ added in v1.2.0
func NewMsgMigrateValidator(newAddress, legacyAddress string, legacyProof, newProof evmigrationtypes.MigrationProof) *evmigrationtypes.MsgMigrateValidator
NewMsgMigrateValidator constructs a MsgMigrateValidator.
func NewMsgRegisterERC20 ¶ added in v1.2.0
func NewMsgRegisterERC20(signer string, contracts []common.Address) *erc20types.MsgRegisterERC20
NewMsgRegisterERC20 builds a MsgRegisterERC20 (governance-gated).
func NewMsgRegisterSupernode ¶
func NewMsgRegisterSupernode( creator, validatorAddress, ipAddress, supernodeAccount, p2pPort string, ) *supernodetypes.MsgRegisterSupernode
NewMsgRegisterSupernode constructs a MsgRegisterSupernode.
func NewMsgRequestAction ¶
func NewMsgRequestAction( creator string, actionType actiontypes.ActionType, metadata string, price string, expiration string, fileSizeKbs int64, ) *actiontypes.MsgRequestAction
NewMsgRequestAction constructs a MsgRequestAction with the provided parameters. Converts typed inputs to the string format required by the protobuf message.
func NewMsgStartSupernode ¶
func NewMsgStartSupernode( creator, validatorAddress string, ) *supernodetypes.MsgStartSupernode
NewMsgStartSupernode constructs a MsgStartSupernode.
func NewMsgStopSupernode ¶
func NewMsgStopSupernode( creator, validatorAddress, reason string, ) *supernodetypes.MsgStopSupernode
NewMsgStopSupernode constructs a MsgStopSupernode.
func NewMsgToggleConversion ¶ added in v1.2.0
func NewMsgToggleConversion(authority, token string) *erc20types.MsgToggleConversion
NewMsgToggleConversion builds a MsgToggleConversion (governance-gated).
func NewMsgUpdateParams ¶
func NewMsgUpdateParams( authority string, params actiontypes.Params, ) *actiontypes.MsgUpdateParams
NewMsgUpdateParams constructs a MsgUpdateParams with the provided authority and params.
func NewMsgUpdateSupernode ¶
func NewMsgUpdateSupernode( creator, validatorAddress, ipAddress, note, supernodeAccount, p2pPort string, ) *supernodetypes.MsgUpdateSupernode
NewMsgUpdateSupernode constructs a MsgUpdateSupernode.
func NewSuperNodeMsgUpdateParams ¶
func NewSuperNodeMsgUpdateParams( authority string, params supernodetypes.Params, ) *supernodetypes.MsgUpdateParams
NewSuperNodeMsgUpdateParams constructs a SuperNode MsgUpdateParams with the provided authority and params.
Types ¶
type ActionClient ¶
type ActionClient struct {
// contains filtered or unexported fields
}
ActionClient provides action module operations
func (*ActionClient) GetActionFee ¶
GetActionFee calculates the fee for an action based on data size
func (*ActionClient) ListActions ¶
func (a *ActionClient) ListActions(ctx context.Context, opts ...QueryOption) ([]*types.Action, error)
ListActions lists actions with optional filters
func (*ActionClient) ListActionsByBlockHeight ¶
func (a *ActionClient) ListActionsByBlockHeight(ctx context.Context, blockHeight int64, limit, offset uint64) ([]*types.Action, error)
ListActionsByBlockHeight lists actions created at a specific block height with pagination.
func (*ActionClient) ListActionsBySuperNode ¶
func (a *ActionClient) ListActionsBySuperNode(ctx context.Context, superNodeAddress string, limit, offset uint64) ([]*types.Action, error)
ListActionsBySuperNode lists actions for a specific supernode address with pagination.
func (*ActionClient) ListActionsByType ¶
func (a *ActionClient) ListActionsByType(ctx context.Context, actionType string, limit, offset uint64) ([]*types.Action, error)
ListActionsByType provides a convenience wrapper accepting actionType as a string with pagination.
func (*ActionClient) ListExpiredActions ¶
func (a *ActionClient) ListExpiredActions(ctx context.Context, limit, offset uint64) ([]*types.Action, error)
ListExpiredActions lists expired actions with pagination.
func (*ActionClient) Params ¶
func (a *ActionClient) Params(ctx context.Context) (*actiontypes.Params, error)
Params retrieves the Action module parameters.
func (*ActionClient) QueryActionByMetadata ¶
func (a *ActionClient) QueryActionByMetadata(ctx context.Context, actionTypeStr, metadataQuery string, limit, offset uint64) ([]*types.Action, error)
QueryActionByMetadata queries actions by metadata and string ActionType with pagination.
func (*ActionClient) QueryActionByMetadataEnum ¶
func (a *ActionClient) QueryActionByMetadataEnum(ctx context.Context, actionType actiontypes.ActionType, metadataQuery string, limit, offset uint64) ([]*types.Action, error)
QueryActionByMetadataEnum queries actions by metadata and typed ActionType with pagination.
func (*ActionClient) WaitForState ¶ added in v1.0.5
func (a *ActionClient) WaitForState(ctx context.Context, actionID string, state types.ActionState, pollInterval time.Duration) (*types.Action, error)
WaitForState polls action state until it matches the target or the context is done. A pollInterval <= 0 uses a 1s default.
type ClaimClient ¶
type ClaimClient struct {
// contains filtered or unexported fields
}
ClaimClient provides claim module operations
type Client ¶
type Client struct {
*base.Client
// Module-specific clients
Action *ActionClient
SuperNode *SuperNodeClient
Claim *ClaimClient
EVMigration *EVMigrationClient
Audit *AuditClient
// EVM module clients (cosmos/evm)
EVM *EVMClient
ERC20 *ERC20Client
FeeMarket *FeeMarketClient
PreciseBank *PreciseBankClient
}
Client provides access to Lumera-specific blockchain operations.
func (*Client) ApproveActionTx ¶
func (c *Client) ApproveActionTx(ctx context.Context, creator, actionID, memo string) (*types.ActionResult, error)
ApproveActionTx builds, signs, broadcasts and confirms a MsgApproveAction.
func (*Client) ClaimLegacyAccountTx ¶ added in v1.2.0
func (c *Client) ClaimLegacyAccountTx(ctx context.Context, msg *evmigrationtypes.MsgClaimLegacyAccount, memo string) (*MigrationResult, error)
ClaimLegacyAccountTx builds, signs, broadcasts and confirms a MsgClaimLegacyAccount.
func (*Client) ConvertCoinToERC20 ¶ added in v1.2.0
func (c *Client) ConvertCoinToERC20( ctx context.Context, coin sdk.Coin, receiver common.Address, memo string, ) (*ConversionResult, error)
ConvertCoinToERC20 wraps cosmos coins as ERC20 tokens. Receiver is the EVM (0x) address that gets the wrapped ERC20. Sender is the client's signer.
func (*Client) ConvertERC20ToCoin ¶ added in v1.2.0
func (c *Client) ConvertERC20ToCoin( ctx context.Context, contract common.Address, amount sdkmath.Int, receiver string, memo string, ) (*ConversionResult, error)
ConvertERC20ToCoin unwraps ERC20 tokens to native cosmos coins. Receiver is the cosmos bech32 address; sender is the 0x address derived from the client's eth_secp256k1 signing key.
func (*Client) DeregisterSupernodeTx ¶
func (c *Client) DeregisterSupernodeTx(ctx context.Context, creator, validatorAddress, memo string) (*types.ActionResult, error)
DeregisterSupernodeTx de-registers an existing supernode.
func (*Client) FinalizeActionTx ¶
func (c *Client) FinalizeActionTx(ctx context.Context, creator, actionID string, actionType actiontypes.ActionType, metadata, memo string) (*types.ActionResult, error)
FinalizeActionTx builds, signs, broadcasts and confirms a MsgFinalizeAction.
func (*Client) MigrateValidatorTx ¶ added in v1.2.0
func (c *Client) MigrateValidatorTx(ctx context.Context, msg *evmigrationtypes.MsgMigrateValidator, memo string) (*MigrationResult, error)
MigrateValidatorTx builds, signs, broadcasts and confirms a MsgMigrateValidator.
func (*Client) RegisterERC20Tx ¶ added in v1.2.0
func (c *Client) RegisterERC20Tx( ctx context.Context, contracts []common.Address, memo string, ) (string, error)
RegisterERC20Tx wraps MsgRegisterERC20 and broadcasts it. The chain may permit permissionless registration; if it requires governance, the signer must be the module authority.
func (*Client) RegisterSupernodeTx ¶
func (c *Client) RegisterSupernodeTx(ctx context.Context, creator, validatorAddress, ipAddress, supernodeAccount, p2pPort, memo string) (*types.ActionResult, error)
RegisterSupernodeTx registers a new supernode.
func (*Client) RequestActionTx ¶
func (c *Client) RequestActionTx(ctx context.Context, creator string, actionType actiontypes.ActionType, metadata, price, expiration string, fileSizeKbs int64, memo string) (*types.ActionResult, error)
RequestActionTx builds, signs, broadcasts and confirms a MsgRequestAction.
func (*Client) StartSupernodeTx ¶
func (c *Client) StartSupernodeTx(ctx context.Context, creator, validatorAddress, memo string) (*types.ActionResult, error)
StartSupernodeTx starts a supernode.
func (*Client) StopSupernodeTx ¶
func (c *Client) StopSupernodeTx(ctx context.Context, creator, validatorAddress, reason, memo string) (*types.ActionResult, error)
StopSupernodeTx stops a supernode with a reason.
func (*Client) ToggleConversionTx ¶ added in v1.2.0
func (c *Client) ToggleConversionTx( ctx context.Context, authority, token, memo string, ) (string, error)
ToggleConversionTx wraps MsgToggleConversion (governance-gated).
func (*Client) UpdateActionParamsTx ¶
func (c *Client) UpdateActionParamsTx(ctx context.Context, authority string, params actiontypes.Params, memo string) (*types.ActionResult, error)
UpdateActionParamsTx builds, signs, broadcasts and confirms a MsgUpdateParams for the Action module.
func (*Client) UpdateSuperNodeParamsTx ¶
func (c *Client) UpdateSuperNodeParamsTx(ctx context.Context, authority string, params supernodetypes.Params, memo string) (*types.ActionResult, error)
UpdateSuperNodeParamsTx builds, signs, broadcasts and confirms a SuperNode MsgUpdateParams.
func (*Client) UpdateSupernodeTx ¶
func (c *Client) UpdateSupernodeTx(ctx context.Context, creator, validatorAddress, ipAddress, note, supernodeAccount, p2pPort, memo string) (*types.ActionResult, error)
UpdateSupernodeTx updates a supernode's info.
type ConversionResult ¶ added in v1.2.0
type ConversionResult struct {
From string
To string
Amount sdkmath.Int
TxHash string
Height int64
}
ConversionResult captures the outcome of a coin <-> ERC20 conversion.
type ERC20Client ¶ added in v1.2.0
type ERC20Client struct {
// contains filtered or unexported fields
}
ERC20Client provides x/erc20 module operations: queries plus opinionated tx helpers for the Cosmos<->ERC20 conversion flows.
func (*ERC20Client) Erc20Allowance ¶ added in v1.2.0
func (c *ERC20Client) Erc20Allowance(ctx context.Context, contract, owner, spender common.Address) (*big.Int, error)
Erc20Allowance calls allowance(owner, spender) on the ERC20 contract.
func (*ERC20Client) Erc20Balance ¶ added in v1.2.0
func (c *ERC20Client) Erc20Balance(ctx context.Context, contract, holder common.Address) (*big.Int, error)
Erc20Balance calls balanceOf(holder) on the ERC20 contract.
func (*ERC20Client) Erc20Metadata ¶ added in v1.2.0
func (c *ERC20Client) Erc20Metadata(ctx context.Context, contract common.Address) (Erc20Metadata, error)
Erc20Metadata returns name, symbol, decimals for the ERC20 contract.
func (*ERC20Client) Erc20TotalSupply ¶ added in v1.2.0
func (c *ERC20Client) Erc20TotalSupply(ctx context.Context, contract common.Address) (*big.Int, error)
Erc20TotalSupply calls totalSupply() on the ERC20 contract.
func (*ERC20Client) Params ¶ added in v1.2.0
func (c *ERC20Client) Params(ctx context.Context) (*erc20types.QueryParamsResponse, error)
Params returns the current x/erc20 module parameters.
func (*ERC20Client) TokenPair ¶ added in v1.2.0
func (c *ERC20Client) TokenPair(ctx context.Context, token string) (erc20types.TokenPair, error)
TokenPair returns the registered pair for a given denom or 0x contract.
func (*ERC20Client) TokenPairs ¶ added in v1.2.0
func (c *ERC20Client) TokenPairs(ctx context.Context, pagination *query.PageRequest) ([]erc20types.TokenPair, *query.PageResponse, error)
TokenPairs returns the registered token pairs with optional pagination.
type EVMClient ¶ added in v1.2.0
type EVMClient struct {
// Lumera precompile wrappers. Each routes through this EVMClient.
Action *PrecompileClient
Supernode *PrecompileClient
Wasm *PrecompileClient
// contains filtered or unexported fields
}
EVMClient provides x/vm module query operations plus high-level Ethereum transaction helpers (SendEthereumTransaction, DeployContract, CallContract, RawEthereumTx).
func (*EVMClient) Balance ¶ added in v1.2.0
Balance returns the account balance in the EVM extended denom (alume on Lumera) as an integer wei-like *big.Int.
func (*EVMClient) BaseFee ¶ added in v1.2.0
BaseFee returns the EIP-1559 base fee in the EVM extended denom (alume) as a *big.Int. Differs from FeeMarketClient.BaseFee, which returns the native denom (ulume) decimal value.
func (*EVMClient) CallContract ¶ added in v1.2.0
func (c *EVMClient) CallContract( ctx context.Context, to common.Address, data []byte, ) ([]byte, error)
CallContract is a read-only call (forwards to EthCall).
func (*EVMClient) Config ¶ added in v1.2.0
Config returns the EVM configuration (chain config, denoms, active forks).
func (*EVMClient) CosmosAccount ¶ added in v1.2.0
func (c *EVMClient) CosmosAccount(ctx context.Context, addr common.Address) (*evmtypes.QueryCosmosAccountResponse, error)
CosmosAccount returns the cosmos bech32 address paired with the given EVM address, plus its current sequence and account number.
func (*EVMClient) DeployContract ¶ added in v1.2.0
func (c *EVMClient) DeployContract( ctx context.Context, bytecode []byte, opts *EthereumTxOptions, ) (common.Address, *EthereumTransactionResult, error)
DeployContract is sugar over SendEthereumTransaction for contract creation. Returns the deployed contract address derived from sender+nonce per EIP-161.
func (*EVMClient) EstimateGas ¶ added in v1.2.0
func (c *EVMClient) EstimateGas(ctx context.Context, from common.Address, to *common.Address, data []byte, value *big.Int, gasCap uint64) (uint64, error)
EstimateGas estimates gas for a hypothetical tx. value may be nil.
func (*EVMClient) EthAccount ¶ added in v1.2.0
func (c *EVMClient) EthAccount(ctx context.Context, addr common.Address) (*evmtypes.QueryAccountResponse, error)
EthAccount returns the raw EVM account record: balance, code hash, nonce. On Lumera the nonce is shared with the Cosmos auth sequence.
func (*EVMClient) EthCall ¶ added in v1.2.0
func (c *EVMClient) EthCall(ctx context.Context, from common.Address, to *common.Address, data []byte, gasCap uint64) (*evmtypes.MsgEthereumTxResponse, error)
EthCall executes a read-only EVM call. from may be the zero address.
func (*EVMClient) GlobalMinGasPrice ¶ added in v1.2.0
GlobalMinGasPrice returns the chain-wide minimum gas price in alume/gas.
func (*EVMClient) RawEthereumTx ¶ added in v1.2.0
func (c *EVMClient) RawEthereumTx( ctx context.Context, signed *ethtypes.Transaction, ) (*EthereumTransactionResult, error)
RawEthereumTx broadcasts a pre-signed go-ethereum transaction unchanged. For callers bringing their own signer (e.g. hardware wallet).
func (*EVMClient) SendEthereumTransaction ¶ added in v1.2.0
func (c *EVMClient) SendEthereumTransaction( ctx context.Context, to *common.Address, data []byte, opts *EthereumTxOptions, ) (*EthereumTransactionResult, error)
SendEthereumTransaction signs and broadcasts an Ethereum-format tx using the client's key. Pulls nonce, gas, and fees from chain when not set. Waits for inclusion. Returns both the eth tx hash and cosmos hash so callers can correlate.
to=nil deploys a contract; pass DeployContract for that case.
func (*EVMClient) Storage ¶ added in v1.2.0
func (c *EVMClient) Storage(ctx context.Context, addr common.Address, key common.Hash) (common.Hash, error)
Storage returns the storage slot value at key for the contract at addr.
type EVMigrationClient ¶ added in v1.2.0
type EVMigrationClient struct {
// contains filtered or unexported fields
}
EVMigrationClient provides evmigration module query operations.
func (*EVMigrationClient) MigrationEstimate ¶ added in v1.2.0
func (c *EVMigrationClient) MigrationEstimate(ctx context.Context, legacyAddress string) (*evmigrationtypes.QueryMigrationEstimateResponse, error)
MigrationEstimate returns a pre-flight estimate of whether the migration would succeed, including asset counts and rejection reason.
func (*EVMigrationClient) MigrationRecord ¶ added in v1.2.0
func (c *EVMigrationClient) MigrationRecord(ctx context.Context, legacyAddress string) (*evmigrationtypes.QueryMigrationRecordResponse, error)
MigrationRecord returns the migration record for a legacy address. If no record exists, the underlying query returns its gRPC error.
func (*EVMigrationClient) MigrationRecordByNewAddress ¶ added in v1.2.0
func (c *EVMigrationClient) MigrationRecordByNewAddress(ctx context.Context, newAddress string) (*evmigrationtypes.QueryMigrationRecordByNewAddressResponse, error)
MigrationRecordByNewAddress returns the migration record for a migrated destination address. If no record exists, the underlying query returns its gRPC error.
func (*EVMigrationClient) MigrationStats ¶ added in v1.2.0
func (c *EVMigrationClient) MigrationStats(ctx context.Context) (*evmigrationtypes.QueryMigrationStatsResponse, error)
MigrationStats returns aggregate migration statistics (total migrated, total legacy, etc.).
func (*EVMigrationClient) Params ¶ added in v1.2.0
func (c *EVMigrationClient) Params(ctx context.Context) (*evmigrationtypes.QueryParamsResponse, error)
Params returns the current evmigration module parameters.
type Erc20Metadata ¶ added in v1.2.0
Erc20Metadata bundles the static ERC20 metadata fields.
type EthereumTransactionResult ¶ added in v1.2.0
type EthereumTransactionResult struct {
EthTxHash common.Hash
CosmosHash string
Height int64
GasUsed uint64
VMError string
ReturnData []byte
Logs []*evmtypes.Log
}
EthereumTransactionResult captures the outcome of an Ethereum-format tx.
type EthereumTxOptions ¶ added in v1.2.0
type EthereumTxOptions struct {
Nonce *uint64 // default: query EthAccount
GasLimit uint64 // default: EstimateGas + 20% buffer
GasTipCap *big.Int // default: feemarket MinGasPrice scaled to alume/gas
GasFeeCap *big.Int // default: BaseFee * 2 + tipCap (alume/gas)
Value *big.Int // default: 0 (alume)
AccessList ethtypes.AccessList
Memo string // unused for EVM-path txs; reserved for future
}
EthereumTxOptions overrides defaults pulled from chain state.
type FeeMarketClient ¶ added in v1.2.0
type FeeMarketClient struct {
// contains filtered or unexported fields
}
FeeMarketClient provides x/feemarket module query operations.
func (*FeeMarketClient) BaseFee ¶ added in v1.2.0
BaseFee returns the EIP-1559 base fee of the parent block, expressed in the native denom (ulume on Lumera). Callers that need an integer wei-like value for EIP-1559 fee fields should pass the result through pkg/crypto.ULumeDecToWei.
func (*FeeMarketClient) BlockGas ¶ added in v1.2.0
func (c *FeeMarketClient) BlockGas(ctx context.Context) (int64, error)
BlockGas returns the gas used at the most recent block.
func (*FeeMarketClient) Params ¶ added in v1.2.0
func (c *FeeMarketClient) Params(ctx context.Context) (*feemarkettypes.QueryParamsResponse, error)
Params returns the current feemarket module parameters.
type MigrationResult ¶ added in v1.2.0
MigrationResult contains the result of an evmigration tx.
type PreciseBankClient ¶ added in v1.2.0
type PreciseBankClient struct {
// contains filtered or unexported fields
}
PreciseBankClient provides x/precisebank module query operations.
func (*PreciseBankClient) FractionalBalance ¶ added in v1.2.0
func (c *PreciseBankClient) FractionalBalance(ctx context.Context, address string) (sdk.Coin, error)
FractionalBalance returns the sub-ulume fractional balance for an address. Does not include the integer balance stored in x/bank.
type PrecompileClient ¶ added in v1.2.0
type PrecompileClient struct {
// contains filtered or unexported fields
}
PrecompileClient wraps a Lumera precompile (action, supernode, or wasm) so callers can invoke any of its methods without packing calldata manually.
Use Call for read-only methods (forwarded through EthCall) and Send for state-changing methods (signed and broadcast as a MsgEthereumTx).
func (*PrecompileClient) ABI ¶ added in v1.2.0
func (p *PrecompileClient) ABI() abi.ABI
ABI returns the parsed ABI so callers can introspect method signatures.
func (*PrecompileClient) Address ¶ added in v1.2.0
func (p *PrecompileClient) Address() common.Address
Address returns the precompile's fixed Ethereum address.
func (*PrecompileClient) Call ¶ added in v1.2.0
Call invokes a read-only precompile method and returns the unpacked outputs in the order the Solidity interface declares them.
func (*PrecompileClient) Send ¶ added in v1.2.0
func (p *PrecompileClient) Send(ctx context.Context, method string, opts *EthereumTxOptions, args ...any) (*EthereumTransactionResult, error)
Send signs and broadcasts a state-changing precompile call. opts may be nil; nonce/gas/fees are resolved from chain state when unset.
type QueryOption ¶
type QueryOption interface {
ApplyToActionQuery(*actiontypes.QueryListActionsRequest)
}
QueryOption is a functional option for queries
func WithActionState ¶
func WithActionState(state actiontypes.ActionState) QueryOption
WithActionState filters by action state enum
func WithActionStateEnum ¶
func WithActionStateEnum(st actiontypes.ActionState) QueryOption
WithActionStateEnum is an alias for WithActionState for clarity
func WithActionStateStr ¶
func WithActionStateStr(s string) QueryOption
WithActionStateStr parses a string into an enum (case-insensitive), falling back to zero value if unknown
func WithActionType ¶
func WithActionType(actionType actiontypes.ActionType) QueryOption
WithActionType filters by action type enum
func WithActionTypeEnum ¶
func WithActionTypeEnum(t actiontypes.ActionType) QueryOption
WithActionTypeEnum is an alias for WithActionType for clarity
func WithActionTypeStr ¶
func WithActionTypeStr(s string) QueryOption
WithActionTypeStr parses a string into an enum (case-insensitive), falling back to zero value if unknown
func WithPagination ¶
func WithPagination(limit, offset uint64) QueryOption
WithPagination sets pagination parameters
type SuperNodeClient ¶
type SuperNodeClient struct {
// contains filtered or unexported fields
}
SuperNodeClient provides supernode module operations
func (*SuperNodeClient) GetSuperNode ¶
func (s *SuperNodeClient) GetSuperNode(ctx context.Context, validatorAddr string) (*types.SuperNode, error)
GetSuperNode retrieves a supernode by validator address
func (*SuperNodeClient) GetSuperNodeBySuperNodeAddress ¶
func (s *SuperNodeClient) GetSuperNodeBySuperNodeAddress(ctx context.Context, supernodeAddress string) (*types.SuperNode, error)
GetSuperNodeBySuperNodeAddress retrieves a supernode by its supernode account address.
func (*SuperNodeClient) GetTopSuperNodesForBlock ¶
func (s *SuperNodeClient) GetTopSuperNodesForBlock(ctx context.Context, blockHeight int32) ([]*supernodetypes.SuperNode, error)
GetTopSuperNodesForBlock retrieves top supernodes for a specific block
func (*SuperNodeClient) GetTopSuperNodesForBlockWithOptions ¶
func (s *SuperNodeClient) GetTopSuperNodesForBlockWithOptions(ctx context.Context, blockHeight int32, limit int32, state string) ([]*types.SuperNode, error)
GetTopSuperNodesForBlockWithOptions retrieves top supernodes for a block with optional limit and state filter.
func (*SuperNodeClient) ListSuperNodes ¶
func (s *SuperNodeClient) ListSuperNodes(ctx context.Context, limit, offset uint64) ([]*types.SuperNode, error)
ListSuperNodes returns a paginated list of supernodes (converted to SDK types).
func (*SuperNodeClient) Params ¶
func (s *SuperNodeClient) Params(ctx context.Context) (*supernodetypes.Params, error)
Params retrieves the SuperNode module parameters.