-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add your_coin
example
#208
Conversation
d74508f
to
c69a8c7
Compare
c69a8c7
to
d30210d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some feedback on toString()
, but otherwise it's good
}, | ||
}); | ||
|
||
return data[0] ? data[0].amount : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return data[0] ? data[0].amount : 0; | |
return data[0]?.amount ?? 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesnt work with cjs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really? Interesting...
b896921
to
dff2f08
Compare
Description
This PR
your_coin
example to demonstrate how to publish a MoonCoin module, register, mind and transfer a coin. Based on existing sdk v1 example https://github.com/aptos-labs/aptos-core/blob/main/ecosystem/typescript/sdk/examples/typescript/your_coin.tsgetAccountAPTAmount
to query account's APT amountgetAccountCoinAmount
to query any account's coin amountTest Plan
pnpm test
Related Links