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

Update fa_coin and your_fungible_asset #600

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jmintuitive
Copy link
Contributor

Description

Updates the example code used in the "Your First Fungible Asset" tutorial in order to make it customizable. That way during the updated tutorial, you can change the name of the asset and see what the result is on-chain.

Test Plan

I tested locally to verify that the fa_coin still deployed and executed transactions correctly, but now the updated your_fungible_asset script actually looks up the ASSET_NAME.

Related Links

Checklist

  • Have you ran pnpm fmt?
  • Have you updated the CHANGELOG.md? (Not needed)

@jmintuitive jmintuitive requested a review from a team as a code owner December 5, 2024 17:23
Copy link
Collaborator

@gregnazario gregnazario left a comment

Choose a reason for hiding this comment

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

LGTM, just clean up those two issues

* @param admin - The account that deployed the fungible asset module.
* @returns The name of the token as a string.
*/
async function fetchTokenName(aptos: Aptos, admin: Account): Promise<string> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

These examples use a "global" aptos object, so it doesn't have to be passed here

);

console.log("Alice freezes Bob's account.");
const freezeTransactionHash = await freeze(alice, bob.accountAddress);
await aptos.waitForTransaction({ transactionHash: freezeTransactionHash });

console.log(
"Alice as the admin forcefully transfers the newly minted coins of Charlie to Bob ignoring that Bob's account is frozen.",
`Alice as the admin forcefully transfers the newly minted coins of Charlie to Bob ignoring that Bob's account is frozen.`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

please replace with "

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.

2 participants