-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from Augmint/token_migration
legacy token addresses in migration scripts + conversion event
- Loading branch information
Showing
3 changed files
with
48 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const FeeAccount = artifacts.require("./FeeAccount.sol"); | ||
const TokenAEur = artifacts.require("./TokenAEur.sol"); | ||
const MonetarySupervisor = artifacts.require("./MonetarySupervisor.sol"); | ||
|
||
module.exports = async function(deployer, network, accounts) { | ||
const monetarySupervisor = MonetarySupervisor.at(MonetarySupervisor.address); | ||
|
||
if (web3.version.network == 999) { | ||
const oldToken = await TokenAEur.new( | ||
FeeAccount.address, | ||
2000, // transferFeePt in parts per million = 0.2% | ||
2, // min: 0.02 A-EUR | ||
500 // max fee: 5 A-EUR | ||
); | ||
|
||
await Promise.all([ | ||
oldToken.grantPermission(accounts[0], "MonetarySupervisorContract"), // "hack" for test to issue | ||
oldToken.grantPermission(monetarySupervisor.address, "NoFeeTransferContracts"), | ||
monetarySupervisor.setAcceptedLegacyAugmintToken(oldToken.address, true) | ||
]); | ||
|
||
await oldToken.issueTo(accounts[0], 20000); // issue some to account 0 | ||
console.log( | ||
"On local ganache - deployed a mock legacy token contract for manual testing at " + oldToken.address | ||
); | ||
} else if (web3.version.network === 4) { | ||
// on rinkeby | ||
const oldToken = TokenAEur.at("0xa35d9de06895a3a2e7ecae26654b88fe71c179ea"); | ||
await monetarySupervisor.setAcceptedLegacyAugmintToken(oldToken.address, true); | ||
await Promise.all([ | ||
oldToken.grantPermission(monetarySupervisor.address, "NoFeeTransferContracts"), | ||
monetarySupervisor.setAcceptedLegacyAugmintToken(oldToken.address, true) | ||
]); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters