-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add vip for vtreasury on opmainnet
- Loading branch information
1 parent
8f030a4
commit cc322fa
Showing
5 changed files
with
237 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { makeProposal } from "../../../../src/utils"; | ||
|
||
const TREASURY = "0x104c01EB7b4664551BE6A9bdB26a8C5c6Be7d3da"; | ||
|
||
const vip000 = () => { | ||
return makeProposal([ | ||
{ | ||
target: TREASURY, | ||
signature: "acceptOwnership()", | ||
params: [], | ||
}, | ||
]); | ||
}; | ||
export default vip000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import "./vip-000"; |
191 changes: 191 additions & 0 deletions
191
multisig/simulations/opmainnet/vip-000/abi/treasury.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
[ | ||
{ | ||
"inputs": [], | ||
"name": "ZeroAddressNotAllowed", | ||
"type": "error" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "previousOwner", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "newOwner", | ||
"type": "address" | ||
} | ||
], | ||
"name": "OwnershipTransferStarted", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "previousOwner", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "newOwner", | ||
"type": "address" | ||
} | ||
], | ||
"name": "OwnershipTransferred", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": false, | ||
"internalType": "uint256", | ||
"name": "withdrawAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "withdrawAddress", | ||
"type": "address" | ||
} | ||
], | ||
"name": "WithdrawTreasuryNative", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "tokenAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint256", | ||
"name": "withdrawAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "withdrawAddress", | ||
"type": "address" | ||
} | ||
], | ||
"name": "WithdrawTreasuryToken", | ||
"type": "event" | ||
}, | ||
{ | ||
"stateMutability": "payable", | ||
"type": "fallback" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "acceptOwnership", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "owner", | ||
"outputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "pendingOwner", | ||
"outputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "renounceOwnership", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "newOwner", | ||
"type": "address" | ||
} | ||
], | ||
"name": "transferOwnership", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "withdrawAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "address payable", | ||
"name": "withdrawAddress", | ||
"type": "address" | ||
} | ||
], | ||
"name": "withdrawTreasuryNative", | ||
"outputs": [], | ||
"stateMutability": "payable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "tokenAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "withdrawAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "withdrawAddress", | ||
"type": "address" | ||
} | ||
], | ||
"name": "withdrawTreasuryToken", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"stateMutability": "payable", | ||
"type": "receive" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { expect } from "chai"; | ||
import { Contract } from "ethers"; | ||
import { ethers } from "hardhat"; | ||
|
||
import { NETWORK_ADDRESSES } from "../../../../src/networkAddresses"; | ||
import { forking, pretendExecutingVip } from "../../../../src/vip-framework"; | ||
import vip000 from "../../../proposals/opmainnet/vip-000"; | ||
import TREASURY_ABI from "./abi/treasury.json"; | ||
|
||
const TREASURY = "0x104c01EB7b4664551BE6A9bdB26a8C5c6Be7d3da"; | ||
|
||
forking(125518550, async () => { | ||
let treasury: Contract; | ||
|
||
before(async () => { | ||
treasury = await ethers.getContractAt(TREASURY_ABI, TREASURY); | ||
await pretendExecutingVip(await vip000()); | ||
}); | ||
|
||
describe("Post tx checks", () => { | ||
it("Should set owner to multisig", async () => { | ||
const owner = await treasury.owner(); | ||
expect(owner).equals(NETWORK_ADDRESSES.opmainnet.GUARDIAN); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters