Skip to content

Commit

Permalink
Deployed Timelock to Sonic (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
naddison36 authored Jan 14, 2025
1 parent 59b2db0 commit fcc9c85
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build/deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,13 @@
"contracts": {
"TIMELOCK": "0xf817cb3092179083c48c014688D98B72fB61464f"
}
},
"146": {
"executions": {
"001_Timelock": 1736832555
},
"contracts": {
"TIMELOCK": "0x31a91336414d3B955E494E7d485a6B06b55FC8fB"
}
}
}
5 changes: 5 additions & 0 deletions contracts/utils/Addresses.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ library AddressesBase {
// 5/8 multisig
address public constant GOVERNOR = 0x92A19381444A001d62cE67BaFF066fA1111d7202;
}

library AddressesSonic {
// 5/8 multisig
address public constant ADMIN = 0xAdDEA7933Db7d83855786EB43a238111C69B00b6;
}
4 changes: 4 additions & 0 deletions script/deploy/DeployManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import {XOGNGovernanceScript} from "./mainnet/014_xOGNGovernanceScript.sol";

import {DeployTimelockScript} from "./base/001_Timelock.sol";

import {SonicDeployTimelockScript} from "./sonic/001_Timelock.sol";

import {VmSafe} from "forge-std/Vm.sol";

contract DeployManager is Script {
Expand Down Expand Up @@ -79,6 +81,8 @@ contract DeployManager is Script {
_runDeployFile(new XOGNGovernanceScript());
} else if (block.chainid == 8453) {
_runDeployFile(new DeployTimelockScript());
} else if (block.chainid == 146) {
_runDeployFile(new SonicDeployTimelockScript());
}
}

Expand Down
39 changes: 39 additions & 0 deletions script/deploy/sonic/001_Timelock.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

import "../AbstractScript.sol";
import {Vm} from "forge-std/Vm.sol";

import {AddressesSonic} from "contracts/utils/Addresses.sol";

import {Timelock} from "contracts/Timelock.sol";

contract SonicDeployTimelockScript is AbstractScript {
string public constant override DEPLOY_NAME = "001_Timelock";
uint256 public constant override CHAIN_ID = 146;
bool public constant override proposalExecuted = false;

constructor() {}

function _execute() internal override {
console.log("Deploy:");
console.log("------------");

address[] memory proposers = new address[](1);
address[] memory executors = new address[](1);

proposers[0] = AddressesSonic.ADMIN;
executors[0] = AddressesSonic.ADMIN;

// 1. Deploy Timelock
Timelock timelock = new Timelock(
60, // 60s
proposers,
executors
);
_recordDeploy("TIMELOCK", address(timelock));
}

function _fork() internal override {}
}

0 comments on commit fcc9c85

Please sign in to comment.