Skip to content

Add Transfer event when token is minted#345

Merged
frangio merged 1 commit into
OpenZeppelin:masterfrom
SylTi:master
Aug 11, 2017
Merged

Add Transfer event when token is minted#345
frangio merged 1 commit into
OpenZeppelin:masterfrom
SylTi:master

Conversation

@SylTi

@SylTi SylTi commented Aug 1, 2017

Copy link
Copy Markdown
Contributor

cf issue #344

@SylTi SylTi changed the title Add Transfer event when token is minted to be fully ERC20 compliant Add Transfer event when token is minted Aug 1, 2017
@jdeauna13

jdeauna13 commented Aug 2, 2017 via email

Copy link
Copy Markdown

@SylTi

SylTi commented Aug 2, 2017

Copy link
Copy Markdown
Contributor Author

what ?

@frangio frangio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @SylTi! Would you mind writing a test for MintableToken to check that both Mint and Transfer events are being emitted?

@SylTi

SylTi commented Aug 4, 2017

Copy link
Copy Markdown
Contributor Author

@frangio Updated with tests ;)

Comment thread test/MintableToken.js
await token.mint(accounts[0], 100);

const result = await token.mint(accounts[0], 100);
assert.equal(result.logs[0].event, 'Mint');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Array#find instead of hardcoding the index, like result.logs.find(e => e.event === 'Mint'). Same for Transfer.

Sorry! Last changes and I'll merge.

@SylTi

SylTi commented Aug 9, 2017 via email

Copy link
Copy Markdown
Contributor Author

@frangio

frangio commented Aug 9, 2017

Copy link
Copy Markdown
Contributor

Alright, merging as is! Thanks @SylTi!

@frangio frangio merged commit b972f43 into OpenZeppelin:master Aug 11, 2017
ProphetDaniel pushed a commit to classicdelta/Smart-Contracts that referenced this pull request Mar 9, 2018
Add Transfer event when token is minted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants