New answers tagged erc-20-approve
0
votes
Implementing an ERC20 Smart-Contract within another Smart-Contract
OK I finally got the thing working so here are some major takeaways that I think & hope future coders will find very helpful if they're trying to achieve the same functionality:
While Metamask (...
0
votes
Implementing an ERC20 Smart-Contract within another Smart-Contract
First of all ethereum require to pay transactions in ETH and not in any ERC tokens.
So in your case you want to collect Fee for invoking your contract by ETH or ERC token so what you have to do is use ...
1
vote
Metamask - get value entered from calling ERC20 "approve()" method
when you send the transaction you cannot override the argument again if you do that that will be another transaction.
in your case you hardcoded the 1000 to be approved and in metamask user can enter ...
0
votes
Accepted
insufficient allowance Error .. ERC20
From your code what I understood is that you want to access tek token from your contract when user is calling the buyItem function.
You can achieve this using two methods.
approve Your contract code ...
0
votes
Token allowance of router address
There is no need to cast routerAdd to an address, as it is an address already. You can therefore just use allowance[address(this)][routerAdd] =...
The reason developers do it this way is, that is it ...
0
votes
transferFrom not working. Estimate gas fee error. Cant find the bug
trying openzepplin libraries like safeMath to perform calculations will limit the error rate in calculations, safeErc20 library will allow you to use functions like safeTransferFrom to transfer ...
0
votes
How can I remove custom spending cap on Metamask?
Simple answer, you cannot for good reason.
Find your answer here.
We designed this interface to give you more control and visibility over your token allowances, since you'll be prompted to always ...
Top 50 recent answers are included
Related Tags
erc-20-approve × 132erc-20 × 82
solidity × 52
transferfrom × 20
tokens × 16
transfer × 13
uniswap × 10
ethers.js × 9
metamask × 8
allowance × 8
remix × 7
erc-721 × 7
transactions × 6
web3js × 5
smart-contract-wallets × 5
hardhat × 4
delegatecall × 4
security × 3
openzeppelin × 3
pancakeswap × 3
decentralized-exchange × 3
contract-development × 2
blockchain × 2
ether × 2
dapps × 2