You can mint an NFT on the blockchain in JavaScript with ~10 lines of code.

No solidity, no testing... just these 10 lines of JavaScript.

Here's how it works 🧵
Typically minting an NFT would require you to write code in this language called 'solidity' to create a smart contract which would then mint the nft.

It require lots of testing, security checks and remember, once code goes on the blockchain it cannot be changed.

This sucks.
What we'll do instead is use the thirdweb's JavaScript library, and with 7 lines of code we'll mint NFTs without any hassle.

I'll guide you through the entire process, let's go 👇🏻
Make you sure have a metamask account set up and some fake ETH, here's step by step guide on how to get that done.

🔗 thirdweb.com/portal/guides/…
Next head over to thirdweb.com/start, you will be guided through a setup process.

These steps are to get your metamask setup.
These steps are for choosing the chain network, we'll go with the rinkeby testnet.

Our NFT will be minted on this "fake" test network called rinkeby for free.
Now we can create the project to which we'll be adding the NFT module to create NFTs 😋
Adding the NFT module... and volia!

We actually can now mint NFTs straight from the dashboard.

But we don't do that, we're JavaScript programmers.
Make sure you copy the "module address" from the previous step which we'll use in the code.

Just click on the pill and it'll copy it for you.

Now onto the code.
Using these commands we'll install the thirdweb sdk and types.

Additionally you can install TypeScript if thats your jam.
We'll import the thirdweb library and ethers js for connecting our wallet and also import the private key that you should remember from the metamask guide.

Remember to store your private key safely and do not share them with anyone.
We will now instantiate the sdk, add our private key and connect to the blockchain.
Finally can add the module address from the dashboard and mint the NFT.

We're adding details like the same of the NFT,description and the URL of the image that is going to be an NFT.
Run the code and you have just minted your very first NFT, congratulations! 🎉

All it took was 15 minutes of setup and ~10 lines of JavaScript.

If you liked this thread make sure to follow @PrasoonPratham and retweet it.

I'll teach you all about web3!
Want to read this thread later on?

Save it as a link, there's also additional content in this guide 👇🏻

thirdweb.com/portal/guides/…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Pratham

Pratham Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @PrasoonPratham

20 Nov
Get started with web3 development on the blockchain today! ⛓

Here's a simple 5 minute guide to setup your metamask wallet and get free ethereum to develop decentralised applications 🧵
The first step is to head over to metamask.io/download, then download the metamask browser extention for your specific browser.

Chrome, FireFox and any chromium dervatives like brave, edge, vivaldi are supported.
After the extention is installed you'll be at the setup screen, click continue.
Read 13 tweets
6 Nov
As I see it, there are three fundamental features of a blockchain:

🧊Decentralisation
🕵️‍♂️Transparency
🔐Immutability

They make the blockchain so powerful and useful.
1️⃣Decentralisation

All data is decentralised and not stored in some server at a billon dollar corporation.

Everyone gets to own the data.
2⃣ Transparency

Since everyone owns the data, it can viewed by everyone.

A lot of people think the blockchain keeps people anonymous, which is incorrect.

They are actually "pseudonymous".

Anonymous: not identifiable
Pseudonymous: identifiable under and alias
Read 4 tweets
5 Nov
You wouldn't believe this, a friend of mine is earning $100k+ a year by writing code for something called a 'DAO'.

They are one of the most interesting applications of blockchain tech in web3 and are being used for a host of different things.

Here's how it works 🧵
🏢'DAOs short for (𝗗ecentralized 𝗔utonomous 𝗢rganizations) are an effective and safe way to work with like-minded folks around the globe.'

- Ethereum.​org

🔺Corporations of today operate with a 'hierarchical' structure so to speak.
The people at the top hold an immense amount of power, which they can use to their own advantage.

Granted there are laws and rules to prevent this, but they aren't always enforced.

There's always room for shady things like insider trading or manipulating the books to happen.
Read 14 tweets
1 Oct
Want to learn Python as a beginner in 2021 for free?

Here's everything you need to know to get started with updated resources and a proper roadmap!

🧵 👇🏻
A bit of backstory, I wrote my first piece of Python code in 2015 but eventually gave it up for several years because of two main reasons:

A. I had no internet
B. No guidance

You have the power of the internet and I don't want the same to happen to you, hence this guide.
All of this is based on my experience of successfully teaching 300+ students the basics of how to code using Python.

Feel free to modify this roadmap to your liking!

Now onto the guide.
Read 22 tweets
29 Sep
Hi 👋 if you are interested in:

🐍 Python
📈 Data Science
🤖 Machine Learning
🐼 pandas

Follow me. ✔️

I'm planning on using Twitter to share a lot of content that you won't want to miss. 🎉
👽👌
The twitter algorithim is a joke😂

I'll explain what happened sometime soon, this went pretty unexpected.
Read 5 tweets
28 Sep
The mean squared error is probably one of the very first evaluation metrics that you might've used when making machine learning models.

Yet most people don't have a clear intuition about how it works, let's fix that today!

🧵 👇🏻
📍 The mean squared error (MSE) is a common loss function used for 'regression' problems.

Regression models are used for predicting quantitave values based on data like the prices of houses in an area, future height growth of a plant etc.
📈 MSE is calculated as the sum of the squared difference between the predicted and actual values of the target variable.

Let us break this down with the help of an example 👇🏻
Read 16 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Thank you for your support!

Follow Us on Twitter!

:(