Documentation ¶
Index ¶
- Constants
- Variables
- func Account(address *common.Address) *types.AccountIdentifier
- func Amount(value *big.Int, currency *types.Currency) *types.Amount
- func ChecksumAddress(address string) (string, error)
- func ConvertEVMTopicHashToAddress(hash *common.Hash) *common.Address
- func EffectiveGasPrice(tx *EthTypes.Transaction, baseFee *big.Int) (*big.Int, error)
- func Erc20Amount(bytes []byte, addr common.Address, symbol string, decimals int32, sender bool) *types.Amount
- func Erc20Currency(symbol string, decimals int32, contractAddress string) *types.Currency
- func GenerateErc20TransferData(toAddress string, value *big.Int) []byte
- func GetTraceConfig(useNative bool) (*tracers.TraceConfig, error)
- func IsValidERC20Token(whiteList []configuration.Token, address string) bool
- func MarshalJSONMap(i interface{}) (map[string]interface{}, error)
- func MustChecksum(address string) string
- func ToBlockNumArg(number *big.Int) string
- func UnmarshalJSONMap(m map[string]interface{}, i interface{}) error
- type Call
- type ContractCurrency
- type ContractInfoToken
- type ContractInfoTokenCaller
- type ContractInfoTokenCallerRaw
- type ContractInfoTokenCallerSession
- type ContractInfoTokenFilterer
- type ContractInfoTokenRaw
- func (_ContractInfoToken *ContractInfoTokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_ContractInfoToken *ContractInfoTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_ContractInfoToken *ContractInfoTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type ContractInfoTokenSession
- type ContractInfoTokenTransactor
- type ContractInfoTokenTransactorRaw
- type ContractInfoTokenTransactorSession
- type EVMTransfer
- type EthClient
- type FeeSetResult
- type FeeStatsResult
- type FlatCall
- type GetTransactionReceiptResult
- type GraphQL
- type Header
- type JSONRPC
- type L1InboxBatchInfo
- type LoadedTransaction
- type Metadata
- type OpenEthAction
- type OpenEthTrace
- type OpenEthTraceCall
- type Options
- type ParseMetadata
- type PayloadsResponse
- type RPCBlock
- type RPCClient
- type RPCTransaction
- type RosettaTxReceipt
- type SDKClient
- func (ec *SDKClient) Balance(ctx context.Context, account *RosettaTypes.AccountIdentifier, ...) (*RosettaTypes.AccountBalanceResponse, error)
- func (ec *SDKClient) BlockAuthor(ctx context.Context, blockIndex int64) (string, error)
- func (ec *SDKClient) BlockRewardTransaction(blockIdentifier *RosettaTypes.BlockIdentifier, miner string, ...) *RosettaTypes.Transaction
- func (ec *SDKClient) GetBaseFee(ctx context.Context) (*big.Int, error)
- func (ec *SDKClient) GetBlockHash(ctx context.Context, blockIdentifier RosettaTypes.BlockIdentifier) (string, error)
- func (ec *SDKClient) GetBlockReceipts(ctx context.Context, blockHash common.Hash, txs []RPCTransaction, ...) ([]*RosettaTxReceipt, error)
- func (ec *SDKClient) GetClient() *SDKClient
- func (ec *SDKClient) GetContractCallGasLimit(ctx context.Context, toAddress string, fromAddress string, value *big.Int, ...) (uint64, error)
- func (ec *SDKClient) GetContractCurrency(addr common.Address, erc20 bool) (*ContractCurrency, error)
- func (ec *SDKClient) GetCustomizedBlockBody(raw json.RawMessage, body *RPCBlock) error
- func (ec *SDKClient) GetErc20TransferGasLimit(ctx context.Context, toAddress string, fromAddress string, value *big.Int, ...) (uint64, error)
- func (ec *SDKClient) GetGasFeeCap(ctx context.Context, input Options, gasTipCap *big.Int) (*big.Int, error)
- func (ec *SDKClient) GetGasPrice(ctx context.Context, input Options) (*big.Int, error)
- func (ec *SDKClient) GetGasTipCap(ctx context.Context, input Options) (*big.Int, error)
- func (ec *SDKClient) GetL1DataFee(ctx context.Context, ethTxBytes []byte) (*big.Int, error)
- func (ec *SDKClient) GetLoadedTransaction(ctx context.Context, request *RosettaTypes.BlockTransactionRequest) (*LoadedTransaction, error)
- func (ec *SDKClient) GetNativeTransferGasLimit(ctx context.Context, toAddress string, fromAddress string, value *big.Int) (uint64, error)
- func (ec *SDKClient) GetNonce(ctx context.Context, input Options) (uint64, error)
- func (ec *SDKClient) GetRosettaConfig() configuration.RosettaConfig
- func (ec *SDKClient) GetTransactionReceipt(ctx context.Context, tx *LoadedTransaction) (*RosettaTxReceipt, error)
- func (ec *SDKClient) GetUncles(ctx context.Context, head *EthTypes.Header, body *RPCBlock) ([]*EthTypes.Header, error)
- func (ec *SDKClient) ParseOps(tx *LoadedTransaction) ([]*RosettaTypes.Operation, error)
- func (ec *SDKClient) PopulateCrossChainTransactions(*EthTypes.Block, []*LoadedTransaction) ([]*RosettaTypes.Transaction, error)
- func (ec *SDKClient) SkipTxReceiptParsing(contractAddress string) bool
- func (ec *SDKClient) Status(ctx context.Context) (*RosettaTypes.BlockIdentifier, int64, *RosettaTypes.SyncStatus, ...)
- func (ec *SDKClient) Submit(ctx context.Context, signedTx *EthTypes.Transaction) error
- func (ec *SDKClient) TraceBlockByHash(ctx context.Context, blockHash common.Hash, txs []RPCTransaction) (map[string][]*FlatCall, error)
- func (ec *SDKClient) TraceReplayBlockTransactions(ctx context.Context, hsh string) (map[string][]*FlatCall, error)
- func (ec *SDKClient) TraceReplayTransaction(ctx context.Context, hsh string) (json.RawMessage, []*FlatCall, error)
- func (ec *SDKClient) TraceTransaction(ctx context.Context, hash common.Hash) (json.RawMessage, []*FlatCall, error)
- type SignedTransactionWrapper
- type Transaction
- type TxExtraInfo
Constants ¶
const ( // DefaultElapsedTime is the default limit on time // spent retrying a fetch. DefaultElapsedTime = 1 * time.Minute // DefaultRetries is the default number of times to // attempt a retry on a failed request. DefaultRetries = 10 // DefaultHTTPTimeout is the default timeout for // HTTP requests. DefaultHTTPTimeout = 10 * time.Second // DefaultIdleConnTimeout is the maximum amount of time an idle // (keep-alive) connection will remain idle before closing // itself. DefaultIdleConnTimeout = 30 * time.Second // DefaultMaxConnections limits the number of concurrent // connections we will attempt to make. Most OS's have a // default connection limit of 128, so we set the default // below that. DefaultMaxConnections = 120 )
const ( // Interesting ERC20 log topics Erc20TransferLogTopic = "Transfer(address,address,uint256)" Erc20DepositLogTopic = "Deposit(address,uint256)" Erc20WithdrawalLogTopic = "Withdrawal(address,uint256)" UnknownERC20Symbol = "ERC20_UNKNOWN" UnknownERC20Decimals = 0 UnknownERC721Symbol = "ERC721_UNKNOWN" UnknownERC721Decimals = 0 ContractAddressMetadata = "contractAddress" )
const ( BalanceOfMethodPrefix = "0x70a08231000000000000000000000000" GenericTransferBytesLength = 68 TransferFnSignature = "transfer(address,uint256)" // do not include spaces in the string Milliseconds = 1000 )
Variables ¶
var ContractInfoTokenABI = ContractInfoTokenMetaData.ABI
ContractInfoTokenABI is the input ABI used to generate the binding from. Deprecated: Use ContractInfoTokenMetaData.ABI instead.
var ContractInfoTokenMetaData = &bind.MetaData{
ABI: "[{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint8\",\"name\":\"\",\"internalType\":\"uint8\"}],\"name\":\"decimals\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"string\",\"name\":\"\",\"internalType\":\"string\"}],\"name\":\"symbol\",\"inputs\":[]}]",
}
ContractInfoTokenMetaData contains all meta data concerning the ContractInfoToken contract.
var ( // Mapping log topic to its hash and hex format Erc20LogTopicMap = map[string]string{ Erc20TransferLogTopic: "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", Erc20DepositLogTopic: "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", Erc20WithdrawalLogTopic: "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", } )
Functions ¶
func ChecksumAddress ¶
ChecksumAddress ensures an address can be EIP55-compliant format
func ConvertEVMTopicHashToAddress ¶
ConvertEVMTopicHashToAddress uses the last 20 bytes of a common.Hash to create a common.Address
func EffectiveGasPrice ¶
EffectiveGasPrice returns the price of gas charged to this Transaction to be included in the block.
func Erc20Amount ¶
func Erc20Currency ¶
func GetTraceConfig ¶
func GetTraceConfig(useNative bool) (*tracers.TraceConfig, error)
func IsValidERC20Token ¶
func IsValidERC20Token(whiteList []configuration.Token, address string) bool
EqualFoldContains checks if the array contains the string regardless of casing
func MarshalJSONMap ¶
marshalJSONMap converts an interface into a map[string]interface{}.
func MustChecksum ¶
MustChecksum ensures an address can be EIP55-compliant format
func ToBlockNumArg ¶
func UnmarshalJSONMap ¶
UnmarshalJSONMap converts map[string]interface{} into a interface{}.
Types ¶
type Call ¶
type Call struct { BeforeEVMTransfers []*EVMTransfer `json:"beforeEVMTransfers"` AfterEVMTransfers []*EVMTransfer `json:"afterEVMTransfers"` Type string `json:"type"` From common.Address `json:"from"` To common.Address `json:"to"` Value *big.Int `json:"value"` GasUsed *big.Int `json:"gasUsed"` Revert bool ErrorMessage string `json:"error"` Calls []*Call `json:"calls"` }
Call is an Ethereum debug trace.
func (*Call) UnmarshalJSON ¶
UnmarshalJSON is a custom unmarshaler for Call.
type ContractCurrency ¶
type ContractInfoToken ¶
type ContractInfoToken struct { ContractInfoTokenCaller // Read-only binding to the contract ContractInfoTokenTransactor // Write-only binding to the contract ContractInfoTokenFilterer // Log filterer for contract events }
ContractInfoToken is an auto generated Go binding around an Ethereum contract.
func NewContractInfoToken ¶
func NewContractInfoToken(address common.Address, backend bind.ContractBackend) (*ContractInfoToken, error)
NewContractInfoToken creates a new instance of ContractInfoToken, bound to a specific deployed contract.
type ContractInfoTokenCaller ¶
type ContractInfoTokenCaller struct {
// contains filtered or unexported fields
}
ContractInfoTokenCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewContractInfoTokenCaller ¶
func NewContractInfoTokenCaller(address common.Address, caller bind.ContractCaller) (*ContractInfoTokenCaller, error)
NewContractInfoTokenCaller creates a new read-only instance of ContractInfoToken, bound to a specific deployed contract.
type ContractInfoTokenCallerRaw ¶
type ContractInfoTokenCallerRaw struct {
Contract *ContractInfoTokenCaller // Generic read-only contract binding to access the raw methods on
}
ContractInfoTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*ContractInfoTokenCallerRaw) Call ¶
func (_ContractInfoToken *ContractInfoTokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
type ContractInfoTokenCallerSession ¶
type ContractInfoTokenCallerSession struct { Contract *ContractInfoTokenCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
ContractInfoTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*ContractInfoTokenCallerSession) Decimals ¶
func (_ContractInfoToken *ContractInfoTokenCallerSession) Decimals() (uint8, error)
Decimals is a free data retrieval call binding the contract method 0x313ce567.
Solidity: function decimals() view returns(uint8)
func (*ContractInfoTokenCallerSession) Symbol ¶
func (_ContractInfoToken *ContractInfoTokenCallerSession) Symbol() (string, error)
Symbol is a free data retrieval call binding the contract method 0x95d89b41.
Solidity: function symbol() view returns(string)
type ContractInfoTokenFilterer ¶
type ContractInfoTokenFilterer struct {
// contains filtered or unexported fields
}
ContractInfoTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewContractInfoTokenFilterer ¶
func NewContractInfoTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*ContractInfoTokenFilterer, error)
NewContractInfoTokenFilterer creates a new log filterer instance of ContractInfoToken, bound to a specific deployed contract.
type ContractInfoTokenRaw ¶
type ContractInfoTokenRaw struct {
Contract *ContractInfoToken // Generic contract binding to access the raw methods on
}
ContractInfoTokenRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*ContractInfoTokenRaw) Call ¶
func (_ContractInfoToken *ContractInfoTokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
func (*ContractInfoTokenRaw) Transact ¶
func (_ContractInfoToken *ContractInfoTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*ContractInfoTokenRaw) Transfer ¶
func (_ContractInfoToken *ContractInfoTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type ContractInfoTokenSession ¶
type ContractInfoTokenSession struct { Contract *ContractInfoToken // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
ContractInfoTokenSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*ContractInfoTokenSession) Decimals ¶
func (_ContractInfoToken *ContractInfoTokenSession) Decimals() (uint8, error)
Decimals is a free data retrieval call binding the contract method 0x313ce567.
Solidity: function decimals() view returns(uint8)
func (*ContractInfoTokenSession) Symbol ¶
func (_ContractInfoToken *ContractInfoTokenSession) Symbol() (string, error)
Symbol is a free data retrieval call binding the contract method 0x95d89b41.
Solidity: function symbol() view returns(string)
type ContractInfoTokenTransactor ¶
type ContractInfoTokenTransactor struct {
// contains filtered or unexported fields
}
ContractInfoTokenTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewContractInfoTokenTransactor ¶
func NewContractInfoTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*ContractInfoTokenTransactor, error)
NewContractInfoTokenTransactor creates a new write-only instance of ContractInfoToken, bound to a specific deployed contract.
type ContractInfoTokenTransactorRaw ¶
type ContractInfoTokenTransactorRaw struct {
Contract *ContractInfoTokenTransactor // Generic write-only contract binding to access the raw methods on
}
ContractInfoTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*ContractInfoTokenTransactorRaw) Transact ¶
func (_ContractInfoToken *ContractInfoTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*ContractInfoTokenTransactorRaw) Transfer ¶
func (_ContractInfoToken *ContractInfoTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type ContractInfoTokenTransactorSession ¶
type ContractInfoTokenTransactorSession struct { Contract *ContractInfoTokenTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
ContractInfoTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
type EVMTransfer ¶ added in v0.0.5
type EVMTransfer struct { Purpose string `json:"purpose"` From *common.Address `json:"from"` To *common.Address `json:"to"` Value *big.Int `json:"value"` }
EVMTransfer is an Ethereum debug trace.
func (*EVMTransfer) UnmarshalJSON ¶ added in v0.0.5
func (t *EVMTransfer) UnmarshalJSON(input []byte) error
UnmarshalJSON is a custom unmarshaler for Call.
type EthClient ¶
func NewEthClient ¶
NewEthClient connects a SDKClient to the given URL.
type FeeSetResult ¶ added in v0.0.5
type FeeStatsResult ¶ added in v0.0.5
type FeeStatsResult struct { Prices *FeeSetResult `json:"prices"` UnitsUsed *FeeSetResult `json:"unitsUsed"` Paid *FeeSetResult `json:"paid"` }
type FlatCall ¶
type FlatCall struct { BeforeEVMTransfers []*EVMTransfer `json:"beforeEVMTransfers"` AfterEVMTransfers []*EVMTransfer `json:"afterEVMTransfers"` Type string `json:"type"` From common.Address `json:"from"` To common.Address `json:"to"` Value *big.Int `json:"value"` GasUsed *big.Int `json:"gasUsed"` Revert bool ErrorMessage string `json:"error"` }
func FlattenOpenEthTraces ¶
func FlattenOpenEthTraces(data *OpenEthTraceCall, flattened []*FlatCall) []*FlatCall
flattenTraces recursively flattens all traces.
func FlattenTraces ¶
flattenTraces recursively flattens all traces.
type GetTransactionReceiptResult ¶ added in v0.0.5
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"` EffectiveGasPrice hexutil.Uint64 `json:"effectiveGasPrice"` ContractAddress *common.Address `json:"contractAddress"` Logs []*EthTypes.Log `json:"logs"` LogsBloom hexutil.Bytes `json:"logsBloom"` Status hexutil.Uint64 `json:"status"` // L2 Specific Fields ReturnCode hexutil.Uint64 `json:"returnCode"` ReturnData hexutil.Bytes `json:"returnData"` FeeStats *FeeStatsResult `json:"feeStats"` L1BlockNumber *hexutil.Big `json:"l1BlockNumber"` L1InboxBatchInfo *L1InboxBatchInfo `json:"l1InboxBatchInfo"` Type string `json:"type,omitempty"` PostState []byte `json:"root"` }
Receipt represents the results of a transaction.
type Header ¶ added in v0.0.7
Header represents the simple header for base fee to improve the performance of base fee pulling
type JSONRPC ¶
type JSONRPC interface { CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error BatchCallContext(ctx context.Context, b []rpc.BatchElem) error Close() }
JSONRPC is the interface for accessing go-ethereum's JSON RPC endpoint. https://github.com/ethereum/go-ethereum/blob/0169d579d0eed4f6366697985a7b0f0b99402783/rpc/client.go#L308
type L1InboxBatchInfo ¶ added in v0.0.5
type LoadedTransaction ¶
type LoadedTransaction struct { Transaction *EthTypes.Transaction From *common.Address BlockNumber *string BlockHash *common.Hash TxHash *common.Hash // may not equal Transaction.Hash() due to state sync indicator FeeAmount *big.Int FeeBurned *big.Int // nil if no fees were burned Miner string Author string Status bool Trace []*FlatCall RawTrace json.RawMessage Receipt *RosettaTxReceipt BaseFee *big.Int IsBridgedTxn bool Mint string }
func (*LoadedTransaction) GetMint ¶ added in v0.0.6
func (tx *LoadedTransaction) GetMint() *big.Int
type Metadata ¶
type Metadata struct { Nonce uint64 `json:"nonce"` GasPrice *big.Int `json:"gas_price"` GasLimit uint64 `json:"gas_limit"` GasTipCap *big.Int `json:"gas_tip_cap,omitempty"` GasFeeCap *big.Int `json:"gas_fee_cap,omitempty"` ContractData string `json:"data,omitempty"` MethodSignature string `json:"method_signature,omitempty"` MethodArgs interface{} `json:"method_args,omitempty"` L1DataFee *big.Int `json:"l1_data_fee,omitempty"` }
type OpenEthAction ¶
type OpenEthAction struct { Type string `json:"callType"` From common.Address `json:"from"` To common.Address `json:"to"` Value *big.Int `json:"value"` GasUsed *big.Int `json:"gas"` }
func (*OpenEthAction) UnmarshalJSON ¶
func (t *OpenEthAction) UnmarshalJSON(input []byte) error
UnmarshalJSON is a custom unmarshaler for OpenEthAction.
type OpenEthTrace ¶
type OpenEthTrace struct { Subtraces int64 `json:"subtraces"` Action OpenEthAction `json:"action"` Type string `json:"type"` TransactionHash string `json:"transactionHash"` }
type OpenEthTraceCall ¶
type OpenEthTraceCall struct { Output string `json:"output"` Trace []OpenEthTrace `json:"trace"` }
Open Ethereum API traces
type Options ¶
type Options struct { From string `json:"from"` To string `json:"to"` TokenAddress string `json:"token_address,omitempty"` ContractAddress string `json:"contract_address,omitempty"` Value string `json:"value"` SuggestedFeeMultiplier *float64 `json:"suggested_fee_multiplier,omitempty"` GasPrice *big.Int `json:"gas_price,omitempty"` GasLimit *big.Int `json:"gas_limit,omitempty"` GasTipCap *big.Int `json:"gas_tip_cap,omitempty"` GasFeeCap *big.Int `json:"gas_fee_cap,omitempty"` Nonce *big.Int `json:"nonce,omitempty"` Currency *RosettaTypes.Currency `json:"currency,omitempty"` MethodSignature string `json:"method_signature,omitempty"` MethodArgs interface{} `json:"method_args,omitempty"` ContractData string `json:"data,omitempty"` }
type ParseMetadata ¶
type PayloadsResponse ¶
type RPCBlock ¶
type RPCBlock struct { Hash common.Hash `json:"hash"` Transactions []RPCTransaction `json:"transactions"` UncleHashes []common.Hash `json:"uncles"` }
type RPCClient ¶
type RPCClient struct {
JSONRPC
}
func NewRPCClient ¶
NewRPCClient connects a SDKClient to the given URL.
type RPCTransaction ¶
type RPCTransaction struct { Tx *EthTypes.Transaction TxExtraInfo }
EthTypes.Transaction contains TxData, which is DynamicFeeTx: https://github.com/ethereum/go-ethereum/blob/980b7682b474db61ecbd78171e7cacfec8214048 /core/types/dynamic_fee_tx.go#L25
func (*RPCTransaction) LoadedTransaction ¶
func (tx *RPCTransaction) LoadedTransaction() *LoadedTransaction
func (*RPCTransaction) UnmarshalJSON ¶
func (tx *RPCTransaction) UnmarshalJSON(msg []byte) error
Custom UnmarshalJSON for RPCTransaction to populate tx, and extra info.
type RosettaTxReceipt ¶
type SDKClient ¶
type SDKClient struct { P *params.ChainConfig *RPCClient *EthClient // contains filtered or unexported fields }
func NewClient ¶
func NewClient(cfg *configuration.Configuration, rpcClient *RPCClient) (*SDKClient, error)
NewClient creates a client that connects to the network.
func (*SDKClient) Balance ¶
func (ec *SDKClient) Balance( ctx context.Context, account *RosettaTypes.AccountIdentifier, blockIdentifier *RosettaTypes.PartialBlockIdentifier, currencies []*RosettaTypes.Currency, ) (*RosettaTypes.AccountBalanceResponse, error)
func (*SDKClient) BlockAuthor ¶
nolint:staticcheck
func (*SDKClient) BlockRewardTransaction ¶
func (ec *SDKClient) BlockRewardTransaction( blockIdentifier *RosettaTypes.BlockIdentifier, miner string, uncles []*EthTypes.Header, ) *RosettaTypes.Transaction
func (*SDKClient) GetBaseFee ¶ added in v0.0.7
func (*SDKClient) GetBlockHash ¶ added in v0.0.15
func (ec *SDKClient) GetBlockHash(ctx context.Context, blockIdentifier RosettaTypes.BlockIdentifier) (string, error)
func (*SDKClient) GetBlockReceipts ¶
func (ec *SDKClient) GetBlockReceipts( ctx context.Context, blockHash common.Hash, txs []RPCTransaction, baseFee *big.Int, ) ([]*RosettaTxReceipt, error)
func (*SDKClient) GetContractCallGasLimit ¶
func (*SDKClient) GetContractCurrency ¶
func (ec *SDKClient) GetContractCurrency( addr common.Address, erc20 bool, ) (*ContractCurrency, error)
GetContractCurrency returns the currency for a specific address
func (*SDKClient) GetCustomizedBlockBody ¶ added in v0.0.15
func (ec *SDKClient) GetCustomizedBlockBody(raw json.RawMessage, body *RPCBlock) error
func (*SDKClient) GetErc20TransferGasLimit ¶
func (*SDKClient) GetGasFeeCap ¶ added in v0.0.7
func (*SDKClient) GetGasPrice ¶
func (*SDKClient) GetGasTipCap ¶ added in v0.0.7
func (*SDKClient) GetL1DataFee ¶ added in v0.0.7
func (*SDKClient) GetLoadedTransaction ¶
func (ec *SDKClient) GetLoadedTransaction( ctx context.Context, request *RosettaTypes.BlockTransactionRequest, ) (*LoadedTransaction, error)
nolint:staticcheck
func (*SDKClient) GetNativeTransferGasLimit ¶
func (*SDKClient) GetRosettaConfig ¶
func (ec *SDKClient) GetRosettaConfig() configuration.RosettaConfig
func (*SDKClient) GetTransactionReceipt ¶
func (ec *SDKClient) GetTransactionReceipt( ctx context.Context, tx *LoadedTransaction, ) (*RosettaTxReceipt, error)
func (*SDKClient) ParseOps ¶
func (ec *SDKClient) ParseOps( tx *LoadedTransaction, ) ([]*RosettaTypes.Operation, error)
func (*SDKClient) PopulateCrossChainTransactions ¶
func (ec *SDKClient) PopulateCrossChainTransactions( *EthTypes.Block, []*LoadedTransaction, ) ([]*RosettaTypes.Transaction, error)
func (*SDKClient) SkipTxReceiptParsing ¶ added in v0.0.15
func (*SDKClient) Status ¶
func (ec *SDKClient) Status(ctx context.Context) ( *RosettaTypes.BlockIdentifier, int64, *RosettaTypes.SyncStatus, []*RosettaTypes.Peer, error, )
Status returns geth status information for determining node healthiness.
func (*SDKClient) TraceBlockByHash ¶
func (ec *SDKClient) TraceBlockByHash( ctx context.Context, blockHash common.Hash, txs []RPCTransaction, ) (map[string][]*FlatCall, error)
TraceBlockByHash returns the Transaction traces of all transactions in the block
func (*SDKClient) TraceReplayBlockTransactions ¶
func (ec *SDKClient) TraceReplayBlockTransactions(ctx context.Context, hsh string) ( map[string][]*FlatCall, error, )
TraceReplayBlockTransactions returns all transactions in a block returning the requested traces for each Transaction.
func (*SDKClient) TraceReplayTransaction ¶
func (ec *SDKClient) TraceReplayTransaction( ctx context.Context, hsh string, ) (json.RawMessage, []*FlatCall, error)
TraceReplayTransaction returns a Transaction trace
type SignedTransactionWrapper ¶
type SignedTransactionWrapper struct { SignedTransaction []byte `json:"signed_tx"` Currency *RosettaTypes.Currency `json:"currency,omitempty"` }
type Transaction ¶
type Transaction struct { From string `json:"from"` To string `json:"to"` Value *big.Int `json:"value"` Data []byte `json:"data"` Nonce uint64 `json:"nonce"` GasPrice *big.Int `json:"gas_price"` GasLimit uint64 `json:"gas"` GasTipCap *big.Int `json:"gas_tip_cap,omitempty"` GasFeeCap *big.Int `json:"gas_fee_cap,omitempty"` ChainID *big.Int `json:"chain_id"` Currency *RosettaTypes.Currency `json:"currency,omitempty"` }