Commit f5591ca6 authored by Delweng's avatar Delweng Committed by GitHub

op-service/client: rm unnecessary type arguments (#12651)

Signed-off-by: default avatarjsvisa <delweng@gmail.com>
parent 44f814ce
...@@ -79,43 +79,43 @@ func (ic *InstrumentedClient) RPC() RPC { ...@@ -79,43 +79,43 @@ func (ic *InstrumentedClient) RPC() RPC {
} }
func (ic *InstrumentedClient) ChainID(ctx context.Context) (*big.Int, error) { func (ic *InstrumentedClient) ChainID(ctx context.Context) (*big.Int, error) {
return instrument2[*big.Int](ic.m, "eth_chainId", func() (*big.Int, error) { return instrument2(ic.m, "eth_chainId", func() (*big.Int, error) {
return ic.c.ChainID(ctx) return ic.c.ChainID(ctx)
}) })
} }
func (ic *InstrumentedClient) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error) { func (ic *InstrumentedClient) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error) {
return instrument2[*types.Block](ic.m, "eth_getBlockByHash", func() (*types.Block, error) { return instrument2(ic.m, "eth_getBlockByHash", func() (*types.Block, error) {
return ic.c.BlockByHash(ctx, hash) return ic.c.BlockByHash(ctx, hash)
}) })
} }
func (ic *InstrumentedClient) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) { func (ic *InstrumentedClient) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) {
return instrument2[*types.Block](ic.m, "eth_getBlockByNumber", func() (*types.Block, error) { return instrument2(ic.m, "eth_getBlockByNumber", func() (*types.Block, error) {
return ic.c.BlockByNumber(ctx, number) return ic.c.BlockByNumber(ctx, number)
}) })
} }
func (ic *InstrumentedClient) BlockNumber(ctx context.Context) (uint64, error) { func (ic *InstrumentedClient) BlockNumber(ctx context.Context) (uint64, error) {
return instrument2[uint64](ic.m, "eth_blockNumber", func() (uint64, error) { return instrument2(ic.m, "eth_blockNumber", func() (uint64, error) {
return ic.c.BlockNumber(ctx) return ic.c.BlockNumber(ctx)
}) })
} }
func (ic *InstrumentedClient) PeerCount(ctx context.Context) (uint64, error) { func (ic *InstrumentedClient) PeerCount(ctx context.Context) (uint64, error) {
return instrument2[uint64](ic.m, "net_peerCount", func() (uint64, error) { return instrument2(ic.m, "net_peerCount", func() (uint64, error) {
return ic.c.PeerCount(ctx) return ic.c.PeerCount(ctx)
}) })
} }
func (ic *InstrumentedClient) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error) { func (ic *InstrumentedClient) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error) {
return instrument2[*types.Header](ic.m, "eth_getHeaderByHash", func() (*types.Header, error) { return instrument2(ic.m, "eth_getHeaderByHash", func() (*types.Header, error) {
return ic.c.HeaderByHash(ctx, hash) return ic.c.HeaderByHash(ctx, hash)
}) })
} }
func (ic *InstrumentedClient) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error) { func (ic *InstrumentedClient) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error) {
return instrument2[*types.Header](ic.m, "eth_getHeaderByNumber", func() (*types.Header, error) { return instrument2(ic.m, "eth_getHeaderByNumber", func() (*types.Header, error) {
return ic.c.HeaderByNumber(ctx, number) return ic.c.HeaderByNumber(ctx, number)
}) })
} }
...@@ -132,25 +132,25 @@ func (ic *InstrumentedClient) TransactionSender(ctx context.Context, tx *types.T ...@@ -132,25 +132,25 @@ func (ic *InstrumentedClient) TransactionSender(ctx context.Context, tx *types.T
} }
func (ic *InstrumentedClient) TransactionCount(ctx context.Context, blockHash common.Hash) (uint, error) { func (ic *InstrumentedClient) TransactionCount(ctx context.Context, blockHash common.Hash) (uint, error) {
return instrument2[uint](ic.m, "eth_getTransactionCount", func() (uint, error) { return instrument2(ic.m, "eth_getTransactionCount", func() (uint, error) {
return ic.c.TransactionCount(ctx, blockHash) return ic.c.TransactionCount(ctx, blockHash)
}) })
} }
func (ic *InstrumentedClient) TransactionInBlock(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error) { func (ic *InstrumentedClient) TransactionInBlock(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error) {
return instrument2[*types.Transaction](ic.m, "eth_getTransactionByBlockHashAndIndex", func() (*types.Transaction, error) { return instrument2(ic.m, "eth_getTransactionByBlockHashAndIndex", func() (*types.Transaction, error) {
return ic.c.TransactionInBlock(ctx, blockHash, index) return ic.c.TransactionInBlock(ctx, blockHash, index)
}) })
} }
func (ic *InstrumentedClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) { func (ic *InstrumentedClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) {
return instrument2[*types.Receipt](ic.m, "eth_getTransactionReceipt", func() (*types.Receipt, error) { return instrument2(ic.m, "eth_getTransactionReceipt", func() (*types.Receipt, error) {
return ic.c.TransactionReceipt(ctx, txHash) return ic.c.TransactionReceipt(ctx, txHash)
}) })
} }
func (ic *InstrumentedClient) SyncProgress(ctx context.Context) (*ethereum.SyncProgress, error) { func (ic *InstrumentedClient) SyncProgress(ctx context.Context) (*ethereum.SyncProgress, error) {
return instrument2[*ethereum.SyncProgress](ic.m, "eth_syncing", func() (*ethereum.SyncProgress, error) { return instrument2(ic.m, "eth_syncing", func() (*ethereum.SyncProgress, error) {
return ic.c.SyncProgress(ctx) return ic.c.SyncProgress(ctx)
}) })
} }
...@@ -160,37 +160,37 @@ func (ic *InstrumentedClient) SubscribeNewHead(ctx context.Context, ch chan<- *t ...@@ -160,37 +160,37 @@ func (ic *InstrumentedClient) SubscribeNewHead(ctx context.Context, ch chan<- *t
} }
func (ic *InstrumentedClient) NetworkID(ctx context.Context) (*big.Int, error) { func (ic *InstrumentedClient) NetworkID(ctx context.Context) (*big.Int, error) {
return instrument2[*big.Int](ic.m, "net_version", func() (*big.Int, error) { return instrument2(ic.m, "net_version", func() (*big.Int, error) {
return ic.c.NetworkID(ctx) return ic.c.NetworkID(ctx)
}) })
} }
func (ic *InstrumentedClient) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error) { func (ic *InstrumentedClient) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error) {
return instrument2[*big.Int](ic.m, "eth_getBalance", func() (*big.Int, error) { return instrument2(ic.m, "eth_getBalance", func() (*big.Int, error) {
return ic.c.BalanceAt(ctx, account, blockNumber) return ic.c.BalanceAt(ctx, account, blockNumber)
}) })
} }
func (ic *InstrumentedClient) StorageAt(ctx context.Context, account common.Address, key common.Hash, blockNumber *big.Int) ([]byte, error) { func (ic *InstrumentedClient) StorageAt(ctx context.Context, account common.Address, key common.Hash, blockNumber *big.Int) ([]byte, error) {
return instrument2[[]byte](ic.m, "eth_getStorageAt", func() ([]byte, error) { return instrument2(ic.m, "eth_getStorageAt", func() ([]byte, error) {
return ic.c.StorageAt(ctx, account, key, blockNumber) return ic.c.StorageAt(ctx, account, key, blockNumber)
}) })
} }
func (ic *InstrumentedClient) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error) { func (ic *InstrumentedClient) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error) {
return instrument2[[]byte](ic.m, "eth_getCode", func() ([]byte, error) { return instrument2(ic.m, "eth_getCode", func() ([]byte, error) {
return ic.c.CodeAt(ctx, account, blockNumber) return ic.c.CodeAt(ctx, account, blockNumber)
}) })
} }
func (ic *InstrumentedClient) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error) { func (ic *InstrumentedClient) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error) {
return instrument2[uint64](ic.m, "eth_getTransactionCount", func() (uint64, error) { return instrument2(ic.m, "eth_getTransactionCount", func() (uint64, error) {
return ic.c.NonceAt(ctx, account, blockNumber) return ic.c.NonceAt(ctx, account, blockNumber)
}) })
} }
func (ic *InstrumentedClient) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error) { func (ic *InstrumentedClient) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error) {
return instrument2[[]types.Log](ic.m, "eth_getLogs", func() ([]types.Log, error) { return instrument2(ic.m, "eth_getLogs", func() ([]types.Log, error) {
return ic.c.FilterLogs(ctx, q) return ic.c.FilterLogs(ctx, q)
}) })
} }
...@@ -200,67 +200,67 @@ func (ic *InstrumentedClient) SubscribeFilterLogs(ctx context.Context, q ethereu ...@@ -200,67 +200,67 @@ func (ic *InstrumentedClient) SubscribeFilterLogs(ctx context.Context, q ethereu
} }
func (ic *InstrumentedClient) PendingBalanceAt(ctx context.Context, account common.Address) (*big.Int, error) { func (ic *InstrumentedClient) PendingBalanceAt(ctx context.Context, account common.Address) (*big.Int, error) {
return instrument2[*big.Int](ic.m, "eth_getBalance", func() (*big.Int, error) { return instrument2(ic.m, "eth_getBalance", func() (*big.Int, error) {
return ic.c.PendingBalanceAt(ctx, account) return ic.c.PendingBalanceAt(ctx, account)
}) })
} }
func (ic *InstrumentedClient) PendingStorageAt(ctx context.Context, account common.Address, key common.Hash) ([]byte, error) { func (ic *InstrumentedClient) PendingStorageAt(ctx context.Context, account common.Address, key common.Hash) ([]byte, error) {
return instrument2[[]byte](ic.m, "eth_getStorageAt", func() ([]byte, error) { return instrument2(ic.m, "eth_getStorageAt", func() ([]byte, error) {
return ic.c.PendingStorageAt(ctx, account, key) return ic.c.PendingStorageAt(ctx, account, key)
}) })
} }
func (ic *InstrumentedClient) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error) { func (ic *InstrumentedClient) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error) {
return instrument2[[]byte](ic.m, "eth_getCode", func() ([]byte, error) { return instrument2(ic.m, "eth_getCode", func() ([]byte, error) {
return ic.c.PendingCodeAt(ctx, account) return ic.c.PendingCodeAt(ctx, account)
}) })
} }
func (ic *InstrumentedClient) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) { func (ic *InstrumentedClient) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) {
return instrument2[uint64](ic.m, "eth_getTransactionCount", func() (uint64, error) { return instrument2(ic.m, "eth_getTransactionCount", func() (uint64, error) {
return ic.c.PendingNonceAt(ctx, account) return ic.c.PendingNonceAt(ctx, account)
}) })
} }
func (ic *InstrumentedClient) PendingTransactionCount(ctx context.Context) (uint, error) { func (ic *InstrumentedClient) PendingTransactionCount(ctx context.Context) (uint, error) {
return instrument2[uint](ic.m, "eth_getBlockTransactionCountByNumber", func() (uint, error) { return instrument2(ic.m, "eth_getBlockTransactionCountByNumber", func() (uint, error) {
return ic.c.PendingTransactionCount(ctx) return ic.c.PendingTransactionCount(ctx)
}) })
} }
func (ic *InstrumentedClient) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { func (ic *InstrumentedClient) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) {
return instrument2[[]byte](ic.m, "eth_call", func() ([]byte, error) { return instrument2(ic.m, "eth_call", func() ([]byte, error) {
return ic.c.CallContract(ctx, msg, blockNumber) return ic.c.CallContract(ctx, msg, blockNumber)
}) })
} }
func (ic *InstrumentedClient) CallContractAtHash(ctx context.Context, msg ethereum.CallMsg, blockHash common.Hash) ([]byte, error) { func (ic *InstrumentedClient) CallContractAtHash(ctx context.Context, msg ethereum.CallMsg, blockHash common.Hash) ([]byte, error) {
return instrument2[[]byte](ic.m, "eth_call", func() ([]byte, error) { return instrument2(ic.m, "eth_call", func() ([]byte, error) {
return ic.c.CallContractAtHash(ctx, msg, blockHash) return ic.c.CallContractAtHash(ctx, msg, blockHash)
}) })
} }
func (ic *InstrumentedClient) PendingCallContract(ctx context.Context, msg ethereum.CallMsg) ([]byte, error) { func (ic *InstrumentedClient) PendingCallContract(ctx context.Context, msg ethereum.CallMsg) ([]byte, error) {
return instrument2[[]byte](ic.m, "eth_call", func() ([]byte, error) { return instrument2(ic.m, "eth_call", func() ([]byte, error) {
return ic.c.PendingCallContract(ctx, msg) return ic.c.PendingCallContract(ctx, msg)
}) })
} }
func (ic *InstrumentedClient) SuggestGasPrice(ctx context.Context) (*big.Int, error) { func (ic *InstrumentedClient) SuggestGasPrice(ctx context.Context) (*big.Int, error) {
return instrument2[*big.Int](ic.m, "eth_gasPrice", func() (*big.Int, error) { return instrument2(ic.m, "eth_gasPrice", func() (*big.Int, error) {
return ic.c.SuggestGasPrice(ctx) return ic.c.SuggestGasPrice(ctx)
}) })
} }
func (ic *InstrumentedClient) SuggestGasTipCap(ctx context.Context) (*big.Int, error) { func (ic *InstrumentedClient) SuggestGasTipCap(ctx context.Context) (*big.Int, error) {
return instrument2[*big.Int](ic.m, "eth_maxPriorityFeePerGas", func() (*big.Int, error) { return instrument2(ic.m, "eth_maxPriorityFeePerGas", func() (*big.Int, error) {
return ic.c.SuggestGasPrice(ctx) return ic.c.SuggestGasPrice(ctx)
}) })
} }
func (ic *InstrumentedClient) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error) { func (ic *InstrumentedClient) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error) {
return instrument2[uint64](ic.m, "eth_estimateGas", func() (uint64, error) { return instrument2(ic.m, "eth_estimateGas", func() (uint64, error) {
return ic.c.EstimateGas(ctx, msg) return ic.c.EstimateGas(ctx, msg)
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment