Skip to content

Commit b60638b

Browse files
committed
Fix TUP deployment
1 parent 7460bf4 commit b60638b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/foundry/stylus/DeployAddWasmCacheManagerAction.s.sol

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pragma solidity 0.8.16;
33

44
import {DeploymentHelpersScript} from "../helper/DeploymentHelpers.s.sol";
55
import {AddWasmCacheManagerAction} from "../../../contracts/child-chain/stylus/AddWasmCacheManagerAction.sol";
6+
import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
67

78
interface ICacheManager {
89
function initialize(uint64 initCacheSize, uint64 initDecay) external;
@@ -23,10 +24,10 @@ contract DeployAddWasmCacheManagerActionScript is DeploymentHelpersScript {
2324
address cacheManagerLogic = deployBytecodeFromJSON(
2425
"/node_modules/@arbitrum/nitro-contracts-2.0.0/build/contracts/src/chain/CacheManager.sol/CacheManager.json"
2526
);
26-
address cacheManagerProxy = deployBytecodeWithConstructorFromJSON(
27-
"/node_modules/@openzeppelin/contracts/build/contracts/TransparentUpgradeableProxy.json",
28-
abi.encode(cacheManagerLogic, vm.envAddress("CACHE_MANAGER_PROXY_ADMIN_ADDRESS"), "0x")
27+
address cacheManagerProxy = address(
28+
new TransparentUpgradeableProxy(cacheManagerLogic, vm.envAddress("CACHE_MANAGER_PROXY_ADMIN_ADDRESS"), "")
2929
);
30+
3031
ICacheManager cacheManager = ICacheManager(cacheManagerProxy);
3132
cacheManager.initialize(uint64(vm.envUint("INIT_CACHE_SIZE")), uint64(vm.envUint("INIT_DECAY")));
3233

0 commit comments

Comments
 (0)