Documentation ¶
Index ¶
- Variables
- func DoCall(ctx context.Context, blockNrOrHash *rpctypes.BlockNumberOrHash, ...) (*vm.ExecutionResult, error)
- func NewRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber uint64, index uint64) *rpctypes.RPCTransaction
- type AccountResult
- type AxiomAPI
- func (api *AxiomAPI) Accounts() (ret []common.Address, err error)
- func (api *AxiomAPI) FeeHistory(blockCount rpctypes.DecimalOrHex, lastBlock rpctypes.BlockNumber, ...) (ret *feeHistoryResult, err error)
- func (api *AxiomAPI) GasPrice() *hexutil.Big
- func (api *AxiomAPI) MaxPriorityFeePerGas(ctx context.Context) (ret *hexutil.Big, err error)
- func (api *AxiomAPI) Syncing() (ret any, err error)
- type BlockChainAPI
- func (api *BlockChainAPI) BlockNumber() (ret ethhexutil.Uint64, err error)
- func (api *BlockChainAPI) Call(args types.CallArgs, blockNrOrHash *rpctypes.BlockNumberOrHash, ...) (ret ethhexutil.Bytes, err error)
- func (api *BlockChainAPI) ChainId() (ret ethhexutil.Uint, err error)
- func (s *BlockChainAPI) CreateAccessList(args types.CallArgs, blockNrOrHash *rpctypes.BlockNumberOrHash) (*accessListResult, error)
- func (api *BlockChainAPI) EstimateGas(args types.CallArgs, blockNrOrHash *rpctypes.BlockNumberOrHash) (ret ethhexutil.Uint64, err error)
- func (api *BlockChainAPI) GetBalance(address common.Address, blockNrOrHash *rpctypes.BlockNumberOrHash) (ret *ethhexutil.Big, err error)
- func (api *BlockChainAPI) GetBlockByHash(hash common.Hash, fullTx bool) (ret map[string]any, err error)
- func (api *BlockChainAPI) GetBlockByNumber(blockNum rpctypes.BlockNumber, fullTx bool) (ret map[string]any, err error)
- func (api *BlockChainAPI) GetCode(address common.Address, blockNrOrHash *rpctypes.BlockNumberOrHash) (ret ethhexutil.Bytes, err error)
- func (api *BlockChainAPI) GetProof(address common.Address, storageKeys []string, ...) (ret *AccountResult, err error)
- func (api *BlockChainAPI) GetStorageAt(address common.Address, key string, blockNrOrHash *rpctypes.BlockNumberOrHash) (ret ethhexutil.Bytes, err error)
- type StorageResult
- type TransactionAPI
- func (api *TransactionAPI) GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint
- func (api *TransactionAPI) GetBlockTransactionCountByNumber(blockNum rpctypes.BlockNumber) *hexutil.Uint
- func (api *TransactionAPI) GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) (ret *rpctypes.RPCTransaction, err error)
- func (api *TransactionAPI) GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockNumber, idx hexutil.Uint) (ret *rpctypes.RPCTransaction, err error)
- func (api *TransactionAPI) GetTransactionByHash(hash common.Hash) (ret *rpctypes.RPCTransaction, err error)
- func (api *TransactionAPI) GetTransactionCount(address common.Address, blockNrOrHash *rpctypes.BlockNumberOrHash) (ret *hexutil.Uint64, err error)
- func (api *TransactionAPI) GetTransactionReceipt(hash common.Hash) (ret map[string]any, err error)
- func (api *TransactionAPI) SendRawTransaction(data hexutil.Bytes) (ret common.Hash, err error)
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotSupportApiError = errors.New("unsupported interface")
)
Functions ¶
func DoCall ¶
func DoCall(ctx context.Context, blockNrOrHash *rpctypes.BlockNumberOrHash, evmCfg repo.EVM, api api.CoreAPI, args types.CallArgs, timeout time.Duration, globalGasCap uint64, logger logrus.FieldLogger) (*vm.ExecutionResult, error)
DoCall todo call with historical ledger
func NewRPCTransaction ¶
func NewRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber uint64, index uint64) *rpctypes.RPCTransaction
NewRPCTransaction returns a transaction that will serialize to the RPC representation
Types ¶
type AccountResult ¶
type AccountResult struct { Address common.Address `json:"address"` AccountProof []string `json:"accountProof"` Balance *ethhexutil.Big `json:"balance"` CodeHash common.Hash `json:"codeHash"` Nonce ethhexutil.Uint64 `json:"nonce"` StorageHash common.Hash `json:"storageHash"` StorageProof []StorageResult `json:"storageProof"` }
type AxiomAPI ¶
type AxiomAPI struct {
// contains filtered or unexported fields
}
AxiomAPI provides an API to get related info
func NewAxiomAPI ¶
func (*AxiomAPI) FeeHistory ¶
func (api *AxiomAPI) FeeHistory(blockCount rpctypes.DecimalOrHex, lastBlock rpctypes.BlockNumber, rewardPercentiles []float64) (ret *feeHistoryResult, err error)
FeeHistory return feeHistory todo Supplementary feeHsitory
func (*AxiomAPI) GasPrice ¶
GasPrice returns the current gas price based on dynamic adjustment strategy.
func (*AxiomAPI) MaxPriorityFeePerGas ¶
MaxPriorityFeePerGas returns a suggestion for a gas tip cap for dynamic transactions. todo Supplementary gas fee
type BlockChainAPI ¶
type BlockChainAPI struct {
// contains filtered or unexported fields
}
BlockChain API provides an API for accessing blockchain data
func NewBlockChainAPI ¶
func NewBlockChainAPI(rep *repo.Repo, api api.CoreAPI, logger logrus.FieldLogger) *BlockChainAPI
func (*BlockChainAPI) BlockNumber ¶
func (api *BlockChainAPI) BlockNumber() (ret ethhexutil.Uint64, err error)
BlockNumber returns the current block number.
func (*BlockChainAPI) Call ¶
func (api *BlockChainAPI) Call(args types.CallArgs, blockNrOrHash *rpctypes.BlockNumberOrHash, _ *map[common.Address]rpctypes.Account) (ret ethhexutil.Bytes, err error)
Call performs a raw contract call.
func (*BlockChainAPI) ChainId ¶
func (api *BlockChainAPI) ChainId() (ret ethhexutil.Uint, err error)
ChainId returns the chain's identifier in hex format
func (*BlockChainAPI) CreateAccessList ¶
func (s *BlockChainAPI) CreateAccessList(args types.CallArgs, blockNrOrHash *rpctypes.BlockNumberOrHash) (*accessListResult, error)
func (*BlockChainAPI) EstimateGas ¶
func (api *BlockChainAPI) EstimateGas(args types.CallArgs, blockNrOrHash *rpctypes.BlockNumberOrHash) (ret ethhexutil.Uint64, err error)
EstimateGas returns an estimate of gas usage for the given smart contract call. It adds 2,000 gas to the returned value instead of using the gas adjustment param from the SDK.
func (*BlockChainAPI) GetBalance ¶
func (api *BlockChainAPI) GetBalance(address common.Address, blockNrOrHash *rpctypes.BlockNumberOrHash) (ret *ethhexutil.Big, err error)
GetBalance returns the provided account's balance, blockNum is ignored.
func (*BlockChainAPI) GetBlockByHash ¶
func (api *BlockChainAPI) GetBlockByHash(hash common.Hash, fullTx bool) (ret map[string]any, err error)
GetBlockByHash returns the block identified by hash.
func (*BlockChainAPI) GetBlockByNumber ¶
func (api *BlockChainAPI) GetBlockByNumber(blockNum rpctypes.BlockNumber, fullTx bool) (ret map[string]any, err error)
GetBlockByNumber returns the block identified by number.
func (*BlockChainAPI) GetCode ¶
func (api *BlockChainAPI) GetCode(address common.Address, blockNrOrHash *rpctypes.BlockNumberOrHash) (ret ethhexutil.Bytes, err error)
GetCode returns the contract code at the given address, blockNum is ignored.
func (*BlockChainAPI) GetProof ¶
func (api *BlockChainAPI) GetProof(address common.Address, storageKeys []string, blockNrOrHash *rpctypes.BlockNumberOrHash) (ret *AccountResult, err error)
todo GetProof returns the Merkle-proof for a given account and optionally some storage keys.
func (*BlockChainAPI) GetStorageAt ¶
func (api *BlockChainAPI) GetStorageAt(address common.Address, key string, blockNrOrHash *rpctypes.BlockNumberOrHash) (ret ethhexutil.Bytes, err error)
GetStorageAt returns the contract storage at the given address and key, blockNum is ignored.
type StorageResult ¶
type StorageResult struct { Key string `json:"key"` Value *ethhexutil.Big `json:"value"` Proof []string `json:"proof"` }
type TransactionAPI ¶
type TransactionAPI struct {
// contains filtered or unexported fields
}
TransactionAPI provide apis to get and create transaction
func NewTransactionAPI ¶
func NewTransactionAPI(rep *repo.Repo, api api.CoreAPI, logger logrus.FieldLogger) *TransactionAPI
func (*TransactionAPI) GetBlockTransactionCountByHash ¶
func (api *TransactionAPI) GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint
GetBlockTransactionCountByHash returns the number of transactions in the block identified by hash.
func (*TransactionAPI) GetBlockTransactionCountByNumber ¶
func (api *TransactionAPI) GetBlockTransactionCountByNumber(blockNum rpctypes.BlockNumber) *hexutil.Uint
GetBlockTransactionCountByNumber returns the number of transactions in the block identified by its height.
func (*TransactionAPI) GetTransactionByBlockHashAndIndex ¶
func (api *TransactionAPI) GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) (ret *rpctypes.RPCTransaction, err error)
GetTransactionByBlockHashAndIndex returns the transaction identified by hash and index.
func (*TransactionAPI) GetTransactionByBlockNumberAndIndex ¶
func (api *TransactionAPI) GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockNumber, idx hexutil.Uint) (ret *rpctypes.RPCTransaction, err error)
GetTransactionByBlockNumberAndIndex returns the transaction identified by number and index.
func (*TransactionAPI) GetTransactionByHash ¶
func (api *TransactionAPI) GetTransactionByHash(hash common.Hash) (ret *rpctypes.RPCTransaction, err error)
GetTransactionByHash returns the transaction identified by hash.
func (*TransactionAPI) GetTransactionCount ¶
func (api *TransactionAPI) GetTransactionCount(address common.Address, blockNrOrHash *rpctypes.BlockNumberOrHash) (ret *hexutil.Uint64, err error)
GetTransactionCount returns the number of transactions at the given address, blockNum is ignored.
func (*TransactionAPI) GetTransactionReceipt ¶
GetTransactionReceipt returns the transaction receipt identified by hash.
func (*TransactionAPI) SendRawTransaction ¶
SendRawTransaction send a raw Ethereum transaction.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package filters implements an ethereum filtering system for block, transactions and log events.
|
Package filters implements an ethereum filtering system for block, transactions and log events. |
Package tracers is a manager for transaction tracing engines.
|
Package tracers is a manager for transaction tracing engines. |