mirror of
https://github.com/logos-messaging/logos-messaging-rlnv2-contract.git
synced 2026-01-24 00:33:08 +00:00
fix: remove upgrade from Deploy.s.sol
This commit is contained in:
parent
43c43c03bc
commit
e6d8631099
@ -17,13 +17,6 @@ contract Deploy is BaseScript {
|
||||
address proxy = address(new ERC1967Proxy(impl, data));
|
||||
w = WakuRlnV2(proxy);
|
||||
}
|
||||
|
||||
function upgrade(address proxy, address newImpl) public {
|
||||
vm.startBroadcast(msg.sender);
|
||||
bytes memory data;
|
||||
UUPSUpgradeable(proxy).upgradeToAndCall(newImpl, data);
|
||||
vm.stopBroadcast();
|
||||
}
|
||||
}
|
||||
|
||||
contract DeployLibs is BaseScript {
|
||||
|
||||
@ -2,15 +2,13 @@
|
||||
pragma solidity >=0.8.19 <0.9.0;
|
||||
|
||||
import { Test } from "forge-std/Test.sol";
|
||||
import { stdStorage, StdStorage } from "forge-std/Test.sol";
|
||||
import { Deploy } from "../script/Deploy.s.sol";
|
||||
import { DeploymentConfig } from "../script/DeploymentConfig.s.sol";
|
||||
import "../src/WakuRlnV2.sol"; // solhint-disable-line
|
||||
import { PoseidonT3 } from "poseidon-solidity/PoseidonT3.sol";
|
||||
import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
|
||||
|
||||
contract WakuRlnV2Test is Test {
|
||||
using stdStorage for StdStorage;
|
||||
|
||||
WakuRlnV2 internal w;
|
||||
address internal impl;
|
||||
DeploymentConfig internal deploymentConfig;
|
||||
@ -192,8 +190,8 @@ contract WakuRlnV2Test is Test {
|
||||
|
||||
function test__Upgrade() external {
|
||||
address newImplementation = address(new WakuRlnV2());
|
||||
Deploy deployment = new Deploy();
|
||||
deployment.upgrade(address(w), newImplementation);
|
||||
bytes memory data;
|
||||
UUPSUpgradeable(address(w)).upgradeToAndCall(newImplementation, data);
|
||||
// ensure that the implementation is set correctly
|
||||
// ref:
|
||||
// solhint-disable-next-line
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user