Deposit Vault

Introduction

This guide focusses on the most common patterns of interactions with the Bounty Manager Module. Please refer to the Technical Reference section to see all public getters and setters.

The guide includes code snippets for both Inverter Network's TypeScript SDK and React SDK. Please refer to the relevant code snippets based on the SDK you are using.

Setup Requirements

  1. Set up Inverter Network SDK: Refer to the Quick Start guides for detailed instructions. See the React SDK Guide or TypeScript SDK Guide for more information.

  2. Deploy a Workflow: Refer to the Deploy a Workflow guide for detailed instructions. See the React SDK Guide or TypeScript SDK Guide for more information.

  3. Retrieve a deployed Workflow: Refer to the Operate a Workflow guide for detailed instructions. See the React SDK Guide or TypeScript SDK Guide for more information.

Deposit Funding

Deposits a specified amount of tokens into the contract from the sender's account.

Please ensure that the token amount has been approved to the Funding Manager

TS SDK

const hash = await workflow.fundingManager.write.deposit.run('1000')

React SDK

  // Add deposit mutation
  const depositMutation = useMutation({
    mutationFn: async (amount) => {
      if (!workflow.data) throw new Error('No workflow instance found')
      
      return await workflow.data.fundingManager.write.deposit.run(amount)
    }
  })

Last updated