Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tokenvoting ivotes checks #600

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import {DeployFunction} from 'hardhat-deploy/types';

import governanceERC20Artifact from '../../../../artifacts/src/token/ERC20/governance/GovernanceERC20.sol/GovernanceERC20.json';
import governanceWrappedERC20Artifact from '../../../../artifacts/src/token/ERC20/governance/GovernanceWrappedERC20.sol/GovernanceWrappedERC20.json';
import TokenVotingArtifact from '../../../../artifacts/src/plugins/governance/majority-voting/token/TokenVoting.sol/TokenVoting.json';

import tokenVotingSetupArtifact from '../../../../artifacts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol/TokenVotingSetup.json';
import {MintSettings} from '../../../../test/token/erc20/governance-erc20';

Expand Down Expand Up @@ -38,11 +40,19 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
}
);

const tokenVoting = await deploy('TokenVoting', {
contract: TokenVotingArtifact,
from: deployer.address,
args: [],
log: true,
});

// Deploy the TokenVotingSetup and provide the bases in the constructor
await deploy('TokenVotingSetup', {
contract: tokenVotingSetupArtifact,
from: deployer.address,
args: [
tokenVoting.address,
governanceERC20DeployResult.address,
governanceWrappedERC20DeployResult.address,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,13 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
await hre.deployments.get('GovernanceWrappedERC20')
);

hre.aragonToVerifyContracts.push(await hre.deployments.get('TokenVoting'));

hre.aragonToVerifyContracts.push({
contract:
'src/plugins/governance/majority-voting/token/TokenVotingSetup.sol:TokenVotingSetup',
...TokenVotingSetupDeployment,
});
hre.aragonToVerifyContracts.push({
contract:
'src/plugins/governance/majority-voting/token/TokenVoting.sol:TokenVoting',
address: await tokenVotingSetup.implementation(),
args: [],
});
};

export default func;
Expand Down
27 changes: 27 additions & 0 deletions packages/contracts/deploy/token/arbitrum/00_tt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DeployFunction} from 'hardhat-deploy/types';

import tokenVotingSetupArtifact from '../../../artifacts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol/TokenVotingSetup.json';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, ethers} = hre;
const {deploy} = deployments;
const [deployer] = await ethers.getSigners();

const governanceERC20Base = '0xddCc39a2a0047Eb47EdF94180452cbaB14d426EF';
const governanceWrappedERC20Base =
'0x5B3B36BdC9470963A2734D6a0d2F6a64C21C159f';
const tokenVotingBase = '0x4f40F01b2944359A0E507b509a868C8DbFAd215B';

// build metadata: "0x697066733a2f2f516d5a70314373446a5a544162775541576a69564c4d4c31597755737045537a6b42437374354d31484b626a646d"

// Deploy the TokenVotingSetup and provide the bases in the constructor
await deploy('TokenVotingSetup', {
contract: tokenVotingSetupArtifact,
from: deployer.address,
args: [tokenVotingBase, governanceERC20Base, governanceWrappedERC20Base],
log: true,
});
};
export default func;
func.tags = ['New', 'TokenVotingSetup'];
27 changes: 27 additions & 0 deletions packages/contracts/deploy/token/baseMainnet/00_tt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DeployFunction} from 'hardhat-deploy/types';

import tokenVotingSetupArtifact from '../../../artifacts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol/TokenVotingSetup.json';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, ethers} = hre;
const {deploy} = deployments;
const [deployer] = await ethers.getSigners();

const governanceERC20Base = '0xd8C229F3644576b200319cB3919B0E87716f47d8';
const governanceWrappedERC20Base =
'0x7870837ffe670E62d4e601393D454f1b8649F7f9';
const tokenVotingBase = '0x908BB81ABeb86FfEa97f1b95b59c4AA8E71d84aA';

// build metadata: "0x697066733a2f2f"

// Deploy the TokenVotingSetup and provide the bases in the constructor
await deploy('TokenVotingSetup', {
contract: tokenVotingSetupArtifact,
from: deployer.address,
args: [tokenVotingBase, governanceERC20Base, governanceWrappedERC20Base],
log: true,
});
};
export default func;
func.tags = ['New', 'TokenVotingSetup'];
27 changes: 27 additions & 0 deletions packages/contracts/deploy/token/holesky/00_tt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DeployFunction} from 'hardhat-deploy/types';

