Documentation
¶
Index ¶
- type DefaultRequestInterceptor
- func (m *DefaultRequestInterceptor) GetAccount(accountAddressStr string) (intercepted, append bool, response berpctypes.GenericBackendResponse, ...)
- func (m *DefaultRequestInterceptor) GetDenomsInformation() (intercepted, append bool, denoms map[string]string, err error)
- func (m *DefaultRequestInterceptor) GetModuleParams(moduleName string) (intercepted bool, res berpctypes.GenericBackendResponse, err error)
- func (m *DefaultRequestInterceptor) GetTransactionByHash(hashStr string) (intercepted bool, response berpctypes.GenericBackendResponse, err error)
- type EvmBackend
- func (m *EvmBackend) EvmCall(input string, contract common.Address, optionalChainId *hexutil.Big, ...) ([]byte, error)
- func (m *EvmBackend) GetBankDenomsMetadata(coins sdk.Coins) map[string]banktypes.Metadata
- func (m *EvmBackend) GetContractCode(contractAddress common.Address) ([]byte, error)
- func (m *EvmBackend) GetErc20Balance(accountAddress common.Address, contractAddresses []common.Address) (berpctypes.GenericBackendResponse, error)
- func (m *EvmBackend) GetErc20ContractInfo(contractAddress common.Address) (berpctypes.GenericBackendResponse, error)
- func (m *EvmBackend) GetErc20ModuleParams() (*erc20types.Params, error)
- func (m *EvmBackend) GetEvmModuleParams() (*evmtypes.Params, error)
- func (m *EvmBackend) GetEvmTransactionByHash(hash common.Hash) (berpctypes.GenericBackendResponse, error)
- func (m *EvmBackend) GetEvmTransactionInvolversByHash(hash common.Hash) (berpctypes.MessageInvolversResult, error)
- type EvmBackendI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultRequestInterceptor ¶
type DefaultRequestInterceptor struct {
// contains filtered or unexported fields
}
func NewDefaultRequestInterceptor ¶
func NewDefaultRequestInterceptor( beRpcBackend berpcbackend.BackendI, backend EvmBackendI, ) *DefaultRequestInterceptor
func (*DefaultRequestInterceptor) GetAccount ¶
func (m *DefaultRequestInterceptor) GetAccount(accountAddressStr string) (intercepted, append bool, response berpctypes.GenericBackendResponse, err error)
GetAccount returns the contract information if the account is a contract. Other-wise no-op.
func (*DefaultRequestInterceptor) GetDenomsInformation ¶
func (m *DefaultRequestInterceptor) GetDenomsInformation() (intercepted, append bool, denoms map[string]string, err error)
func (*DefaultRequestInterceptor) GetModuleParams ¶
func (m *DefaultRequestInterceptor) GetModuleParams(moduleName string) (intercepted bool, res berpctypes.GenericBackendResponse, err error)
func (*DefaultRequestInterceptor) GetTransactionByHash ¶
func (m *DefaultRequestInterceptor) GetTransactionByHash(hashStr string) (intercepted bool, response berpctypes.GenericBackendResponse, err error)
type EvmBackend ¶
type EvmBackend struct {
// contains filtered or unexported fields
}
EvmBackend implements the EvmBackendI interface
func NewEvmBackend ¶
func NewEvmBackend( ctx *server.Context, logger log.Logger, clientCtx client.Context, externalServices berpctypes.ExternalServices, ) *EvmBackend
NewEvmBackend creates a new EvmBackend instance for EVM Block Explorer
func (*EvmBackend) GetBankDenomsMetadata ¶ added in v1.1.4
func (*EvmBackend) GetContractCode ¶
func (m *EvmBackend) GetContractCode(contractAddress common.Address) ([]byte, error)
func (*EvmBackend) GetErc20Balance ¶
func (m *EvmBackend) GetErc20Balance(accountAddress common.Address, contractAddresses []common.Address) (berpctypes.GenericBackendResponse, error)
func (*EvmBackend) GetErc20ContractInfo ¶
func (m *EvmBackend) GetErc20ContractInfo(contractAddress common.Address) (berpctypes.GenericBackendResponse, error)
GetErc20ContractInfo will return information of ERC20 contract by address.
- name (optional): the name of the ERC20 token.
- symbol (mandatory): the symbol of the ERC20 token.
- decimals (mandatory): the number of decimals the token uses.
If failed to query any of the mandatory fields, it will return an error. If failed to query the optional field, it will continue.
func (*EvmBackend) GetErc20ModuleParams ¶ added in v1.1.3
func (m *EvmBackend) GetErc20ModuleParams() (*erc20types.Params, error)
func (*EvmBackend) GetEvmModuleParams ¶
func (m *EvmBackend) GetEvmModuleParams() (*evmtypes.Params, error)
func (*EvmBackend) GetEvmTransactionByHash ¶
func (m *EvmBackend) GetEvmTransactionByHash(hash common.Hash) (berpctypes.GenericBackendResponse, error)
func (*EvmBackend) GetEvmTransactionInvolversByHash ¶
func (m *EvmBackend) GetEvmTransactionInvolversByHash(hash common.Hash) (berpctypes.MessageInvolversResult, error)
type EvmBackendI ¶
type EvmBackendI interface { // GetEvmTransactionByHash returns a transaction by its hash. GetEvmTransactionByHash(hash common.Hash) (berpctypes.GenericBackendResponse, error) GetEvmTransactionInvolversByHash(hash common.Hash) (berpctypes.MessageInvolversResult, error) GetErc20ContractInfo(contractAddress common.Address) (berpctypes.GenericBackendResponse, error) GetErc20Balance(accountAddress common.Address, contractAddresses []common.Address) (berpctypes.GenericBackendResponse, error) EvmCall(input string, contract common.Address, optionalChainId *hexutil.Big, optionalBlockNumber *hexutil.Uint64, optionalGas uint64) ([]byte, error) GetContractCode(contractAddress common.Address) ([]byte, error) GetEvmModuleParams() (*evmtypes.Params, error) GetErc20ModuleParams() (*erc20types.Params, error) GetBankDenomsMetadata(coins sdk.Coins) map[string]banktypes.Metadata }
Click to show internal directories.
Click to hide internal directories.