Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit event on install #111

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Emit event on install #111

merged 2 commits into from
Jan 29, 2024

Conversation

Levike34
Copy link
Contributor

@Levike34 Levike34 commented Jan 26, 2024

Emit a Transfer event on install_contract() to register token's existence. It would be best if some event was emitted on install.

Emit a Transfer event on install_contract() to register token's existence
@davidatwhiletrue
Copy link
Contributor

@Levike34 Maybe it should be a Mint event?

@Levike34
Copy link
Contributor Author

Levike34 commented Jan 26, 2024

@Levike34 Maybe it should be a Mint event?

@davidatwhiletrue That does make more sense. For more context, I created this PR to address this issue: After deploying a new CEP18 contract, tokens do not appear in Casper Wallet until some event is emitted. Transfer works for sure, but I will have to check if Mint works as well. Tokens only seem to appear if events_mode is enabled and after a Transfer event. This commit I put allows tokens to be seen in one's wallet after calling install_contract

@davidatwhiletrue
Copy link
Contributor

@Levike34 thanks for the context information. I just tried and, yes, emitting a Mint event during contract installation also makes the initial supply visible in the contract owner account.

@Levike34
Copy link
Contributor Author

@davidatwhiletrue updated to Mint event

@gRoussac gRoussac requested a review from deuszex January 29, 2024 10:53
@deuszex
Copy link
Contributor

deuszex commented Jan 29, 2024

Technically it is a Mint event.

Copy link
Contributor

@deuszex deuszex left a comment

Choose a reason for hiding this comment

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

Reasonable

@deuszex deuszex merged commit 3b02f59 into casper-ecosystem:dev Jan 29, 2024
2 checks passed
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