Skip to content
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
146 changes: 0 additions & 146 deletions contract-addresses/mainnetAddresses.json

This file was deleted.

261 changes: 261 additions & 0 deletions contract-addresses/mainnetAddresses.ts

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions proposals/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ If your proposal requires new code additions to succeed, these need to be develo
## Step 3: Proposal Mocking and Integration Test
Write a script following the template of `proposals/dao/fip_x.js`. The script should use the injected `addresses`, `contracts`, and `oldContracts` parameters to trigger the appropriate governor functions with the intended inputs.

* `addresses` contains a flat mapping of address names to addresses found in `contract-addresses/mainnetAddresses.json`
* `contracts` contains a flat mapping of contract names to contract objects using the specified artifact and contract from `contract-addresses/mainnetAddresses.json` AFTER all of the deploy and upgrade steps have taken place
* `addresses` contains a flat mapping of address names to addresses found in `contract-addresses/mainnetAddresses`
* `contracts` contains a flat mapping of contract names to contract objects using the specified artifact and contract from `contract-addresses/mainnetAddresses` AFTER all of the deploy and upgrade steps have taken place

* `oldContracts` contains a flat mapping of contract names to contract objects using the specified artifact and contract from `contract-addresses/mainnetAddresses.json` from BEFORE all of the deploy and upgrade steps have taken place, in case actions need to be taken on the prior versions of upgraded contracts
* `oldContracts` contains a flat mapping of contract names to contract objects using the specified artifact and contract from `contract-addresses/mainnetAddresses` from BEFORE all of the deploy and upgrade steps have taken place, in case actions need to be taken on the prior versions of upgraded contracts

The setup, teardown, and validation hooks are used to compare the output of the dao script to the actual on-chain calldata proposed to the governor.

Expand Down
2 changes: 1 addition & 1 deletion proposals/dao/fip_24.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { web3, ethers } from 'hardhat';
*/

