A couple of days ago I showed you how to mint NFTs on the blockchain with JavaScript in ~10 lines of code.

You can do the same thing with Python 🐍

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 Python library, and with ~10 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.

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 Pythonistas.
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 inside of a virtual environment.
We'll import the thirdweb library and also 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.

We'll also add the NFT module to mint the NFTs.
Finally we're adding details like the name 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 with Python, 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.

We'll learn web3 together!

• • •

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

21 Nov
You make your own cryptocurrency on the blockchain with JavaScript in just these 9 lines of code.

Here's how it works🧵
We'll be using thirdweb's JavaScript sdk to make this happen.

To start you'll need to setup Metamask and store your private key, here's a guide that'll take you through the entire process.

🔗 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 with the thirdweb interface.
Read 15 tweets
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
19 Nov
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 👇🏻
Read 15 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

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!

:(