|
|
@ -116,9 +116,9 @@ func (s *EthereumAPI) FeeHistory(ctx context.Context, blockCount math.HexOrDecim |
|
|
|
return results, nil |
|
|
|
return results, nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Syncing returns false in case the node is currently not syncing with the network. It can be up to date or has not
|
|
|
|
// Syncing returns false in case the node is currently not syncing with the network. It can be up-to-date or has not
|
|
|
|
// yet received the latest block headers from its pears. In case it is synchronizing:
|
|
|
|
// yet received the latest block headers from its pears. In case it is synchronizing:
|
|
|
|
// - startingBlock: block number this node started to synchronise from
|
|
|
|
// - startingBlock: block number this node started to synchronize from
|
|
|
|
// - currentBlock: block number this node is currently importing
|
|
|
|
// - currentBlock: block number this node is currently importing
|
|
|
|
// - highestBlock: block number of the highest block header this node has received from peers
|
|
|
|
// - highestBlock: block number of the highest block header this node has received from peers
|
|
|
|
// - pulledStates: number of state entries processed until now
|
|
|
|
// - pulledStates: number of state entries processed until now
|
|
|
@ -150,7 +150,7 @@ func (s *EthereumAPI) Syncing() (interface{}, error) { |
|
|
|
}, nil |
|
|
|
}, nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// TxPoolAPI offers and API for the transaction pool. It only operates on data that is non confidential.
|
|
|
|
// TxPoolAPI offers and API for the transaction pool. It only operates on data that is non-confidential.
|
|
|
|
type TxPoolAPI struct { |
|
|
|
type TxPoolAPI struct { |
|
|
|
b Backend |
|
|
|
b Backend |
|
|
|
} |
|
|
|
} |
|
|
@ -337,7 +337,7 @@ func (s *PersonalAccountAPI) OpenWallet(url string, passphrase *string) error { |
|
|
|
return wallet.Open(pass) |
|
|
|
return wallet.Open(pass) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// DeriveAccount requests a HD wallet to derive a new account, optionally pinning
|
|
|
|
// DeriveAccount requests an HD wallet to derive a new account, optionally pinning
|
|
|
|
// it for later reuse.
|
|
|
|
// it for later reuse.
|
|
|
|
func (s *PersonalAccountAPI) DeriveAccount(url string, path string, pin *bool) (accounts.Account, error) { |
|
|
|
func (s *PersonalAccountAPI) DeriveAccount(url string, path string, pin *bool) (accounts.Account, error) { |
|
|
|
wallet, err := s.am.Wallet(url) |
|
|
|
wallet, err := s.am.Wallet(url) |
|
|
@ -712,7 +712,7 @@ func (s *BlockChainAPI) GetProof(ctx context.Context, address common.Address, st |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// decodeHash parses a hex-encoded 32-byte hash. The input may optionally
|
|
|
|
// decodeHash parses a hex-encoded 32-byte hash. The input may optionally
|
|
|
|
// be prefixed by 0x and can have an byte length up to 32.
|
|
|
|
// be prefixed by 0x and can have a byte length up to 32.
|
|
|
|
func decodeHash(s string) (common.Hash, error) { |
|
|
|
func decodeHash(s string) (common.Hash, error) { |
|
|
|
if strings.HasPrefix(s, "0x") || strings.HasPrefix(s, "0X") { |
|
|
|
if strings.HasPrefix(s, "0x") || strings.HasPrefix(s, "0X") { |
|
|
|
s = s[2:] |
|
|
|
s = s[2:] |
|
|
@ -1438,7 +1438,7 @@ func newRPCTransactionFromBlockHash(b *types.Block, hash common.Hash, config *pa |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// accessListResult returns an optional accesslist
|
|
|
|
// accessListResult returns an optional accesslist
|
|
|
|
// Its the result of the `debug_createAccessList` RPC call.
|
|
|
|
// It's the result of the `debug_createAccessList` RPC call.
|
|
|
|
// It contains an error if the transaction itself failed.
|
|
|
|
// It contains an error if the transaction itself failed.
|
|
|
|
type accessListResult struct { |
|
|
|
type accessListResult struct { |
|
|
|
Accesslist *types.AccessList `json:"accessList"` |
|
|
|
Accesslist *types.AccessList `json:"accessList"` |
|
|
@ -1446,7 +1446,7 @@ type accessListResult struct { |
|
|
|
GasUsed hexutil.Uint64 `json:"gasUsed"` |
|
|
|
GasUsed hexutil.Uint64 `json:"gasUsed"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// CreateAccessList creates a EIP-2930 type AccessList for the given transaction.
|
|
|
|
// CreateAccessList creates an EIP-2930 type AccessList for the given transaction.
|
|
|
|
// Reexec and BlockNrOrHash can be specified to create the accessList on top of a certain state.
|
|
|
|
// Reexec and BlockNrOrHash can be specified to create the accessList on top of a certain state.
|
|
|
|
func (s *BlockChainAPI) CreateAccessList(ctx context.Context, args TransactionArgs, blockNrOrHash *rpc.BlockNumberOrHash) (*accessListResult, error) { |
|
|
|
func (s *BlockChainAPI) CreateAccessList(ctx context.Context, args TransactionArgs, blockNrOrHash *rpc.BlockNumberOrHash) (*accessListResult, error) { |
|
|
|
bNrOrHash := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber) |
|
|
|
bNrOrHash := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber) |
|
|
|