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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

transaction reverted with reason string 'ERC20: insufficient allowance' in test

I'm getting this error while testing my mockup dai token contract DaiToken is ERC20, Ownable { constructor() ERC20("Dai Token", "mDAI") {} function mint(address to, ...
  • 105
0 votes
2 answers
24 views

Unkown token in my wallet

I received a transaction to my ETH wallet containing a token I don't recognize. It's clearly a phishing attempt trying to lure me into a website, however, the transaction seems to contain an smart ...
0 votes
1 answer
33 views

Restricting minting of an ERC20 token by another smart contract

I have an ERC20 token that I would like another smart contract (lets call it Manager) to be able to mint to the users of the dapp. I am assuming, I should restrict the mint function to only be execute ...
0 votes
1 answer
14 views

How do i prevent further burn once the minimum total supply of my token has been reached?

I have successfully created my token and I have an automatic burn fee but I would like the burn fee to be automatically set to 0 once the minimum total supply has been reached and also prevent any ...
0 votes
1 answer
14 views

Questions about ERC20 Tokens

I read UNDERSTAND THE ERC-20 TOKEN SMART CONTRACT and I have a three questions. What actions updates it? I only see a value set at the point of contract creation. My guess will be burn and mint ...
0 votes
0 answers
9 views

Error with supportsInterface function (ERC165)

I have this function: /// @dev Checks if the type of asset-contract is same as the TokenType specified. function _checkTokenType(Token memory _token) internal view { if (_token.tokenType == ...
0 votes
1 answer
31 views

Can't make buy function work on ERC20

I'm trying to figure this out for the past days but without luck. I have a function called BuyTickets which by default was using only native tokens. I'm trying to change it to accept any other token. ...
  • 1
0 votes
2 answers
15 views

Is there a way to put a call function to show the top holders address of an ERC20 token in Remix?

Looking to find a way to show top holder/holders of an ERC20 token I've created. I'm using Remix.
1 vote
1 answer
49 views

Explanation for a three-way NFT transaction

I can't figure out why this transaction is the way it is. It involves 3 parties and 2 sales of an NFT. Here are the events: NFT Sells for 0.0244 from 06BBBB to C5320D. But no transfer happens. ...
  • 115
1 vote
3 answers
33 views

Snapshot API for ERC20 or ERC721

I'm looking for an API that allows to export all wallets from a given ERC20 Token or ERC721 NFT. I already tried some, but most of them take multiple minutes to respond, which is too slow for us, as ...
  • 13
0 votes
0 answers
13 views

I was wondering how do you transfer a private USDT or ERC20 address balance from a website called btcusdt365? [closed]

I have the account Information, deposit address and etc. I just need to transfer the balance to a different wallet from just the deposit address.
0 votes
0 answers
17 views

What irregular ERC20 tokens are out there?

So I found out that some tokens behave a bit differently than a normal ERC20 token would. For example: USDC has only 6 decimals USDT does not return a value after the transfer USDT does not allow to ...
0 votes
0 answers
36 views

web3.js verify the success of the token transfer in mass transfer transaction

I've deployed smart contract: // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event ...
  • 101
0 votes
3 answers
75 views

Information about Apply mining pool rewards ERC-20 Smart Contract

I was contacted from a girl of Singapore,she told me to join a website,with 1k of buying USDT erc-20,every day I withdraw 30 dollar,but today I accept this partecipation for the claim the reward but ...
  • 1
0 votes
2 answers
24 views

Determing value of ERC-20 token

In developing a new ERC-20 token, can you determine the value of the token? Can you make them worth a different fraction of an ethereum?
0 votes
1 answer
33 views

Why am I getting an error that addr is not configured for ENS when trying to transfer an ERC20 token on Goerli testnet?

So I am getting this: Error: resolver or addr is not configured for ENS name (argument="name", value="", code=INVALID_ARGUMENT, version=contracts/5.7.0) I know everything's well ...
0 votes
2 answers
11 views

Having issues logging out state variables in Hardhat unit test

I am currently trying to log out the inherited _allowances state variable from a contract that inherits OZ's ERC20Upgradeable contract within Hardhat: mapping(address => mapping(address => ...
1 vote
1 answer
13 views

A question about ERC-20 Token

New to Crypto somehow. When an ERC-20 token is deployed gas fees are taken. So as the admin, I can transfer, and they take some money from my BNB accounts. Does this mean, if the holders of my token ...
  • 25
2 votes
0 answers
26 views

What is the difference between "Matic" and "Matic Token"?

I found "Matic Token". Contract Address: 0x0000000000000000000000000000000000001010 PolygonScan Link: https://polygonscan.com/token/0x0000000000000000000000000000000000001010 I have ...
  • 57
0 votes
2 answers
44 views

Where to find new ERC20 tokens?

Hope you are all doing good. Could someone help me to find out where to get information about new ERC20 tokens? Like DEX listing announcement or smth like that, when a token is available for buying ...
0 votes
1 answer
13 views

Why doesn't formatEther apply to my simple code?

So I have a React app and in it I need to check the balance of USDC tokens in my smart contract. For that there is a simple solution, but somehow the USDC value on display does not format (it has 12 ...
0 votes
1 answer
68 views

strange transaction when trying to sell a token

I accidentally found a token unknown to me in my wallet, its price exceeds $300, I tried to sell it on pancakeSwap, but the platform demanded a suspiciously high transaction worth $7 for activating ...
0 votes
0 answers
20 views

Why is my buyTokens function recieving a Metamask RPC error?

I have been working through a tutorial to learn more about blockchain development. In the tutorial , we develop an ERC-20 token and deploy it to a test network. We then run an ICO using another ...
  • 21
0 votes
1 answer
17 views

Fractional NFT overriding error

I deployed this smartcontract few months ago and it was running perfectly well but when I compiled it today, suddenly 4 errors are coming and I am very frustrated how to resolve them. Can anyone ...
0 votes
0 answers
32 views

Transfer ETH as ERC20?

I'm bulding a webapp where ERC20 tokens are sent to the SC, first I ask for the approval of the funds allowance to be moved and then I call a custom function from my smart contract which basically ...
0 votes
1 answer
31 views

Making an ERC20 token that the issuer has all controls over the tokens

While I am making a toy project that has some web3 feature, I am trying to make ERC20 token that the issuer can control the tokens wherever they are. For example, the issuer can send the tokens from ...
  • 37
0 votes
1 answer
37 views

how to call Transferfrom usdt contract?

I am newbie, I am testing . I have 1 question. How to withdraw usdt from an approved spender?. We hope to receive an answer
  • 11
1 vote
1 answer
28 views

Is it possible to make ERC20 tokens that the issuer originally has all controls over them?

I am wondering if the issuer of the ERC20 token can move tokens from user A to user B, without getting the allownace from user A. Is it posssible? If it is, how should I code the ERC20 contract?
  • 37
0 votes
1 answer
35 views

How many transfer events are there in Ethereum?

So I learnt that ERC20 tokens have Transfer and TransferFrom event. From my understanding Transfer event is when a transaction comes from an address to the smart contract instructing the transfer of ...
0 votes
2 answers
33 views

Execution Reverted : Burn token and redeem ethers

I'm developing two contracts: Tokens : ERC20Burnable Transparent Upgradeable Proxy - contract minting a token 1:1 for each ethers sent. Machine : Transparent Upgradeable Proxy - contract accepting ...
  • 3
0 votes
1 answer
29 views

Allow ERC20 token as payment method for minting ERC721 NFT

I'm new in Solidity and trying to allow purchasing using ETH and other token such as USDT but I keep getting this error no matter what I tried. DeclarationError: Identifier already declared. -->...
  • 101
0 votes
0 answers
27 views

getting the wrong price with getReserves()

I'm attempting to make a function that can give back the price of a token in WETH. however, the price I get back is a massive number and can't be correct. i'm getting an output of ...
0 votes
2 answers
28 views

Upgrade ERC20 Onchain without hardhat with UUPS Proxy

I have a token governance token: import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol&...
  • 119
0 votes
2 answers
36 views

how to make a contract compatible with different ERC-20 Decimals

I'm making a tutorial about how to create an AMM ( Automated Market Maker ), but I have a problem with the decimals. Both tokens have different decimals, and when I want to transfer them, the ...
0 votes
1 answer
25 views

Uncertain how to correctly implement Approve and TransferFrom for ERC20, could you kindly help me to understand?

Having trouble understanding how to correctly implement Approve and transferFrom. Some guidance would be much appreciated, thank you for your time. Below is my Deposit function: / Users can deposit ...
  • 1
0 votes
1 answer
29 views

move approved ERC20 to another contract

I created a contract that acts as my entry contract and gets an address for my second contract that would then call UniSwap exactInputSingle(). for the token that I'm sending to the first contract, I ...
0 votes
1 answer
48 views

How can I efficiently watch for new ERC20 contracts deployed?

I am wanting to listen for new contracts deployed and monitor specific events within these contracts. The method I am currently using to retrieve newly deployed contracts is very long-winded and not ...
  • 1
0 votes
0 answers
13 views

Checking contract verification status on Etherscan using an API

I am trying to create a script that will automatically alert me of new ERC20 tokens that have been created on the Ethereum network and that may be worth investing in. As part of this process, I would ...
1 vote
2 answers
50 views

How did this address steal my Ethereum ERC-20 Tokens?

A person on Twitter told me about this DApp that gives her 1% ROI each day and since I was new to crypto and her lies was really believable to me and I had really big FOMO. I first put 100 USDT into ...
  • 11
0 votes
0 answers
16 views

How can I find out the crypto exchange name from the below ERC20 crypto address?

How can I find out the crypto exchange name from the below ERC20 crypto addresses? I) 0xc261b02dafbe844b6b30d96bcaba14f2a04e3cc8 II) 0x699076cBd255C4e1F779C7e3CAstrong textE88e09846aDF83
  • 1
0 votes
1 answer
24 views

Trying to find difference between ERC20 and ERC721, any help please?

Getting this error when I try to run the following code which is supposed to check kthe receipt topics and if they are 4 then it should be ERC721 contract creation transaction and if 3 than it is ...
0 votes
0 answers
11 views

Sign and send signed transaction in L2 zk-Rollup

I own an ERC20 token on the Ethereum mainnet but as everyone knows the fees are very high would it be possible use L2 zk-Rollup with this methods below? Example transfer(), estimateGas(), ...
  • 101
0 votes
1 answer
17 views

Can ZCash be implemented as ERC-20 token or does it require another standard?

Obviously, you can implement e.g. Bitcoin as an ERC-20 token, but ZCash seems to have a way more complicated interface. I wonder if there is a standard describing tokens dealing with anonymity.
  • 165
0 votes
4 answers
86 views

Allowing contract to take ERC20 tokens from msg.sender

I'm kind of new to Solidity and struggling with allowances and approvals. I want my smart contract to be allowed to take ERC20 tokens (LINK in this case) from the msg.sender. I'm using Remix on Goerli,...
  • 101
1 vote
1 answer
25 views

Smart contract has stopped working well (runs out of gas)

I created an ERC20-compliant token with a tax and redistribution mechanism and deployed to the Bitgert chain and it has worked fine for days now. It stopped working well yesterday and efforts to ...
0 votes
1 answer
45 views

How to create a stablecoin pegged with gold (a gold-backed token) using ERC20

How to create a stablecoin pegged with gold basically a gold-backed token using ERC20, example 1Token = 1mg gold, what are the essential functions or steps need to take care, our customer is planning ...
0 votes
1 answer
21 views

How to absolutely cap an ERC20 token?

I'm working on my ERC20 token and I'm in need of capping the total supply. For this purpose I found the ERC20Capped extension of ERC20 standard, but I noticed, that if I mint all my tokens (So ...
1 vote
1 answer
25 views

Some Addresses Work In Function And Others Don't?

I have the below code running based on a series of wallet addresses placed into an array for arbAgainst. const main = async () => { const { token0Contract, token1Contract, token0, ...
0 votes
0 answers
20 views

swapExactTokensForETH function showing error in Pancakeswap

I deployed a token on bscscan(testnet) and created an LP in pancake(testing). but when I try to swap tokens for BNB it is showing an error. I think this error is related to isExcludedFromFee bcoz when ...
-1 votes
2 answers
104 views

How can i make my contract to accept only ERC20 tokens

i am building an escrow smart contract. I would like the contract to accept only ERC20 token. USDC OR USDT. Is there a way to inlcude this in my deposit function ? Similar questions have been asked ...
  • 9

1
2 3 4 5
48