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 WasmBackend
- func (m *WasmBackend) GetContractCodeId(contractAddress string) (uint64, error)
- func (m *WasmBackend) GetCw20Balance(accountAddress string, contractAddresses []string) (berpctypes.GenericBackendResponse, error)
- func (m *WasmBackend) GetCw20ContractInfo(contractAddress string) (berpctypes.GenericBackendResponse, error)
- func (m *WasmBackend) GetCw20TokenInfo(contractAddress string) (*iberpctypes.Cw20TokenInfo, error)
- func (m *WasmBackend) GetTmTxResult(tmTx tmtypes.Tx) ([]abci.Event, error)
- func (m *WasmBackend) GetWasmModuleParams() (*wasmtypes.Params, error)
- func (m *WasmBackend) GetWasmTransactionByHash(hash string) (berpctypes.GenericBackendResponse, error)
- func (m *WasmBackend) GetWasmTransactionInvolversByHash(hash string) (berpctypes.MessageInvolversResult, error)
- func (m *WasmBackend) SmartContractState(input map[string]any, contract string, optionalBlockNumber *int64) ([]byte, error)
- type WasmBackendI
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 WasmBackendI, ) *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 WasmBackend ¶
type WasmBackend struct {
// contains filtered or unexported fields
}
WasmBackend implements the WasmBackendI interface
func NewWasmBackend ¶
func NewWasmBackend( ctx *server.Context, logger log.Logger, clientCtx client.Context, _ berpctypes.ExternalServices, ) *WasmBackend
NewWasmBackend creates a new WasmBackend instance for Wasm Block Explorer
func (*WasmBackend) GetContractCodeId ¶
func (m *WasmBackend) GetContractCodeId(contractAddress string) (uint64, error)
func (*WasmBackend) GetCw20Balance ¶
func (m *WasmBackend) GetCw20Balance(accountAddress string, contractAddresses []string) (berpctypes.GenericBackendResponse, error)
func (*WasmBackend) GetCw20ContractInfo ¶
func (m *WasmBackend) GetCw20ContractInfo(contractAddress string) (berpctypes.GenericBackendResponse, error)
GetCw20ContractInfo will return information of CW-20 contract by address.
- name: the name of the CW-20 token.
- symbol: the symbol of the CW-20 token.
- decimals: the number of decimals the token uses.
- totalSupply: the total supply of the token.
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 (*WasmBackend) GetCw20TokenInfo ¶
func (m *WasmBackend) GetCw20TokenInfo(contractAddress string) (*iberpctypes.Cw20TokenInfo, error)
func (*WasmBackend) GetTmTxResult ¶ added in v1.1.0
func (*WasmBackend) GetWasmModuleParams ¶
func (m *WasmBackend) GetWasmModuleParams() (*wasmtypes.Params, error)
func (*WasmBackend) GetWasmTransactionByHash ¶
func (m *WasmBackend) GetWasmTransactionByHash(hash string) (berpctypes.GenericBackendResponse, error)
func (*WasmBackend) GetWasmTransactionInvolversByHash ¶
func (m *WasmBackend) GetWasmTransactionInvolversByHash(hash string) (berpctypes.MessageInvolversResult, error)
func (*WasmBackend) SmartContractState ¶
type WasmBackendI ¶
type WasmBackendI interface { // GetWasmTransactionByHash returns a transaction by its hash. GetWasmTransactionByHash(hash string) (berpctypes.GenericBackendResponse, error) GetWasmTransactionInvolversByHash(hash string) (berpctypes.MessageInvolversResult, error) GetTmTxResult(tmTx tmtypes.Tx) ([]abci.Event, error) GetCw20ContractInfo(contractAddress string) (berpctypes.GenericBackendResponse, error) GetCw20TokenInfo(contractAddress string) (*iberpctypes.Cw20TokenInfo, error) GetCw20Balance(accountAddress string, contractAddresses []string) (berpctypes.GenericBackendResponse, error) SmartContractState(input map[string]any, contract string, optionalBlockNumber *int64) ([]byte, error) GetContractCodeId(contractAddress string) (uint64, error) GetWasmModuleParams() (*wasmtypes.Params, error) }
Click to show internal directories.
Click to hide internal directories.