human-standard-token-abi | A JSON ABI for the Ethereum ERC 20 Token Standard | Cryptocurrency library
kandi X-RAY | human-standard-token-abi Summary
kandi X-RAY | human-standard-token-abi Summary
A simple node module that exports the Ethereum ABI for ERC 20 compatible tokens. Requires the web3 API to be available, either by initailizing it yourself, or using a web3-injecting Javascript environment, like Geth, MetaMask, or Mist.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Start the application
- get balance of a wallet
- local require function
human-standard-token-abi Key Features
human-standard-token-abi Examples and Code Snippets
Community Discussions
Trending Discussions on human-standard-token-abi
QUESTION
I'm having real issues selling a token BUNNY for BNB on BSC. Here's what I know IS working
- checking the allowance shows I have approval to trade BUNNY on the PCSv2 router
- increasing the allowance also works
- Spending BNB to buy BUNNY works also (swapExactETHforTokens)
- manually writing into the contract on BSC scan also works
what doesn't work is swapExactTokensForETH - it spends some gas but throws up: "TRANSFER FROM FAILED"... reason: 'transaction failed', code: 'CALL_EXCEPTION' here's the failed transaction from the node.js script https://bscscan.com/tx/0x55d45e5f1e937fcd55294fa3e4d8c4c24d9c578b7ba8361fb12b2a017d7e7a4b
now all of the research i've done says it's because i need to approve the spender - I've done that... how do I know? well the function I wrote says it's fine as does querying BUNNY directly the other odd thing is that this worked perfectly (with no additional approval) - see screenshot
BSCScan Write Contract that works
here's the success transaction from the BSCscan write part of the router contract https://bscscan.com/tx/0xc8d2b999c08cef6ecceecf4bc5d6242bcd43571164016a8372bbf0c02d1a6185
If anyone can work out why this error is being thrown that would be a massive help tyvm in advance Here's the code:
...ANSWER
Answered 2021-May-26 at 08:42This is the amountIn you supplied in failed tx: 3299718614161746000.
This is the amountIn you supplied in successful tx: 3299718614161745787, and it's less.
So I assume you've provided incorrect amountIn, that is greater than your balance.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install human-standard-token-abi
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page