Skip to content

Commit 0b5de6e

Browse files
Merge pull request #170 from moonwell-fi/test/temporal-governor
Test/temporal governor
2 parents 3566939 + 4634380 commit 0b5de6e

17 files changed

+801
-185
lines changed

.github/workflows/invariant.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
uses: ./.github/actions
1818

1919
- name: Invariant Test Contracts
20-
run: time forge test -vvv --match-contract xWELLOwnerHandler
20+
run: time forge test -vvv --match-contract Invariant

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@
1414
[submodule "lib/openzeppelin-contracts-upgradeable"]
1515
path = lib/openzeppelin-contracts-upgradeable
1616
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
17+
[submodule "lib/wormhole"]
18+
path = lib/wormhole
19+
url = https://github.com/wormhole-foundation/wormhole

foundry.toml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ evm_version = 'paris' # lock to paris to prevent use of push0 opcode which is no
1010
optimizer_runs = 1
1111
rpc_storage_caching = { chains = "all", endpoints = "all" }
1212

13+
[fuzz]
14+
runs = 1
15+
1316
[rpc_endpoints]
1417
localhost = "http://127.0.0.1:8545"
1518
moonriver = "https://rpc.api.moonriver.moonbeam.network"

lib/wormhole

Submodule wormhole added at aa22a2b

remappings.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
@openzeppelin-contracts/=lib/openzeppelin-contracts/
33
@openzeppelin/=lib/openzeppelin-contracts/
44
@openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/
5+
@wormhole/=lib/wormhole/ethereum/contracts/
56
@protocol=src/
67
@test=test/
78
@proposals=src/proposals/
89
@utils/=utils/
9-
@zelt/=lib/zelt/
10+
@zelt/=lib/zelt/

script/DeployTokenSale.s.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ contract DeployTokenSale is Script {
2828
vm.startBroadcast(PRIVATE_KEY);
2929

3030
address implementation = deployCode(
31-
"TokenSaleDistributor.sol:TokenSaleDistributor"
31+
"artifacts/foundry/TokenSaleDistributor.sol/TokenSaleDistributor.json"
3232
);
3333

3434
address proxy = deployCode(
35-
"TokenSaleDistributorProxy.sol:TokenSaleDistributorProxy"
35+
"artifacts/foundry/TokenSaleDistributorProxy.sol/TokenSaleDistributorProxy.json"
3636
);
3737

3838
ITokenSaleDistributorProxy(proxy).setPendingImplementation(

src/governance/multichain/MultichainGovernorDeploy.sol

+8-4
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ contract MultichainGovernorDeploy is Test {
167167
address proxyAdmin
168168
) public returns (address proxy, address implementation) {
169169
// deploy mock implementation
170-
implementation = deployCode("MockStakedWell.sol:MockStakedWell");
170+
implementation = deployCode(
171+
"artifacts/foundry/MockStakedWell.sol/MockStakedWell.json"
172+
);
171173

172174
// generate init calldata
173175
bytes memory initData = abi.encodeWithSignature(
@@ -207,7 +209,9 @@ contract MultichainGovernorDeploy is Test {
207209
address proxyAdmin
208210
) public returns (address proxy, address implementation) {
209211
// deploy actual stkWELL implementation for Base
210-
implementation = deployCode("StakedWell.sol:StakedWell");
212+
implementation = deployCode(
213+
"artifacts/foundry/StakedWell.sol/StakedWell.json"
214+
);
211215

212216
// generate init calldata
213217
bytes memory initData = abi.encodeWithSignature(
@@ -246,11 +250,11 @@ contract MultichainGovernorDeploy is Test {
246250
)
247251
{
248252
ecosystemReserveImplementation = deployCode(
249-
"EcosystemReserve.sol:EcosystemReserve"
253+
"artifacts/foundry/EcosystemReserve.sol/EcosystemReserve.json"
250254
);
251255

252256
ecosystemReserveController = deployCode(
253-
"EcosystemReserveController.sol:EcosystemReserveController"
257+
"artifacts/foundry/EcosystemReserveController.sol/EcosystemReserveController.json"
254258
);
255259

256260
ecosystemReserveProxy = address(

src/proposals/mips/mip-m23/mip-m23.sol

+1-10
Original file line numberDiff line numberDiff line change
@@ -386,19 +386,10 @@ contract mipm23 is Configs, HybridProposal, MultichainGovernorDeploy {
386386
}
387387

388388
function run(Addresses addresses, address) public override {
389-
vm.selectFork(moonbeamForkId);
390-
391-
_runMoonbeamArtemisGovernor(
392-
addresses.getAddress("WORMHOLE_CORE"),
393-
addresses.getAddress("ARTEMIS_GOVERNOR"),
394-
addresses.getAddress("WELL"),
395-
address(1000000000)
396-
);
397-
398389
vm.selectFork(baseForkId);
399390

400391
address temporalGovernor = addresses.getAddress("TEMPORAL_GOVERNOR");
401-
_runBase(temporalGovernor);
392+
_runBase(addresses, temporalGovernor);
402393

403394
// switch back to the moonbeam fork so we can run the validations
404395
vm.selectFork(primaryForkId());

src/proposals/mips/mip-m24/mip-m24.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ contract mipm24 is HybridProposal, MultichainGovernorDeploy {
187187
vm.selectFork(baseForkId);
188188

189189
address temporalGovernor = addresses.getAddress("TEMPORAL_GOVERNOR");
190-
_runBase(temporalGovernor);
190+
_runBase(addresses, temporalGovernor);
191191

192192
// switch back to the moonbeam fork so we can run the validations
193193
vm.selectFork(moonbeamForkId);

0 commit comments

Comments
 (0)