Documentation ¶
Index ¶
- func GenerateWeb3Server(server *aggregator.Server, privateKeys []*ecdsa.PrivateKey, ganacheMode bool, ...) (*rpc.Server, error)
- func HandleCallError(res *evm.TxResult, ganacheMode bool) error
- func HandleNodeInterfaceCall(srv *aggregator.Server, calldata []byte) ([]byte, error)
- type Accounts
- type CallTxArgs
- type EthClient
- func (c *EthClient) CallContract(_ context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (c *EthClient) CodeAt(_ context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
- func (c *EthClient) EstimateGas(_ context.Context, call ethereum.CallMsg) (uint64, error)
- func (c *EthClient) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
- func (c *EthClient) PendingCodeAt(_ context.Context, account common.Address) ([]byte, error)
- func (c *EthClient) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
- func (c *EthClient) SendTransaction(ctx context.Context, tx *types.Transaction) error
- func (c *EthClient) SubscribeFilterLogs(_ context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
- func (c *EthClient) SuggestGasPrice(_ context.Context) (*big.Int, error)
- func (c *EthClient) TransactionReceipt(_ context.Context, txHash common.Hash) (*types.Receipt, error)
- type FeeSetResult
- type FeeStatsResult
- type GetBlockResult
- type GetTransactionReceiptResult
- type Net
- type PersonalAccounts
- type SendTransactionArgs
- type Server
- func (s *Server) Accounts() []common.Address
- func (s *Server) BlockNumber() (hexutil.Uint64, error)
- func (s *Server) Call(callArgs CallTxArgs, blockNum *rpc.BlockNumber) (hexutil.Bytes, error)
- func (s *Server) ChainId() hexutil.Uint64
- func (s *Server) EstimateGas(args CallTxArgs) (hexutil.Uint64, error)
- func (s *Server) GasPrice() *hexutil.Big
- func (s *Server) GetBalance(address *common.Address, blockNum *rpc.BlockNumber) (*hexutil.Big, error)
- func (s *Server) GetBlockByHash(blockHashRaw hexutil.Bytes, includeTxData bool) (*GetBlockResult, error)
- func (s *Server) GetBlockByNumber(blockNum *rpc.BlockNumber, includeTxData bool) (*GetBlockResult, error)
- func (s *Server) GetBlockTransactionCountByHash(blockHash common.Hash) (*hexutil.Big, error)
- func (s *Server) GetBlockTransactionCountByNumber(blockNum *rpc.BlockNumber) (*hexutil.Big, error)
- func (s *Server) GetCode(address *common.Address, blockNum *rpc.BlockNumber) (hexutil.Bytes, error)
- func (s *Server) GetStorageAt(address *common.Address, index *hexutil.Big, blockNum *rpc.BlockNumber) (*hexutil.Big, error)
- func (s *Server) GetTransactionByBlockHashAndIndex(blockHash common.Hash, index hexutil.Uint64) (*TransactionResult, error)
- func (s *Server) GetTransactionByBlockNumberAndIndex(blockNum *rpc.BlockNumber, index hexutil.Uint64) (*TransactionResult, error)
- func (s *Server) GetTransactionByHash(txHash hexutil.Bytes) (*TransactionResult, error)
- func (s *Server) GetTransactionCount(ctx context.Context, address *common.Address, blockNum *rpc.BlockNumber) (hexutil.Uint64, error)
- func (s *Server) GetTransactionReceipt(txHash hexutil.Bytes) (*GetTransactionReceiptResult, error)
- func (s *Server) SendRawTransaction(ctx context.Context, data hexutil.Bytes) (hexutil.Bytes, error)
- type TransactionResult
- type Web3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateWeb3Server ¶
func GenerateWeb3Server(server *aggregator.Server, privateKeys []*ecdsa.PrivateKey, ganacheMode bool, plugins map[string]interface{}) (*rpc.Server, error)
func HandleNodeInterfaceCall ¶
func HandleNodeInterfaceCall(srv *aggregator.Server, calldata []byte) ([]byte, error)
Types ¶
type Accounts ¶
type Accounts struct {
// contains filtered or unexported fields
}
func NewAccounts ¶
func NewAccounts(ethServer *Server, privateKeys []*ecdsa.PrivateKey) *Accounts
func (*Accounts) SendTransaction ¶
type CallTxArgs ¶
type EthClient ¶
type EthClient struct {
// contains filtered or unexported fields
}
func NewEthClient ¶
func NewEthClient(srv *aggregator.Server, ganacheMode bool) *EthClient
func (*EthClient) CallContract ¶
func (*EthClient) EstimateGas ¶
func (*EthClient) FilterLogs ¶
func (*EthClient) PendingCodeAt ¶
func (*EthClient) PendingNonceAt ¶
func (*EthClient) SendTransaction ¶
func (*EthClient) SubscribeFilterLogs ¶
func (*EthClient) SuggestGasPrice ¶
type FeeSetResult ¶
type FeeStatsResult ¶
type FeeStatsResult struct { Prices *FeeSetResult `json:"prices"` UnitsUsed *FeeSetResult `json:"unitsUsed"` Paid *FeeSetResult `json:"paid"` }
type GetBlockResult ¶
type GetBlockResult struct { Number *hexutil.Big `json:"number"` Hash hexutil.Bytes `json:"hash"` ParentHash hexutil.Bytes `json:"parentHash"` MixDigest hexutil.Bytes `json:"mixHash"` Nonce *types.BlockNonce `json:"nonce"` Sha3Uncles hexutil.Bytes `json:"sha3Uncles"` LogsBloom hexutil.Bytes `json:"logsBloom"` TransactionsRoot hexutil.Bytes `json:"transactionsRoot"` StateRoot hexutil.Bytes `json:"stateRoot"` ReceiptsRoot hexutil.Bytes `json:"receiptsRoot"` Miner hexutil.Bytes `json:"miner"` Difficulty *hexutil.Big `json:"difficulty"` TotalDifficulty *hexutil.Big `json:"totalDifficulty"` ExtraData *hexutil.Bytes `json:"extraData"` Size *hexutil.Uint64 `json:"size"` GasLimit *hexutil.Uint64 `json:"gasLimit"` GasUsed *hexutil.Uint64 `json:"gasUsed"` Timestamp *hexutil.Uint64 `json:"timestamp"` Transactions interface{} `json:"transactions"` Uncles *[]hexutil.Bytes `json:"uncles"` L1BlockNumber *hexutil.Big `json:"l1BlockNumber"` }
type GetTransactionReceiptResult ¶
type GetTransactionReceiptResult struct { TransactionHash common.Hash `json:"transactionHash"` TransactionIndex hexutil.Uint64 `json:"transactionIndex"` BlockHash common.Hash `json:"blockHash"` BlockNumber *hexutil.Big `json:"blockNumber"` From common.Address `json:"from"` To *common.Address `json:"to"` CumulativeGasUsed hexutil.Uint64 `json:"cumulativeGasUsed"` GasUsed hexutil.Uint64 `json:"gasUsed"` ContractAddress *common.Address `json:"contractAddress"` Logs []*types.Log `json:"logs"` LogsBloom hexutil.Bytes `json:"logsBloom"` Status hexutil.Uint64 `json:"status"` // Arbitrum Specific Fields ReturnCode hexutil.Uint64 `json:"returnCode"` ReturnData hexutil.Bytes `json:"returnData"` FeeStats *FeeStatsResult `json:"feeStats"` L1BlockNumber *hexutil.Big `json:"l1BlockNumber"` }
Receipt represents the results of a transaction.
type PersonalAccounts ¶
type PersonalAccounts struct {
// contains filtered or unexported fields
}
func NewPersonalAccounts ¶
func NewPersonalAccounts(privateKeys []*ecdsa.PrivateKey) *PersonalAccounts
type SendTransactionArgs ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Call ¶
func (s *Server) Call(callArgs CallTxArgs, blockNum *rpc.BlockNumber) (hexutil.Bytes, error)
func (*Server) EstimateGas ¶
func (s *Server) EstimateGas(args CallTxArgs) (hexutil.Uint64, error)
func (*Server) GetBalance ¶
func (*Server) GetBlockByHash ¶
func (*Server) GetBlockByNumber ¶
func (s *Server) GetBlockByNumber(blockNum *rpc.BlockNumber, includeTxData bool) (*GetBlockResult, error)
func (*Server) GetBlockTransactionCountByHash ¶
func (*Server) GetBlockTransactionCountByNumber ¶
func (*Server) GetStorageAt ¶
func (*Server) GetTransactionByBlockHashAndIndex ¶
func (*Server) GetTransactionByBlockNumberAndIndex ¶
func (s *Server) GetTransactionByBlockNumberAndIndex(blockNum *rpc.BlockNumber, index hexutil.Uint64) (*TransactionResult, error)
func (*Server) GetTransactionByHash ¶
func (s *Server) GetTransactionByHash(txHash hexutil.Bytes) (*TransactionResult, error)
func (*Server) GetTransactionCount ¶
func (*Server) GetTransactionReceipt ¶
func (s *Server) GetTransactionReceipt(txHash hexutil.Bytes) (*GetTransactionReceiptResult, error)
type TransactionResult ¶
type TransactionResult struct { BlockHash *common.Hash `json:"blockHash"` BlockNumber *hexutil.Big `json:"blockNumber"` From common.Address `json:"from"` Gas hexutil.Uint64 `json:"gas"` GasPrice *hexutil.Big `json:"gasPrice"` Hash common.Hash `json:"hash"` Input hexutil.Bytes `json:"input"` Nonce hexutil.Uint64 `json:"nonce"` To *common.Address `json:"to"` TransactionIndex *hexutil.Uint64 `json:"transactionIndex"` Value *hexutil.Big `json:"value"` V *hexutil.Big `json:"v"` R *hexutil.Big `json:"r"` S *hexutil.Big `json:"s"` // Arbitrum Specific Fields L1SeqNum *hexutil.Big `json:"l1SequenceNumber"` ParentRequestId *common.Hash `json:"parentRequestId"` IndexInParent *hexutil.Big `json:"indexInParent"` ArbType hexutil.Uint64 `json:"arbType"` ArbSubType *hexutil.Uint64 `json:"arbSubType"` L1BlockNumber *hexutil.Big `json:"l1BlockNumber"` }
Click to show internal directories.
Click to hide internal directories.