Questions tagged [erc-20]
The ERC20 Token Standard is a set of 8 functions to be included (in an agreed upon language) in a smart token contract in order to enable interoperability across multiple interfaces and dapps. These functions relate to (1) how tokens can be transferred (2) how to access data about the token, and (3) how to format key events like transfers and approvals. ERC stands for Ethereum Request for Comments.
2,606
questions
0
votes
1
answer
27
views
How to use sepolia deployed erc-20 token for my project?
I'm new to proper deployment and interaction of tokens on smart contract and I'm unable to understand how to use my erc-20 token(address-0x7E0405b46F427cae024563a358d47455De256adc) in a coinflip game. ...
0
votes
1
answer
20
views
what happens when a erc20 token is transferred?
I believe there are no "physical" tokens in the sense that nothing really is transferred, just the erc20 token contract updates the balances of the sender and recipient.
Is my understanding ...
0
votes
1
answer
26
views
ERC20InsufficientAllowance in ERC20Wrapper Contract
I got this error:
ERC20InsufficientAllowance
Parameters:
{
"spender": {
"value": "0xb31BA5cDC07A2EaFAF77c95294fd4aE27D04E9CA",
"documentation": "...
0
votes
1
answer
42
views
do I need to hold ETH (for tokens) in my wallet to receive ERC-20 with value? [duplicate]
I want to receive ETH (ERC-20) which was initially converted from BTC to ETH and sent to my wallet with 0 value.
Do I need to hold ETH in my wallet in order to activate ETH tokens to receive real ETH ...
0
votes
1
answer
31
views
Revoke ERC-20 Smart contract approval
Is it possible to revoke the approval given in ERC-20 smart contract in solidity.
0
votes
1
answer
18
views
USDT ERC20 FAIL. Reason: EvmError: Revert
I trying to impersonate a whale to send USDT via vm.startPrank(whale1) in Foundry, but got this weird error:
├─ [18501] TetherToken::transfer(0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045, 1000000000 ...
1
vote
1
answer
9
views
Does layzer zero preserve token functionality across chains?
I'm evaluating layzer zero and I am aware that it can wrap erc-20 tokens or create new ofts.
However, I'd like to know whether if my existing erc-20 token has freeze functionality (can freeze an ...
0
votes
0
answers
18
views
Problem accepting Erc20 platform transaction
Hi i transfer trump coin between my exchangers wallet end wallet is Bitunix i did all of them right because of updating bitunix exchanger my transfer show success at first wallet or etherscan.io but ...
0
votes
1
answer
33
views
Get historical balance of ETH and ERC-20 Tokens
Now I am wondering how to get the historical balance of ETH and ERC-20 Tokens, like the web tool provided by etherscan. I attempted to add all the transactions on Etherscan to get the historical ERC-...
0
votes
1
answer
10
views
Which tokens exists on Polygon network?
I want my smart contract to accept tokens from different blockchain networks such as bitcoin or ethereum. I know there are wrapped versions of these tokens that works on the Polygon network. Is there ...
1
vote
1
answer
116
views
Ridiculous high gas fee in production (ERC20)
I was trying to create a new smart contract with Remix. It should be something like a lottery. I made a simple function to enter the lottery:
> function enter() public payable {
> require(msg....
0
votes
0
answers
16
views
MY COINS BEING SENT TO ANOTHER WALLET [duplicate]
So when i deposit 2$ worth of ethereum to pay the transaction fee of usdt erc20 the ethereum i deposit is being sent to another wallet theres someone in wallet or some another thing i can't withdraw ...
0
votes
1
answer
28
views
EVMError: Revert for Auction.sol
Building an Auction for ERC20 Tokens.
Scripts are compiling.
2/3 tests pass.
[FAIL. Reason: EvmError: Revert] for 1/3.
It may be an issue with the OpenZeppelin import, it may be out of date, wrong ...
0
votes
1
answer
10
views
Issues due to openzeppelin updated versions
Im building defi token Im developing it with reference cource in which the educator is using openzeppelin version 4.8.3 in which ERC20Mock contract takes 4 parameters , but right now there is only ...
0
votes
1
answer
18
views
What are wrapped tokens, and how do they utilize the ERC-20 standard?
The question addresses how wrapped tokens convert non-Ethereum assets into ERC-20 compliant tokens, allowing them to be used on the Ethereum network.
1
vote
1
answer
21
views
Cant learn any erc20 token price in uniswapv3
How hard can it be to learn the price of an erc20 token in terms of usdc in uniswapv3. a hint: its really hard. Any resource that you know that exactly explains how to get a price of any erc20 token ...
0
votes
1
answer
37
views
How can I unlock a locked amount in a liquidity mining pool ? It is now showing in my wallet after I revoked the token
I’ve joined a mining pool in DApp browser inside Trustwallet app then I tried to withdraw the money to my other wallet but I couldn’t because of the follwowing error
(Fail with error 'BEP20: transfer ...
0
votes
1
answer
45
views
Deploying an ERC20 Contract: Invalid Opcode Error
I'm trying to deploy an ERC20 contract, but I keep getting an invalid opcode error. Below is my contract and a screenshot from REMIX:
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/...
0
votes
0
answers
11
views
Coinbase and sending it to another wallet
The address is sent from my coinbase acct, I was tired of the shenanigans of coinbase pro, so I sent assets to a wallet I thought was more manageable.
0x587416Ba3789ee89F8B5f85FEeb836afF4D06717
And ...
0
votes
1
answer
42
views
Is it best practice to check the token balance when withdrawing ERC20 tokens from a contract?
A smart contract which stores ERC20 tokens.
When withdrawing an amount from the contract I found examples of checking the token balance before making the transfer:
IERC20 token = IERC20(tokenAddress);
...
0
votes
1
answer
24
views
ERC20 test with chai issue
I am starting my journy with contracts and decided to begin with some ERC20. I used some ready examples but can't get pass one single error.
To state my knowlede level. I am C++ big data programmer. ...
0
votes
1
answer
24
views
get_total_transfer(tx_hash, receipt) function to compute the total amount transferred for each token involved in an Ethereum transaction
How can I implement the get_total_transfer(tx_hash, receipt) function to compute the total amount transferred for each token involved in an Ethereum transaction (tx), using transaction data and ...
0
votes
1
answer
21
views
Why don't tokens use a standard transaction method (blockchain)?
If a token is a coin already created on the basis of some existing blockchain (let’s take Ethereum for example), then why does tokens need smart contracts? Why don’t they use regular transactions like ...
0
votes
0
answers
11
views
Governance execute proposal of the governance contract itself or any other contract or restrict functions to come from a proposal only in the erc20
Is it possible to have a proposal that executes a function from the governance contract itself?
namely i would like to have every expense of the dao to come from a proposal.
does the target have to be ...
0
votes
0
answers
26
views
tax in token result ds-math-sub-underflow
function swapTokenForFund(uint256 tokenAmount) private lockTheSwap {
emit LogTaxWalletBalance(_balances[address(this)]);
address[] memory path = new address[](2);
path[0] = ...
0
votes
0
answers
23
views
ParserError: Source Not Found Despite Correct Path
I'm encountering a ParserError when trying to compile my Solidity contract. The error indicates that the specified path is not found, even though I believe the paths are correct.
Error message:...
0
votes
1
answer
25
views
How to restrict access to a public mint function to only to users to who have completed certain tasks (eg., tap and earn )
I have written an ERC20 smart contract where I have a onlyOwner mint function where only the owner is allowed to mint tokens and I also have a public mint function where users can able to mint ...
1
vote
0
answers
60
views
Smart-contract works on local node and Sepolia but not Polygon Amoy
I have an ERC20 Token that I'm testing and I'd like to deploy on Polygon PoS.
I deployed it on Polygon Amoy and for example, every time I call the approve method, my transaction fail.
I then tested to ...
1
vote
1
answer
69
views
Help Needed: Resolving "EIP2612: Invalid Signature"
I am encountering an error message "EIP2612: invalid signature" when testing the permit function in my contract.
This is my contract:
// @inheritdoc IPayments
contract Payments is IPayments {...
0
votes
0
answers
58
views
How to Ensure Custom Tax is Applied on Token Swaps in Solidity Smart Contract?
I'm developing a smart contract for a token (FMYNT) using Solidity on the Binance Smart Chain testnet, integrated with PancakeSwap testnet. I've implemented a custom 5% tax feature for buy and sell ...
0
votes
1
answer
18
views
Automate the use of approve() without having to do it manually
I'm taking my first steps on Solidity. I would like the user to be able to use their funds by calling the dapp functions, but without having to use the approve() function manually on the token ...
0
votes
1
answer
54
views
Help ERC-20 contract, ERROR Txn: Contract creation code storage out of gas
I have created an ERC-20 token contract, and I have a problem with the gas. I must not have calculated the gas expenditure correctly, and on Etherscan, I get a warning. This is the link to the ...
0
votes
1
answer
53
views
How does the contract handle tax deductions for simple buy and sell transactions when the token is listed on any decentralized exchange (DEX)?
Could anyone provide an example solidity smart contract code for how to implement tax deduction using a router in a smart contract when list on DEX ? I've noticed that when adding custom tax deduction ...
0
votes
1
answer
36
views
I tranfer taiko token through ERC20 network which is a wrong network address How can i recover my taiko token
I mistakenly transferred my taiko token from okx web3 wallet to kucoin through ERC20 network which is a wrong network address. How can i recover my taiko token, if it is possible
0
votes
1
answer
35
views
what is the way to find out if a selected token will revert at 0 transfer
How can I find out if the selected token will revert to 0 transfer? Is there a list of tokens that revert at 0 transfer. As far as I understand USDC is one of them, is that correct ? Thanks in advance!...
0
votes
0
answers
25
views
MAX TOTAL SUPPLY ON ETHERSCAN IS 0
I deployed my token to MetaMask and it did not reflect the token name or the decimal. I manually had to input it. After I deployed to etherscan it is showing MAX TOTAL SUPPLY: 0 HOLDERS 0 TOTAL ...
1
vote
1
answer
82
views
TESTS FOR MY ERC20 TOKEN IS NOT WORKING
// SPDX-License-Identifier: SEE LICENSE IN LICENSE
pragma solidity ^0.8.24;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/...
0
votes
1
answer
50
views
Two or more base classes define function with same name and parameter types
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Capped.sol&...
1
vote
2
answers
121
views
Smart Contract for Gasless ERC-20 Transfers
I'm building an app where I want to pay the transaction fees for ERC-20 token transfers between user's wallets that don't necessarily have ETH. I know of standards like EIP-2612, which provides permit,...
0
votes
0
answers
7
views
When developing layer two token like arbitum by modifying an existing erc20. Is it necessary to clone the entire source code repository?
I'm modifying an existing Solidity smart contract, or more accurately taking functionality from multiple different smart contracts and wanted to know if the new contract would pull code from its ...
0
votes
1
answer
38
views
Lost $80 and never got anything back
Transaction hash
0x74172b4cbe05721616339a2f53dcb27d68697de736b47f424e1d78e1e65a567f
I want to know why I didn’t get my PEPE I tried to purchase over a year ago using Coinbase wallet. I only clicked ...
0
votes
0
answers
11
views
Etherscan Approval Query
I swapped USDT for a token in dextools & Etherscan shows the transaction as successful but the token has not imported & the usdt funds are still in my wallet. When I go to approval & ...
0
votes
0
answers
20
views
bought a token that is unsellable, but I can see that on Etherscan that few accounts are selling the same. Is there a way I can sell this token [duplicate]
I bought this token 'Monad' on uniswap. It seems to be all fine but than later realized that this token is unsellable.
I can see that the team are able to sell the token, and so did someone else who I ...
0
votes
0
answers
18
views
Issue with ERC20 Contract Verification on Base API Despite Successful Response
I'm attempting to verify my ERC20 contract using the Base API. I'm receiving a positive response with the following:
{
"status": "1",
"message": "OK",
...
0
votes
0
answers
15
views
Subdecimals in ERC20 tokens and wallets?
Is there any standard or any discussion of standard for wallets to display not the standard unit of a token, but perhaps 10^-3n, such as one thousandth, one millionth. Much like wei, gigawei, etc. ...
0
votes
1
answer
40
views
Is there Uniswap V2/V3 function to get initial token supply amount in pool?
I need to get initial token supply when liquidity pool was created by querying Ethereum node (RPC) or Uniswap contract and not Mint() function, is it possible to do (python)?
To get reserves on any ...
0
votes
1
answer
57
views
Congestion in ERC20, not allowing me access to my transfer unless I pay 10% or it will be lost
I transferred 3mil from Coinbase Wallet, CounbaseETF. I was informed that the transfer was congested in the ERC20 network and I will not have access unless I pay a 10% fee within 20 days. Is this ...
1
vote
1
answer
28
views
ERC-20 Tokens Stuck on MIST Multisig Contract on the Polygon Network
Help! I can't get access to these tokens.... I have ERC-20 tokens attached to a MIST multisig contract on the polygon network. Here's a contract similar to mine (by not mine). This might actually ...
2
votes
1
answer
164
views
Are there any no-code tools for deploying ERC-20 tokens?
As the title says: are there any no-code tools for deploying ERC-20 tokens?
0
votes
1
answer
23
views
Transferring funds after Permit is given
I have 20 ERC 20 tokens.
I use Permit and give my signature to allow a contract to spend 20 of my tokens.
However, I move these tokens to another wallet before transferFrom happens.
What happens when ...