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
0answers
3 views

Accessing a Function of an Already Deployed Smart Contract on Ropsten Test Network

I have already deployed a smart contract for my custom ERC20 Token on the Ropsten Test Network. Now I am creating a new smart contract and within a function I need to call the transfer() function of ...
0
votes
0answers
4 views

¿ E creado un token ERC-20 y necesito ayuda ? alguien que hable Español :)gracias

Es mi primer proyecto.. cree el token con la plataforma tokenmint.io y subi el contrato . Listado en Etherscan.io https://etherscan.io/token/0x505df100eacacc68f5c915ac91a28027f332e6ac Casini Token ( ...
0
votes
0answers
4 views

Get Contract Symbol from Transaction when multiple token transfers (swaps) in transaction occure

I want to monitor and extract the token transactions for a bunch of wallets using web3 subscriptions to the log events. I then extract the token information from the events contract. My problem is, ...
0
votes
0answers
11 views

Can any sort of transactions be executed on Layer-2?

I am new to DeFi space. I would like to understand the following: When transactions are executed on layer-2, is there only specific sort of transactions that can be executed on layer 2? Let's say I ...
0
votes
1answer
18 views

How to transfer a fraction of ERC20 Token?

I have deployed an erc20 contract on ethereum testnet and want to transfer a fraction of erc20. I used the transfer function to transfer tokens but I don't have any idea how can I transfer a fraction ...
0
votes
1answer
24 views

How to get the ERC-20 token balance of an account using etherjs?

I want to get the ERC-20 token balance of an account using ethers.js. Could you help me?
0
votes
0answers
3 views

can mint function be included in the erc20 reflection contract?

mint function to increase the supply of tokens be included in an erc20 contract with reflection keeping the existing reflection total , when mint function occurs can it should sync with existing ...
0
votes
0answers
8 views

WalletConnect Session Handling (with Metamsk) - No Metamask Confirm Dialog after first transaction

I have a web app using Wallet to send ERC20 transactions (contract interactions -> transfer). I am using Metamask (mainnet) to interact with the web app. For the login (connect) I get the confirm ...
0
votes
0answers
16 views

Cannot use transferFrom

no matter what I try, I am unable to call token.transferFrom without getting ERC20: transfer amount exceeds allowance - even though I have approved the allowance. Code speaks better than words: ...
0
votes
1answer
8 views

What if the owner remove address A from whitelist?

Let's imagine account A has the 1000 tokens and it's in the whitelist. Since this token provides the functionality of removing someone from the whitelist only to the owner. What if remove account A ...
0
votes
1answer
13 views

I sent ERC20 to Ethereum wallet that doesn't accept tokens. Is there any way I can recover it? [duplicate]

So after creating the smart chain bnb network on metamas I swapped my BNB to ETH and sent it to a casino account. apparently those were ETH tokens and they don't accept them. Are there any ways I can ...
0
votes
1answer
14 views

Transfer ERC20 tokens of a smart contract

I have an smart contract where people had to send some ETH using a simple transfer. Some of them transferred ERC20 tokens and not ETH. Is there a way of sending this ERC20 tokens back to it's owners? ...
1
vote
0answers
13 views

Cannot confirm my ERC20 coin balance with geth.console

In geth console, I want to check the balance of my ERC20 coin (called 'DPI' at contract address below). I do not want to use etherscan, rather I want to be able to check it offline. I think how I ...
0
votes
0answers
18 views

Ethers.js handling delayed signer rejection

I'm working on a site with an existing virtual currency (Let's call this VC). I've also created an ERC20 Token (Let's call this ET) so that I can buy ET using the VC. Since there's no way to check the ...
0
votes
1answer
34 views

Automatically generate an address for a token in the ERC20 and TRC20 network [duplicate]

How to create USDT TRC20 and ERC20 addresses for my wallet automatically via an api. I need to create USDT TRC20 and ERC20 addresses for a small exchange so that users can deposit their tokens, an ...
0
votes
0answers
12 views

Extract Automatic Liquidity from transaction fees?

At the moment, the feature where an ERC20 (or BEP20) token has X% automatic liquidity added to the LP from transaction fees is quite popular on Uniswap/PancakeSwap. But who can remove/extract this ...
0
votes
0answers
24 views

How to prevent users from adding liquidity in a BEP-20 token

