Documentation ¶
Index ¶
- Constants
- func IsURLAvailable(address string) bool
- func NewChainAdaptor(conf *config.Config) (chain.IChainAdaptor, error)
- type ChainAdaptor
- func (c ChainAdaptor) BuildSignedTransaction(req *account.SignedTransactionRequest) (*account.SignedTransactionResponse, error)
- func (c ChainAdaptor) ConvertAddress(req *account.ConvertAddressRequest) (*account.ConvertAddressResponse, error)
- func (c ChainAdaptor) CreateUnSignTransaction(req *account.UnSignTransactionRequest) (*account.UnSignTransactionResponse, error)
- func (c ChainAdaptor) DecodeTransaction(req *account.DecodeTransactionRequest) (*account.DecodeTransactionResponse, error)
- func (c ChainAdaptor) GetAccount(req *account.AccountRequest) (*account.AccountResponse, error)
- func (c ChainAdaptor) GetBlockByHash(req *account.BlockHashRequest) (*account.BlockResponse, error)
- func (c ChainAdaptor) GetBlockByNumber(req *account.BlockNumberRequest) (*account.BlockResponse, error)
- func (c ChainAdaptor) GetBlockByRange(req *account.BlockByRangeRequest) (*account.BlockByRangeResponse, error)
- func (c *ChainAdaptor) GetBlockHeaderByHash(req *account.BlockHeaderHashRequest) (*account.BlockHeaderResponse, error)
- func (c ChainAdaptor) GetBlockHeaderByNumber(req *account.BlockHeaderNumberRequest) (*account.BlockHeaderResponse, error)
- func (c ChainAdaptor) GetExtraData(req *account.ExtraDataRequest) (*account.ExtraDataResponse, error)
- func (c ChainAdaptor) GetFee(req *account.FeeRequest) (*account.FeeResponse, error)
- func (c ChainAdaptor) GetSupportChains(req *account.SupportChainsRequest) (*account.SupportChainsResponse, error)
- func (c ChainAdaptor) GetTxByAddress(req *account.TxAddressRequest) (*account.TxAddressResponse, error)
- func (c ChainAdaptor) GetTxByHash(req *account.TxHashRequest) (*account.TxHashResponse, error)
- func (c ChainAdaptor) SendTx(req *account.SendTxRequest) (*account.SendTxResponse, error)
- func (c ChainAdaptor) ValidAddress(req *account.ValidAddressRequest) (*account.ValidAddressResponse, error)
- func (c ChainAdaptor) VerifySignedTransaction(req *account.VerifyTransactionRequest) (*account.VerifyTransactionResponse, error)
- type EthClient
- type EthData
- type Logs
- type RPC
- type RpcBlock
- type TransactionList
Constants ¶
View Source
const ChainName = "Ethereum"
Variables ¶
This section is empty.
Functions ¶
func IsURLAvailable ¶
func NewChainAdaptor ¶
func NewChainAdaptor(conf *config.Config) (chain.IChainAdaptor, error)
Types ¶
type ChainAdaptor ¶
type ChainAdaptor struct {
// contains filtered or unexported fields
}
func (ChainAdaptor) BuildSignedTransaction ¶
func (c ChainAdaptor) BuildSignedTransaction(req *account.SignedTransactionRequest) (*account.SignedTransactionResponse, error)
func (ChainAdaptor) ConvertAddress ¶
func (c ChainAdaptor) ConvertAddress(req *account.ConvertAddressRequest) (*account.ConvertAddressResponse, error)
func (ChainAdaptor) CreateUnSignTransaction ¶
func (c ChainAdaptor) CreateUnSignTransaction(req *account.UnSignTransactionRequest) (*account.UnSignTransactionResponse, error)
func (ChainAdaptor) DecodeTransaction ¶
func (c ChainAdaptor) DecodeTransaction(req *account.DecodeTransactionRequest) (*account.DecodeTransactionResponse, error)
func (ChainAdaptor) GetAccount ¶
func (c ChainAdaptor) GetAccount(req *account.AccountRequest) (*account.AccountResponse, error)
func (ChainAdaptor) GetBlockByHash ¶
func (c ChainAdaptor) GetBlockByHash(req *account.BlockHashRequest) (*account.BlockResponse, error)
func (ChainAdaptor) GetBlockByNumber ¶
func (c ChainAdaptor) GetBlockByNumber(req *account.BlockNumberRequest) (*account.BlockResponse, error)
func (ChainAdaptor) GetBlockByRange ¶
func (c ChainAdaptor) GetBlockByRange(req *account.BlockByRangeRequest) (*account.BlockByRangeResponse, error)
func (*ChainAdaptor) GetBlockHeaderByHash ¶
func (c *ChainAdaptor) GetBlockHeaderByHash(req *account.BlockHeaderHashRequest) (*account.BlockHeaderResponse, error)
func (ChainAdaptor) GetBlockHeaderByNumber ¶
func (c ChainAdaptor) GetBlockHeaderByNumber(req *account.BlockHeaderNumberRequest) (*account.BlockHeaderResponse, error)
func (ChainAdaptor) GetExtraData ¶
func (c ChainAdaptor) GetExtraData(req *account.ExtraDataRequest) (*account.ExtraDataResponse, error)
func (ChainAdaptor) GetFee ¶
func (c ChainAdaptor) GetFee(req *account.FeeRequest) (*account.FeeResponse, error)
func (ChainAdaptor) GetSupportChains ¶
func (c ChainAdaptor) GetSupportChains(req *account.SupportChainsRequest) (*account.SupportChainsResponse, error)
func (ChainAdaptor) GetTxByAddress ¶
func (c ChainAdaptor) GetTxByAddress(req *account.TxAddressRequest) (*account.TxAddressResponse, error)
func (ChainAdaptor) GetTxByHash ¶
func (c ChainAdaptor) GetTxByHash(req *account.TxHashRequest) (*account.TxHashResponse, error)
func (ChainAdaptor) SendTx ¶
func (c ChainAdaptor) SendTx(req *account.SendTxRequest) (*account.SendTxResponse, error)
func (ChainAdaptor) ValidAddress ¶
func (c ChainAdaptor) ValidAddress(req *account.ValidAddressRequest) (*account.ValidAddressResponse, error)
func (ChainAdaptor) VerifySignedTransaction ¶
func (c ChainAdaptor) VerifySignedTransaction(req *account.VerifyTransactionRequest) (*account.VerifyTransactionResponse, error)
type EthClient ¶
type EthClient interface { BlockHeaderByNumber(*big.Int) (*types.Header, error) BlockByNumber(*big.Int) (*RpcBlock, error) BlockByHash(common.Hash) (*RpcBlock, error) LatestSafeBlockHeader() (*types.Header, error) LatestFinalizedBlockHeader() (*types.Header, error) BlockHeaderByHash(common.Hash) (*types.Header, error) BlockHeadersByRange(*big.Int, *big.Int, uint) ([]types.Header, error) TxByHash(common.Hash) (*types.Transaction, error) TxReceiptByHash(common.Hash) (*types.Receipt, error) StorageHash(common.Address, *big.Int) (common.Hash, error) FilterLogs(filterQuery ethereum.FilterQuery, chainId uint) (Logs, error) TxCountByAddress(common.Address) (hexutil.Uint64, error) SendRawTransaction(rawTx string) error SuggestGasPrice() (*big.Int, error) SuggestGasTipCap() (*big.Int, error) Close() }
type EthData ¶
type EthData struct {
EthDataCli *etherscan.ChainExplorerAdaptor
}
func NewEthDataClient ¶
func (*EthData) GetTxByAddress ¶
func (ss *EthData) GetTxByAddress(page, pagesize uint64, address string, action account.ActionType) (*account.TransactionResponse[account.AccountTxResponse], error)
type RPC ¶
type RpcBlock ¶
type RpcBlock struct { Hash common.Hash `json:"hash"` Transactions []TransactionList `json:"transactions"` BaseFee string `json:"baseFeePerGas"` }
type TransactionList ¶
Click to show internal directories.
Click to hide internal directories.