-
-
Save kolya-t/5112b742c75f05a655bb34d4030991e4 to your computer and use it in GitHub Desktop.
it('transfer with disabled lock') with async/await
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
it('transfer with disabled lock', async () => { | |
const instance = await ERC20.new( | |
1000000, | |
"TEST", | |
18, | |
"TEST", | |
true, | |
false | |
); | |
await Utils.balanceShouldEqualTo(instance, accounts[0], 1000000); | |
await Utils.balanceShouldEqualTo(instance, instance.address, 0); | |
let receipt = await instance.transfer(accounts[1], 1000); | |
await Utils.receiptShouldSucceed(receipt); | |
await Utils.balanceShouldEqualTo(instance, accounts[0], 999000); | |
await Utils.balanceShouldEqualTo(instance, accounts[1], 1000); | |
receipt = await instance.transfer(accounts[1], 1000); | |
await Utils.receiptShouldSucceed(receipt); | |
receipt = await instance.transfer(accounts[1], 1000); | |
await Utils.receiptShouldSucceed(receipt); | |
receipt = await instance.transfer(accounts[1], 1000); | |
await Utils.receiptShouldSucceed(receipt); | |
await Utils.balanceShouldEqualTo(instance, accounts[0], 996000); | |
await Utils.balanceShouldEqualTo(instance, accounts[1], 4000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment