1
0
forked from mico/idle_moloch
idle_moloch/script/RaidGeld.s.sol
2024-10-27 22:25:19 +05:30

31 lines
842 B
Solidity

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {Script, console} from "forge-std/Script.sol";
import {RaidGeld} from "../src/RaidGeld.sol";
import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";
contract RaidGeldScript is Script {
function setUp() public {}
function run() public {
vm.startBroadcast();
// Deploy the upgradeable contract
address _proxyAddress = Upgrades.deployTransparentProxy(
"RaidGeld.sol",
msg.sender,
abi.encodeCall(RaidGeld.initialize, (msg.sender))
);
// Get the implementation address
address implementationAddress = Upgrades.getImplementationAddress(
_proxyAddress
);
vm.stopBroadcast();
return (implementationAddress, _proxyAddress);
}
}