Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertEthLog(l *ethtypes.Log) *types.Log
- func GetCoinbaseAddress() common.Address
- func GetLogsForTx(receipt *types.Receipt) []*ethtypes.Log
- func IsPayablePrecompile(addr *common.Address) bool
- func NewMsgServerImpl(keeper *Keeper) types.MsgServer
- type AddressNoncePair
- type EVMCallFunc
- type EvmTxDeferredInfo
- type Keeper
- func (k *Keeper) AccountKeeper() *authkeeper.AccountKeeper
- func (k *Keeper) AddAnteSurplus(ctx sdk.Context, txHash common.Hash, surplus sdk.Int) error
- func (k *Keeper) AddPendingNonce(key tmtypes.TxKey, addr common.Address, nonce uint64, priority int64)
- func (k *Keeper) AppendErrorToEvmTxDeferredInfo(ctx sdk.Context, txHash common.Hash, err string)
- func (k *Keeper) AppendToEvmTxDeferredInfo(ctx sdk.Context, bloom ethtypes.Bloom, txHash common.Hash, surplus sdk.Int)
- func (k *Keeper) BankKeeper() bankkeeper.Keeper
- func (k *Keeper) CalculateNextNonce(ctx sdk.Context, addr common.Address, includePending bool) uint64
- func (k *Keeper) CallEVM(ctx sdk.Context, from common.Address, to *common.Address, val *sdk.Int, ...) (retdata []byte, reterr error)
- func (k *Keeper) ChainID(ctx sdk.Context) *big.Int
- func (k *Keeper) ClearEVMTxDeferredInfo()
- func (k *Keeper) DeleteAddressMapping(ctx sdk.Context, seiAddress sdk.AccAddress, evmAddress common.Address)
- func (k *Keeper) DeleteAllAnteSurplus(ctx sdk.Context)
- func (k *Keeper) DeleteERC20CW20Pointer(ctx sdk.Context, cw20Address string, version uint16)
- func (k *Keeper) DeleteERC20NativePointer(ctx sdk.Context, token string, version uint16)
- func (k *Keeper) DeleteERC721CW721Pointer(ctx sdk.Context, cw721Address string, version uint16)
- func (k *Keeper) GetAnteSurplusSum(ctx sdk.Context) sdk.Int
- func (k *Keeper) GetBaseDenom(ctx sdk.Context) string
- func (k *Keeper) GetBaseFee(ctx sdk.Context) *big.Int
- func (k *Keeper) GetBaseFeePerGas(ctx sdk.Context) sdk.Dec
- func (k *Keeper) GetBlockBloom(ctx sdk.Context, height int64) (res ethtypes.Bloom)
- func (k *Keeper) GetCW20ERC20Pointer(ctx sdk.Context, erc20Address common.Address) (addr sdk.AccAddress, version uint16, exists bool)
- func (k *Keeper) GetCW721ERC721Pointer(ctx sdk.Context, erc721Address common.Address) (addr sdk.AccAddress, version uint16, exists bool)
- func (k *Keeper) GetCode(ctx sdk.Context, addr common.Address) []byte
- func (k *Keeper) GetCodeHash(ctx sdk.Context, addr common.Address) common.Hash
- func (k *Keeper) GetCodeSize(ctx sdk.Context, addr common.Address) int
- func (k *Keeper) GetERC20CW20Pointer(ctx sdk.Context, cw20Address string) (addr common.Address, version uint16, exists bool)
- func (k *Keeper) GetERC20NativePointer(ctx sdk.Context, token string) (addr common.Address, version uint16, exists bool)
- func (k *Keeper) GetERC721CW721Pointer(ctx sdk.Context, cw721Address string) (addr common.Address, version uint16, exists bool)
- func (k *Keeper) GetEVMAddress(ctx sdk.Context, seiAddress sdk.AccAddress) (common.Address, bool)
- func (k *Keeper) GetEVMAddressOrDefault(ctx sdk.Context, seiAddress sdk.AccAddress) common.Address
- func (k *Keeper) GetEVMMessage(ctx sdk.Context, tx *ethtypes.Transaction, sender common.Address) *core.Message
- func (k *Keeper) GetEVMTxDeferredInfo(ctx sdk.Context) (res []EvmTxDeferredInfo)
- func (k *Keeper) GetFeeCollectorAddress(ctx sdk.Context) (common.Address, error)
- func (k *Keeper) GetGasPool() core.GasPool
- func (k *Keeper) GetHashFn(ctx sdk.Context) vm.GetHashFunc
- func (k *Keeper) GetKeysToNonces() map[tmtypes.TxKey]*AddressNoncePair
- func (k *Keeper) GetMinimumFeePerGas(ctx sdk.Context) sdk.Dec
- func (k *Keeper) GetNonce(ctx sdk.Context, addr common.Address) uint64
- func (k *Keeper) GetParams(ctx sdk.Context) types.Params
- func (k *Keeper) GetPendingTxs() map[string][]*PendingTx
- func (k *Keeper) GetPointerInfo(ctx sdk.Context, pref []byte) (addr []byte, version uint16, exists bool)
- func (k *Keeper) GetPriorityNormalizer(ctx sdk.Context) sdk.Dec
- func (k *Keeper) GetReceipt(ctx sdk.Context, txHash common.Hash) (*types.Receipt, error)
- func (k *Keeper) GetReplayInitialHeight(ctx sdk.Context) int64
- func (k *Keeper) GetReplayedHeight(ctx sdk.Context) int64
- func (k *Keeper) GetSeiAddress(ctx sdk.Context, evmAddress common.Address) (sdk.AccAddress, bool)
- func (k *Keeper) GetSeiAddressOrDefault(ctx sdk.Context, evmAddress common.Address) sdk.AccAddress
- func (k *Keeper) GetState(ctx sdk.Context, addr common.Address, hash common.Hash) common.Hash
- func (k *Keeper) GetStoreKey() sdk.StoreKey
- func (k *Keeper) GetStoredPointerCodeID(ctx sdk.Context, pointerType types.PointerType) uint64
- func (k *Keeper) GetTxHashesOnHeight(ctx sdk.Context, height int64) (res []common.Hash)
- func (k *Keeper) GetVMBlockContext(ctx sdk.Context, gp core.GasPool) (*vm.BlockContext, error)
- func (k *Keeper) HandleInternalEVMCall(ctx sdk.Context, req *types.MsgInternalEVMCall) (*sdk.Result, error)
- func (k *Keeper) HandleInternalEVMDelegateCall(ctx sdk.Context, req *types.MsgInternalEVMDelegateCall) (*sdk.Result, error)
- func (k *Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k *Keeper) IterateAll(ctx sdk.Context, pref []byte, cb func(key, val []byte) bool)
- func (k *Keeper) IterateAllCode(ctx sdk.Context, cb func(addr common.Address, code []byte) bool)
- func (k *Keeper) IterateAllNonces(ctx sdk.Context, cb func(addr common.Address, nonce uint64) bool)
- func (k *Keeper) IterateSeiAddressMapping(ctx sdk.Context, cb func(evmAddr common.Address, seiAddr sdk.AccAddress) bool)
- func (k *Keeper) IterateState(ctx sdk.Context, ...)
- func (k *Keeper) OpenEthDatabase() *ethtypes.Header
- func (k *Keeper) PrefixStore(ctx sdk.Context, pref []byte) sdk.KVStore
- func (k *Keeper) PrepareReplayedAddr(ctx sdk.Context, addr common.Address)
- func (k *Keeper) PurgePrefix(ctx sdk.Context, pref []byte)
- func (k *Keeper) RemovePendingNonce(key tmtypes.TxKey)
- func (k *Keeper) SetAddressMapping(ctx sdk.Context, seiAddress sdk.AccAddress, evmAddress common.Address)
- func (k *Keeper) SetBlockBloom(ctx sdk.Context, height int64, blooms []ethtypes.Bloom)
- func (k *Keeper) SetCW20ERC20Pointer(ctx sdk.Context, erc20Address common.Address, addr string) error
- func (k *Keeper) SetCW721ERC721Pointer(ctx sdk.Context, erc721Address common.Address, addr string) error
- func (k *Keeper) SetCode(ctx sdk.Context, addr common.Address, code []byte)
- func (k *Keeper) SetERC20CW20Pointer(ctx sdk.Context, cw20Address string, addr common.Address) error
- func (k *Keeper) SetERC20CW20PointerWithVersion(ctx sdk.Context, cw20Address string, addr common.Address, version uint16) error
- func (k *Keeper) SetERC20NativePointer(ctx sdk.Context, token string, addr common.Address) error
- func (k *Keeper) SetERC20NativePointerWithVersion(ctx sdk.Context, token string, addr common.Address, version uint16) error
- func (k *Keeper) SetERC721CW721Pointer(ctx sdk.Context, cw721Address string, addr common.Address) error
- func (k *Keeper) SetERC721CW721PointerWithVersion(ctx sdk.Context, cw721Address string, addr common.Address, version uint16) error
- func (k *Keeper) SetNonce(ctx sdk.Context, addr common.Address, nonce uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k *Keeper) SetReceipt(ctx sdk.Context, txHash common.Hash, receipt *types.Receipt) error
- func (k *Keeper) SetReplayInitialHeight(ctx sdk.Context, h int64)
- func (k *Keeper) SetReplayedHeight(ctx sdk.Context)
- func (k *Keeper) SetState(ctx sdk.Context, addr common.Address, key common.Hash, val common.Hash)
- func (k *Keeper) SetTxHashesOnHeight(ctx sdk.Context, height int64, hashes []common.Hash)
- func (k *Keeper) SetTxResults(txResults []*abci.ExecTxResult)
- func (k *Keeper) StaticCallEVM(ctx sdk.Context, from sdk.AccAddress, to *common.Address, data []byte) ([]byte, error)
- func (k *Keeper) VerifyAccount(ctx sdk.Context, addr common.Address, accountData core.GenesisAccount)
- func (k *Keeper) VerifyBalance(ctx sdk.Context, addr common.Address)
- func (k *Keeper) VerifyState(ctx sdk.Context, addr common.Address)
- func (k *Keeper) VerifyTxResult(ctx sdk.Context, hash common.Hash)
- func (k *Keeper) WasmKeeper() *wasmkeeper.PermissionedKeeper
- type PendingTx
- type Querier
- func (q Querier) EVMAddressBySeiAddress(c context.Context, req *types.QueryEVMAddressBySeiAddressRequest) (*types.QueryEVMAddressBySeiAddressResponse, error)
- func (q Querier) Pointer(c context.Context, req *types.QueryPointerRequest) (*types.QueryPointerResponse, error)
- func (q Querier) PointerVersion(c context.Context, req *types.QueryPointerVersionRequest) (*types.QueryPointerVersionResponse, error)
- func (q Querier) SeiAddressByEVMAddress(c context.Context, req *types.QuerySeiAddressByEVMAddressRequest) (*types.QuerySeiAddressByEVMAddressResponse, error)
- func (q Querier) StaticCall(c context.Context, req *types.QueryStaticCallRequest) (*types.QueryStaticCallResponse, error)
- type ReplayChainContext
Constants ¶
const BaseDenom = "usei"
const CoinbaseNonce = 42
const CoinbaseSeedAddress = "0000000000000000000000000000000000000001"
Variables ¶
var ErrorPointerToPointerNotAllowed = sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "cannot create a pointer to a pointer")
Functions ¶
func GetCoinbaseAddress ¶
func IsPayablePrecompile ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type AddressNoncePair ¶
type EVMCallFunc ¶
type EvmTxDeferredInfo ¶
type Keeper ¶
type Keeper struct { Paramstore paramtypes.Subspace QueryConfig *querier.Config // only used during ETH replay. Not used in chain critical path. EthClient *ethclient.Client EthReplayConfig replay.Config // only used during blocktest. Not used in chain critical path. EthBlockTestConfig blocktest.Config BlockTest *tests.BlockTest // used for both ETH replay and block tests. Not used in chain critical path. Trie ethstate.Trie DB ethstate.Database Root common.Hash ReplayBlock *ethtypes.Block // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( storeKey sdk.StoreKey, memStoreKey sdk.StoreKey, paramstore paramtypes.Subspace, bankKeeper bankkeeper.Keeper, accountKeeper *authkeeper.AccountKeeper, stakingKeeper *stakingkeeper.Keeper, transferKeeper ibctransferkeeper.Keeper, wasmKeeper *wasmkeeper.PermissionedKeeper) *Keeper
func (*Keeper) AccountKeeper ¶
func (k *Keeper) AccountKeeper() *authkeeper.AccountKeeper
func (*Keeper) AddAnteSurplus ¶
func (*Keeper) AddPendingNonce ¶
func (k *Keeper) AddPendingNonce(key tmtypes.TxKey, addr common.Address, nonce uint64, priority int64)
AddPendingNonce adds a pending nonce to the keeper
func (*Keeper) AppendErrorToEvmTxDeferredInfo ¶
func (*Keeper) AppendToEvmTxDeferredInfo ¶
func (*Keeper) BankKeeper ¶
func (k *Keeper) BankKeeper() bankkeeper.Keeper
func (*Keeper) CalculateNextNonce ¶
func (k *Keeper) CalculateNextNonce(ctx sdk.Context, addr common.Address, includePending bool) uint64
CalculateNextNonce calculates the next nonce for an address If includePending is true, it will consider pending nonces If includePending is false, it will only return the next nonce from GetNonce
func (*Keeper) ClearEVMTxDeferredInfo ¶
func (k *Keeper) ClearEVMTxDeferredInfo()
func (*Keeper) DeleteAddressMapping ¶
func (*Keeper) DeleteAllAnteSurplus ¶
func (*Keeper) DeleteERC20CW20Pointer ¶
ERC20 -> CW20
func (*Keeper) DeleteERC20NativePointer ¶
ERC20 -> Native Token
func (*Keeper) DeleteERC721CW721Pointer ¶
ERC721 -> CW721
func (*Keeper) GetBlockBloom ¶
func (*Keeper) GetCW20ERC20Pointer ¶
func (k *Keeper) GetCW20ERC20Pointer(ctx sdk.Context, erc20Address common.Address) (addr sdk.AccAddress, version uint16, exists bool)
CW20 -> ERC20
func (*Keeper) GetCW721ERC721Pointer ¶
func (*Keeper) GetCodeHash ¶
func (*Keeper) GetERC20CW20Pointer ¶
func (k *Keeper) GetERC20CW20Pointer(ctx sdk.Context, cw20Address string) (addr common.Address, version uint16, exists bool)
ERC20 -> CW20
func (*Keeper) GetERC20NativePointer ¶
func (k *Keeper) GetERC20NativePointer(ctx sdk.Context, token string) (addr common.Address, version uint16, exists bool)
ERC20 -> Native Token
func (*Keeper) GetERC721CW721Pointer ¶
func (k *Keeper) GetERC721CW721Pointer(ctx sdk.Context, cw721Address string) (addr common.Address, version uint16, exists bool)
ERC721 -> CW721
func (*Keeper) GetEVMAddress ¶
func (*Keeper) GetEVMAddressOrDefault ¶
func (*Keeper) GetEVMMessage ¶
func (*Keeper) GetEVMTxDeferredInfo ¶
func (k *Keeper) GetEVMTxDeferredInfo(ctx sdk.Context) (res []EvmTxDeferredInfo)
func (*Keeper) GetFeeCollectorAddress ¶
func (*Keeper) GetGasPool ¶
func (*Keeper) GetHashFn ¶
func (k *Keeper) GetHashFn(ctx sdk.Context) vm.GetHashFunc
returns a function that provides block header hash based on block number
func (*Keeper) GetKeysToNonces ¶
func (k *Keeper) GetKeysToNonces() map[tmtypes.TxKey]*AddressNoncePair
Test use only
func (*Keeper) GetPendingTxs ¶
Test use only
func (*Keeper) GetPointerInfo ¶
func (*Keeper) GetPriorityNormalizer ¶
func (*Keeper) GetReceipt ¶
Receipt is a data structure that stores EVM specific transaction metadata. Many EVM applications (e.g. MetaMask) relies on being on able to query receipt by EVM transaction hash (not Sei transaction hash) to function properly.
func (*Keeper) GetReplayInitialHeight ¶
func (*Keeper) GetSeiAddress ¶
func (*Keeper) GetSeiAddressOrDefault ¶
func (*Keeper) GetStoreKey ¶
func (*Keeper) GetStoredPointerCodeID ¶
func (*Keeper) GetTxHashesOnHeight ¶
func (*Keeper) GetVMBlockContext ¶
func (*Keeper) HandleInternalEVMCall ¶
func (*Keeper) HandleInternalEVMDelegateCall ¶
func (*Keeper) InitGenesis ¶
func (k *Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
func (*Keeper) IterateAll ¶
func (*Keeper) IterateAllCode ¶
func (*Keeper) IterateAllNonces ¶
func (*Keeper) IterateSeiAddressMapping ¶
func (*Keeper) IterateState ¶
func (*Keeper) OpenEthDatabase ¶
func (*Keeper) PrepareReplayedAddr ¶
Only used in ETH replay
func (*Keeper) RemovePendingNonce ¶
RemovePendingNonce removes a pending nonce from the keeper but leaves a hole so that a future transaction must use this nonce.
func (*Keeper) SetAddressMapping ¶
func (*Keeper) SetBlockBloom ¶
func (*Keeper) SetCW20ERC20Pointer ¶
func (k *Keeper) SetCW20ERC20Pointer(ctx sdk.Context, erc20Address common.Address, addr string) error
CW20 -> ERC20
func (*Keeper) SetCW721ERC721Pointer ¶
func (*Keeper) SetERC20CW20Pointer ¶
func (k *Keeper) SetERC20CW20Pointer(ctx sdk.Context, cw20Address string, addr common.Address) error
ERC20 -> CW20
func (*Keeper) SetERC20CW20PointerWithVersion ¶
func (k *Keeper) SetERC20CW20PointerWithVersion(ctx sdk.Context, cw20Address string, addr common.Address, version uint16) error
ERC20 -> CW20
func (*Keeper) SetERC20NativePointer ¶
ERC20 -> Native Token
func (*Keeper) SetERC20NativePointerWithVersion ¶
func (k *Keeper) SetERC20NativePointerWithVersion(ctx sdk.Context, token string, addr common.Address, version uint16) error
ERC20 -> Native Token
func (*Keeper) SetERC721CW721Pointer ¶
func (k *Keeper) SetERC721CW721Pointer(ctx sdk.Context, cw721Address string, addr common.Address) error
ERC721 -> CW721
func (*Keeper) SetERC721CW721PointerWithVersion ¶
func (k *Keeper) SetERC721CW721PointerWithVersion(ctx sdk.Context, cw721Address string, addr common.Address, version uint16) error
ERC721 -> CW721
func (*Keeper) SetReceipt ¶
func (*Keeper) SetReplayInitialHeight ¶
func (*Keeper) SetReplayedHeight ¶
func (*Keeper) SetTxHashesOnHeight ¶
func (*Keeper) SetTxResults ¶
func (k *Keeper) SetTxResults(txResults []*abci.ExecTxResult)
func (*Keeper) StaticCallEVM ¶
func (*Keeper) VerifyAccount ¶
func (*Keeper) WasmKeeper ¶
func (k *Keeper) WasmKeeper() *wasmkeeper.PermissionedKeeper
type Querier ¶
type Querier struct {
*Keeper
}
Querier defines a wrapper around the x/mint keeper providing gRPC method handlers.
func NewQuerier ¶
func (Querier) EVMAddressBySeiAddress ¶
func (q Querier) EVMAddressBySeiAddress(c context.Context, req *types.QueryEVMAddressBySeiAddressRequest) (*types.QueryEVMAddressBySeiAddressResponse, error)
func (Querier) Pointer ¶
func (q Querier) Pointer(c context.Context, req *types.QueryPointerRequest) (*types.QueryPointerResponse, error)
func (Querier) PointerVersion ¶
func (q Querier) PointerVersion(c context.Context, req *types.QueryPointerVersionRequest) (*types.QueryPointerVersionResponse, error)
func (Querier) SeiAddressByEVMAddress ¶
func (q Querier) SeiAddressByEVMAddress(c context.Context, req *types.QuerySeiAddressByEVMAddressRequest) (*types.QuerySeiAddressByEVMAddressResponse, error)
func (Querier) StaticCall ¶
func (q Querier) StaticCall(c context.Context, req *types.QueryStaticCallRequest) (*types.QueryStaticCallResponse, error)
type ReplayChainContext ¶
type ReplayChainContext struct {
// contains filtered or unexported fields
}
only used during ETH replay
func (*ReplayChainContext) Engine ¶
func (ctx *ReplayChainContext) Engine() consensus.Engine