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
1 answer
7 views

Is it possible to distinguish users, who send tokens/eth on single address?

I know that the easiest way is to generate new address for every user and then withdraw token/eth from it, but this requires additional tx fee payment. Is there any way how I can determine users by ...
1 vote
0 answers
8 views

How to add ERC-20 symbol and logo to UniSwap?

We’ve created an erc-20 token and deployed it on Eth mainnet and listed plus added liquidity and received the LP’s on UniSwap. At the moment, on UniSwap, we can only search for the token by its 0x... ...
2 votes
4 answers
288 views

Is it possible Refund the ETH within ERC20 Contracts?

if user sent the 1.5 ETH then accepted the 1 ETH, but 0.5 ETH should be refunded to sender. I tried like msg.sender.transfer(0.5) and tried like msg.sender.transfer(500000000000000000) but nothing ...
2 votes
3 answers
519 views

Given transaction hash, how to proof that it was a successful erc-20 token transfer using web3?

I have a transaction hash and an RPC access to fully synced node. How to check if the token was actually moved? The transaction might be old, so there is no point in querying the contract. If I ...
2 votes
1 answer
18 views

call method problem in solidity

I have simple contract and it has a function to call ERC20 token contract: function _approve(uint256 amount, address to) external payable returns (bool){ (bool ok,) = linkTokenAddress....
0 votes
1 answer
601 views

Setting ERC-20 token price

I'm currently trying to set the token price of my ERC-20 token.The problem I'm having is trying to set the price to ETH(0.01) per token, but the closest value I keep getting to is ETH(0.001) per token ...
1 vote
1 answer
15 views

Search etc-20 tokens by name on UniSwap

We’ve created an erc-20 token and deployed it on Eth mainnet and listed plus added liquidity and received the LP’s on UniSwap. At the moment, on UniSwap, we can only search for the token by its 0x... ...
1 vote
1 answer
26 views

TranferFrom in delegate call

I have an ERC20 test contract, also I did multicall with delegatecall function instead of call. I have a three accounts: account1, account2, and account3. account1 can spend tokens from account2 (I ...
0 votes
1 answer
406 views

Adding max tx percent ERC20

I can see that many ERC20 tokens that has recently launched has an "set max tx percent" before adding liq. What does it stand for? Is it to stop bots to buy upp all tokens as soon as liq has ...
0 votes
1 answer
309 views

Metamask false positive error: ERC20 transferFrom tx displays "Exception thrown" error in metamask, but tx confirms fine

I'm fairly certainly this is due to approvals- that metamask thinks that an error will be thrown because the contract does not have approval to transfer the ERC20- even though the approval tx is ...
0 votes
1 answer
525 views

ERC20 Event Listener in Rust Programming

I am trying to program an erc20 event listener using Rust programming language and trying to get events from a particular block to the latest block. But even though I have specified from the block it ...
2 votes
2 answers
1k views

How to add website link to erc20 token on etherscan.io

How can we add this official site link to our deployed contract? Like in the image below: Here is my deployed contract address: https://etherscan.io/address/0xab73a739729a21b2299761408507556d2719af89#...
0 votes
1 answer
1k views

Transaction underpriced

I used the search function, but I didn't find a solution. We want to create for our new religious NGO a ERC20 token. I got a sample contract, a Metamask account, went to redmix website and connected ...
9 votes
7 answers
9k views

ProviderError: Error: Transaction reverted: function selector was not recognized and there's no fallback function

I'm trying to call a function[propose] from Openzeppelin governor.sol. The function is like this... function propose( address[] memory targets, uint256[] memory values, bytes[] ...
0 votes
0 answers
13 views

MetaMask can't detect token in local network

I'm working on a local environment by Truffle and Ganache so that MetaMask is set to it. I created an ERC20 token there and imported it to MetaMask according to this guide. But, MetaMask doesn't list ...
0 votes
1 answer
367 views

How to detect if user burned tokens

Looking through the code of ERC20 tokens they have the ability to burn and mint new tokens. I want to write a nodejs program that monitors if a user burns a token and then sends them a new one if ...
1 vote
3 answers
794 views

How to get the Total Number of Tokenholders of ERC20 tokens?

Is there any simple API or datafeeds where I can just get the total number of tokenholders of ERC20 tokens?
2 votes
2 answers
2k views

Dynamic total supply for ERC20 tokens

I am trying to create an ERC20 token using the following workflow. Create a new token, let's say 'XYZ' with an initial total supply of 1000 coins. List them on exchanges and also create coin's own ...
2 votes
1 answer
5k views

Can I "cancel" a token transfer transaction by sending ether?

The OMG transaction is listed here on etherscan. I initiated it around 7:30 AM this morning, even though the timestamp on that page always seems to restart everytime I refresh the page. I found a ...
0 votes
2 answers
393 views

How to call approve ERC20 and other contract function?

I'm trying to design this: user clicks the button and the button calls approve for ERC20 and call contract function that requires those ERC20s. But what happens it's that approve function succeeds, ...
0 votes
1 answer
846 views

ERC20 Token. My transfer function from my token does not work

When I call the function giveFifteenthTokens in my contract problem2_bank, it does not transfer tokens from msg.sender to recipient. Why? My Files: LoanToken.sol pragma solidity ^0.5.8; import "...
1 vote
3 answers
873 views

How can I collect the tokens inside smart contract that people will send accidentally?

I have an ERC20 token XYZ smart contract created. People will send certain amount of tokens back to the contract address to initiate certain functions. I just want to know that what will happen if ...
0 votes
1 answer
33 views

Error with getting balance of an ERC20 token for a wallet address solidity

I tried calling this function : function createBorrowerCentricService (address _borrowToken) public returns (uint256) { BorrowService storage borrowService = borrowingServices[...
0 votes
0 answers
10 views

Why doesn't Openzeppelin's IERC20 has a `decimal()` function?

In my projects, getting the decimals() is an important task, so I have to sometimes manually add the function in IERC20's interface. But why isn't this function officially in the contract? What am I ...
0 votes
0 answers
14 views

Split payment for ERC20 transfers between user owned wallets

I am trying to create a solution that charges a processing fee when ERC20 payments go from user to user on our platform. I don't control the ERC20 token so I can't implement anything on that contract. ...
0 votes
1 answer
23 views

How to get all addresses with USDT balance? [duplicate]

I am trying to get all Ethereum addresses with more than 0 USDT on them. How do I do this? Then, how do I do this with any ERC20 contract?
0 votes
0 answers
21 views

Use Brownie to send ERC20 tokens to a payable function with the amount of tokens as an argument to the function

I have the following AlgoToken contract: interface StableCoin { function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external ...
0 votes
1 answer
426 views

Stablecoin smart contract

Drop in smart contract links for ERC-20 stablecoin. There is no list defined anywhere. There should be easy to understand resources in one place for new lerners. what should be the best boilerplate?
0 votes
1 answer
2k views

ERC20 token recovery

I am sorry if this is a stupid question but if someone can help I would appreciate it. first I have the keystore to where the tokens were linked to, I already sync completely to the network. I show ...
1 vote
1 answer
976 views

ERC20 Token support for metamask website payment

I have the following code working in my site to accept ethereum payments in my website via metamask.... <!DOCTYPE html> <html> <head> <script src="https://cdnjs.cloudflare.com/...
3 votes
1 answer
1k views

Passing one contract instance as an argument to the constructor of another contract

I need to use the functions of the ERC20 contract in another contract. The ERC20 contract is from the openZeppelin contract library. I found the following code on a website: import "../../...
1 vote
1 answer
30 views

ERC20 Tax on sell (via swap)

I'm struggling with taxing upon swapping a token back for ETH. I can't figure out what I'm doing wrong here. I'm using Hardhat testnet forking Goerli to work with the Uniswap contracts. Also made ...
1 vote
1 answer
28 views

how to peg an ERC20 token to a stipulated price in other to make it a stablecoin [duplicate]

I'm new into blockchain development and currently challenging myself to create a stablecoin. I have created an ERC20 token but I don't know how to peg the price to the desired price. Please can anyone ...
1 vote
1 answer
40 views

swapExactTokensForETH transaction reverted, `UniswapV2: K` error (with gas wasting), selling with Uniswap GUI works fine

Facing reverting swapExactTokensForETH transaction using web3js. Tried different ways. Probably, it is important to note, this failed transaction uses a relatively large amount of Gas Fees. The code ...
0 votes
2 answers
277 views

Error encountered during contract execution [invalid opcode: INVALID]

I was using Web3.py to send Tether from address A to B: w3 = Web3(Web3.HTTPProvider('https://mainnet.infura.io/v3/REDACTED')) teth = '0xdAC17F958D2ee523a2206206994597C13D831ec7' # ...
0 votes
1 answer
267 views

Cannot call ERC20 mint function from another contract's payable function

Scenario: Contract A is a contract that sells ERC20 tokens Specified in Contract A using Open Zeppelin's ERC20 implementation. Contract A has a payable function that receives ether from a caller, as ...
1 vote
1 answer
21 views

ERC20 - Approve/TransferFrom vs listening to Transfer events

I've been learning about the ERC20 standard and I've seen in several places statements like If a smart contract want to detect when it receives a transfer of ERC20 tokens the standard approach is for ...
3 votes
1 answer
17 views

Issue with sending tokens after performing arithmetic operations

I'm implementing a fundraising contract where a user can create a fundraiser but when creating they must send a rewardingToken (ERC20 token) to the contract and the user also specifies a token which ...
0 votes
1 answer
379 views

Monitoring uniswap pair buy and sell transactions via the logs filtering

Can anybody suggests the way to retrieve an Uniswap pair sell or buy transactions, filtering the events logs. I know, it's possible to monitor an token transfers continuously scanning token Transfer ...
0 votes
1 answer
285 views

Batch Transfer ERC20 Tokens From One Wallet To Another Wallet

Is it possible to batch transfer ERC20 tokens from one wallet to another with one transaction call? For example, one wallet has 10 ERC20 tokens. We want to get all the ERC20 token contracts in wallet ...
2 votes
0 answers
21 views

Query Transactions between date ranges with Infura

I need to query ERC20 and ETH transactions by a date range and not simply get a paginated batch at a time. How can I do this?
1 vote
1 answer
307 views

Is there a protocol to transfer erc20 tokens to multiple addresses?

I'm looking for something like described here: how to transfer ether from one account to multiple account I just thought it's such a common problem - isn't there an existing library (preferred) or a ...
0 votes
1 answer
22 views

Problem about ParserError: Source "@openzeppelin/contracts/token/ERC20/ERC20.sol" not found: File not found. Searched the following locations: ""

// contracts/OurToken.sol // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract OurToken is ERC20 { constructor(uint256 ...
0 votes
0 answers
13 views

BLUR airdrop claim explained - embedding a proof into a transaction

Recently, I saw that Blur had a twitter dependent airdrop. So basically you had to tweet and then you would get the option to claim tokens. I went to analyze the code, but it is overwhelming for me. ...
0 votes
2 answers
109 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 ...
1 vote
3 answers
46 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 ...
1 vote
3 answers
154 views

Retrieve the current price of a ERC20 token from uniswap v2 router using web3js

I'm really stuck on getting the price of a erc20 token for 1 wETH if the token can have a dynamic decimal. I tried to play with values dividing them by token's exponentiation decimals in different ...
0 votes
1 answer
415 views

How to interact with mainnet smart contracts by GOlang?

Please tell me an example of code in GOlang that connects to the contract and checks the balance of the ERC20 token / transfer tokens / gets the name of the token. I looked for examples and did not ...
0 votes
1 answer
1k views

Opensea - To first time sell I need to sign messeage & Sign a message using your wallet to continue but it shows error afterwards [Picture shown]

This is my first time selling and it says that I need to "sign message" shown here. I did that but I got the error is shown below instead of approval: Any advice on how I can fix this issue ...
0 votes
4 answers
393 views

Use custom ERC20 addresses

I am pretty new to the Ethereum and ERC20. I am willing to create an ERC20 token. I see that ERC 20 tokens can be transacted using the Ethereum addresses. However, I am wondering if it is possible to ...

1
2 3 4 5
49