Skip to content

Commit

Permalink
feat: refactor extract mastercopy
Browse files Browse the repository at this point in the history
  • Loading branch information
juliopavila committed Sep 5, 2024
1 parent 95f6c85 commit ab083e1
Show file tree
Hide file tree
Showing 3 changed files with 4,180 additions and 293 deletions.
3,145 changes: 3,145 additions & 0 deletions mastercopies copy.json

Large diffs are not rendered by default.

1,262 changes: 970 additions & 292 deletions mastercopies.json

Large diffs are not rendered by default.

66 changes: 65 additions & 1 deletion tasks/extract-mastercopy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { task } from "hardhat/config"
import { ethers, ZeroHash } from "ethers"

import { writeMastercopyFromBuild } from "@gnosis-guild/zodiac-core"

Expand All @@ -15,7 +16,70 @@ task("extract:mastercopy", "Extracts and persists current mastercopy build artif
}),
constructorArgs: {
types: ["address", "string", "string"],
values: [AddressOne, "", ""],
values: [AddressOne, "0x", "0x"],
},
salt: ZeroHash,
})
writeMastercopyFromBuild({
contractVersion: packageJson.version,
contractName: "ERC721Votes",
compilerInput: await hre.run("verify:etherscan-get-minimal-input", {
sourceName: "contracts/ERC721Votes.sol",
}),
constructorArgs: {
types: ["address", "string", "string"],
values: [AddressOne, "0x", "0x"],
},
salt: ZeroHash,
})
writeMastercopyFromBuild({
contractVersion: packageJson.version,
contractName: "MultisendEncoder",
compilerInput: await hre.run("verify:etherscan-get-minimal-input", {
sourceName: "contracts/MultisendEncoder.sol",
}),
constructorArgs: {
types: [],
values: [],
},
salt: "0x0000000000000000000000000000000000000000000000000000000000000000",
})

await hre.run("verify:etherscan-get-minimal-input", {
sourceName: "contracts/OZGovernorModule.sol",
})

writeMastercopyFromBuild({
contractVersion: packageJson.version,
contractName: "OZGovernorModule",
compilerInput: await hre.run("verify:etherscan-get-minimal-input", {
sourceName: "contracts/OZGovernorModule.sol",
}),
constructorArgs: {
types: [
"address",
"address",
"address",
"address",
"string",
"uint256",
"uint256",
"uint256",
"uint256",
"uint64",
],
values: [
"0x0000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000001",
"",
"0x0000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000001",
],
},
salt: "0x0000000000000000000000000000000000000000000000000000000000000000",
})
Expand Down

0 comments on commit ab083e1

Please sign in to comment.