Skip to content

Commit

Permalink
Merge pull request #43 from zeriontech/piedao-metadata
Browse files Browse the repository at this point in the history
Added PieDAO metadata
  • Loading branch information
sobolev-igor authored Apr 23, 2020
2 parents f1a069a + 703a248 commit f85fcd7
Show file tree
Hide file tree
Showing 30 changed files with 151 additions and 99 deletions.
25 changes: 25 additions & 0 deletions migrations_scripts/1_deploy_registry_and_add_adapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const ChaiAdapter = artifacts.require('ChaiAdapter');
const DSRAdapter = artifacts.require('DSRAdapter');
const MCDAssetAdapter = artifacts.require('MCDAssetAdapter');
const MCDDebtAdapter = artifacts.require('MCDDebtAdapter');
const PieDAOPieAdapter = artifacts.require('PieDAOPieAdapter');
const PoolTogetherAdapter = artifacts.require('PoolTogetherAdapter');
const SynthetixAssetAdapter = artifacts.require('SynthetixAssetAdapter');
const SynthetixDebtAdapter = artifacts.require('SynthetixDebtAdapter');
Expand All @@ -30,6 +31,7 @@ const DmmTokenAdapter = artifacts.require('DmmTokenAdapter');
const IdleTokenAdapter = artifacts.require('IdleTokenAdapter');
const IearnTokenAdapter = artifacts.require('IearnTokenAdapter');
const ChaiTokenAdapter = artifacts.require('ChaiTokenAdapter');
const PieDAOPieTokenAdapter = artifacts.require('PieDAOPieTokenAdapter');
const PoolTogetherTokenAdapter = artifacts.require('PoolTogetherTokenAdapter');
const TokenSetsTokenAdapter = artifacts.require('TokenSetsTokenAdapter');
const UniswapV1TokenAdapter = artifacts.require('UniswapV1TokenAdapter');
Expand Down Expand Up @@ -113,6 +115,8 @@ const usdcPoolAddress = '0x0034Ea9808E620A0EF79261c51AF20614B742B24';

const chaiAddress = '0x06AF07097C9Eeb7fD685c692751D5C66dB49c215';

const BTCPPAddress = '0x0327112423F3A68efdF1fcF402F6c5CB9f7C33fd';

