Biconomy Gasless SDK (EOA)
DashboardMediumWebsite
  • 🚀Getting Started
  • Introduction
    • 🤘Why Biconomy?
    • 🙂How we simplify transactions
  • Products
    • 💸Gasless Transactions
      • Choose An Approach to Enable Gasless
        • Standard EIP 2771 Approach
          • 1. Register Artifacts on the Dashboard
          • 2. Code Changes
            • Using SDK
            • Using API
        • Custom Implementation Approach
          • 1. Register Artifacts on the Dashboard
          • 2. Code Changes
            • Using SDK
            • Using API
        • Smart Contract Wallet Approach
          • Gnosis
        • Network Agnostic Transactions
          • EIP-2771 Approach
          • Custom Approach
      • Conditional Whitelisting
      • Gasless SDK (EOA) 3
      • Networks Supported
    • ↔️Hyphen - Instant Cross-Chain Transfers
      • SDK
        • DepositManager
        • TransferManager
        • TokenManager
      • APIs
      • Helper Methods
      • Migrating from Hyphen V1
      • Contract Addresses
      • Hyphen Widget
  • Guides
    • 💻Dashboard
      • DApp Statistics
    • ⛽Gas Tank Deposits
      • Via Dashboard
      • Via Smart Contract
  • api
    • 🔧Native Meta Transaction
      • Get Retried Hashes
    • 🌎Dashboard APIs
    • ⚪Whitelist API
      • Whitelist Destination Address
      • Whitelist Proxy Contracts
    • 〰️ Check Limits
    • 💿Biconomy Data API
      • 👨‍🚀Unique User Data
      • 🧑‍🔧Per User Limits Data
      • ⛽Gas Tank Balance Data
  • SDK
    • 📙Gasless SDK (EOA)
      • Configuration
  • Tutorials
    • 🔰Native Meta Transactions
      • How To Build Your First DApp
        • Write Your First Smart Contract
        • Initialize Web3 on Client Side
        • Executing First Blockchain Transaction
      • Enable Native Meta Transactions
        • Smart Contract
          • Describe Your Structs
          • Declare Your Variables
          • Modify Respective Function
        • Client Side
          • Design Your JSON structure
          • Design Your Domain Separator
          • Design Data Types
          • Define Data To Sign
          • Generate Signatures
      • Integrate Biconomy
        • Register On Dashboard
        • Integrate Gasless SDK (EOA)
      • Summary
  • BICO Staking
    • 🪁Safety Module
  • Get in touch
    • 👥Contact Us
  • Misc
    • 🧩Projects on Biconomy
    • 🌐Supported Networks
    • 📫Contract Addresses
    • ✔︎ Smart Contracts Audit
    • ❓FAQs
Powered by GitBook
On this page
  • Methods
  • getSupportedTokens(networkId)
  • getERC20TokenDecimals(address)
  • getERC20Allowance(tokenAddress,userAddress,spender)
  • approveERC20(token,spender,amount,userAddress,infiniteApproval,useBiconomy,wallet?)

Was this helpful?

  1. Products
  2. Hyphen - Instant Cross-Chain Transfers
  3. SDK

TokenManager

The TokenManager subclass provides helper functions for various ERC20 operations that are required during a deposit transaction lifecycle.

Usage: hyphen.tokens

Methods

getSupportedTokens(networkId)

Arguments networkId: number, Chain ID of the network to query.

Returns Promise<SupportedToken[] | void>

type SupportedToken = {
    tokenSymbol: string,
    decimal: number,
    address: string
}

getERC20TokenDecimals(address)

Arguments address: string, Address of the token to query.

Returns Promise<number>, number representing the decimals in the token.

getERC20Allowance(tokenAddress,userAddress,spender)

Arguments tokenAddress: string, Address of the token to query. userAddress: string, Address for which allowance is to be fetched. spender: string, Address of spender

Returns Promise<number>, number representing the allowance.

approveERC20(token,spender,amount,userAddress,infiniteApproval,useBiconomy,wallet?)

Arguments token: string, Address of token.

spender: string, Address of spender.

amount: string, amount to approve.

userAddress: string, address of user for which approval is to be processed.

infiniteApproval: boolean, whether infinite approval is to be processed.

useBiconomy: boolean, whether to use meta-transactions to process approval.

PreviousTransferManagerNextAPIs

Last updated 3 years ago

Was this helpful?

wallet?: , optional parameter that can be used to sign transactions offline

Returns Promise<TransactionResponse | undefined>: of the approval transaction.

↔️
ethers.Wallet
TransactionResponse