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
203 views

Adding Max Wallet Limit but exclude creator wallet and liquidity pools ERC20 Simple Code

As stated, looking to do a very simple clean ERC-20 contract with basic functionality. Only thing I want to add is a max wallet limit of 2% to avoid sniping bots or whales buying at once. Only issue I ...
Confuzion's user avatar
0 votes
1 answer
316 views

error in Transfer amount must be greater than zero

I have a token named TEST that integrates a function called addFund. This addFund function is responsible for receiving a 3% fee from every buy/sell of the token. The total fee is 5%: 1% for LP (...
Lloyd Ramos's user avatar
0 votes
1 answer
157 views

How to identify ERC 20 swaps using ehterscan API

Hi I would want to identify ERC 20 swaps for a certain ETH address using etherscan API. At their site method column shows if it's a swap. But the json of the response doesn't include a method field, ...
Javier M's user avatar
0 votes
2 answers
84 views

transferring USDT from metamask to smart contract

I'm trying to transfer USDT tokens from my metamask account to another address(which is variable in smart contract) through method call. if I use transfer method, I'm getting not enough balance(...
GiorgiSh's user avatar
  • 119
0 votes
0 answers
460 views

How to get taxation feature on token transactions on uniswap?

I have an ERC20 token contract deployed on mainnet. // SPDX-License-Identifier: MIT pragma solidity <=0.9.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@...
Swapnil's user avatar
0 votes
0 answers
32 views

Set the correct spender when calling gasless transferFrom from another contract with GSN

Actually I'm trying to figure out the best way to implement gasless call to transferFrom of a ERC-20 token. I'm not very familiar with GSN so maybe it could be a best way to achieve this. I wrote a ...
viac92's user avatar
  • 33
0 votes
0 answers
157 views

I want to fork some memecoin in arbitrum goerli but I have some errors

Alert This contract may be abstract, it may not implement an abstract parent's methods completely or it may not invoke an inherited contract's constructor correctly. Gas estimation failed Gas ...
dusk081's user avatar
0 votes
1 answer
38 views

Execute ERC20 Approve outside of ERC20 contract

I am rewriting the solidty-by-example.org crowdfunding exercise. IERC20 public immutable token; function pledge(uint _id, uint _amount) external { Campaign storage campaign = campaigns[_id]; ...
stevealock's user avatar
1 vote
0 answers
42 views

Smart Contract working perfectly fine on remix but I face issues when I deploy it on the Binance Test Net

I made a smart contract that allows user to enter pools and place a bet. When the pool time ends the users are given rewards given that they their bet turned out to be correct. When I tested this ...
Anas Naeem's user avatar
0 votes
1 answer
82 views

I am getting errors when trying to deploy, and I can not figure it out. Error: The transaction has been reverted to the initial state. Note: The calle

The transaction has been reverted to the initial state. Note: The called function should be payable if you send value and the value you send should be less than your current balance. Debug the ...
Nathan Martinez's user avatar
0 votes
1 answer
402 views

ERC20 transfer amount exceeds balance error in Solidity contract

I'm encountering an error while trying to transfer tokens from one address to another in my Solidity contract. When I attempt to print the balance of msg.sender, it shows a value of ...
Anantashayana Hegde's user avatar
0 votes
0 answers
14 views

Creating an stable ERC20 coin for Commerce

I am looking to build a euro backed stable coin that is built on ETH. We have liquidity behind it to keep it pegged. This would be used on a ecommerce site to buy physical items and than users will be ...
Jas B's user avatar
  • 1
0 votes
1 answer
1k views

How to generate Bitcoin Address from Seed Phrase?

I know I can use ethers.js to generate my ERC20 compatible wallet address(public key) from my twelve words seed phrase. I have been wondering if that is doable with bitcoin addresses too because ...
Shigaba Shigaba's user avatar
0 votes
1 answer
47 views

How to find Constructor Arguments for verification on Etherscan.io

I spent 4 days for this work. plz make me know anybody. this is solidity code of my token I use openzeppelin. // SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/...
jerry12345's user avatar
0 votes
1 answer
201 views

How to safeTransfer an ERC20?

I have to safeTransfer an ERC20 to a smart contract. How can I do this? I understand that SafeERC20 is not an extension of ERC20, this is why I don't understand how I am able to interact with safe ...
Falcon Stakepool's user avatar
1 vote
2 answers
351 views

new token liquidity and price

if I have a new token that has a total supply of 420 trillion and I want to have 20% liquidity for it, how much of the token and ether would I need to put in to get this
matt's user avatar
  • 11
6 votes
4 answers
720 views

How to get Token balances

How to get balances of all ERC 20 tokens a wallet holds?
Devsuite's user avatar
3 votes
2 answers
138 views

Trying to get txn hash

How can I get an Ethereum transaction hash whenever a particular NFT/ERC20 token is transferred? Not sure exactly what process/code is needed to do that.
Tien's user avatar
  • 193
3 votes
2 answers
210 views

How to get ERC 721/1155 and ERC-20 data?

How do I get all the NFTs (ERC-721 & 1155) and Tokens (ERC-20) for a wallet address? Is there an API for this? Irwing Tello
Irwing Tello's user avatar
3 votes
2 answers
162 views

ERC-20 balances

How do I get balances of all the ERC-20 tokens for a wallet address Irwing Tello
Irwing Tello's user avatar
0 votes
1 answer
24 views

erc20 where the contract holds the tokens

I want to create a contract where the coins that are minted initially are given to the contract, and then later I'll create a function on how to distribute them. But I was wondering if it's possible ...
你的老师's user avatar
0 votes
1 answer
31 views

Updating Front-end data based on smart contract data

I am writing an ICO(Presale) contract which have different phases of sale and different starting prices for each phase. Also, on each token sale the price of tokens increase by a static value. After ...
Bengican Altunsu's user avatar
0 votes
0 answers
222 views

BEP20 Token : Gas estimate failed, trying eth_call to extract error

I'm new to Solidity and I've successfully built a BEP20 smart contract using Solidity version 8.19. The contract includes several features such as pausable, ownable, blacklist, fee division among ...
Mohammed's user avatar
0 votes
1 answer
89 views

Make a refund function for ERC20

I have a crowdsale campaign that i've created but cant seem to find the root cause of this. Basically, when the campaign is expired, the buyer able to make a refund the token that they've bought ...
0xhaz's user avatar
  • 3
0 votes
0 answers
17 views

Can I tip Basic Attention Token (BAT) directly without using Brave Browser?

From the BAT FAQ, Explain the Brave and BAT products and how they work together. [...] Whether you want to earn BAT by seeing ads, or buy tokens directly, you can use them to support the sites you ...
user122273's user avatar
0 votes
0 answers
25 views

Problems Integration ERC-20 Smartcontract, and Interface with Metamask

I got problems connecting my ERC-20 tokensale smart contract via interface with Metamask. Everytime I see a popup that I have to connect my wallet while it’s already connected. Another problem is that ...
JayJay's user avatar
  • 1
0 votes
1 answer
48 views

Token name not displayed after deployment

// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; import "...
Igho Terry's user avatar
0 votes
0 answers
44 views

Cannot get my Files to compile in hardhat. getting loop of a few error messages indicating I am either passing too many arguments or not enough

I have tried several solutions offered by a few others and have used open AI to try to get some help, but cannot get files to compile. Please know that I have also tried passing the parameters in the ...
Shawngilbert107's user avatar
0 votes
0 answers
540 views

How to get and decode logs of all transactions of a block in web3?

How to get and decode logs of all transactions of a block in web3? My question is very similar to: Is there a way to get the logs for all transactions in a block? But the suggestions were given using ...
Alison Silva's user avatar
0 votes
0 answers
54 views

How to make a list of top 50 ERC20 tokens by market capitalization (token_price * #_of__tokens_in_circulation)

Want to replicate the landing page of https://coinmarketcap.com/ as part of a college project. I want to build an API like https://docs.moralis.io/web3-data-api/how-to-get-the-top-erc20-tokens-by-...
Supratik Chaudhuri's user avatar
0 votes
1 answer
44 views

Can i transfer token to a account for next 180 days automatically without any further interaction with function using for loop?

I have written a function to lock some amount of tokens. If user lock tokens then by calling this function then token will be locked for 180 days. One of the important logic I wanted to implement is I ...
Hacek 's user avatar
  • 657
0 votes
0 answers
96 views

How did AAVE dapp calculate the “maximum available withdraw” value (v2)?

I can not find the dapp of aave manage to find the exact amount that I can withdraw. I have 5 "aUSDC" but when I go on dapp, I can only withdraw 4.3. I know it's due to the debt of another ...
Frank Waldron's user avatar
1 vote
1 answer
155 views

Is there still any reason to use SafeERC20Upgradeable with the ERC20Upgradeable?

From the ERC20Upgradeable docs: "We have followed general OpenZeppelin Contracts guidelines: functions revert instead returning false on failure. This behavior is nonetheless conventional and ...
noncy 's user avatar
  • 11
0 votes
2 answers
133 views

on etherscan Why input Data amount value and ERC-20 tokens Transferred value are different

In this case https://etherscan.io/tx/0x9412e437f29fa5719de54c5374f0a89fbe78786060db05b2cb9a5ffb189e04d8 Why input Data amount value and ERC-20 tokens Transferred value are different?
Misck's user avatar
  • 1
1 vote
1 answer
371 views

HH606 hardhat compile error/ version issue

I have tried everything I know to do (which is limited, ill admit) and I cannot seem to resolve this error. Error HH606: The project cannot be compiled, see reasons below. The Solidity version pragma ...
Shawngilbert107's user avatar
0 votes
1 answer
463 views

Not able to sell token, where is the tricky code in it

I bought a small amount of this token, but later on doing some more research I found old projects from the creator scamming people: 0x746a2890c506E11597D0b5d805f7d4d6E980667D im not able to sell that ...
Marcel Dz's user avatar
  • 103
1 vote
2 answers
191 views

Implementing an ERC20 Smart-Contract within another Smart-Contract

I’m trying to create a contract that lets people choose to pay for their transactions with either ETH, or another ERC20 Token - one that I’m creating and for now calling “DummyCoin”. So basically when ...
Mark55's user avatar
  • 1,011
1 vote
1 answer
170 views

Metamask - get value entered from calling ERC20 "approve()" method

When we're asking a user to approve() the spending of a proprietary ERC20 Token for the first time (like say DAI, or SUSHI, etc.), the user has to enter the amount they're willing to approve - like ...
Mark55's user avatar
  • 1,011
0 votes
0 answers
22 views

ERC 20 Remix Gas Allowance ERROR

I have this basic contract made on Openzeppelin Wizard, but everytime I try to deploy it on Mainnet i get the same error " exceeds gas allowance". I succesfully deployed it on Goerli. I've ...
Paul Suciu's user avatar
1 vote
0 answers
38 views

List failed (ERC20-)Transactions for a specific address?

is there a way to show all failed (or all including failed) transactions regarding a destination address? Example: https://etherscan.io/tx/...
WhatTheShack3932's user avatar
0 votes
0 answers
41 views

'Execution Reverts' when sending ERC-20 token on Swift

When I run this method in Swift, the transaction fails. And I get the following error in Polygon Scan Mumbai: Warning! Error encountered during contract execution [execution reverted]. When I print ...
Karthik's user avatar
0 votes
1 answer
46 views

What are the pros and cons of using OpenZeppelin ERC20Votes?

I want to use this extension for an ERC20 token. What are the pros and cons (if any) of adding this to it?
Falcon Stakepool's user avatar
0 votes
1 answer
304 views

Using the _mint() function from an ERC20 contract marked 'internal virtual'

I have an existing ERC20 token / contract that I would like to be able to provide rewards that could be minted to the supply. The existing contract already has a _mint() function, but it's labeled as '...
ASumeet's user avatar
  • 15
0 votes
1 answer
72 views

insufficient allowance Error .. ERC20

// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import &...
kaay's user avatar
  • 7
0 votes
1 answer
40 views

How does this 1inch swap result in the user receiving almost double the value of the swapped tokens?

When I look at the following transaction on etherscan, it appears this user swapped $188.89 worth of a token called MOTG for $303.75 worth of USDT. Can someone explain how that happened? I don't ...
Goober117's user avatar
0 votes
1 answer
158 views

Is there a way to burn honeypot tokens in a wallet

There are some tokens in my wallet which are honeypot tokens and I can't sell them or transfer them, is there a way to burn them or are they stuck in my wallet forever?
risky last's user avatar
0 votes
1 answer
21 views

Gas estimation failed for marketplace contract

i receive an error upon trying to interact with buy function in my contract below // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol&...
kaay's user avatar
  • 7
0 votes
0 answers
30 views

Meaning of all amounts populated in Swap event

What does it mean when an erc20 swap event has both an amount0_in and amount1_in? Are they receiving both tokens in return? Why does this make any sense?
BAR's user avatar
  • 135
0 votes
1 answer
65 views

transferFrom not working. Estimate gas fee error. Cant find the bug

Code of contract followed by an explanation and requirements. Everything works but trade function. /** *Submitted for verification at Etherscan.io on 2023-05-16 */ // SPDX-License-Identifier: ...
SideChain Labs's user avatar
7 votes
4 answers
11k views

invalid opcode: opcode 0x5f not defined

I'm new to Solidity and it's my first try to write a smart contract using Openzeppelin, Pancakeswap and BEP20 libraries basically to make a BEP-20 token. When i try to deploy the smart contract, i get ...
Mohammed's user avatar

1 2 3
4
5
52