const aaveAssetAdapterTokens = [
aDaiAddress,
aTusdAddress,
Expand Down Expand Up @@ -218,6 +222,9 @@ const mcdAssetAdapterTokens = [
const mcdDebtAdapterTokens = [
daiAddress,
];
const pieDAOPieAdapterTokens = [
BTCPPAddress,
];
const poolTogetherAdapterTokens = [
saiPoolAddress,
daiPoolAddress,
Expand Down Expand Up @@ -412,6 +419,18 @@ module.exports = async (deployer, network, accounts) => {
'0',
]);

await deployer.deploy(PieDAOPieAdapter, { from: accounts[0] });
adapters.push([PieDAOPieAdapter.address]);
tokens.push([pieDAOPieAdapterTokens]);
protocolNames.push('PieDAO');
metadata.push([
'PieDAO BTC++',
'BTC on Ethereum diversified',
'btc.piedao.org',
'protocol-icons.s3.us-east-1.amazonaws.com/piedao.png',
'0',
]);

await deployer.deploy(SynthetixAssetAdapter, { from: accounts[0] });
await deployer.deploy(SynthetixDebtAdapter, { from: accounts[0] });
adapters.push([SynthetixAssetAdapter.address, SynthetixDebtAdapter.address]);
Expand Down Expand Up @@ -521,6 +540,12 @@ module.exports = async (deployer, network, accounts) => {
ChaiTokenAdapter.address,
);
});
await deployer.deploy(PieDAOPieTokenAdapter, { from: accounts[0] })
.then(() => {
tokenAdapters.push(
PieDAOPieTokenAdapter.address,
);
});
await deployer.deploy(PoolTogetherTokenAdapter, { from: accounts[0] })
.then(() => {
tokenAdapters.push(
Expand Down
25 changes: 25 additions & 0 deletions migrations_scripts/1_use_registry_and_add_adapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const ChaiAdapter = artifacts.require('ChaiAdapter');
const DSRAdapter = artifacts.require('DSRAdapter');
const MCDAssetAdapter = artifacts.require('MCDAssetAdapter');
const MCDDebtAdapter = artifacts.require('MCDDebtAdapter');
const PieDAOPieAdapter = artifacts.require('PieDAOPieAdapter');
const PoolTogetherAdapter = artifacts.require('PoolTogetherAdapter');
const SynthetixAssetAdapter = artifacts.require('SynthetixAssetAdapter');
const SynthetixDebtAdapter = artifacts.require('SynthetixDebtAdapter');
Expand All @@ -30,6 +31,7 @@ const DmmTokenAdapter = artifacts.require('DmmTokenAdapter');
const IdleTokenAdapter = artifacts.require('IdleTokenAdapter');
const IearnTokenAdapter = artifacts.require('IearnTokenAdapter');
const ChaiTokenAdapter = artifacts.require('ChaiTokenAdapter');
const PieDAOPieTokenAdapter = artifacts.require('PieDAOPieTokenAdapter');
const PoolTogetherTokenAdapter = artifacts.require('PoolTogetherTokenAdapter');
const TokenSetsTokenAdapter = artifacts.require('TokenSetsTokenAdapter');
const UniswapV1TokenAdapter = artifacts.require('UniswapV1TokenAdapter');
Expand Down Expand Up @@ -113,6 +115,8 @@ const usdcPoolAddress = '0x0034Ea9808E620A0EF79261c51AF20614B742B24';

const chaiAddress = '0x06AF07097C9Eeb7fD685c692751D5C66dB49c215';

const BTCPPAddress = '0x0327112423F3A68efdF1fcF402F6c5CB9f7C33fd';

const aaveAssetAdapterTokens = [
aDaiAddress,
aTusdAddress,
Expand Down Expand Up @@ -218,6 +222,9 @@ const mcdAssetAdapterTokens = [
const mcdDebtAdapterTokens = [
daiAddress,
];
const pieDAOPieAdapterTokens = [
BTCPPAddress,
];
const poolTogetherAdapterTokens = [
saiPoolAddress,
daiPoolAddress,
Expand Down Expand Up @@ -412,6 +419,18 @@ module.exports = async (deployer, network, accounts) => {
'0',
]);

await deployer.deploy(PieDAOPieAdapter, { from: accounts[0] });
adapters.push([PieDAOPieAdapter.address]);
tokens.push([pieDAOPieAdapterTokens]);
protocolNames.push('PieDAO');
metadata.push([
'PieDAO BTC++',
'BTC on Ethereum diversified',
'btc.piedao.org',
'protocol-icons.s3.us-east-1.amazonaws.com/piedao.png',
'0',
]);

await deployer.deploy(SynthetixAssetAdapter, { from: accounts[0] });
await deployer.deploy(SynthetixDebtAdapter, { from: accounts[0] });
adapters.push([SynthetixAssetAdapter.address, SynthetixDebtAdapter.address]);
Expand Down Expand Up @@ -521,6 +540,12 @@ module.exports = async (deployer, network, accounts) => {
ChaiTokenAdapter.address,
);
});
await deployer.deploy(PieDAOPieTokenAdapter, { from: accounts[0] })
.then(() => {
tokenAdapters.push(
PieDAOPieTokenAdapter.address,
);
});
await deployer.deploy(PoolTogetherTokenAdapter, { from: accounts[0] })
.then(() => {
tokenAdapters.push(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let tokenAdapters = [];

module.exports = async (deployer, network, accounts) => {
adapters.push(['']);
tokens.push([dmmAssetAdapterTokens]);
tokens.push([[]]);
protocolNames.push('Initial protocol name');
metadata.push([
'Name',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"eth-gas-reporter": "0.2.17",
"ethlint": "1.2.5",
"ganache-cli": "6.9.1",
"solhint": "2.3.1",
"solhint": "3.0.0-rc.8",
"solidity-coverage": "0.7.4"
}
}
8 changes: 4 additions & 4 deletions test/AaveAssetAdapter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./AaveAssetAdapter');
const TokenAdapter = artifacts.require('./AaveTokenAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('AaveAssetAdapter');
const TokenAdapter = artifacts.require('AaveTokenAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('AaveAssetAdapter', () => {
const aDAIAddress = '0xfC1E690f61EFd961294b3e1Ce3313fBD8aa4f85d';
Expand Down
6 changes: 3 additions & 3 deletions test/AaveDebtAdapter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./AaveDebtAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('AaveDebtAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('AaveDebtAdapter', () => {
const daiAddress = '0x6B175474E89094C44Da98b954EedeAC495271d0F';
Expand Down
6 changes: 3 additions & 3 deletions test/AdapterRegistry.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import expectRevert from './helpers/expectRevert';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./MockAdapter');
const TokenAdapter = artifacts.require('./MockTokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('MockAdapter');
const TokenAdapter = artifacts.require('MockTokenAdapter');

const ZERO = '0x0000000000000000000000000000000000000000';
const ONE = '0x1111111111111111111111111111111111111111';
Expand Down
4 changes: 3 additions & 1 deletion test/AdapterRegistryDeployed.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const AdapterRegistry = artifacts.require('./AdapterRegistry');
const AdapterRegistry = artifacts.require('AdapterRegistry');

contract.skip('AdapterRegistry deployed', () => {
let adapterRegistry;
Expand All @@ -22,6 +22,7 @@ contract.skip('AdapterRegistry deployed', () => {
'TokenSets',
'Synthetix',
'PoolTogether',
'PieDAO',
'Multi-Collateral Dai',
'Dai Savings Protocol',
'Chai',
Expand All @@ -48,6 +49,7 @@ contract.skip('AdapterRegistry deployed', () => {
'SmartToken',
'SetToken',
'PoolTogether pool',
'PieDAO Pie Token',
'Chai token',
'YToken',
'IdleToken',
Expand Down
10 changes: 5 additions & 5 deletions test/BalancerAdapter.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./BalancerAdapter');
const TokenAdapter = artifacts.require('./BalancerTokenAdapter');
const CompoundTokenAdapter = artifacts.require('./CompoundTokenAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('BalancerAdapter');
const TokenAdapter = artifacts.require('BalancerTokenAdapter');
const CompoundTokenAdapter = artifacts.require('CompoundTokenAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('BalancerAdapter', () => {
const wethDai3070PoolAddress = '0x53b89CE35928dda346c574D9105A5479CB87231c';
Expand Down
8 changes: 4 additions & 4 deletions test/BancorAdapter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./BancorAdapter');
const TokenAdapter = artifacts.require('./BancorTokenAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('BancorAdapter');
const TokenAdapter = artifacts.require('BancorTokenAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('BalancerAdapter', () => {
const bntBethPoolAddress = '0xb1CD6e4153B2a390Cf00A6556b0fC1458C4A5533';
Expand Down
8 changes: 4 additions & 4 deletions test/ChaiAdapter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./ChaiAdapter');
const TokenAdapter = artifacts.require('./ChaiTokenAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('ChaiAdapter');
const TokenAdapter = artifacts.require('ChaiTokenAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('ChaiAdapter', () => {
const chaiAddress = '0x06AF07097C9Eeb7fD685c692751D5C66dB49c215';
Expand Down
8 changes: 4 additions & 4 deletions test/CompoundAssetAdapter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./CompoundAssetAdapter');
const TokenAdapter = artifacts.require('./CompoundTokenAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('CompoundAssetAdapter');
const TokenAdapter = artifacts.require('CompoundTokenAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('CompoundAssetAdapter', () => {
const cDAIAddress = '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643';
Expand Down
6 changes: 3 additions & 3 deletions test/CompoundDebtAdapter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./CompoundDebtAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('CompoundDebtAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('CompoundDebtAdapter', () => {
const daiAddress = '0x6B175474E89094C44Da98b954EedeAC495271d0F';
Expand Down
12 changes: 6 additions & 6 deletions test/CurveAdapter.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./CurveAdapter');
const TokenAdapter = artifacts.require('./CurveTokenAdapter');
const CTokenAdapter = artifacts.require('./CompoundTokenAdapter');
const YTokenAdapter = artifacts.require('./IearnTokenAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('CurveAdapter');
const TokenAdapter = artifacts.require('CurveTokenAdapter');
const CTokenAdapter = artifacts.require('CompoundTokenAdapter');
const YTokenAdapter = artifacts.require('IearnTokenAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('CurveAdapter', () => {
const ssCompoundTokenAddress = '0x845838DF265Dcd2c412A1Dc9e959c7d08537f8a2';
Expand Down
6 changes: 3 additions & 3 deletions test/DSRAdapter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./DSRAdapter');
const TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('DSRAdapter');
const TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('DSRAdapter', () => {
const daiAddress = '0x6B175474E89094C44Da98b954EedeAC495271d0F';
Expand Down
8 changes: 4 additions & 4 deletions test/DmmAssetAdapter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./DmmAssetAdapter');
const TokenAdapter = artifacts.require('./DmmTokenAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('DmmAssetAdapter');
const TokenAdapter = artifacts.require('DmmTokenAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('DmmAssetAdapter', () => {
const mDAIAddress = '0x06301057D77D54B6e14c7FafFB11Ffc7Cab4eaa7';
Expand Down
6 changes: 3 additions & 3 deletions test/DyDxAssetAdapter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./DyDxAssetAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('DyDxAssetAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('DyDxAssetAdapter', () => {
const wethAddress = '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2';
Expand Down
6 changes: 3 additions & 3 deletions test/DyDxDebtAdapter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./DyDxDebtAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('DyDxDebtAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('DyDxDebtAdapter', () => {
const wethAddress = '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2';
Expand Down
6 changes: 3 additions & 3 deletions test/ERC20TokenAdapter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./SynthetixAssetAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('SynthetixAssetAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('ERC20TokenAdapter', () => {
const badAddress = '0x101571584659dC31bF3E3E5E29F55D8BdfBAecEC';
Expand Down
8 changes: 4 additions & 4 deletions test/IdleAdapter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./IdleAdapter');
const TokenAdapter = artifacts.require('./IdleTokenAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('IdleAdapter');
const TokenAdapter = artifacts.require('IdleTokenAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('IdleAdapter', () => {
const daiAddress = '0x6B175474E89094C44Da98b954EedeAC495271d0F';
Expand Down
8 changes: 4 additions & 4 deletions test/IearnAdapter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import displayToken from './helpers/displayToken';

const AdapterRegistry = artifacts.require('./AdapterRegistry');
const ProtocolAdapter = artifacts.require('./IearnAdapter');
const TokenAdapter = artifacts.require('./IearnTokenAdapter');
const ERC20TokenAdapter = artifacts.require('./ERC20TokenAdapter');
const AdapterRegistry = artifacts.require('AdapterRegistry');
const ProtocolAdapter = artifacts.require('IearnAdapter');
const TokenAdapter = artifacts.require('IearnTokenAdapter');
const ERC20TokenAdapter = artifacts.require('ERC20TokenAdapter');

contract('IearnAdapter', () => {
const daiAddress = '0x6B175474E89094C44Da98b954EedeAC495271d0F';
Expand Down
Loading

0 comments on commit f85fcd7

Please sign in to comment.