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 ...
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....
  • 300
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 ...
  • 13
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... ...
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 ...
  • 491
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. ...
  • 1
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 ...
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 ...
  • 87
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 ...
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 ...
  • 61
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 ...
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?
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. ...
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 ...
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 ...
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 ...
  • 87
0 votes
1 answer
7 views

An ethereum token standard for minting and burning only

Does there exist a token standard (ERC or EIP) that has an interface similar to below? interface token { function totalSupply() external view; function mint(address _account, address _amount) ...
  • 197
0 votes
1 answer
13 views

ICO Site Development, When should I transfer tokens to investors

I am trying to develop ICO presale site and researched various ICO contracts on github. I am now stuck because I can't know when I should transfer tokens to investors. Someone wrote buyTokens ...
0 votes
1 answer
26 views

Is it possible to burn tokens that are in a contracts balance?

As the title states, is it possible, to burn tokens that are in the balance of a contract? I made a mini game where the person who calls the external function, it suppose to burn the tokens in the ...
0 votes
1 answer
11 views

Why do ICO startups mostly prefer ERC20 tokens for raising funds?

Can anyone create ERC20 tokens on their own? Does it need any technical expertise? Provide whatever information you know relevant to this question. It will be helpful even for newbies who are visiting ...
5 votes
2 answers
932 views

Someone has "faked" transferring 0.00 ERC-20 tokens from my and many other addresses

Someone has created a tx in which my address has supposedly "transferred" 0.00 USDC tokens to another address on Polygon, along with dozens of other addresses also transferring 0.00 DAI/WETH/...
0 votes
3 answers
50 views

How to develop a swappable ERC20 token?

I am developing a BEP20 token. The employer wants this token to be swappable in PancakeSwap. When I read source of similar tokens, they add IUniswapV2Pair, IUniswapV2Router01 and IUniswapV2Router02 ...
0 votes
1 answer
25 views

How to determine ETH price of ERC20 token using my own full node?

So I have a contract address of an ERC20 token and I have direct access to a full node. I want to determine the price of that token in ETH without making any external API calls and just by using my ...
  • 111
1 vote
2 answers
35 views

I can't make my first NFT sell

A buyer reached out to me on instagram. Sent me a QR Code. I saw the price. She made the payment to the network. She's clean. I'm clean. But things get complicated from this situtation: My NFTs are on ...
  • 11
1 vote
1 answer
29 views

Why my safeTransfer function doesn't work?

I am learning solidity and want to transfer tokens to others in my contract. But something blocked the way. Hope someone to help me. Below is my code: pragma solidity >= 0.8.0; contract Test { ...
  • 21
1 vote
0 answers
39 views

I am wondering what address do you use to call flashloan?

I am using this address to call flashloan 0x65aFADD39029741B3b8f0756952C74678c9cEC93 but I get Gas estimation failed error please let me know if you use another address and successfully call the ...
  • 11
0 votes
1 answer
13 views

How to get ERC-20 transfer events using curl?

I want to check whether my full node has historical logs correctly stored. How can I query historical ERC-20 transfer events, or any historical Solidity events, using UNIX curl command?
0 votes
1 answer
36 views

ERC20 INSUFFICIENT ALLOWANCE

here is my contract I'm minting an nft against erc20 token, but it will always give revert in the first condition of if because the transfer from function throws an error of insufficient allowance but ...
  • 61
1 vote
1 answer
31 views

Struggling to pick token standards for a game

Hello Ethereum community, We are building a game and struggle to figure out which token standards to use. Here is a high level overview of what "tokens" we need: Crystal (Tradable, FT, ...
1 vote
1 answer
133 views

Who pays the computation fee in account abstraction ERC-4337? in what currency?

I hear that by imposing account abstraction specified in ERC-4337 EOA is not the only one that can instantiate a transaction. What I'm confused about is the actual entity that pays the gas fee and the ...
0 votes
1 answer
77 views

Where can I find an example of a sponsored transaction (ERC-4337)?

I know this is the standard repo but I am not finding an actual example on how I can send a transaction from an account, paying for gas fees in an ERC20 token (paymaster providing ETH once tokens are ...
0 votes
1 answer
25 views

How to make my protocol token erc20 compatible?

I'm currently working on a DeFi blockchain project and we need to be listed on DEX. How can I make sure my token is ERC20 compatible and compliant to DEX norms?
0 votes
1 answer
34 views

How do i transfer erc20 token from another contract?

I'm creating a contract which will transfer usdt token from users wallet to contract address // SPDX-License-Identifier: MIT pragma solidity 0.8.16; import "https://github.com/OpenZeppelin/...
0 votes
2 answers
67 views

Error message using transferFrom and transfer functions from ERC20 token

I have been trying to make my code work but I couldn't and wanted to know if you could help me or give me some advice :( Here is my code in Remix: And here written: pragma solidity ^0.8.18; import &...
0 votes
0 answers
32 views

is this private Etherem based blockchain design spec possible for implementation?

I'm new to Ethereum / blockchain, so if some of the questions seem naive or stupid I apologize in advance. The motivation is, I need a blockchain that can dynamically change its token supply based on ...
0 votes
1 answer
40 views

Is it possible to set up an event listener that will catch all ERC20 tokens

Is it possible to set up an event listener in such a way that it will trigger for all token transfers? I am using web3.rs at the moment which is an implementation of web3.js in Rust. So anything that ...
1 vote
0 answers
21 views

Extremely High gas price after Transparent Proxy Upgrade of BEP20 token BSC

I upgraded my BEP20 token contract recently and all seems normal except that now the gas fees went from average of 35 to 50 cents to $13 to $32 dollars for 1 single token transfer, we are using the ...
1 vote
1 answer
64 views

Transaction Reverted when calling a function to send Tether USDT from Contract to wallet address

I have a function that uses the ERC20 transfer function to send an ERC20 token from a smart contract to another wallet address. function withdrawTokens(address _tokenContract, uint256 _amount) ...
0 votes
1 answer
27 views

Lock multiple token batches for 30 days

Similar question, in need of something simpler Specs: Each time a user interacts with my contract, I want to deposit 100 USDC into Spirals tokens should be locked for at least 30 days deposited ...
0 votes
1 answer
16 views

Does the Maker contract have a recovery function in his contract for funds sent to his address?

Is there a function inside of the Maker contract: https://etherscan.io/tokentxns?a=0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2&p=2 that would allow to recover funds that are sent to the contract ...
0 votes
2 answers
85 views

Failing to trying to approve contract using ethers.js (CALL_EXCEPTION or cannot estimate gas)

I am having trouble calling a simple ERC-20 approve function from the front end on the Arbitrum network. Any insight is greatly appreciated. I will outline my code below. I am retrieving the provider ...
  • 3
0 votes
1 answer
21 views

Why contract owner suddenly has bunch of zeros as prefix?

I am making upgradeable erc20 smart contract using chugsplash as upgrader and foundry as framework. It's name is FractionToken.sol and has it test contract FractionToken.t.sol. It went well(The ...
0 votes
0 answers
41 views

ZRX staking was my goal on this website: https://www.0x.org/zrx/vote and from my Metamask wallet

I have question! I just wanted to stake my ZRX tokens on ETH chain from my Metamask and went to this website: https://www.0x.org/zrx/vote sent some little fee and now I can not see anymore my tokens ...
0 votes
1 answer
26 views

I need to understand how to give deposit and withdraw permission to an aragonOSx plugin

I'm currently looking at the DAO.sol contract and I cannot find: the specific permission I need for the deposit function (so that I can deposit assets into the DAO). any withdraw function so that I ...
0 votes
1 answer
37 views

Metamask not showing balance of custom ERC20 token (hardhat)

I'm trying to test a custom ERC-20 token using Metamask and Hardhat. After deploying my ERC-20 coin and minting some to one of the HardHat default accounts I try to add the token to Metamask. It is ...
  • 1
1 vote
1 answer
34 views

call a function in the same contract

i have a contract who containt a function onTokenTransfer(address _sender, uint256 _fee, bytes memory _data), when i transfer some ERC-20 Token using ERC-677 function transferAndCall, the function ...
  • 187

1
2 3 4 5
49