-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from gnosis/update_zodiac
Update zodiac
- Loading branch information
Showing
13 changed files
with
1,705 additions
and
909 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 |
---|---|---|
|
@@ -7,4 +7,6 @@ packages/exit-app/src/contracts/types | |
|
||
packages/exit-app/.env | ||
|
||
node_modules | ||
node_modules | ||
|
||
.DS_Store |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
37 changes: 29 additions & 8 deletions
37
packages/contracts/src/deploy/deploy_circulating_supply.ts
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
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
packages/contracts/src/deploy/deploy_erc20_exit_module_mastercopy.ts
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,46 @@ | ||
import { computeTargetAddress, deployMastercopy } from "@gnosis.pm/zodiac"; | ||
import { DeployFunction } from "hardhat-deploy/types"; | ||
import { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
|
||
import CONTRACT_ARTIFACT from "../../build/artifacts/contracts/ExitModule/ExitERC20Module.sol/ExitERC20.json"; | ||
|
||
const SaltZero = | ||
"0x0000000000000000000000000000000000000000000000000000000000000000"; | ||
const FirstAddress = "0x0000000000000000000000000000000000000001"; | ||
|
||
const deploy: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { getNamedAccounts } = hre; | ||
const { deployer: deployerAddress } = await getNamedAccounts(); | ||
const deployer = hre.ethers.provider.getSigner(deployerAddress); | ||
|
||
const ExitERC20 = await hre.ethers.getContractFactory("ExitERC20"); | ||
|
||
const args = [ | ||
FirstAddress, | ||
FirstAddress, | ||
FirstAddress, | ||
FirstAddress, | ||
FirstAddress, | ||
]; | ||
const { address, isDeployed } = await computeTargetAddress( | ||
deployer, | ||
ExitERC20, | ||
args, | ||
SaltZero | ||
); | ||
|
||
if (isDeployed) { | ||
console.log("ExitERC20 already deployed to:", address); | ||
} else { | ||
await deployMastercopy(deployer, ExitERC20, args, SaltZero); | ||
console.log("ExitERC20 was deployed to:", address); | ||
} | ||
|
||
hre.deployments.save("ExitERC20", { | ||
abi: CONTRACT_ARTIFACT.abi, | ||
address: address, | ||
}); | ||
}; | ||
|
||
deploy.tags = ["exit-module"]; | ||
export default deploy; |
28 changes: 0 additions & 28 deletions
28
packages/contracts/src/deploy/deploy_erc721_exit_module.ts
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
packages/contracts/src/deploy/deploy_erc721_exit_module_mastercopy.ts
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,47 @@ | ||
import { computeTargetAddress, deployMastercopy } from "@gnosis.pm/zodiac"; | ||
import { DeployFunction } from "hardhat-deploy/types"; | ||
import { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
|
||
import CONTRACT_ARTIFACT from "../../build/artifacts/contracts/ExitModule/ExitERC721Module.sol/ExitERC721.json"; | ||
|
||
const SaltZero = | ||
"0x0000000000000000000000000000000000000000000000000000000000000000"; | ||
const FirstAddress = "0x0000000000000000000000000000000000000001"; | ||
|
||
const deploy: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { getNamedAccounts } = hre; | ||
const { deployer: deployerAddress } = await getNamedAccounts(); | ||
const deployer = hre.ethers.provider.getSigner(deployerAddress); | ||
|
||
const ExitERC721 = await hre.ethers.getContractFactory("ExitERC721"); | ||
|
||
const args = [ | ||
FirstAddress, | ||
FirstAddress, | ||
FirstAddress, | ||
FirstAddress, | ||
FirstAddress, | ||
]; | ||
|
||
const { address, isDeployed } = await computeTargetAddress( | ||
deployer, | ||
ExitERC721, | ||
args, | ||
SaltZero | ||
); | ||
|
||
if (isDeployed) { | ||
console.log("ExitERC721 already deployed to:", address); | ||
} else { | ||
await deployMastercopy(deployer, ExitERC721, args, SaltZero); | ||
console.log("ExitERC721 was deployed to:", address); | ||
} | ||
|
||
hre.deployments.save("ExitERC721", { | ||
abi: CONTRACT_ARTIFACT.abi, | ||
address: address, | ||
}); | ||
}; | ||
|
||
deploy.tags = ["erc721-exit-module"]; | ||
export default deploy; |
Oops, something went wrong.
2118798
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
zodiac-exit-app – ./
zodiac-exit-app-gnosis-guild.vercel.app
zodiac-exit-app.vercel.app
zodiac-exit-app-git-master-gnosis-guild.vercel.app