Published on

ThirdWeb integration on Outerbridge

Authors

image

🎉 ThirdWeb node has been added! 🎉

ThirdWeb is an end to end developer tool accelerating teams building web3 apps, games, tokens, NFTs, marketplaces, DAOs and more. It enables users to add features such as NFTs, marketplaces, and social tokens to their Web3 projects with simple sdk or one liner code.

Read more on ThirdWeb here

With this integration, users can easily use ThirdWeb node to build a powerful workflow.

image

Steps

  1. Add ThirdWeb node onto canvas

  2. Select node action

    • Read data from contracts
    • Execute transactions on contracts (*requires wallet)
  3. Select network

  4. Configure input parameters

    • First, navigate to ThirdWeb project, under the Code -> Javascript -> Getting Started section, you will see similar code as below:
    import { ThirdwebSDK } from '@thirdweb-dev/sdk'
    
    const sdk = new ThirdwebSDK('<network>')
    const contract = await sdk.getContract('<Contract-Address>', '<Prebuilt-Type>')
    
    • Back to ThirdWeb node on Outerbridge, fill in the parameters accordingly:

      • Contract Address: <Contract-Address>
      • Prebuilt Contract Type: <Prebuilt-Type>
    • Now, you can copy paste the function you want to execute or query. For instance: Get NFT Balance

    const walletAddress = '<Wallet-Address>'
    const balance = await contract.balanceOf(walletAddress)
    return balance
    
    • You can also import and use additional libraries such as ethers, @openzeppelin/contracts and use it together within the Code parameter:
    const ethers = require('ethers')
    const walletAddress = '<Wallet-Address>'
    const balance = await contract.balanceOf(walletAddress)
    return ethers.utils.formatEther(balance)
    
  5. Select wallet you'd like to sign the transaction on-chain if you have chosen Execute transaction on contracts in action.

  6. Test the node, save and deploy!