current position:Home>TransferHelper: TRANSFER_ FROM_ FAILED
TransferHelper: TRANSFER_ FROM_ FAILED
2022-02-03 20:42:52 【Q & A of Denglian community】
Contract published on bsc Test chain , stay https://test-swap.pinksale.finance/#/pool Release liquidity , Use uniswap Report an error when selling tokens TransferHelper: TRANSFER_FROM_FAILED, How to solve this problem ? sell token Code for :
function _swapTokensForBnb(uint256 tokenAmount) public { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); }
Take the answer 1:
TRANSFER_FROM_FAILED Usually without authorization , Or not enough .
Do you have tokens in your contract ?
copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032042496833.html
The sidebar is recommended
- Technology weekly · why is Web3 related to blockchain
- Blockchain mainstream consensus mechanism
- Technical magic of blockchain
- Decentralized Oracle adameral blockchain data interaction Middleware
- Is it difficult to settle claims in hospital? Blockchain technology realizes "report upon hospitalization and compensation upon discharge"
- Implement the national standardization development outline and put the blockchain on a standardized path
- Understand pledge as service: opportunities and risks, current situation and future
- Talk about Web3 Decentralized work: will the Internet create human prosperity?
- Vitalik: how to improve the transaction anti censorship of the block proposer's scheme
- [Hackathon] BSV programming marathon champion plan to build a dynamic bitcoin network
guess what you like
-
Research Report on Solana: practical applications, advantages and challenges
-
A hundred flowers bloom in application, presenting the five pole pattern of North Zhejiang, Jiangsu, Shanghai and Guangdong - industrial application of China's blockchain industry development report in 2021
-
Popular science article | can Ethereum and Boca use the same address? Moonbeam "unified account" helps you achieve
-
Bloomberg 2022 encryption Outlook: the "fate" of bitcoin, Ethereum and encrypted dollar
-
Sailian blockchain education provides block chain technology training for Weichai Power
-
Sailian blockchain Education: does the school district blockchain have a future?
-
Is the development of school district block chain promising?
-
Sailian blockchain education was invited to give a training lecture on blockchain technology in Shandong science and engineering district
-
To learn blockchain technology, let's build a group school district blockchain technology
-
School district block chain technology, what do you learn? Blockchain training institutions or self-study?
Random recommended
- What exactly does blockchain learning learn? Do you need to go to blockchain training institutions?
- Review of dimitra and Morpheus AMA, global blockchain agricultural technology platform
- Bitcoin public key principle
- Blockchain application series - did
- Bitcoin series - using docker to build BTC private chain
- Bitcoin series - BTC synchronous public chain, test chain and private chain
- Bitcoin series - BTC compilation and installation
- Ethereum series - Web3 js
- Experience - deploy Ethereum private chain (POA)
- Experience part - deploying Ethereum private chain (POW)
- Ethereum series - Smart contract development and commissioning
- Ethereum series - DAPP development three swordsman
- IPFs series - combination of IPFs and blockchain
- How can the Internet of things, big data, cloud computing, blockchain and artificial intelligence be combined to promote the development of digital economy?
- The form of story telling tells you what is server, cloud deployment, virtualization, artificial intelligence, blockchain, cloud computing, big data and privacy computing
- Open source Hongmeng, metauniverse, blockchain, open source collection | alot open source science and technology festival and openharmony technology forum are in hot registration
- Bankless year-end summary: encrypted network will subvert the old power system
- The other side of Dao: bribery in the chain and the rise of dark Dao
- The first 3D chain game (CSC) of metauniverse concept seeks token in encrypted world and blockchain game
- Metauniverse 3D [NFT] arrg mobile game of metauniverse blockchain [Curtis sword]
- It is said on the Internet that three arrows bought "Adidas and gear", which is actually a fraud
- How will the global network and metauniverse affect international politics?
- GIS + blockchain, a new application scenario of geospatial data, is expected in the future
- The demand for NFT, a clothing luxury brand, has soared, and metauniverse may provide opportunities for transformation
- Curtis sword CSC coin star "Q coin mode" will be launched in January
- Adaoracle ecology and its decentralized Oracle network promote the development of blockchain
- a16z:Web3. 0 ecological panorama
- Development and application of blockchain in food industry
- Chat blockchain (III)
- Ethereum smart contract - building the basic environment
- Founder of ENS: not only Eth, to be the domain name service provider of every digital resource in the world
- A piece of land is 32 million. Why do real estate tycoons buy land in the virtual world?
- Three minutes to understand why arbitrum TVL can lead in layer2
- 13th anniversary of bitcoin white paper, 13 key knowledge points
- From didi to bitcoin, towards a new era of zero friction economy
- Randomness in bitcoin
- Blockchain private Chain NEW
- Blockchain private chain
- Blockchain game: unsustainable or is the future coming?
- Chat blockchain (IV)