iost.js icon indicating copy to clipboard operation
iost.js copied to clipboard

Token iost exceeds amount limit

Open ghost opened this issue 5 years ago • 3 comments

Hi, I'm testing a function in my ABI and getting the error: Error: token iost exceeds amount limit.

I have tried publishing the contract as unlimited amount limit, and still no luck.

Any advice would be appreciated.

ghost avatar Aug 23 '19 17:08 ghost

How do you solved?

little-buddy avatar Jul 14 '20 18:07 little-buddy

@sonyyang49 @little-buddy You need this statement tx.addApprove('iost', amount) It makes your transaction approve the amount you set in client side.

What you did in .abi file was just setting amount limit in blockchain side(sort of backend side)

Try like below:

const tx = iost.callABI(
  CONTRACT_ADDRESS,
  ACTION_NAME,
  [...arguments],
)
tx.addApprove('iost', amount)

nujabes403 avatar Jul 15 '20 01:07 nujabes403

It's Ok. Thanks.👍

little-buddy avatar Jul 25 '20 11:07 little-buddy