How to interact
You can use any libraries to interact with smart contracts deployed from Bunzz.
and more...
If you want to interact with a deployed contract directly, you can use the Interaction UI.
In this tutorial, let's see a simple example of interacting with your smart contract.
1) Install the package to your project
npm install --save ethers2) To interact with a deployed smart contract, please copy the contract's address and the ABI from the Bunzz dashboard.

3) First, you need to create a contract object.
4) Once you have created an object of the contract, you can call its functions using the contract.functioName() syntax. For example, if the contract has a function named getValue that returns the value stored in the contract, you can call it like this:
You can also call a function to update state of the contract that requires signing. For example, if the contract has a function named setValue, you can call it like this:
Here is the complete code example:
To learn details and advanced usage of ethers.js, read the official document or google "ethers.js" since there are a lot of great articlesπ
1) Install the package to your project
2) To interact with a deployed smart contract, please copy the contract's address and the ABI from the Bunzz dashboard.

3) First, you need to create a contract object.
4) Once you have created an object of the contract, you can call its functions using the contract.methods.functioName().call() syntax. For example, if the contract has a function named getValue that returns the value stored in the contract, you can call it like this:
You can also call a function to update state of the contract that requires signing with send syntax. For example, if the contract has a function named setValue, you can call it like this:
Here is the complete code example:
To learn details and advanced usage of web3.js, read the official document or google "web3.js" since there are a lot of great articlesπ
1) Install the package to your project
2) To interact with a deployed smart contract, please copy the contract's address and the ABI from the Bunzz dashboard.

Keep them as variables in your production code.
3) First, you need to wrap your main component with the "WagmiConfig" component.
4) Wagmi is a collection of React Hooks to interact with EVM blockchains. Here is a hook to connect user's wallet and your app.
You can also call a function via hooks. For example, if the contract has a function named setValue as a write function, you can call it by these hooks:
Here is the complete code example:
To learn details and advanced usages of wagmi, read the official document or google "wagmi hook" since there are a lot of great articlesπ
1) Install the package to your project
2) To interact with a deployed smart contract, please copy the contract's address and the ABI from the Bunzz dashboard.

3) First, you need to create a contract object.
4) Once you have created an object of the contract, you can call its functions using the contract.functions.functioName().call() syntax. For example, if the contract has a function named getValue that returns the value stored in the contract, you can call it like this:
You can also call a function to update state of the contract that requires signing with transact syntax. For example, if the contract has a function named setValue, you can call it like this:
Here is the complete code example:
To learn details and advanced usage of web3.py, read the official document or google "web3.py" since there are a lot of great articlesπ
Last updated