import tokenVotingSetupArtifact from '../../../artifacts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol/TokenVotingSetup.json';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, ethers} = hre;
const {deploy} = deployments;
const [deployer] = await ethers.getSigners();

const governanceERC20Base = '0xC24188a73dc09aA7C721f96Ad8857B469C01dC9f';
const governanceWrappedERC20Base =
'0x7a62da7B56fB3bfCdF70E900787010Bc4c9Ca42e';
const tokenVotingBase = '0xb261e8B006f5220D1cADEBCE5e6B63BD6dff5c6f';

// build metadata: "0x697066733a2f2f516d6562646b4343363150724b3256775951486e3650317154666443444a3274555261504c704a50596964326f71"

// Deploy the TokenVotingSetup and provide the bases in the constructor
await deploy('TokenVotingSetup', {
contract: tokenVotingSetupArtifact,
from: deployer.address,
args: [tokenVotingBase, governanceERC20Base, governanceWrappedERC20Base],
log: true,
});
};
export default func;
func.tags = ['New', 'TokenVotingSetup'];
27 changes: 27 additions & 0 deletions packages/contracts/deploy/token/mainnet/00_tt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DeployFunction} from 'hardhat-deploy/types';

import tokenVotingSetupArtifact from '../../../artifacts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol/TokenVotingSetup.json';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, ethers} = hre;
const {deploy} = deployments;
const [deployer] = await ethers.getSigners();

const governanceERC20Base = '0x868581Ee5991C6C08D2467132698fa4AB6C9c272';
const governanceWrappedERC20Base =
'0xCC925a32fA4fa41c42a7d5585D69C980b6Fa9342';
const tokenVotingBase = '0xd4bfb6C688b2982A3b432F2Fc6C35117532A2C27';

// build metadata: "0x697066733a2f2f516d6562646b4343363150724b3256775951486e3650317154666443444a3274555261504c704a50596964326f71"

// Deploy the TokenVotingSetup and provide the bases in the constructor
await deploy('TokenVotingSetup', {
contract: tokenVotingSetupArtifact,
from: deployer.address,
args: [tokenVotingBase, governanceERC20Base, governanceWrappedERC20Base],
log: true,
});
};
export default func;
func.tags = ['New', 'TokenVotingSetup'];
27 changes: 27 additions & 0 deletions packages/contracts/deploy/token/polygon/00_tt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DeployFunction} from 'hardhat-deploy/types';

import tokenVotingSetupArtifact from '../../../artifacts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol/TokenVotingSetup.json';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, ethers} = hre;
const {deploy} = deployments;
const [deployer] = await ethers.getSigners();

const governanceERC20Base = '0x644D3bA8A335F5b1a6afFe63e551306D0C933582';
const governanceWrappedERC20Base =
'0x8f2088E83F007B1567E8E1187380DFfdC83079d4';
const tokenVotingBase = '0x8725b5f8247a0db0A5c6D86Db6Fb7A98F2Bd27f5';

// build metadata: "0x697066733a2f2f516d6562646b4343363150724b3256775951486e3650317154666443444a3274555261504c704a50596964326f71"

// Deploy the TokenVotingSetup and provide the bases in the constructor
await deploy('TokenVotingSetup', {
contract: tokenVotingSetupArtifact,
from: deployer.address,
args: [tokenVotingBase, governanceERC20Base, governanceWrappedERC20Base],
log: true,
});
};
export default func;
func.tags = ['New', 'TokenVotingSetup'];
35 changes: 35 additions & 0 deletions packages/contracts/deploy/token/sepolia/00_tt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DeployFunction} from 'hardhat-deploy/types';

import tokenVotingSetupArtifact from '../../../artifacts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol/TokenVotingSetup.json';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, ethers} = hre;
const {deploy} = deployments;
const [deployer] = await ethers.getSigners();

const governanceERC20Base = '0xA03C2182af8eC460D498108C92E8638a580b94d4';
const governanceWrappedERC20Base =
'0x6E924eA5864044D8642385683fFA5AD42FB687f2';
const tokenVotingBase = '0x0749047B49B472a7f80C1c8f0a4dbBcecBc54339';

