Skip to content

Commit

Permalink
Merge pull request #74 from Augmint/migration_data
Browse files Browse the repository at this point in the history
Migration initial data update (post review)
  • Loading branch information
Peter Petrovics authored Apr 20, 2018
2 parents 431424b + b4b4cd1 commit 3499885
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
18 changes: 10 additions & 8 deletions migrations/10_deploy_Locker.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ module.exports = function(deployer) {
monetarySupervisor.grantPermission(Locker.address, "LockerContracts"),

// (perTermInterest, durationInSecs, minimumLockAmount, isActive)
locker.addLockProduct(160000, 31536000, 1000, true), // 365 days, 16% p.a.
locker.addLockProduct(66750, 15552000, 1000, true), // 180 days, 14% p.a.
locker.addLockProduct(23779, 7776000, 1000, true), // 90 days 10% p.a.
locker.addLockProduct(6346, 2592000, 1000, true), // 30 days, 8% p.a.
locker.addLockProduct(2237, 1209600, 1000, true), // 14 days, 6% p.a.
locker.addLockProduct(936, 604800, 1000, true), // 7 days, 5% p.a.
locker.addLockProduct(251, 3600, 1000, true), // 60 minutes for testing, ~801.13% p.a.
locker.addLockProduct(1, 60, 1000, true) // 1 minute for testing, ~69.15% p.a.
locker.addLockProduct(80001, 31536000, 1000, true), // 365 days, 8% p.a.
locker.addLockProduct(33929, 15552000, 1000, true), // 180 days, 7% p.a.

locker.addLockProduct(14472, 7776000, 1000, true), // 90 days 6% p.a.
locker.addLockProduct(4019, 2592000, 1000, true), // 30 days, 5% p.a.
locker.addLockProduct(1506, 1209600, 1000, true), // 14 days, 4% p.a.
locker.addLockProduct(568, 604800, 1000, true), // 7 days, 3% p.a.

locker.addLockProduct(3, 3600, 2000, true), // 60 minutes for testing, ~2.66% p.a.
locker.addLockProduct(1, 60, 3000, true) // 1 minute for testing, ~69.15% p.a.
]);
});
};
6 changes: 4 additions & 2 deletions migrations/98_add_legacyTokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ module.exports = async function(deployer, network, accounts) {
"On local ganache - deployed a mock legacy token contract for manual testing at " + oldToken.address
);
} else if (web3.version.network == 4) {
const oldToken = TokenAEur.at("0xa35d9de06895a3a2e7ecae26654b88fe71c179ea");
const oldToken1 = TokenAEur.at("0xa35d9de06895a3a2e7ecae26654b88fe71c179ea");
const oldToken2 = TokenAEur.at("0x03fe291f8a30e54cd05459f368d554b40784ca78");
await Promise.all([
feeAccount.grantPermission(monetarySupervisor.address, "NoFeeTransferContracts"),
monetarySupervisor.setAcceptedLegacyAugmintToken(oldToken.address, true)
monetarySupervisor.setAcceptedLegacyAugmintToken(oldToken1.address, true),
monetarySupervisor.setAcceptedLegacyAugmintToken(oldToken2.address, true)
]);
}
});
Expand Down
17 changes: 10 additions & 7 deletions migrations/9_deploy_LoanManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ module.exports = function(deployer) {
}
console.log(" On a test network. Adding test loanProducts. Network id: ", web3.version.network);
// term (in sec), discountRate, loanCoverageRatio, minDisbursedAmount (w/ 4 decimals), defaultingFeePt, isActive
await lm.addLoanProduct(31536000, 800000, 800000, 3000, 50000, true); // due in 365d
await lm.addLoanProduct(15552000, 850000, 800000, 3000, 50000, true); // due in 180d
await lm.addLoanProduct(7776000, 910000, 800000, 3000, 50000, true); // due in 90d
await lm.addLoanProduct(2592000, 950000, 800000, 3000, 50000, true); // due in 30d
await lm.addLoanProduct(86400, 970000, 850000, 3000, 50000, true); // due in 1 day
await lm.addLoanProduct(3600, 985000, 900000, 2000, 50000, true); // due in 1hr for testing repayments
await lm.addLoanProduct(1, 990000, 950000, 1000, 50000, true); // defaults in 1 secs for testing
await lm.addLoanProduct(31536000, 860000, 550000, 1000, 50000, true); // 365d, 14% p.a.
await lm.addLoanProduct(15552000, 937874, 550000, 1000, 50000, true); // 180d, 13% p.a.

await lm.addLoanProduct(7776000, 971661, 600000, 1000, 50000, true); // 90d, 12%. p.a.
await lm.addLoanProduct(2592000, 990641, 600000, 1000, 50000, true); // 30d, 12% p.a.
await lm.addLoanProduct(1209600, 996337, 600000, 1000, 50000, true); // 14d, 10% p.a.
await lm.addLoanProduct(604800, 998170, 600000, 1000, 50000, true); // 7d, 10% p.a.

await lm.addLoanProduct(3600, 999989, 980000, 2000, 50000, true); // due in 1hr for testing repayments ? p.a.
await lm.addLoanProduct(1, 999999, 990000, 3000, 50000, true); // defaults in 1 secs for testing ? p.a.
});
};

0 comments on commit 3499885

Please sign in to comment.