diff --git a/contracts/token/ERC20/ERC20Burnable.sol b/contracts/token/ERC20/ERC20Burnable.sol index ee2f98b82..e49d5de2c 100644 --- a/contracts/token/ERC20/ERC20Burnable.sol +++ b/contracts/token/ERC20/ERC20Burnable.sol @@ -9,8 +9,6 @@ import "./ERC20.sol"; */ contract ERC20Burnable is ERC20 { - event TokensBurned(address indexed burner, uint256 value); - /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. @@ -34,6 +32,5 @@ contract ERC20Burnable is ERC20 { */ function _burn(address who, uint256 value) internal { super._burn(who, value); - emit TokensBurned(who, value); } } diff --git a/contracts/token/ERC20/ERC20Mintable.sol b/contracts/token/ERC20/ERC20Mintable.sol index 50e03a7ec..20cc200ed 100644 --- a/contracts/token/ERC20/ERC20Mintable.sol +++ b/contracts/token/ERC20/ERC20Mintable.sol @@ -9,7 +9,6 @@ import "../../access/roles/MinterRole.sol"; * @dev ERC20 minting logic */ contract ERC20Mintable is ERC20, MinterRole { - event Minted(address indexed to, uint256 amount); event MintingFinished(); bool private _mintingFinished = false; @@ -42,7 +41,6 @@ contract ERC20Mintable is ERC20, MinterRole { returns (bool) { _mint(to, amount); - emit Minted(to, amount); return true; } diff --git a/contracts/token/ERC721/ERC721Mintable.sol b/contracts/token/ERC721/ERC721Mintable.sol index 481fa4715..81b6f8ea6 100644 --- a/contracts/token/ERC721/ERC721Mintable.sol +++ b/contracts/token/ERC721/ERC721Mintable.sol @@ -9,7 +9,6 @@ import "../../access/roles/MinterRole.sol"; * @dev ERC721 minting logic */ contract ERC721Mintable is ERC721, MinterRole { - event Minted(address indexed to, uint256 tokenId); event MintingFinished(); bool private _mintingFinished = false; @@ -42,7 +41,6 @@ contract ERC721Mintable is ERC721, MinterRole { returns (bool) { _mint(to, tokenId); - emit Minted(to, tokenId); return true; } diff --git a/test/token/ERC20/ERC20Burnable.behavior.js b/test/token/ERC20/ERC20Burnable.behavior.js index 69c5bf515..be81ed63b 100644 --- a/test/token/ERC20/ERC20Burnable.behavior.js +++ b/test/token/ERC20/ERC20Burnable.behavior.js @@ -28,12 +28,6 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) { (await this.token.balanceOf(owner)).should.be.bignumber.equal(initialBalance - amount); }); - it('emits a burn event', async function () { - const event = expectEvent.inLogs(this.logs, 'TokensBurned'); - event.args.burner.should.equal(owner); - event.args.value.should.be.bignumber.equal(amount); - }); - it('emits a transfer event', async function () { const event = expectEvent.inLogs(this.logs, 'Transfer'); event.args.from.should.equal(owner); @@ -79,12 +73,6 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) { (await this.token.allowance(owner, burner)).should.be.bignumber.equal(originalAllowance - amount); }); - it('emits a burn event', async function () { - const event = expectEvent.inLogs(this.logs, 'TokensBurned'); - event.args.burner.should.equal(owner); - event.args.value.should.be.bignumber.equal(amount); - }); - it('emits a transfer event', async function () { const event = expectEvent.inLogs(this.logs, 'Transfer'); event.args.from.should.equal(owner); diff --git a/test/token/ERC20/ERC20Capped.behavior.js b/test/token/ERC20/ERC20Capped.behavior.js index 3bec19302..e56195d35 100644 --- a/test/token/ERC20/ERC20Capped.behavior.js +++ b/test/token/ERC20/ERC20Capped.behavior.js @@ -1,5 +1,4 @@ const { expectThrow } = require('../../helpers/expectThrow'); -const expectEvent = require('../../helpers/expectEvent'); const BigNumber = web3.BigNumber; @@ -16,8 +15,8 @@ function shouldBehaveLikeERC20Capped (minter, [anyone], cap) { }); it('should mint when amount is less than cap', async function () { - const { logs } = await this.token.mint(anyone, cap.sub(1), { from }); - expectEvent.inLogs(logs, 'Minted'); + await this.token.mint(anyone, cap.sub(1), { from }); + (await this.token.totalSupply()).should.be.bignumber.equal(cap.sub(1)); }); it('should fail to mint if the ammount exceeds the cap', async function () { diff --git a/test/token/ERC20/ERC20Mintable.behavior.js b/test/token/ERC20/ERC20Mintable.behavior.js index debca8097..5cf43696d 100644 --- a/test/token/ERC20/ERC20Mintable.behavior.js +++ b/test/token/ERC20/ERC20Mintable.behavior.js @@ -104,11 +104,6 @@ function shouldBehaveLikeERC20Mintable (minter, [anyone]) { }); it('emits a mint and a transfer event', async function () { - const mintEvent = expectEvent.inLogs(this.logs, 'Minted', { - to: anyone, - }); - mintEvent.args.amount.should.be.bignumber.equal(amount); - const transferEvent = expectEvent.inLogs(this.logs, 'Transfer', { from: ZERO_ADDRESS, to: anyone, diff --git a/test/token/ERC721/ERC721MintBurn.behavior.js b/test/token/ERC721/ERC721MintBurn.behavior.js index a86e0c4a5..cadfe87cc 100644 --- a/test/token/ERC721/ERC721MintBurn.behavior.js +++ b/test/token/ERC721/ERC721MintBurn.behavior.js @@ -47,11 +47,6 @@ function shouldBehaveLikeMintAndBurnERC721 ( to: newOwner, }); logs[0].args.tokenId.should.be.bignumber.equal(thirdTokenId); - - await expectEvent.inLogs(logs, 'Minted', { - to: newOwner, - }); - logs[1].args.tokenId.should.be.bignumber.equal(thirdTokenId); }); });