I am relaunching a BEP-20 token and want to migrate from an old token to a new token with the same supply. I already have everything figured out, except for one thing: Question I want to make sure ...
0
votes
1answer
13 views

Can ERC tokens change their creation code or parameters afterwards?

Probably a dead stupid question, but just to make sure: can ERC20 or other tokens based on Ethereum Smart Contracts alter their properties after the creation? For example, can they change decimals ...
0
votes
1answer
6 views

I am Getting DeclarationError : undeclared identifier function setEndTime(uint _endTime) public onlyOwner

pragma solidity ^0.5.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfbdb11605bab94df6a6b864afc1a068e94a67cc/contracts/crowdsale/Crowdsale.sol"; import "https://...
0
votes
1answer
31 views

Newbie Contract Creation Question

Complete newbie here so thanks in advance for tolerating the ignorance that follows. I'm starting from the very beginning learning how to create and deploy my own tokens. And I'm going through and ...
0
votes
1answer
32 views

Why include UniSwapRouterV2 in Erc20 Contract?

Many ERC20 coins like SafeMoon include UniSwapRouterV2 in their contract. What are the benefits of this? Is it ok not to include a router? e.g. SafeMoon's Router code: interface IUniswapV2Router01 { ...
0
votes
1answer
18 views

Contract keeping track of token transfers

I want to create a contract that keeps track of what tokens have been sent to it (what amount, type, who sent it, etc.) I can do this for ERC721, ERC 777, ERC 1155 using the "tokenReceived" ...
0
votes
1answer
7 views

Is there a gas difference between minting and sending ERC-20 tokens?

Is there a large difference in the cost of gas when you mint tokens in a pre-existing ERC-20 contract, versus sending that same token? One example would be when an AMM like Uniswap wants to send ...
0
votes
1answer
27 views

Is it possible to redistribute ERC20 tokens?

While helping a friend with his ICO I saw he made a mistake while creating the tokens. The idea was the following: 20% Pre-sales and ICO 10% for the whole team 2% Marketing 1% Bounty 1% Airdrop 1% ...
0
votes
0answers
8 views

Getting parserError while compiling ERC20 contract?

I got this below error while compiling the contract... ParserError: Expected a state variable declaration. If you intended this as a fallback function or a function to handle plain ether transactions,...
1
vote
2answers
32 views

What's the default erc20 decimals?

As we know, decimals is an optional parameter on ERC20. I was wondering what if decimals is not set on a contract. Does it mean that if I send 10 in the transfer function, it means that it actually ...
0
votes
0answers
26 views

Send ERC20 Token to Contract address using web3.js

