227 lines
7.5 KiB
JavaScript
Raw Permalink Normal View History

2019-05-08 11:11:14 -04:00
const rinkebyBase = {
enabled: true,
dappConnection: [
'$WEB3'
],
strategy: 'explicit',
tracking: './testnet.chains.json',
2019-12-19 11:24:37 +01:00
deploy: {
2019-05-08 11:11:14 -04:00
LPVault: {
},
LiquidPledging: {
},
RecoveryVault: {
},
LPFactory: {
2019-05-09 09:45:26 -04:00
address: '0x968F0a788F29b5B33296C61cEB34F1c40C55e52c',
2019-05-08 11:11:14 -04:00
args: {
_vaultBase: '$LPVault',
_lpBase: '$LiquidPledging',
}
},
// contracts for testing
StandardToken: {
},
SNT: {
// minting address: 0xEdEB948dE35C6ac414359f97329fc0b4be70d3f1
},
Kernel: {
2019-05-09 09:45:26 -04:00
address: "0x49798b01e64295497624645B77004614CC5160c3",
2019-05-08 11:11:14 -04:00
file: "@aragon/os/contracts/kernel/Kernel.sol"
},
ACL: {
file: "@aragon/os/contracts/acl/ACL.sol"
}
}
};
2018-11-04 11:07:02 -08:00
module.exports = {
// default applies to all environments
default: {
dappConnection: [
2019-12-19 11:24:37 +01:00
'$EMBARK',
2018-11-08 14:50:49 -08:00
'$WEB3', // uses pre existing web3 object if available (e.g in Mist)
'ws://localhost:8546',
'http://localhost:8545',
2018-11-04 11:07:02 -08:00
],
2018-11-07 07:00:44 -08:00
2019-08-19 14:01:02 -04:00
dappAutoEnable: false,
2018-11-08 14:50:49 -08:00
gas: 'auto',
// Strategy for the deployment of the contracts:
// - implicit will try to deploy all the contracts located inside the contracts directory
// or the directory configured for the location of the contracts. This is default one
// when not specified
// - explicit will only attempt to deploy the contracts that are explicity specified inside the
// contracts section.
strategy: 'explicit',
2019-12-19 11:24:37 +01:00
deploy: {},
2018-11-04 11:07:02 -08:00
},
// default environment, merges with the settings in default
// assumed to be the intended environment by `embark run`
development: {
dappConnection: [
2019-12-19 11:24:37 +01:00
'$EMBARK',
'$WEB3', // uses pre existing web3 object if available (e.g in Mist)
2018-11-08 14:50:49 -08:00
'ws://localhost:8546',
'http://localhost:8545',
],
2018-11-28 11:12:50 -05:00
strategy: 'explicit',
2019-12-19 11:24:37 +01:00
deploy: {
2018-11-08 14:50:49 -08:00
LPVault: {},
LiquidPledging: {
2019-04-23 09:58:54 -04:00
instanceOf: 'LiquidPledgingMock'
},
2018-11-08 14:50:49 -08:00
RecoveryVault: {},
LPFactory: {
2019-04-23 09:58:54 -04:00
args: ['$LPVault', '$LiquidPledging'],
2018-11-08 14:50:49 -08:00
},
// contracts for testing
StandardToken: {},
2018-11-28 11:12:50 -05:00
Kernel: {
file: "@aragon/os/contracts/kernel/Kernel.sol"
},
ACL: {
file: "@aragon/os/contracts/acl/ACL.sol"
2019-12-19 11:24:37 +01:00
},
cDAI: {
instanceOf: "StandardToken",
address: '0xf5dce57282a584d2746faf1593d3121fcac444dc'
},
cETH: {
instanceOf: "StandardToken",
address: '0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5'
},
SNT: {
address: '0x744d70FDBE2Ba4CF95131626614a1763DF805B9E'
2018-11-28 11:12:50 -05:00
}
2018-11-08 14:50:49 -08:00
},
// afterDeploy: [
// `console.log('we deployed here')`,
// `embark.logger.info('we deployed here')`,
// `LPFactory.methods.newLP("$accounts[0]", "$RecoveryVault").send({ gas: 7000000 })
2019-04-23 09:58:54 -04:00
// .then(({ events }) => {
// console.log('method ran');
// global.LiquidPledging = new web3.eth.Contract(LiquidPledgingMockAbi, events.DeployLiquidPledging.returnValues.liquidPledging);
// global.LPVault = new web3.eth.Contract(LPVaultAbi, events.DeployVault.returnValues.vault);
// StandardToken.methods.mint(accounts[1], web3.utils.toWei('1000')).send();
// StandardToken.methods.approve(global.LiquidPledging.address, '0xFFFFFFFFFFFFFFFF').send({ from: "$accounts[1]" });
// })`
2019-04-23 09:58:54 -04:00
// .catch(err => console.log('error', err))
// `,
// `web3.eth.getAccounts().then(accounts => {
// return LPFactory.methods.newLP(accounts[0], "$RecoveryVault").send({ gas: 7000000 })
2019-04-23 09:58:54 -04:00
// .then(({ events }) => {
// global.LiquidPledging = new web3.eth.Contract(LiquidPledgingMockAbi, events.DeployLiquidPledging.returnValues.liquidPledging);
// global.LPVault = new web3.eth.Contract(LPVaultAbi, events.DeployVault.returnValues.vault);
// StandardToken.methods.mint(accounts[1], web3.utils.toWei('1000')).send();
// StandardToken.methods.approve(global.LiquidPledging.address, '0xFFFFFFFFFFFFFFFF').send({ from: accounts[1] });
// });
// })
// .catch(err => console.log('error', err))
// `,
// ],
2018-11-04 11:07:02 -08:00
},
// merges with the settings in default
// used with "embark run privatenet"
2018-11-08 14:50:49 -08:00
privatenet: {},
2018-11-04 11:07:02 -08:00
// merges with the settings in default
// used with "embark run testnet"
2018-11-08 14:50:49 -08:00
testnet: {},
2018-11-04 11:07:02 -08:00
2019-05-22 14:19:22 -04:00
// merges with the settings in default
// used with "embark run ropsten"
ropsten: {
tracking: './ropsten.chains.json',
strategy: 'explicit',
2019-12-19 11:24:37 +01:00
deploy: {
DAI: {
instanceOf: "StandardToken",
address: "0xaD6D458402F60fD3Bd25163575031ACDce07538D"
},
2019-05-22 14:19:22 -04:00
LPVault: {},
LiquidPledging: {},
2019-08-09 12:03:03 -04:00
StandardToken: {},
SNT: {
address: "0x8aA3672a99C489E5Dc5dfDb40e607bE49970cbF7"
},
SwapProxy: {
address: "0x73d3731F9c21e21785Ec5677CC39AB4880CAaFe9",
args: [
'$LiquidPledging',
"0x818E6FECD516Ecc3849DAf6845e3EC868087B755",
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
2019-10-17 14:13:42 -04:00
"0x0000000000000000000000000000000000000000",
20
]
2019-08-09 12:03:03 -04:00
}
2019-05-22 14:19:22 -04:00
},
afterDeploy: async (dependencies) => {
await dependencies.contracts.LiquidPledging.methods.initialize(dependencies.contracts.LPVault.options.address).send({from: dependencies.web3.eth.defaultAccount, gas: 1000000});
await dependencies.contracts.LPVault.methods.initialize(dependencies.contracts.LiquidPledging.options.address).send({from: dependencies.web3.eth.defaultAccount, gas: 1000000});
2019-10-04 10:36:23 -04:00
await dependencies.contracts.LPVault.methods.setAutopay(true).send({from: dependencies.web3.eth.defaultAccount, gas: 1000000});
2019-05-22 14:19:22 -04:00
},
dappConnection: ["$WEB3"]
},
2019-05-08 11:11:14 -04:00
rinkeby: rinkebyBase,
2019-12-19 11:24:37 +01:00
rinkebyInfura: rinkebyBase,
2018-11-04 11:07:02 -08:00
// merges with the settings in default
// used with "embark run livenet"
2019-06-10 13:14:15 -04:00
livenet: {
enabled: true,
dappConnection: [
'$WEB3'
],
strategy: 'explicit',
tracking: './livenet.chains.json',
2019-12-19 11:24:37 +01:00
deploy: {
2019-06-10 13:14:15 -04:00
LPVault: {},
2019-06-12 11:16:21 -04:00
LiquidPledging: {
address: '0x603A7249E64b8cACe20ffb55926145346ca42A97',
2019-06-10 13:14:15 -04:00
},
DAI: {
instanceOf: "StandardToken",
address: '0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359'
},
cDAI: {
instanceOf: "StandardToken",
address: '0xf5dce57282a584d2746faf1593d3121fcac444dc'
},
cETH: {
instanceOf: "StandardToken",
address: '0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5'
},
2019-06-10 13:14:15 -04:00
SNT: {
2019-06-13 10:54:15 -04:00
address: '0x744d70FDBE2Ba4CF95131626614a1763DF805B9E'
2019-12-11 14:16:37 -05:00
},
SwapProxy: {
2019-12-18 13:00:49 -05:00
address: "0x10E1FC179cd37CFed5B77AC4b65D17f0B789360E",
2019-12-11 14:16:37 -05:00
args: [
'$LiquidPledging',
"0x818E6FECD516Ecc3849DAf6845e3EC868087B755",
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"0x0000000000000000000000000000000000000000",
20
]
2019-06-10 13:14:15 -04:00
}
},
afterDeploy: async (dependencies) => {
2019-12-12 14:43:46 -05:00
// await dependencies.contracts.LiquidPledging.methods.initialize(dependencies.contracts.LPVault.options.address).send({from: dependencies.web3.eth.defaultAccount, gas: 1000000});
// await dependencies.contracts.LPVault.methods.initialize(dependencies.contracts.LiquidPledging.options.address).send({from: dependencies.web3.eth.defaultAccount, gas: 1000000});
// await dependencies.contracts.LPVault.methods.setAutopay(true).send({from: dependencies.web3.eth.defaultAccount, gas: 1000000});
2019-06-10 13:14:15 -04:00
}
},
2018-11-04 11:07:02 -08:00
// you can name an environment with specific settings and then specify with
// "embark run custom_name" or "embark blockchain custom_name"
//custom_name: {
//}
}