iost.js
iost.js copied to clipboard
Token iost exceeds amount limit
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.
How do you solved?
@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)
It's Ok. Thanks.👍