thirdweb

Using thirdweb to build on Synapse Chain Testnet

Thirdweb is a web3 infrastructure developer suite that gives developers out-of-the-box tooling to easily deploy contracts on Synapse Chain Testnet.

Create a Smart contract

  1. Run the following command in your CLI:

npx thirdweb create contract
  1. Provide the following in the CLI:

    • Framework to build with (Forge or HardHat)

    • Base Contract (choose from ERC721, ERC1155 or ERC20, or empty)

    • Smart Contract name

  2. Customize additional command line prompts such as:

    • Assign a name to your project

    • Include any desired extensions

    Once created, navigate to your project's directory and open it in your preferred code editor.

    Inside the contracts folder, you'll find your smart contract written in Solidity.

  3. Customize the base-contract to your own preference. Further documentation around the base contracts can be found here.

Deploy a Smart Contract

  1. Use the CLI to deploy your contracts directly to Synapse Chain by running

npx thirdweb deploy
  1. This command will accomplish the following:

    • Detect the framework (Hardhat, Foundry or Truffle).

    • Compile all the contracts in the current directory using your project settings.

    • Allow you to select which contract(s) you want to deploy.

    • Upload your contract metadata to IPFS, making sure it matches exactly the encoded IPFS hash in the compiled bytecode.

    • Detect the extensions on your contract.

    • Open the deploy flow in the dashboard for you to connect a wallet, input the contract parameters and select a chain to deploy to, without needing to hardcode private keys!

  2. In the resulting dashboard, fill out remaining parameters such as:

    1. _name

    2. _symbol

    3. _royaltyRecipient

    4. _royaltyBps

  3. Select SynapseChainTestnet as the network

Reach out to thirdweb support with any additional questions.

Alternative Options

  1. You can deploy a prebuilt contract for NFTs, tokens, or marketplace directly from the thirdweb Explore page:

    1. Navigate to the thirdweb Explore page: https://thirdweb.com/explore

  2. Choose the type of contract you want to deploy from the available options: NFTs, tokens, marketplace, and more.

  3. Follow the on-screen prompts to configure and deploy your contract.

Last updated