Building with Thirdweb
Thirdweb simplify the process of building and deploying Web3 applications. it provides a variety of tools and SDKs (Software Development Kits) for developers to integrate blockchain functionality into their apps with minimal code and it also supports Asset Chain.
Features of Thirdweb
Smart Contract Development: Thirdweb offers pre-built smart contracts that can be easily deployed on various blockchain networks, such as Asset Chain. These contracts cover areas like NFTs, tokens, and marketplaces.
Developer SDKs: It provides SDKs for JavaScript, React, Python, and other languages to interact with smart contracts, enabling developers to manage blockchain operations like token creation, minting, and transferring assets.
User Authentication: Thirdweb supports Web3 wallet integrations (e.g., MetaMask, WalletConnect), making it easy for users to interact with decentralized apps securely.
Gasless Transactions: Thirdweb provides solutions for gasless transactions, where users can interact with the blockchain without paying fees, by allowing the developer to sponsor gas fees.
Analytics & Dashboards: It includes built-in analytics to track contract activity and manage dApps through a visual interface.
AssetChain on Thirdweb
Through Thirdweb, developers can easily interact with AssetChain via its comprehensive tools and services. visit AssetChain-Thirdweb
Leveraging Thirdweb’s Pre-built Contracts: Thirdweb offers a wide range of pre-built contracts tailored for specific use cases, which can streamline the development process. With AssetChain, you can deploy these contracts to tokenize assets or manage interactions with the blockchain without writing code from scratch. This is particularly useful for asset management, staking, and automated processes.
Faucets: Thirdweb supports AssetChain Faucets, This faucet allows developers to test dApps, deploy contracts, and perform token transactions on the AssetChain testnet without incurring real costs, making it a valuable tool for development.
Thirdweb RPC Edge: A specialized endpoint that allows developers to connect their applications to the AssetChain testnet.
Thirdweb Engine: Thirdweb Engine is an open-source backend server that enhances how developers interact with the Asset Chain blockchain at production scale. By integrating Thirdweb Engine with AssetChain, your application can:
Send multiple transactions at once, resubmitting any stuck ones.
Manage nonce, gas settings, and RPC errors automatically.
Deploy contracts and handle smart account interactions.
Control backend wallet access for your team.
Sponsor gas fees for users, improving their experience.
Subscribe to contract events for real-time dApp functionality.
This significantly simplifies the development and scaling of asset-tokenization applications on AssetChain.
Getting Started
To connect your application to Thirdweb, you'll need to create a project on the Thirdweb Dashboard and obtain the Project ID.
Sign Up or Log In to the Thirdweb Dashboard
Visit the Thirdweb Dashboard.
If you don't have an account, connect either your wallet , your socials or google account and create an account. If you already have an account, log in.
Create a New Project
After logging in, go to settings
In the API Key Section, Click on the Create API Key
fill in the necessary details, such as the API key Name and toogle or add domains that will make use of this API key
confirm that you have saved your Client ID and Secret Key.
Setting Up the ReactJs Project
Use any of this Templates Below
Configuring Codebase
For this tutorial, we will be making use of the Vite Kit
Clone the repo to your computer
Make sure you have git, nodejs, yarn and npm installed on your computer
Navigate to the folder path
Install this packages
create a .env
file in the vite-starter folder and add this code below:
create a client.ts
file within the src
folder and add the following codes:
in your main.tsx
file, update it with the following codes:
create a assetchain.testnet.ts
file within the src
folder and the following codes:
in your App.tsx
file , update it with the codes below,
Once everything is updated, open your terminal and run the command below to start the server:
To conclude, the code example demonstrates how to successfully connect to the Asset Chain Network using Thirdweb.
Thirdweb paves the way for efficient and scalable blockchain development, empowering developers to build decentralized applications (dApps) with less friction while maintaining performance and security standards.
Last updated