Download script/Deploy.s.sol from Sahek/ethan: direct link, hf CLI and curl.
- Browser
- Download file 1.48 kB
-
https://huggingface.co/datasets/Sahek/ethan/resolve/main/script/Deploy.s.sol
- Command line
-
hf download hf://datasets/Sahek/ethan/script/Deploy.s.sol
-
curl -L -o Deploy.s.sol https://huggingface.co/datasets/Sahek/ethan/resolve/main/script/Deploy.s.sol
1.48 kB
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.26; | |
| import {Script, console} from "forge-std/Script.sol"; | |
| import {Constitution} from "../src/Constitution.sol"; | |
| import {ProposalRegistry} from "../src/ProposalRegistry.sol"; | |
| import {Router} from "../src/Router.sol"; | |
| contract Deploy is Script { | |
| function run() external { | |
| address usdc = vm.envAddress("USDC"); | |
| address aavePool = vm.envAddress("AAVE_POOL"); | |
| address aToken = vm.envAddress("A_TOKEN"); | |
| address beneficiary = vm.envAddress("BENEFICIARY"); | |
| address guardian = vm.envAddress("GUARDIAN"); | |
| uint256 maxBps = vm.envUint("MAX_BPS"); | |
| uint256 absoluteCap = vm.envUint("ABSOLUTE_CAP"); | |
| uint256 cooldown = vm.envUint("COOLDOWN"); | |
| uint256 timelock = vm.envUint("TIMELOCK"); | |
| uint256 window = vm.envUint("EXECUTION_WINDOW"); | |
| vm.startBroadcast(); | |
| Constitution constitution = | |
| new Constitution(usdc, aavePool, aToken, beneficiary, maxBps, absoluteCap, cooldown, timelock, window); | |
| ProposalRegistry registry = new ProposalRegistry(constitution, guardian); | |
| Router router = new Router(constitution, registry); | |
| registry.setRouter(address(router)); | |
| vm.stopBroadcast(); | |
| console.log("Constitution: ", address(constitution)); | |
| console.log("ProposalRegistry:", address(registry)); | |
| console.log("Router (treasury):", address(router)); | |
| } | |
| } |