// build metadata: "0x697066733a2f2f"

// Deploy the TokenVotingSetup and provide the bases in the constructor
await deploy('TokenVotingSetup', {
contract: tokenVotingSetupArtifact,
from: deployer.address,
args: [tokenVotingBase, governanceERC20Base, governanceWrappedERC20Base],
log: true,
});

const TokenVotingSetupDeployment = await deployments.get('TokenVotingSetup');

hre.aragonToVerifyContracts.push({
contract:
'src/plugins/governance/majority-voting/token/TokenVotingSetup.sol:TokenVotingSetup',
...TokenVotingSetupDeployment,
});
};
export default func;
func.tags = ['New', 'TokenVotingSetup'];
25 changes: 15 additions & 10 deletions packages/contracts/networks.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"mainnet": {
"url": "https://mainnet.infura.io/v3/481a4cdc7c774286b8627f21c6827f48",
"url": "https://mainnet.infura.io/v3/7a03fcb37be7479da06f92c5117afd47",
"isTestnet": false,
"chainId": 1,
"deploy": ["./deploy/update/to_v1.3.0", "./deploy/verification"]
"deploy": ["./deploy/token/mainnet", "./deploy/verification"]
},
"goerli": {
"url": "https://goerli.infura.io/v3/481a4cdc7c774286b8627f21c6827f48",
Expand All @@ -12,17 +12,22 @@
"deploy": ["./deploy/update/to_v1.3.0", "./deploy/verification"]
},
"sepolia": {
"url": "https://sepolia.infura.io/v3/481a4cdc7c774286b8627f21c6827f48",
"url": "https://sepolia.infura.io/v3/7a03fcb37be7479da06f92c5117afd47",
"isTestnet": true,
"chainId": 11155111,
"deploy": ["./deploy/new", "./deploy/verification"]
"deploy": ["./deploy/token/sepolia", "./deploy/verification"]
},
"polygon": {
"url": "https://polygon-mainnet.infura.io/v3/481a4cdc7c774286b8627f21c6827f48",
"url": "https://polygon-mainnet.infura.io/v3/7a03fcb37be7479da06f92c5117afd47",
"isTestnet": false,
"chainId": 137,
"feesUrl": "https://gasstation-mainnet.matic.network/v2",
"deploy": ["./deploy/update/to_v1.3.0", "./deploy/verification"]
"deploy": ["./deploy/token/polygon", "./deploy/verification"]
},
"holesky": {
"chainId": 17000,
"url": "https://ethereum-holesky.publicnode.com",
"deploy": ["./deploy/token/holesky", "./deploy/verification"]
},
"mumbai": {
"url": "https://polygon-mumbai.infura.io/v3/481a4cdc7c774286b8627f21c6827f48",
Expand All @@ -32,10 +37,10 @@
"deploy": ["./deploy/update/to_v1.3.0", "./deploy/verification"]
},
"baseMainnet": {
"url": "https://base-mainnet.infura.io/v3/481a4cdc7c774286b8627f21c6827f48",
"url": "https://base-mainnet.infura.io/v3/7a03fcb37be7479da06f92c5117afd47",
"isTestnet": false,
"chainId": 8453,
"deploy": ["./deploy/new", "./deploy/verification"],
"deploy": ["./deploy/token/baseMainnet", "./deploy/verification"],
"gasPrice": 1000
},
"baseGoerli": {
Expand All @@ -52,10 +57,10 @@
"gasPrice": 1000
},
"arbitrum": {
"url": "https://arbitrum-mainnet.infura.io/v3/481a4cdc7c774286b8627f21c6827f48",
"url": "https://arbitrum-mainnet.infura.io/v3/7a03fcb37be7479da06f92c5117afd47",
"isTestnet": false,
"chainId": 42161,
"deploy": ["./deploy/new", "./deploy/verification"]
"deploy": ["./deploy/token/arbitrum", "./deploy/verification"]
},
"arbitrumGoerli": {
"url": "https://arbitrum-goerli.infura.io/v3/481a4cdc7c774286b8627f21c6827f48",
Expand Down
Loading
Loading