Skip to content

Commit 79c69d6

Browse files
authored
Update Foundry Upgrades submodule to v0.2.1 (#995)
1 parent 0a68abd commit 79c69d6

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

docs/modules/ROOT/pages/foundry/pages/foundry-defender.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@ See xref:foundry-upgrades#installion[Using with Foundry - Installation].
1212
== Prerequisites
1313
1. Install https://nodejs.org/[Node.js].
1414

15-
2. Configure your `foundry.toml` to include build info and storage layout:
15+
2. Configure your `foundry.toml` to enable ffi, ast, build info and storage layout:
1616
[source,toml]
1717
----
1818
[profile.default]
19+
ffi = true
20+
ast = true
1921
build_info = true
2022
extra_output = ["storageLayout"]
2123
----
2224

2325
NOTE: Metadata must also be included in the compiler output, which it is by default.
2426

25-
3. Include `--ffi` in your `forge script` or `forge test` command.
26-
27-
4. Set the following environment variables in your `.env` file at your project root, using your Team API key and secret from OpenZeppelin Defender:
27+
[start=3]
28+
3. Set the following environment variables in your `.env` file at your project root, using your Team API key and secret from OpenZeppelin Defender:
2829
[source]
2930
----
3031
DEFENDER_KEY=<Your API key>

docs/modules/ROOT/pages/foundry/pages/foundry-upgrades.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,20 @@ If you want to be able to run upgrade safety checks, the following are needed:
4141

4242
1. Install https://nodejs.org/[Node.js].
4343

44-
2. Configure your `foundry.toml` to include build info and storage layout:
44+
2. Configure your `foundry.toml` to enable ffi, ast, build info and storage layout:
4545
[source,toml]
4646
----
4747
[profile.default]
48+
ffi = true
49+
ast = true
4850
build_info = true
4951
extra_output = ["storageLayout"]
5052
----
5153

54+
[start=3]
5255
3. If you are upgrading your contract from a previous version, add the `@custom:oz-upgrades-from <reference>` annotation to the new version of your contract according to https://docs.openzeppelin.com/upgrades-plugins/1.x/api-core#define-reference-contracts[Define Reference Contracts] or specify the `referenceContract` option when calling the library's functions.
5356

54-
4. Run `forge clean` before running your Foundry script or tests.
55-
56-
5. Include `--ffi` in your `forge script` or `forge test` command.
57+
4. Run `forge clean` before running your Foundry script or tests, or include the `--force` option when running `forge script` or `forge test`.
5758

5859
If you do not want to run upgrade safety checks, you can skip the above steps and use the `unsafeSkipAllChecks` option when calling the library's functions. Note that this is a dangerous option meant to be used as a last resort.
5960

0 commit comments

Comments
 (0)