Flutter SDK
With the Flutter SDK, you can add functionality to buttons in your app to interact with a vault contract. You only need three lines of code to set up a vault and perform actions like deposits! Here’s how to use it:
Obtain the Vault Contract Address: You need the contract address for the vault where you want users to deposit. This can be got from the Dapp
Create a Vault Instance: Set up an instance of the vault in your code.
Use Vault Functions: Call
vault.deposit
,vault.balance
, orvault.withdraw
as needed.
Example Code
Below is an example showing how to create a vault instance and call the deposit
function:
Last updated