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

Updated NFTs with Metaplex lesson #503

Closed
wants to merge 3 commits into from

Conversation

AbuTuraab
Copy link

Problem

Outdated Tokens with Metaplex lessons

Summary of Changes

Updated code snippets with the latest dependencies and official Metaplex coding conventions
Fixed some grammar issues in the lesson
Fixed as per guidelines
Removed outdated dependencies and replaced them with the latest versions, and everything is working fine as expected

@mikemaccana

Copy link
Collaborator

@mikemaccana mikemaccana left a comment

Choose a reason for hiding this comment

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

This PR moves the code further away from our current style, rather than closer to it.You need to read CONTRIBUTING.md as mentioned in the Superteam Earn before contributing.

),
);

const user = Keypair.fromSecretKey(new Uint8Array(walletFile));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not just use await getKeypairFromFile();? This PR makes the process of loading a keypair more complicated.

@@ -147,17 +153,17 @@ computer.
In action, uploading an image named `random-image.png` from your computer would
take the following steps:

1. Reading the file using `readFile` into a buffer.
1. Reading the file using `readFileSync` into a buffer.
Copy link
Collaborator

Choose a reason for hiding this comment

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

node,js generally prefers async code rather than blocking code.


const buffer = await fs.readFile(filePath);
const buffer = await fs.readFileSync(filePath);
Copy link
Collaborator

Choose a reason for hiding this comment

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

As mentioned in README.md we prefer async/await.

@@ -345,7 +355,7 @@ Solana.
To begin, make a new folder and install the relevant dependencies:

```bash
npm i @solana/web3.js npm i @solana/web3.js npm i @solana-developers/helpers npm i @metaplex-foundation/mpl-token-metadata npm i @metaplex-foundation/umi-bundle-defaults npm i @metaplex-foundation/umi-uploader-irys npm i --save-dev esrun
npm i @solana/web3.js npm i @metaplex-foundation/mpl-token-metadata npm i @metaplex-foundation/umi-bundle-defaults npm i @metaplex-foundation/umi-uploader-irys npm i --save-dev esrun
Copy link
Collaborator

Choose a reason for hiding this comment

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

You are removing helpers for no reason. See CONTRIBUTING.md

@mikemaccana mikemaccana closed this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants