ethers.objc icon indicating copy to clipboard operation
ethers.objc copied to clipboard

Does this library support ERC-20?

Open remembermeLiu opened this issue 6 years ago • 2 comments

remembermeLiu avatar Aug 02 '19 07:08 remembermeLiu

Absolutely. Just use the Contract object, and give it the ERC-20 ABI, along with your token address and a provider (or a signer, for managing the asset).

An ERC-20 token is just a normal contract, nothing special is required to interact with one. The utils.parseUnits and utils.formatUnits also make it easy to convert between user input to safe values and from safe values to display logic. :)

ricmoo avatar Aug 02 '19 07:08 ricmoo

Oh! So sorry, I thought this was for the ethers.js library. I didn’t notice the repo you posted to.

This library does not easily handle ERC-20. Sorry. :s

ricmoo avatar Aug 02 '19 07:08 ricmoo