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

Add tokens task #2024

Merged
merged 4 commits into from
Nov 22, 2022
Merged
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
4 changes: 4 additions & 0 deletions pkg/deployments/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ task('check-deployments', `Check that all tasks' deployments correspond to their
await new Task(args.id, TaskMode.CHECK, hre.network.name).run(args);
} else {
for (const taskID of Task.getAllTaskIds()) {
if (taskID.startsWith('00000000-')) {
continue;
}

const task = new Task(taskID, TaskMode.CHECK, hre.network.name);
const outputDir = path.resolve(task.dir(), 'output');

Expand Down
4 changes: 4 additions & 0 deletions pkg/deployments/tasks/00000000-tokens/output/arbitrum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"BAL": "0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8",
"WETH": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"
}
3 changes: 3 additions & 0 deletions pkg/deployments/tasks/00000000-tokens/output/bsc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"WETH": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"
}
4 changes: 4 additions & 0 deletions pkg/deployments/tasks/00000000-tokens/output/gnosis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"BAL": "0x7eF541E2a22058048904fE5744f9c7E4C57AF717",
"WETH": "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"
nventuro marked this conversation as resolved.
Show resolved Hide resolved
}
4 changes: 4 additions & 0 deletions pkg/deployments/tasks/00000000-tokens/output/goerli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"BAL": "0xfA8449189744799aD2AcE7e0EBAC8BB7575eff47",
"WETH": "0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"
}
4 changes: 4 additions & 0 deletions pkg/deployments/tasks/00000000-tokens/output/mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"BAL": "0xba100000625a3754423978a60c9317c58a424e3D",
"WETH": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
}
4 changes: 4 additions & 0 deletions pkg/deployments/tasks/00000000-tokens/output/optimism.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"BAL": "0xFE8B128bA8C78aabC59d4c64cEE7fF28e9379921",
"WETH": "0x4200000000000000000000000000000000000006"
}
4 changes: 4 additions & 0 deletions pkg/deployments/tasks/00000000-tokens/output/polygon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"BAL": "0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3",
"WETH": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"
}
5 changes: 5 additions & 0 deletions pkg/deployments/tasks/00000000-tokens/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Tokens

This is not a real task, but rather a collection of token addresses that are useful so that they can be referenced in other tasks. The tokens included are WETH and BAL.

Not all networks use ETH as their native token: in these, WETH really represents the wrapped native token. Examples include WMATIC in Polygon, WBNB in Binance and WXDAI in Gnosis.
2 changes: 1 addition & 1 deletion pkg/deployments/tasks/20210418-vault/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { TaskRunOptions } from '../../src/types';

export default async (task: Task, { force, from }: TaskRunOptions = {}): Promise<void> => {
const input = task.input() as VaultDeployment;
const vaultArgs = [input.Authorizer, input.weth, input.pauseWindowDuration, input.bufferPeriodDuration];
const vaultArgs = [input.Authorizer, input.WETH, input.pauseWindowDuration, input.bufferPeriodDuration];
const vault = await task.deployAndVerify('Vault', vaultArgs, from, force);

// The vault automatically also deploys the protocol fees collector: we must verify it
Expand Down
55 changes: 6 additions & 49 deletions pkg/deployments/tasks/20210418-vault/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,17 @@ import { MONTH } from '@balancer-labs/v2-helpers/src/time';

export type VaultDeployment = {
Authorizer: string;
weth: string;
WETH: string;
pauseWindowDuration: number;
bufferPeriodDuration: number;
};

const Authorizer = new Task('20210418-authorizer', TaskMode.READ_ONLY);
const WETH = new Task('00000000-tokens', TaskMode.READ_ONLY);

export default {
kovan: {
Authorizer,
weth: '0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1',
pauseWindowDuration: 3 * MONTH,
bufferPeriodDuration: MONTH,
},
mainnet: {
Authorizer,
weth: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
pauseWindowDuration: 3 * MONTH,
bufferPeriodDuration: MONTH,
},
polygon: {
Authorizer,
weth: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', // WMATIC
pauseWindowDuration: 3 * MONTH,
bufferPeriodDuration: MONTH,
},
arbitrum: {
Authorizer,
weth: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
pauseWindowDuration: 3 * MONTH,
bufferPeriodDuration: MONTH,
},
optimism: {
Authorizer,
weth: '0x4200000000000000000000000000000000000006',
pauseWindowDuration: 3 * MONTH,
bufferPeriodDuration: MONTH,
},
gnosis: {
Authorizer,
weth: '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', // wxDAI
pauseWindowDuration: 3 * MONTH,
bufferPeriodDuration: MONTH,
},
bsc: {
Authorizer,
weth: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', // WBNB
pauseWindowDuration: 3 * MONTH,
bufferPeriodDuration: MONTH,
},
goerli: {
Authorizer,
weth: '0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1',
pauseWindowDuration: 3 * MONTH,
bufferPeriodDuration: MONTH,
},
Authorizer,
pauseWindowDuration: 3 * MONTH,
bufferPeriodDuration: MONTH,
WETH,
};
18 changes: 2 additions & 16 deletions pkg/deployments/tasks/20220413-child-chain-gauge-factory/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,10 @@ export type ChildChainLiquidityGaugeFactoryDeployment = {

const AuthorizerAdaptor = new Task('20220325-authorizer-adaptor', TaskMode.READ_ONLY);
const Vault = new Task('20210418-vault', TaskMode.READ_ONLY);
const TestBalancerToken = new Task('20220325-test-balancer-token', TaskMode.READ_ONLY);
const BAL = new Task('00000000-tokens', TaskMode.READ_ONLY);

export default {
AuthorizerAdaptor,
Vault,
kovan: {
BAL: TestBalancerToken.output({ network: 'kovan' }).TestBalancerToken,
},
polygon: {
BAL: '0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3',
},
arbitrum: {
BAL: '0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8',
},
optimism: {
BAL: '0xFE8B128bA8C78aabC59d4c64cEE7fF28e9379921',
},
goerli: {
BAL: TestBalancerToken.output({ network: 'goerli' }).TestBalancerToken,
},
BAL,
};