Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@getsafle/custom-token-controller

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getsafle/custom-token-controller

This SDK can be used to get the details of any token by it's contract address and it's balance for a specific address.

  • 1.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

Custom Token Controller

This SDK can be used to get the details of any token by it's contract address and it's balance for a specific address.

Installation

To install this SDK,

npm install --save @getsafle/custom-token-controller

Initialization

Initialize the constructor,

const safleTokenController = require('@getsafle/custom-token-controller');

const tokenController = new safleTokenController.CustomTokenController({ userAddress, rpcURL, chain });
  • userAddress - User Public Address
  • rpcURL - Web3 RPC provider URL
  • chain - blockchain name

Get Token Details


This function returns the token decimal and symbol for the contract address passed as parameter.

const tokenDetails = await tokenController.getTokenDetails(contractAddress);
  • contractAddress - Token contract address

Get Token Balance


const tokenDetails = await tokenController.getTokenBalance(contractAddress);
  • contractAddress - Token contract address

FAQs

Package last updated on 01 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc