-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opCodeFinder #1
base: main
Are you sure you want to change the base?
opCodeFinder #1
Conversation
26bcf7f
to
60e0253
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Please merge.
Actually it seems to panic in some cases:
|
ad2625e
to
da224ed
Compare
I reproduced the error and got the transaction hash that caused the issue: lee@linux01:~$ curl -X POST -H "Content-Type: application/json" --data '{
"jsonrpc": "2.0",
"method": "debug_traceTransaction",
"params": [
"0x518c932989883b0bf9dabb9e904397d5f3d6561ef776ceb5dd8a1de5533212cb",
{ "tracer": "callTracer" }
],
"id": 1
}' https://rpc.ankr.com/xdc | jq Response: {
"id": "1",
"jsonrpc": "2.0",
"error": {
"code": -32053,
"message": "API key is not allowed to access method"
}
} And in another RPC node: lee@linux01:~$ curl -X POST -H "Content-Type: application/json" --data '{
"jsonrpc": "2.0",
"method": "debug_traceTransaction",
"params": [
"0x518c932989883b0bf9dabb9e904397d5f3d6561ef776ceb5dd8a1de5533212cb",
{ "tracer": "callTracer" }
],
"id": 1
}' https://earpc.xinfin.network/ | jq Response: {
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "execution timeout"
}
} It seems to be an issue with the node. I haven’t encountered this problem on the private network, so I’ve added code to handle this situation. The code will retry sending the request, record the failed transaction hashes, and skip querying those hashes. If you can provide more information about the node, I can work on finding a complete solution to this issue. |
da224ed
to
9cdbf0b
Compare
5c8bf24
to
d988667
Compare
0a5e34e
to
549be6e
Compare
Overview
opCodeFinder.js
is a Node.js script designed to search for Ethereum contract addresses that contain specific opcodes within a specified block range. The script scans the blockchain for contracts that match the criteria and outputs the resulting contract addresses to a.txt
file.Requirements
Before you can use
opCodeFinder.js
, ensure that you have the following environment set up:web3js
package to interact with the Ethereum blockchain. You can install it using npm:Usage
To run the
opCodeFinder.js
script, use the following command:Example
To search for contracts that include the
PREVRANDAO
opcode on the mainnet, execute the script in your terminal. In this example,72290000
is a block before the PREVRANDAO opcode was introduced.node src\opCodeFinder.js 72290000 latest PREVRANDAO https://rpc.ankr.com/xdc
Parameters
latest
for the most recent block.