diff --git a/foundry.toml b/foundry.toml index 43f57e2..336264c 100644 --- a/foundry.toml +++ b/foundry.toml @@ -8,7 +8,7 @@ evm_version = "shanghai" [rpc_endpoints] sepolia = "${SEPOLIA_RPC_URL}" -taiko= "${TAIKO_RPC_URL}" +taiko = "${TAIKO_RPC_URL}" diff --git a/script/OptimisticTokenVotingPlugin.s.sol b/script/OptimisticTokenVotingPlugin.s.sol index 085f6f9..65f766c 100644 --- a/script/OptimisticTokenVotingPlugin.s.sol +++ b/script/OptimisticTokenVotingPlugin.s.sol @@ -2,7 +2,6 @@ pragma solidity ^0.8.13; import {Script, console2} from "forge-std/Script.sol"; -import {VetoToken} from "../src/VetoToken.sol"; import {OptimisticTokenVotingPluginSetup} from "../src/OptimisticTokenVotingPluginSetup.sol"; import {OptimisticTokenVotingPlugin} from "../src/OptimisticTokenVotingPlugin.sol"; import {GovernanceERC20} from "@aragon/osx/token/ERC20/governance/GovernanceERC20.sol"; @@ -89,9 +88,6 @@ contract Deploy is Script { // 5. Deploying the DAO daoFactory.createDao(daoSettings, pluginSettings); - // Deploy the ERC-20 token - VetoToken _token = new VetoToken(); - vm.stopBroadcast(); } } \ No newline at end of file diff --git a/script/VetoToken.s.sol b/script/VetoToken.s.sol new file mode 100644 index 0000000..7c28d75 --- /dev/null +++ b/script/VetoToken.s.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import {Script, console2} from "forge-std/Script.sol"; +import {VetoToken} from "../src/VetoToken.sol"; + +contract Deploy is Script { + function run() public { + // 0. Setting up foundry + uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); + vm.startBroadcast(deployerPrivateKey); + + // 1. Deploying the token + new VetoToken(); + + vm.stopBroadcast(); + } +} \ No newline at end of file diff --git a/script/deployer.sh b/script/deployer.sh new file mode 100755 index 0000000..090b2ca --- /dev/null +++ b/script/deployer.sh @@ -0,0 +1,3 @@ +source .env +forge script script/OptimisticTokenVotingPlugin.s.sol --rpc-url $SEPOLIA_RPC_URL +forge script script/VetoToken.s.sol --rpc-url $TAIKO_RPC_URL \ No newline at end of file