-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.0; | ||
|
||
import {Script, console2 as console} from "forge-std/Script.sol"; | ||
import {stdToml} from "forge-std/StdToml.sol"; | ||
|
||
import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol"; | ||
import {Utils} from "./Utils.sol"; | ||
|
||
contract AcceptAdmin is Script { | ||
using stdToml for string; | ||
|
||
// This function should be called by the owner to accept the admin role | ||
function run() public { | ||
console.log("Accept admin Hyperchain"); | ||
Check failure on line 15 in l1-contracts-foundry/script/AcceptAdmin.s.sol GitHub Actions / lint
Check failure on line 15 in l1-contracts-foundry/script/AcceptAdmin.s.sol GitHub Actions / lint
|
||
string memory root = vm.projectRoot(); | ||
string memory path = string.concat(root, "/script-config/config-accept-admin.toml"); | ||
string memory toml = vm.readFile(path); | ||
address admin = toml.readAddress("$.target_addr"); | ||
address governor = toml.readAddress("$.governor"); | ||
console.log(governor); | ||
Check failure on line 21 in l1-contracts-foundry/script/AcceptAdmin.s.sol GitHub Actions / lint
Check failure on line 21 in l1-contracts-foundry/script/AcceptAdmin.s.sol GitHub Actions / lint
|
||
Ownable2Step adminContract = Ownable2Step(admin); | ||
Utils.executeUpgrade(governor, bytes32(0), admin, abi.encodeCall(adminContract.acceptOwnership, ()), 0, 0); | ||
Check failure on line 23 in l1-contracts-foundry/script/AcceptAdmin.s.sol GitHub Actions / lint
Check failure on line 23 in l1-contracts-foundry/script/AcceptAdmin.s.sol GitHub Actions / lint
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6028,7 +6028,7 @@ [email protected]: | |
dependencies: | ||
path-parse "^1.0.6" | ||
|
||
resolve@^1.1.6, resolve@^1.10.0, resolve@^1.22.4, resolve@^1.8.1: | ||
resolve@^1.1.6, resolve@^1.22.4, resolve@^1.8.1: | ||
version "1.22.8" | ||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" | ||
integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== | ||
|