Skip to content

Commit

Permalink
Added devnet build, updated migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
0x31 committed Jun 20, 2019
1 parent 927c3d8 commit e4ea11c
Show file tree
Hide file tree
Showing 15 changed files with 117,115 additions and 16 deletions.
17,316 changes: 17,316 additions & 0 deletions build/devnet/BTCShifter.json

Large diffs are not rendered by default.

25,495 changes: 25,495 additions & 0 deletions build/devnet/DarknodePayment.json

Large diffs are not rendered by default.

9,015 changes: 9,015 additions & 0 deletions build/devnet/DarknodePaymentStore.json

Large diffs are not rendered by default.

29,977 changes: 29,977 additions & 0 deletions build/devnet/DarknodeRegistry.json

Large diffs are not rendered by default.

7,689 changes: 7,689 additions & 0 deletions build/devnet/DarknodeRegistryStore.json

Large diffs are not rendered by default.

1,100 changes: 1,100 additions & 0 deletions build/devnet/DarknodeSlasher.json

Large diffs are not rendered by default.

2,869 changes: 2,869 additions & 0 deletions build/devnet/RenToken.json

Large diffs are not rendered by default.

1,770 changes: 1,770 additions & 0 deletions build/devnet/ShifterRegistry.json

Large diffs are not rendered by default.

17,316 changes: 17,316 additions & 0 deletions build/devnet/ZECShifter.json

Large diffs are not rendered by default.

2,273 changes: 2,273 additions & 0 deletions build/devnet/zBTC.json

Large diffs are not rendered by default.

2,273 changes: 2,273 additions & 0 deletions build/devnet/zZEC.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion migrations/1_darknodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ const DarknodeSlasher = artifacts.require("DarknodeSlasher");
const networks = require("./networks.js");

module.exports = async function (deployer, network) {
deployer.logger.log(`Deploying to ${network}...`);
deployer.logger.log(`Deploying to ${network} (${network.replace("-fork", "")})...`);

network = network.replace("-fork", "");

const addresses = networks[network] || {};
const config = networks[network] ? networks[network].config : networks.config;
Expand Down
9 changes: 6 additions & 3 deletions migrations/2_shifter.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ const DarknodePayment = artifacts.require("DarknodePayment");
const networks = require("./networks.js");

module.exports = async function (deployer, network, accounts) {
deployer.logger.log(`Deploying to ${network}...`);
deployer.logger.log(`Deploying to ${network} (${network.replace("-fork", "")})...`);

network = network.replace("-fork", "");

const addresses = networks[network] || {};
const config = networks[network] ? networks[network].config : networks.config;
Expand Down Expand Up @@ -89,7 +91,7 @@ module.exports = async function (deployer, network, accounts) {
}

if ((await registry.getShifter(zBTC.address)) === NULL) {
console.log(`Registring BTC shifter`);
console.log(`Registering BTC shifter`);
await registry.setShifter(zBTC.address, BTCShifter.address);
} else {
console.log(`BTC shifter is already registered: ${await registry.getShifter(zBTC.address)}`);
Expand Down Expand Up @@ -126,7 +128,7 @@ module.exports = async function (deployer, network, accounts) {
}

if ((await registry.getShifter(zZEC.address)) === NULL) {
console.log(`Registring ZEC shifter`);
console.log(`Registering ZEC shifter`);
await registry.setShifter(zZEC.address, ZECShifter.address);
} else {
console.log(`ZEC shifter is already registered: ${await registry.getShifter(zZEC.address)}`);
Expand All @@ -140,5 +142,6 @@ module.exports = async function (deployer, network, accounts) {
ZECShifter: ZECShifter.address,
zBTC: zBTC.address,
zZEC: zZEC.address,
ShifterRegistry: ShifterRegistry.address,
});
}
22 changes: 11 additions & 11 deletions migrations/networks.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const BN = require("bn.js");

const config = {
VERSION: "1.0.0",
VERSION: "927c3d8e",
MINIMUM_BOND: new BN(100000).mul(new BN(10).pow(new BN(18))),
MINIMUM_POD_SIZE: 3, // 24 in production
MINIMUM_EPOCH_INTERVAL: 2, // 14400 in production
Expand Down Expand Up @@ -61,21 +61,21 @@ module.exports = {

devnet: {
RenToken: "0x2cd647668494c1b15743ab283a0f980d90a87394",
DarknodeSlasher: "",
DarknodeRegistry: "",
DarknodeRegistryStore: "",
DarknodePaymentStore: "",
DarknodePayment: "",
DarknodeSlasher: "0xfe48363206E1849a2F53f5214af932354c35FD89",
DarknodeRegistry: "0x6E1a6b85f05bfec5c24C7a26E302cB28e639651c",
DarknodeRegistryStore: "0xC126a308dd07Adfa4a445686dcF7CbC423185593",
DarknodePaymentStore: "0x6341DF1012E862f766Fcd72e0fCAAc5a3839CFef",
DarknodePayment: "0x1f1b1d015Fc31d425C616cC35E39e31686DA69A8",
tokens: {
DAI: "0xc4375b7de8af5a38a93548eb8453a498222c4ff2",
ETH: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
},

BTCShifter: "",
ZECShifter: "",
ShifterRegistry: "",
zBTC: "",
zZEC: "",
BTCShifter: "0xbe830ca535BeFf2C7d82B7494e0B9592A3815730",
ZECShifter: "0x7dD16bf08e06de454C569121a22E58b279c348FB",
zBTC: "0x2341D423440892081516b49e42Fa93aF5280c5f5",
zZEC: "0x8beFd13f678F56470A2919678432D58d6B6055B5",
ShifterRegistry: "0xda67a63aAf771c4Cef589B164337FBcB93C65034",

config: {
...config,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"coveralls": "cat ./coverage/lcov.info | coveralls",
"prepare": "patch-package",
"deploy": "truffle migrate --skipDryRun --network $NETWORK",
"clean-build": "grep -R -l 'networks\": {}' build --exclude-dir=development | xargs rm",
"verify": "truffle run verify --network $NETWORK"
},
"dependencies": {
Expand Down Expand Up @@ -58,4 +59,4 @@
"solc": "0.5.9",
"solidity-coverage": "github:rotcivegaf/solidity-coverage#5875f5b7bc74d447f3312c9c0e9fc7814b482477"
}
}
}

0 comments on commit e4ea11c

Please sign in to comment.