Skip to content

Commit

Permalink
Merge pull request #80 from gnosis/add-votes-tokens
Browse files Browse the repository at this point in the history
Add votes tokens
  • Loading branch information
auryn-macmillan authored Nov 11, 2022
2 parents e099373 + 8342453 commit d7662cf
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gnosis.pm/zodiac",
"version": "1.1.7",
"version": "1.1.8",
"description": "Zodiac is a composable design philosophy and collection of standards for building DAO ecosystem tooling.",
"author": "Auryn Macmillan <[email protected]>",
"license": "LGPL-3.0+",
Expand Down
8 changes: 6 additions & 2 deletions src/factory/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ const MasterCopyAddresses: Record<KnownContracts, string> = {
[KnownContracts.CIRCULATING_SUPPLY_ERC721]:
"0x71530ec830CBE363bab28F4EC52964a550C0AB1E", // missing: mumbai, arbitrum, optimism
[KnownContracts.ROLES]: "0x85388a8cd772b19a468F982Dc264C238856939C9", // missing: mumbai, arbitrum, optimism
tellor: "",
optimisticGovernor: "",
[KnownContracts.TELLOR]: "",
[KnownContracts.OPTIMISTIC_GOVERNOR]: "",
[KnownContracts.OZ_GOVERNOR]: "",
[KnownContracts.ERC20_VOTES]: "",
[KnownContracts.ERC721_VOTES]: "",
};

export const CONTRACT_ADDRESSES: Record<
Expand All @@ -49,6 +51,8 @@ export const CONTRACT_ADDRESSES: Record<
[KnownContracts.OPTIMISTIC_GOVERNOR]:
"0x1340229DCF6e0bed7D9c2356929987C2A720F836",
[KnownContracts.OZ_GOVERNOR]: "0x011Ad6A7FE4FB9226204dDBe2b6a5Fc109961dce",
[KnownContracts.ERC20_VOTES]: "0x245CA18e8c05500160D2F0B406f89167C9efDF86",
[KnownContracts.ERC721_VOTES]: "0x26fBbE4b69d737a8EF7afa71056256900d6647c9",
},
[SUPPORTED_NETWORKS.BinanceSmartChain]: { ...MasterCopyAddresses },
[SUPPORTED_NETWORKS.GnosisChain]: { ...MasterCopyAddresses },
Expand Down
14 changes: 9 additions & 5 deletions src/factory/mastercopy_deployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,27 @@ export const deployMastercopy = async (

if (targetAddress == "0x0000000000000000000000000000000000000000") {
throw new Error(
"Mastercopy already deployed to target address on this network."
"Mastercopy already deployed to target address on this network. " +
"Or the deployment will revert (the error can be checked by deploying directly without the mastercopy deployer)."
);
}

console.log("targetAddress", targetAddress);
console.log(" Mastercopy targetAddress", targetAddress);

const deployData = await singletonFactory.deploy(deploymentTx.data, salt, {
gasLimit: 10000000,
});

const recept = await deployData.wait();
console.log("recept", recept);
console.log(" Mastercopy deploy tx hash", deployData.hash);

await deployData.wait();

if ((await hre.ethers.provider.getCode(targetAddress)).length > 2) {
console.log(
"Successfully deployed ModuleProxyFactory to target address! 🎉"
` Successfully deployed ModuleProxyFactory to target address (${targetAddress})! 🎉`
);
} else {
throw new Error(" Deployment failed.");
}
return targetAddress;
};
1 change: 0 additions & 1 deletion src/factory/singleton_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export const getSingletonFactory = async (
hardhat: HardhatRuntimeEnvironment
): Promise<Contract> => {
const [deployer] = await hardhat.ethers.getSigners();
console.log("Deployer address: ", deployer.address);

const singletonDeployer = "0xBb6e024b9cFFACB947A71991E386681B1Cd1477D";
const singletonFactory = new hardhat.ethers.Contract(
Expand Down
2 changes: 2 additions & 0 deletions src/factory/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export enum KnownContracts {
FACTORY = "factory",
ROLES = "roles",
OZ_GOVERNOR = "ozGovernor",
ERC20_VOTES = "erc20Votes",
ERC721_VOTES = "erc721Votes",
}

type META_GUARD_VERSION = "v1.0.0";
Expand Down

0 comments on commit d7662cf

Please sign in to comment.