Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
f5591ca6
Unverified
Commit
f5591ca6
authored
Oct 26, 2024
by
Delweng
Committed by
GitHub
Oct 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-service/client: rm unnecessary type arguments (#12651)
Signed-off-by:
jsvisa
<
delweng@gmail.com
>
parent
44f814ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
client.go
op-service/client/client.go
+28
-28
No files found.
op-service/client/client.go
View file @
f5591ca6
...
...
@@ -79,43 +79,43 @@ func (ic *InstrumentedClient) RPC() RPC {
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
...
...
@@ -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
)
{
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
...
...
@@ -160,37 +160,37 @@ func (ic *InstrumentedClient) SubscribeNewHead(ctx context.Context, ch chan<- *t
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
...
...
@@ -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
)
{
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
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
)
})
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment