Skip to content

Commit

Permalink
Update Foundry docs (#1105)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericglau authored Dec 5, 2024
1 parent 1824f94 commit 7bdb777
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
28 changes: 28 additions & 0 deletions docs/modules/ROOT/pages/foundry/pages/foundry-upgrades.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,34 @@ Set the following in `remappings.txt`:

NOTE: Use `LegacyUpgrades.sol` instead of `Upgrades.sol` to upgrade existing deployments that were created with OpenZeppelin Contracts v4.

=== Optional: Alternative installation methods

==== NPM

Follow the steps above, but instead of running `forge install OpenZeppelin/openzeppelin-foundry-upgrades`, use this command instead:
[source,console]
----
npm install @openzeppelin/foundry-upgrades
----

Then add the following additional lines to `remappings.txt`, in addition to the ones described above:
[source,console]
----
openzeppelin-foundry-upgrades/=node_modules/@openzeppelin/foundry-upgrades/src/
solidity-stringutils/=node_modules/@openzeppelin/foundry-upgrades/lib/solidity-stringutils/
----

==== Soldeer

Follow the steps above, but instead of running `forge install OpenZeppelin/openzeppelin-foundry-upgrades`, use one of the install commands described in https://soldeer.xyz/project/openzeppelin-foundry-upgrades

Then add the following additional lines to `remappings.txt`, in addition to the ones described above (replace `0.3.6` with the version of the plugin that you installed):
[source,console]
----
openzeppelin-foundry-upgrades/=dependencies/openzeppelin-foundry-upgrades-0.3.6/src/
solidity-stringutils/=dependencies/openzeppelin-foundry-upgrades-0.3.6/lib/solidity-stringutils/
----

== Foundry Requirements

This library requires https://github.com/foundry-rs/forge-std[forge-std] version 1.8.0 or higher.
Expand Down

0 comments on commit 7bdb777

Please sign in to comment.