Skip to content

Commit 7447b3b

Browse files
authored
Blockscout Migration (#9)
- Switch to Blockscout as a data source - Change configuration format - Rebuild cache
1 parent 98bf0be commit 7447b3b

File tree

432 files changed

+903
-508
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

432 files changed

+903
-508
lines changed

.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ jobs:
6060

6161
- name: Run tests
6262
env:
63-
MAINNET_RPC: ${{ secrets.MAINNET_RPC }}
64-
ETHERSCAN_TEST_API_URL: ${{ secrets.ETHERSCAN_TEST_API_URL }}
63+
BLOCKSCOUT_API_KEY: ${{ secrets.BLOCKSCOUT_API_KEY }}
64+
BLOCKSCOUT_TEST_API_URL: ${{ secrets.BLOCKSCOUT_TEST_API_URL}}
6565
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
66-
BITQUERY_API_URL: ${{ secrets.BITQUERY_API_URL }}
67-
BITQUERY_API_KEY: ${{ secrets.BITQUERY_API_KEY }}
66+
ETHERSCAN_TEST_API_URL: ${{ secrets.ETHERSCAN_TEST_API_URL }}
67+
MAINNET_RPC: ${{ secrets.MAINNET_RPC }}
6868
SIGNER_ADDRESS: ${{ secrets.SIGNER_ADDRESS }}
6969
SIGNER_SECRET_KEY: ${{ secrets.SIGNER_SECRET_KEY }}
7070
run: ./tests/ci_tests.sh

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ on_chain_bytecode.txt
88
**/*.swp
99
/*.dvf.json
1010
.env
11+
tests/hardhat/package-lock.json

Cargo.lock

+93-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,4 @@ time = "0.3.36"
6666

6767
[dev-dependencies]
6868
assert_cmd = "2.0.12"
69+
env_logger = "0.11.5"

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ Once you have it installed you can continue to [validate](#validate-dvf).
6868
To successfully create DVFs for on-chain smart contracts, you need access to the following APIs:
6969

7070
1. An RPC archive node for the desired chain ID.
71-
2. (Optional) A [BitQuery](https://bitquery.io/) API key.
71+
2. (Optional) A [Blockscout](https://blockscout.com/) API key.
7272
3. (Optional) An [Etherscan](https://etherscan.io/apis) API key.
7373

7474
**Please note the following restrictions/requirements**:
7575

76-
1. While BitQuery and Etherscan API keys are optional, at least one of them is required to determine the deployment transaction of a contract. If you provide neither, you are limited to local RPC nodes with less than 100 blocks.
77-
2. A BitQuery API key allows for faster execution.
76+
1. While Blockscout and Etherscan API keys are optional, at least one of them is required to determine the deployment transaction of a contract. If you provide neither, you are limited to local RPC nodes with less than 100 blocks.
77+
2. A Blockscout API key allows for faster execution.
7878
3. Your RPC node **must** support either `debug_traceTransaction` or `trace_transaction`.
7979
4. Your RPC node **should** support `debug_traceTransaction` with [opcode logger](https://geth.ethereum.org/docs/developers/evm-tracing/built-in-tracers#struct-opcode-logger) enabled. Otherwise, `dv` won't be able to decode mapping keys.
8080
5. For faster execution, your RPC node **may** support `debug_storageRangeAt`.
@@ -484,7 +484,7 @@ This section will be updated soon.
484484
- Only projects with `solc` version starting from `0.5.13` are supported due to the lack of generated storage layout in older versions (see [solc release 0.5.13](https://github.com/ethereum/solidity/releases/tag/v0.5.13)).
485485
- The RPC endpoints automatically parsed in `dv generate-config` are not guaranteed to be compatible.
486486
- As detailed [above](#dvf-creation), many public RPCs are not or only partially supported for DVF creation.
487-
- Finding the deployment transaction of a contract currently requires either BitQuery or Etherscan API keys to collect all relevant information.
487+
- Finding the deployment transaction of a contract currently requires either Blockscout or Etherscan API keys to collect all relevant information.
488488
- Contracts performing `delegatecall` to more than one other contract are currently not supported.
489489
- `dv update` currently only updates values of existing storage variables in the DVF and does not add newly added storage values.
490490
- Multiple contracts with the same name compiled with different compiler versions in one project are not supported.

docs/config.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ When running the `dvf` command, the default configuration file is expected at `$
88
| `rpc_urls` | Mapping from chain ID to RPC URL |
99
| `dvf_storage` | Folder where DVFs are stored |
1010
| `trusted_signers`: | List of addresses of trusted signers |
11-
| `etherscan_api_key` | Etherscan API Key, free plan sufficient, optional |
12-
| `bitquery_api_key` | Bitquery API Key, free plan sufficient, optional |
11+
| `etherscan_api_key` | Mapping from chain ID to Etherscan API Key, free plan sufficient, optional |
12+
| `blockscout_api_key` | Mapping from chain ID to Blockscout API Key, free plan sufficient, optional |
13+
| `etherscan_test_api_url` | Only for testing, optional |
14+
| `blockscout_test_api_url` | Only for testing, optional |
1315
| `max_blocks_per_event_query` | Number of blocks that can be queried at once in `getLogs`, optional |
1416
| `web3_timeout` | Timeout is seconds for web3 RPC queries, optional |
1517
| `signer` | Configuration on how to sign, optional |

0 commit comments

Comments
 (0)