Skip to content

Commit

Permalink
Swap owner (#16)
Browse files Browse the repository at this point in the history
* swap owner

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* executed
  • Loading branch information
hujw77 authored Sep 11, 2024
1 parent 29eb121 commit 37b1d8c
Show file tree
Hide file tree
Showing 13 changed files with 1,410 additions and 254 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/sphinx.dry-run.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Sphinx Dry Run
env:
SPHINX_API_KEY: ${{ secrets.SPHINX_API_KEY }}
BLAST_KEY: ${{ secrets.BLAST_KEY }}

on:
pull_request:
Expand All @@ -14,13 +15,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Install Sphinx Solidity Library
run: yarn sphinx install
# - name: Install Sphinx Solidity Library
# run: yarn sphinx install
- name: Dry Run
run: npx sphinx propose ./script/Proposal.s.sol --dry-run --networks mainnets
run: npx sphinx propose ./script/Proposal.s.sol --dry-run --networks mainnets --targetContract Proposal
6 changes: 4 additions & 2 deletions .github/workflows/sphinx.propose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Install Sphinx Solidity Library
run: yarn sphinx install
# - name: Install Sphinx Solidity Library
# run: yarn sphinx install
- name: Propose
run: npx sphinx propose ./script/Proposal.s.sol --confirm --networks mainnets
7 changes: 4 additions & 3 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ out = "out"
script = "script"
cache = true
cache_path = "cache"
# build_info = true
# build_info_path = "out/build-info"
build_info = true
build_info_path = "out/build-info"
libs = ["lib"]
sender = "0xD70A2e6eACbdeDA77a5d4bBAE3bC70239A0e088f"
force = false
Expand All @@ -25,6 +25,7 @@ fs_permissions = [
{ "access" = "read", "path" = "./lib/safe-deployments/src/assets/" },
{ "access" = "read", "path" = "./sphinx.lock" },
]
allow_paths = ["../.."]

[rpc_endpoints]
## testnets
Expand All @@ -40,5 +41,5 @@ darwinia = "https://darwinia-rpc.itering.io"
crab = "https://crab-rpc.itering.io"
arbitrum = "https://arb1.arbitrum.io/rpc"
blast = "https://rpc.blast.io"
polygon = "https://rpc.ankr.com/polygon"
polygon = "https://polygon-mainnet.blastapi.io/${BLAST_KEY}"
moonbeam = "https://rpc.api.moonbeam.network"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"devDependencies": {
"@hujw77/plugins": "0.1.13"
"@hujw77/plugins": "0.1.24"
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"signer": "0x0f14341a7f464320319025540e8fe48ad0fe5aec",
"signature": "0xa3f888c1f2bbfc2ee69f68d27a08d739215958127b6439d81422322a4596f3d23740cff6f14ba3bc67a9dd680becb3e0f474a6884f9657d8ae48d028d399c4031c"
},
{
"signer": "0x9F33a4809aA708d7a399fedBa514e0A0d15EfA85",
"signature": "0x0c620afddb243a63727e88f166730d718232616db408fdc1d0edf25794f30218103455063ec59a14c908be5d4d1469518ae09a982b761012d0da19cb2723e6ac1c"
},
{
"signer": "0x52386BE2397e8EAc26298F733b390684203fB580",
"signature": "0x755928105f2ecff919bfc061a9fe52412fe5e4d9af85ad05114991781c21dd67469658cd4684d36b5a773490abffe3d794dac5585ef4bbb3422713bbd47e9ff41c"
}
]

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"signer": "0x0f14341a7f464320319025540e8fe48ad0fe5aec",
"signature": "0xc73d36b606e6ade0b7b5029e3c2752234648b80d816bcdc57bd59ec9aa1c07b2588fbfd418311b884d7cca8b5dd6f4bf97b4871948fd9c317c0d2fda1816a73e1c"
},
{
"signer": "0x9F33a4809aA708d7a399fedBa514e0A0d15EfA85",
"signature": "0xbd797588d068b8d89ca3ee597c1ebbc2f789cd5cc0a827e8f7b3d69e56b830e6427a55c2ca5e9e0c6ee0eeeac7305d6000ec05504151297014e461f5c22db2691b"
},
{
"signer": "0x53405FB4d71591E33fe07bFbC90bD82E65720ad0",
"signature": "0xae4f5dbe5322509988c43ee5d78a2db495f70a10b301d0a8e0af17098eb6c2786d4bff9766d1697355d06749eee9de51dd0cc3f49764d9f1e3267526e27da40a1c"
}
]
4 changes: 2 additions & 2 deletions script/Proposal.s.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "./msgport/Connect.s.sol";
import "./self/SwapOwner.s.sol";

contract Proposal is ConnectScript {}
contract Proposal is SwapOwnerScript {}
2 changes: 1 addition & 1 deletion script/common/Base.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ abstract contract Base is Script, Sphinx, SphinxConstants {
function configureSphinx() public override {
sphinxConfig.projectName = "RING-DAO";
sphinxConfig.testnets = ["sepolia", "arbitrum_sepolia"];
sphinxConfig.mainnets = ["ethereum", "darwinia"];
sphinxConfig.mainnets = ["ethereum", "darwinia", "arbitrum", "blast", "crab", "polygon", "moonbeam"];
}

function CREATE3() public returns (address create3) {
Expand Down
19 changes: 19 additions & 0 deletions script/self/SwapOwner.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import {Base} from "../common/Base.sol";

interface ISafe {
function swapOwner(address prevOwner, address oldOwner, address newOwner) external;
}

contract SwapOwnerScript is Base {
address aki = 0x53405FB4d71591E33fe07bFbC90bD82E65720ad0;
address bear = 0x5b7544b3f6aBd9E03Fba494796B1eE6F9543E2e4;

function run() public sphinx {
address self = safeAddress();

ISafe(self).swapOwner(0x52386BE2397e8EAc26298F733b390684203fB580, aki, bear);
}
}
Loading

0 comments on commit 37b1d8c

Please sign in to comment.