ERC-20 is a smart contract standard defining an interface and a set of rules for development of fungible tokens on the Ethereum platform.
Questions tagged [erc20]
462 questions
-1
votes
2 answers
How can I use my erc20 custom token as required payment in my solidity contract?
I have created a custom ERC20 token and that is currently deployed on testnet and will launch it on polygon in future.
Solidity
uint256 public cost = 0.001 ether;
function test(uint256 _mintAmount) public payable {
require(msg.value…

Blockchain Kid
- 315
- 2
- 9
-1
votes
1 answer
How does uniswap call the approve function
I am trying to build a no-code tool for users, I want to be able to transfer tokens on the user's behalf.
anytime I call the IERC20(token address).approvefunction, my metamask does not a return a screen like the attached image and the IERC20(token…

dayo
- 3
- 2
-1
votes
2 answers
Problem creating NFT "erc721" (name, symbol)
I am trying to create an NFT creation site (ERC721) where any user could upload an NFT he wants he just needs to fill in details of "name","symbol" and "url".
I'm having a problem I can't change the "name" and "symbol". After the first creation each…

asalef alena
- 15
- 3
-1
votes
1 answer
ERC20 atomic swap in solidity
My goal is to create a simple Ethereum smart contract that allows for an atomic swap between tokens. Initially it should've been a cross-chain swap but I am struggling to do the basics.
I am using ERC20 tokens that i have created using the…
-1
votes
1 answer
Why is it when i call transfer() from a certain account (in Remix's Injected Web3 environment), it tries to take out of the contracts balance?
After reading documentation online, I can tell something isn't clicking for me when it comes to dealing with ERC20 tokens in Solidity.
At the very basic level, I need this contract to be able to transfer HEX, an ERC20 token, from user to user. I…

hcwil
- 59
- 1
- 5
-1
votes
1 answer
Token balance check is not working in Solidity smart contract
here is my code snippet and i have no idea why its not working
function Testdeposit(address _assetAddress) public returns (uint256 status)
{
//IERC20 erc20 = IERC20(_assetAddress);
//erc20.transferFrom(senderAddress,…

Malik Mehmood
- 3
- 1
- 3
-1
votes
1 answer
Multiple ERC20 tokens in a DeFi platform
I'm building a DeFi application on Ethereum, and I would like to implement the Deposit function. Everything works fine between ETH and a ERC20 token that I built, but I would like to add some tokens like aToken for AAVE or cTokens for Compound that…

Hyramnet
- 1
- 2
-1
votes
1 answer
How to add liquidity for an inflationary cryptocurrency
I have an NFT collection that generates 1 token (let's call them COIN) every 24 hours (see CyberKongz). There is no ICO for COIN and the currency is 100% inflationary meaning the supply starts when the first NFT generates 1 COIN.
If the price of…

Kyle Underhill
- 89
- 15
- 43
-1
votes
1 answer
exchange own ERC20 token to another token in smart contract for Game
I want to deploy a smart contract (ERC20) for the game,
so the purpose is to keep points.
when someone enters the game, we will ask for some crypto coin (ex. ETH) and give some of our own points
while playing the game, the user will earn some…

Talent
- 23
- 4
-1
votes
1 answer
how to take a our ERC20 token as fee to our products?
I have one product if the consumer want to buy my product he needs to pay 50 ERC20 Tokens. how to write this smart contract and how to know that he payed my tokens only ?

Gopal Gurram
- 61
- 1
- 4
-1
votes
2 answers
Get USDT balance (erc20 token)
Im trying to get balance of USDT address (erc20 token).
func tetherAmount(addrHex string) {
conn, err := ethclient.Dial("https://mainnet.infura.io/v3/[api_here]")
if err != nil {
log.Fatal("Whoops something went wrong!", err)
}
…

root
- 13
- 1
- 4
-1
votes
1 answer
UniSwap Error - The token cannot be transferred. There may be an issue with the output token
https://etherscan.io/token/0xe0e00941dc0a4b0ebf9738b6d9a9d319cac8fd55 We deployed a few minutes ago and people are complaining that if you buy more than 0.005 worth of ETH they get the error "The token cannot be transferred. There may be an issue…

Nordic Guy
- 301
- 5
- 13
-1
votes
1 answer
Pandas conditional row values based on an other column
Picture of the dataframe1
Hi! I've been trying to figure out how I could calculate wallet balances of erc-20 tokens, but can't get this to work.The idea is simple, when the "Status" columns row value is "Sending", the value would be negative, and…
-1
votes
1 answer
How to protect the ownership of the ICO Whitepaper?
I have an idea which I need to write a white paper and go for an ICO. I am curious to know what happens after I publish the whitepaper that someone else can also steal the same and come up with the platform. How do we prevent this ?

Noushad Mohamed
- 31
- 7
-1
votes
1 answer
(Etherscan API, web3 vs Etherscan Website) Why different token values?
transaction hash : 0x70a584e4a2eb38cf7d6d48e215f6ac105b17ecfd97cd7091c4079bb961c2aa4c
[Etherscan Website]
https://etherscan.io/tx/0x70a584e4a2eb38cf7d6d48e215f6ac105b17ecfd97cd7091c4079bb961c2aa4c
transferd value = 90000000000000000000000 (90,000…

DonghoChoi
- 1
- 1