I am trying to send custom ERC20 TestToken to a contract address but somehow Web3 just fetch ether detail from metamask account async function runApprove() { const web3 = window.web3; const ...
0
votes
1answer
52 views

calling updating functions from mainnet contracts within hardhat tests

im trying to test out a portion of my token contract code using hardhat, however im facing an issue. What im trying to do In my testing code, im trying to add liquidity to an external contract (...
0
votes
0answers
11 views

How to get List of Etherscan Lable for each contract address and identify contract transfer token event

I use Etherscan API to get list of ERC20 tranfer token event of a specified address, but I want to get transactions which are sent FROM Uniswap or contract symbol address like this, but I don't know ...
0
votes
0answers
8 views

web3 subscribe produces duplicates

I am using web3 with an infura enterprise account to store tx data into a mongodb. Ive noticed that I have many duplicate transactionhashes stored and just can not figure out why. Is this a known ...
1
vote
1answer
24 views

Hardhat can't find the mint function

I'm using hardhat as a framework to develop my smartcontracts. So far it's been great, but im clueless as to why I can't call the mint function from my tests. Here's the error message: Token.connect(.....
0
votes
0answers
39 views

Unable to Add Liquidity from ERC20 Token Contract

I am trying to include the Uniswap addLiquidityEth() function in this simple ERC20 token that I am deploying via Remix. When calling the addLiq() function, I get the rather unhelpful error message ...
3
votes
1answer
32 views

Why does OpenZeppelin implement increaseAllowance and decreaseAllowance functions differently in their ERC20 contract?

This is copied from their ERC20 contract from github (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol): function increaseAllowance(address spender, ...
0
votes
0answers
10 views

Need help understanding whats happening in transactionhash details

Can someone explain to me what exactly is happening here? https://etherscan.io/tx/0x8f3e1ae0c440eef8d7f298dec5d5e7f707b961a606b87907e0b5cd71bde92c19 I want to track token transfers from a list of ...
0
votes
0answers
16 views

how to get token symbol and amount from transaction receipts using web3

I am looking for a way to retrieve following information of a transactionreceipt fetched with web3js. symbol amount of tokens. Some transactionhashes show multiple token transfers of the same txhash,...
0
votes
2answers
58 views

How can I swap a token across different liquidity pools in a single transaction?

im pretty new to solidity, and i was wondering how you can 1 ERC token by another across different liquidity pools. Example: I have 1 DAI and I change it for eth in the ETH-DAI Uniswap pool then I ...
0
votes
1answer
22 views

Receiving ETH payments

As someone more familiar with bitcoin than ethereum I'd like to ask what would be the best way to accept ETH payments as a merchant? With bitcoin I can do following and my question is if it makes ...
0
votes
1answer
35 views

How to properly use IERC20 interface in a contract using solidity 0.8.0 [duplicate]

Dear Ethereum/Solidity developers, I have a small solidity contract which should allow the contract to spend the owner's ERC20 tokens. I currently have the following interface defined interface IERC20 ...
0
votes
1answer
16 views

I'm confused about decimals and total Supply with my erc20 token

I created erc20 token. I want total supply of 50,00,000. And I want to give 7% tax on every transaction. So if anyone sends single coin then, how can I get 7% and transfer remaining to receiver? For ...
0
votes
0answers
21 views

Is there a way to add just BNB to the LP without adding the token as well? To balance the price a little?

So I manage a project which in my humble opinion has massive potential and a really good community. The problem is I didn't add much liquidity (only 2 BNB when making the coin) and people have sold ...
0
votes
0answers
15 views

Listen for new ERC20 token deployments in golang?

Is it possible to listen for new contract deployments ? More specifically ERC20 tokens ? Then abstracting the decimals and ticker and name. I am trying to create a list of all new ERC20 deployments ...
1
vote
1answer
120 views

A Lottery Solidity Smart Contract that accept erc20/bep20 token instead of ether to enter the lottery

function enter() public payable { require(msg.value > .01 ether); players.push(msg.sender); } Change this function to accept erc20/bep20 token to enter the lottery
0
votes
1answer
43 views

What's the difference between OpenZeppelin's IERC vs ERC contracts?

I'm using the contracts OpenZeppelin provides, but I don't understand why there is 2 version of the same one. Why is there an I version vs non-I?
1
vote
1answer
28 views

Would it be possible to create a token that you can mint on-demand?

Is it possible to create a token that you can mint on demand? Some possibilities might be to allow a specific wallet to execute the minting command, or to set the price ahead of time, or to use other ...
1
vote
1answer
39 views

How to Add a Function to an Already Deployed Smart Contract

I have already deployed a contract on Binance Smart Chain. I now would like to add time lock functionality to this contract to lock some of the tokens for a time period. I know that smart contracts ...
1
vote
2answers
33 views

Always running out of gas when sending ETH to a contract

I'm trying to implement a Crowdsale contract using OpenZeppelin 4.x since this version has deleted the Crowdsale.sol from its repo. My goal is to send ETH to the contract, receive "Gold" in ...
0
votes
1answer
16 views

Adding token image into smart contract [duplicate]

can we directly add the token logo to the token smart-contract so that we can visualize it in Wallets and Exchanges and so that we don’t have to register it in another way Please help erc20 token ...
0
votes
0answers
78 views

Fail with error 'TransferHelper: TRANSFER_FROM_FAILED' when transfer to other wallet

I was able to make a first transaction since I needed to send my tokens to DxSale, I need to send a small amount to DxSale, I am trying from Metamask but now it does not allow me to make any ...
0
votes
1answer
21 views

How an IERC can do transferFrom without ERC20?

I'm trying to understand the following code: pragma solidity ^0.6.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract Recipient { IERC20 private _token; event ...
0
votes
0answers
39 views

Emergency Metamask Withdrawal - Fastest & Easiest Way to Withdraw Tokens From Metamask (You're Being Hacked)

I recently was hacked and had all of my tokens stolen, from a variety of chains (ERC20, BEP20, Matic, Wanchain). This made me realize how poor of a system I had in place, because I had realized that ...

1
2 3 4 5
34