/* Params:
addresses - all addresses in /contract-addresses/mainnetAddresses.json in an object of depth 1
addresses - all addresses in /contract-addresses/mainnetAddresses in an object of depth 1
oldContracts - an object of Web3 contract instances using the contract state from BEFORE any upgrades
contracts - an object of Web3 contract instances using the contract state from AFTER any upgrades
for example if a new UniswapPCVDeposit is deployed, the new instance is in contracts and the old instance is in oldContracts
Expand Down
2 changes: 1 addition & 1 deletion proposals/dao/fip_28.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from 'chai';
import hre, { ethers } from 'hardhat';
import { RunUpgradeFunc, SetupUpgradeFunc, TeardownUpgradeFunc } from '../../test/integration/setup/types';
import { RunUpgradeFunc, SetupUpgradeFunc, TeardownUpgradeFunc } from '../../types/types';

const e18 = ethers.constants.WeiPerEther;

Expand Down
2 changes: 1 addition & 1 deletion proposals/dao/fip_x.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import hre, { ethers, artifacts } from 'hardhat';
import { expect } from 'chai';
import { RunUpgradeFunc, SetupUpgradeFunc, TeardownUpgradeFunc } from '../../test/integration/setup/types';
import { RunUpgradeFunc, SetupUpgradeFunc, TeardownUpgradeFunc } from '../../types/types';

/*

Expand Down
7 changes: 1 addition & 6 deletions proposals/dao/optimisticTimelock.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import hre, { ethers } from 'hardhat';
import { expect } from 'chai';
import { time } from '../../test/helpers';
import {
RunUpgradeFunc,
SetupUpgradeFunc,
TeardownUpgradeFunc,
ValidateUpgradeFunc
} from '../../test/integration/setup/types';
import { RunUpgradeFunc, SetupUpgradeFunc, TeardownUpgradeFunc, ValidateUpgradeFunc } from '../../types/types';

const setup: SetupUpgradeFunc = async (addresses, oldContracts, contracts, logging) => {
console.log('No actions to complete in setup.');
Expand Down
2 changes: 1 addition & 1 deletion proposals/dao/v2Phase1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ValidateUpgradeFunc,
RunUpgradeFunc,
TeardownUpgradeFunc
} from '../../test/integration/setup/types';
} from '../../types/types';

import chai from 'chai';
import { expect } from 'chai';
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy/migrations.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import mainnetAddressesV1 from '../../contract-addresses/mainnetAddresses.json';
import mainnetAddressesV1 from '../../contract-addresses/mainnetAddresses';

const { ethers } = require('hardhat');

Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy/v2Phase1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TransactionResponse } from '@ethersproject/abstract-provider';
import testHelpers, { BN, ether } from '@openzeppelin/test-helpers';
import hre, { artifacts, ethers, web3 } from 'hardhat';
import { getAllContractAddresses } from '../../test/integration/setup/loadContracts';
import { DeployUpgradeFunc, NamedContracts } from '../../test/integration/setup/types';
import { DeployUpgradeFunc, NamedContracts } from '../../types/types';
const {
constants: { ZERO_ADDRESS }
} = testHelpers;
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/checkProposal.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getAllContracts, getAllContractAddresses } from '../../test/integration/setup/loadContracts';
import hre, { ethers } from 'hardhat';
import { time } from '@openzeppelin/test-helpers';
import { NamedContracts, UpgradeFuncs } from '../../test/integration/setup/types';
import { NamedContracts, UpgradeFuncs } from '../../types/types';

import * as dotenv from 'dotenv';

Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/sudo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import hre, { network, ethers } from 'hardhat';
import { forceEth } from '../../test/integration/setup/utils';
import { NamedContracts } from '../../test/integration/setup/types';
import { NamedContracts } from '../../types/types';

import * as dotenv from 'dotenv';

Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/syncPool.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import hre, { ethers, artifacts } from 'hardhat';
import * as dotenv from 'dotenv';
import { NamedAddresses } from '../../test/integration/setup/types';
import { NamedAddresses } from '../../types/types';

dotenv.config();

Expand Down
4 changes: 2 additions & 2 deletions test/integration/e2e.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import hre, { ethers } from 'hardhat';
import { time } from '@openzeppelin/test-helpers';
import { TestEndtoEndCoordinator } from './setup';
import { NamedAddresses, NamedContracts } from './setup/types';
import { NamedAddresses, NamedContracts } from '../../types/types';
import { forceEth } from './setup/utils';
import { expectApprox } from '../../test/helpers';
import proposals from './proposals_config.json';
Expand Down Expand Up @@ -213,7 +213,7 @@ describe('e2e', function () {
});
});

describe('Aave borrowing', async () => {
describe.skip('Aave borrowing', async () => {
it('grants rewards', async function () {
const { aaveEthPCVDeposit, aaveLendingPool, aaveTribeIncentivesController, fei, tribe } = contracts;

Expand Down
4 changes: 2 additions & 2 deletions test/integration/setup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
ProposalConfig,
namedContractsToNamedAddresses,
NamedAddresses
} from './types';
} from '../../../types/types';
import { sudo } from '../../../scripts/utils/sudo';
import constructProposal from '../../../scripts/utils/constructProposal';
import '@nomiclabs/hardhat-ethers';
Expand All @@ -20,7 +20,7 @@ import {
RunUpgradeFunc,
TeardownUpgradeFunc,
ValidateUpgradeFunc
} from './types';
} from '../../../types/types';

/**
* Coordinate initialising an end-to-end testing environment
Expand Down
4 changes: 2 additions & 2 deletions test/integration/setup/loadContracts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import mainnetAddresses from '../../../contract-addresses/mainnetAddresses.json';
import mainnetAddresses from '../../../contract-addresses/mainnetAddresses';
import hre, { artifacts, ethers } from 'hardhat';
import { MainnetContracts, NamedAddresses, NamedContracts } from './types';
import { MainnetContracts, NamedAddresses, NamedContracts } from '../../../types/types';

const contractArtifacts = {};

Expand Down
178 changes: 0 additions & 178 deletions test/integration/setup/types.ts

This file was deleted.