-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* forge install: forge-std v1.9.1 * forge install: openzeppelin-foundry-upgrades v0.3.1 * forge install: openzeppelin-contracts-upgradeable v5.0.2 * chore: adding instructions for validating upgrade safety between versions * chore: updating the configuration according to instructions here https://docs.openzeppelin.com/upgrades-plugins/1.x/foundry-upgrades * chore: adding v1.0.0 implementation and validation script * chore: adding upgrade script for completion * fix: clarifying file ref * chore: formatting script ref * fix: typos and clarity * fix: typo * fix: clarity and formatting * fix: explicit imports * fix: explicit imports * chore: making upgrade script accept the address of the proxy to upgrade * fix: fixing command * fix: wrapping path in backquotes
- Loading branch information
1 parent
459e7be
commit d9e912e
Showing
10 changed files
with
428 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ | |
[submodule "lib/bread-token-v2"] | ||
path = lib/bread-token-v2 | ||
url = [email protected]:BreadchainCoop/bread-token-v2.git | ||
[submodule "lib/openzeppelin-foundry-upgrades"] | ||
path = lib/openzeppelin-foundry-upgrades | ||
url = https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule forge-std
updated
15 files
+6 −12 | .github/workflows/ci.yml | |
+3 −1 | .github/workflows/sync.yml | |
+2 −2 | foundry.toml | |
+1 −1 | package.json | |
+1 −1 | src/StdAssertions.sol | |
+17 −8 | src/StdChains.sol | |
+18 −3 | src/StdInvariant.sol | |
+1 −1 | src/StdUtils.sol | |
+131 −6 | src/Vm.sol | |
+401 −382 | src/console.sol | |
+1 −1,555 | src/console2.sol | |
+1 −5 | src/mocks/MockERC721.sol | |
+12 −7 | test/StdChains.t.sol | |
+1 −1 | test/StdCheats.t.sol | |
+2 −2 | test/Vm.t.sol |
Submodule openzeppelin-contracts-upgradeable
updated
14 files
+4 −0 | CHANGELOG.md | |
+1 −1 | README.md | |
+3 −1 | contracts/access/README.adoc | |
+4 −0 | contracts/governance/README.adoc | |
+5 −0 | contracts/metatx/README.adoc | |
+25 −0 | contracts/mocks/Base64DirtyUpgradeable.sol | |
+7 −0 | contracts/mocks/WithInit.sol | |
+2 −2 | contracts/package.json | |
+24 −4 | contracts/utils/README.adoc | |
+3 −3 | docs/modules/ROOT/pages/governance.adoc | |
+1 −1 | lib/openzeppelin-contracts | |
+2 −2 | package-lock.json | |
+1 −1 | package.json | |
+11 −1 | test/utils/Base64.test.js |
Submodule openzeppelin-foundry-upgrades
added at
4cd15f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
pragma solidity ^0.8.20; | ||
|
||
import {Script} from "forge-std/Script.sol"; | ||
import {Options} from "openzeppelin-foundry-upgrades/Options.sol"; | ||
import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; | ||
|
||
contract DeployYieldDistributor is Script { | ||
function run(address proxyAddress) external { | ||
vm.startBroadcast(); | ||
bytes memory data; | ||
Options memory opts; | ||
opts.referenceContract = "v1.0.0/YieldDistributor.sol:YieldDistributor"; | ||
Upgrades.upgradeProxy(proxyAddress, "YieldDistributor.sol:YieldDistributor", data, opts); | ||
vm.stopBroadcast(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
pragma solidity ^0.8.20; | ||
|
||
import {Script} from "forge-std/Script.sol"; | ||
import {Options} from "openzeppelin-foundry-upgrades/Options.sol"; | ||
import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; | ||
import {YieldDistributor} from "../../src/YieldDistributor.sol"; | ||
|
||
contract DeployYieldDistributor is Script { | ||
function run() external { | ||
vm.startBroadcast(); | ||
Options memory opts; | ||
opts.referenceContract = "v1.0.0/YieldDistributor.sol:YieldDistributor"; | ||
Upgrades.validateUpgrade("YieldDistributor.sol:YieldDistributor", opts); | ||
vm.stopBroadcast(); | ||
} | ||
} |
Oops, something went wrong.