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: book/src/framework/verify.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# Verifying Contracts
2
2
3
+
## Using Foundry
4
+
3
5
You need to install [Foundry](https://book.getfoundry.sh/getting-started/installation) first, `forge` should be available in your `$PATH`.
4
6
5
7
Check out our [example](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/framework/examples/myproject/verify_test.go) of programmatically verifying contracts using `Blockscout` and `Foundry`. You'll need to provide:
@@ -17,3 +19,42 @@ Check out our [example](https://github.com/smartcontractkit/chainlink-testing-fr
17
19
)
18
20
require.NoError(t, err)
19
21
```
22
+
23
+
## Using Seth
24
+
25
+
If you don't want to verify contracts or you can't or don't want to use `Blockscout` not all is lost.
26
+
27
+
### With CLI
28
+
29
+
You can use `Seth` to trace your transaction both from your Go code or from [the CLI](https://smartcontractkit.github.io/chainlink-testing-framework/libs/seth.html#single-transaction-tracing). Remember that you need to adjust `seth.toml` to point to gethwrappers or ABIs of contracts you want to trace.
30
+
31
+
### Programatic
32
+
33
+
If you want to use from Go code, you need to have a couple of things in mind:
34
+
* you need to point Seth to your Gethwrappers, so that it can extract ABIs from them
35
+
* you need to decide, when it should trace transactions: reverted, none or all (by default, only reverted ones are traced)
36
+
* you need to decide, where to output tracing results: console, dot graphs, json files (be default, to console)
37
+
38
+
If printing to console remember to set `Seth` log level to `debug`, otherwise you won't see anything relevant printed:
For more information about configuring `Seth` please read about [TOML config](https://smartcontractkit.github.io/chainlink-testing-framework/libs/seth.html#toml-configuration) and [programatic builder](https://smartcontractkit.github.io/chainlink-testing-framework/libs/seth.html#config).
0 commit comments