You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,15 +72,20 @@ Once you have it installed you can continue to [validate](#validate-dvf).
72
72
To successfully create DVFs for on-chain smart contracts, you need access to the following APIs:
73
73
74
74
1. An RPC archive node for the desired chain ID.
75
-
2. (Optional) A [Blockscout](https://blockscout.com/) API key.
75
+
2. (Optional) A [Blockscout](https://blockscout.com/)Pro API key.
76
76
3. (Optional) An [Etherscan](https://etherscan.io/apis) API key.
77
77
78
78
**Please note the following restrictions/requirements**:
79
79
80
-
1. The Blockscout API is required to fetch the transaction hashes of a contract. This API can only be omitted if you fetch transactions based on events.
81
-
2. The Etherscan API is optional but can be used instead of Blockscout to fetch the deployment transaction of a contract.
82
-
3. Your RPC node **must** support either `debug_traceTransaction` or `trace_transaction`.
83
-
4. For faster execution, your RPC node **may** support `debug_traceTransaction` with [opcode logger](https://geth.ethereum.org/docs/developers/evm-tracing/built-in-tracers#struct-opcode-logger) enabled. Otherwise, `dv` will locally re-execute all transactions which might increase execution time.
80
+
1. Etherscan and Blockscout API keys are optional for fetching the deployment transaction of a contract automatically.
81
+
2. Your RPC node **must** support either `debug_traceTransaction` or `trace_transaction`.
82
+
3. For fetching transactions, one of the following conditions must be met:
83
+
84
+
- Recommended: Your RPC supports the `trace_filter` endpoint.
85
+
- Recommended if contract emits events in all state-changing functions: You are fetching transactions based on events (see [Initialization by event topics](#initialization-by-event-topics)).
86
+
- Not recommended: You added a valid Blockscout Pro API key to your config (please be aware that Blockscout might not fetch all internal transactions of a contract).
87
+
88
+
4. For faster execution, your RPC node **may** support `debug_traceTransaction` with [opcode logger](https://geth.ethereum.org/docs/developers/evm-tracing/built-in-tracers#struct-opcode-logger) enabled. Otherwise, `dv` will locally re-execute all transactions which might increase execution time and can cause a crash when not enough memory is available.
84
89
5. For faster execution, your RPC node **may** support `debug_storageRangeAt`.
85
90
86
91
To run `dv`, you can either [build from source](#building-from-source) it or use the pre-configured [Docker](#using-docker) image.
@@ -539,10 +544,10 @@ Please note that Foundry's `forge clone` provides similar functionality but is c
539
544
540
545
### Initialization by event topics
541
546
542
-
`dv` gets the transactions a contract has been involved in from third party APIs (namely, Blockscout). There are certain cases, in which this is not preferable:
547
+
`dv` gets the transactions a contract has been involved in from the `trace_filter` endpoint of your RPC or third party APIs (namely, Blockscout). This might not work in the following cases:
543
548
544
-
-You don't trust the Blockscout API of the chain you are trying to validate a contract on (this will be solved with a future update).
545
-
- You are working on a chain that does not have a Blockscout API or its Blockscout API does not work as intended.
549
+
-The `trace_filter`endpoint is unavailable.
550
+
- You don't trust the Blockscout API to deliver all existing transactions or Blockscout is unavailable for a certain chain.
546
551
- Retrieving all transactions of a contract is too much and you are not interested in certain transactions (think of, e.g., ERC-20 transfers of the USDT contract).
547
552
548
553
If the contract you are validating emits events every time a security-relevant storage variable is written, you can use the `--eventtopics` argument if the `init` command to specify that only transactions in which the given events have been emitted are evaluated:
@@ -620,7 +625,6 @@ This section will be updated soon.
620
625
- 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)).
621
626
- The RPC endpoints automatically parsed in `dv generate-config` are not guaranteed to be compatible.
622
627
- As detailed [above](#dvf-creation), many public RPCs are not or only partially supported for DVF creation.
623
-
- Finding the deployment transaction of a contract currently requires either Blockscout or Etherscan API keys to collect all relevant information.
624
628
- Contracts performing `delegatecall` to more than one other contract are currently not supported.
625
629
- Multiple contracts with the same name compiled with different compiler versions in one project are not supported.
626
630
- Multi-dimensional mappings with static keys (e.g., `mapping[1][2]`) can currently not be decoded.
0 commit comments