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
1 vote
0 answers
68 views

Can I cut a fee using multicall on Uniswap V3?

I developed my own frontend for Uniswap V3, and I was asking myself if I could cut a small fee of the input token using multicall. Basically, I would calculate what 2 percent of the input token would ...
2 votes
2 answers
47 views

token transfer using one account vs. multiple

I'm trying to send tokens to multiple wallets as soon as possible. A. function can be run by only one wallet under onlyOwner. function batchTransfer(address[] memory receivers, uint256[] memory ...
2 votes
3 answers
102 views

token.transferFrom() Will Not Work with ERC20 Token

I've made an ERC20 token (TaylorSwiftCoin, aka SWFT), and I'm attempting to make a very basic smart contract. I'm running this on the Dune TestNet, and I simply want this smart contract to take 100 of ...
0 votes
1 answer
313 views

There is an address that is hacked, the bot is monitoring it and payments are received regularly!

So, the bot instantly cancels these payments by sending, for example, 0.01 eth with a commission (fee) of 0.009 to another wallet, or even canceling everything through self - sending 0 to the same ...
1 vote
1 answer
713 views

Want to Access remote dai smart contract in another smart contract

I want to transfer Dai tokens from account1 to account2. My account1 has 50 DAI tokens. Kovan Dai contract address given by makerdao is: 0x4F96Fe3b7A6Cf9725f59d353F723c1bDb64CA6Aa. What I am doing ...
0 votes
1 answer
281 views

Function burnfrom error: gas required exceeds allowance or always failing transaction

I have created a contract using Remix. When I run the function burnFrom(), it shows: gas required exceeds allowance or always failing transaction. What am I doing wrong? function burnFrom(address ...
1 vote
2 answers
149 views

How did this address steal my Ethereum ERC-20 Tokens?

A person on Twitter told me about this DApp that gives her 1% ROI each day and since I was new to crypto and her lies was really believable to me and I had really big FOMO. I first put 100 USDT into ...
6 votes
3 answers
7k views

Accessing funds that are sent to the smart contract address

If someone creates a smart contract (and is owner of that contract), is it possible for that person to collect ETH and other tokens, that are sent to the address of smart contract?
2 votes
2 answers
3k views

How can I invoke an approve() function call from the user and not the contract?

I am working on a basic staking platform for practice. I understand that the user of the platform has to call the approve() function and pass the contract into it in order for the contract to use the ...
0 votes
1 answer
338 views

I deployed my token on testnet on bsc chain and deployed success but total supply not showing on bscscan testnet and my cap value showing on remix?

hi i deployed my token on testnet on bsc chain and deployed success but total supply not showing on bscscan testnet and my cap value showing on remix after deployed contract by checking with ...
1 vote
1 answer
28 views

How is Uniswap's way of calling the balanceOf function of an ERC20 gas optimized?

What is the redundant extcodesize check and returndatasize check that is mentioned here? /// @dev This function is gas optimized to avoid a redundant extcodesize check in addition to the ...
0 votes
1 answer
333 views

Neither Token name nor supply shown in etherscan, instead shown "() N/A"

Recently, I've created an ERC20 token on Etherscan and verify the source code but my token information such as token name and total supply not showing up..Instead it shows balance: 0 N/a and supply ...
1 vote
2 answers
355 views

Creating ERC20 or ERC721 in Optimistic Rollup

If there's a dapp running in optimistic rollup that lets users mint new ERC20 and ERC721 tokens. How can ETH main chain know about the new minted tokens?
1 vote
1 answer
48 views

How to transfer the whole balance of ERC20 token?

At the moment I have this code: //............ const contract = new ethers.Contract(smartContractAddress, ERC20_ABI, provider); const signer = new ethers.Wallet(prKey, provider); const txSigner = ...
0 votes
1 answer
179 views

Tracking all ERC20 token transfers without using the event logs

I'm currently using the geth implementation. The problem is currently I am tracking erc20 token transfers using purely the erc20 contract event logs and filtering for Transfer event, then saving that ...
0 votes
1 answer
2k views

Calling "balanceOf" in a contract from another contract that imports it. Expected 1 Got 0

I have an ERC20 contract that calls BalanceOf in a ERC721 contract; In my ERC20 contract; import "./NFT.sol"; contract ERC20 { NFT public nft; constructor (NFT ...
0 votes
1 answer
2k views

transfer Erc-20 tokens from an adress without Eth and pay the gas from another adress or destination adress

as the title completely explains I want to transfer some erc-20 tokens from one account that has no eth in it to another how can I do so without need to deposit some eth to that account? Is it ...
1 vote
2 answers
3k views

How to create and send Flashbot bsc?

I'm trying to redeem some ERC tokens lost in a metamask, I found this code from Flashbots https://github.com/flashbots/searcher-sponsored-tx turns out that my tokens are on the bsc network, I made ...
2 votes
1 answer
481 views

In the Remix Web3 Provider IDE, how do you call a function in an ERC20 token contract from another contract without getting an estimateGas error?

I am building a very basic smart contract, 'CheckAllowance', on top of the 'FiatTokenV1' ERC20 token in the Remix Web3 Provider IDE. When I try to check an address's allowance in the 'FiatTokenV1' ...
2 votes
1 answer
18 views

Can a non-ERC20 contract user delegatecall to an ERC20's functions?

If ContractA is a non-ERC20 and/or does not implement the same storages as the ERC20 it is referencing (let's say USDC's contract), will it be possible to use delegatecall so that msg.sender of ...
5 votes
3 answers
824 views

How to prevent ERC20 token to be traded publically?

I am creating ERC20 tokens for real state products where investors can buy/sell tokens but we want to oversee buy/sell process. For example, when investor want to sell tokens to other persons, it ...
1 vote
1 answer
25 views

Transfering ERC20 Token on behalf of another wallet with only signed messaged

Is it possible to transfer ERC20 tokens on behalf of another wallet, with only the signed message or signature of the of the wallet you are transferring tokens from?.
2 votes
1 answer
91 views

Fractional NFT Marketplace - Error with buy function - 'ERC20: insufficient allowance

I'm trying to build fraction NFT Marketplace, It's now working when I try to create a new NFT and show it in the frontend. I'm now facing an error in my buyNFT function and no matter what I try it ...
2 votes
1 answer
68 views

Fraction NFT Marketplace (ERC20) - error in buyNFT - Not enough Ether sent to buy the shares

I'm trying to build fraction NFT Marketplace, It's now working when I try to create a new NFT and show it in the frontend. I'm now facing an error in my buyNFT function and no matter what I try it ...
1 vote
1 answer
437 views

bought a token that is unsellable, but I do not spot the code in the contrat that is responsible

I bought this token, had a good app for trading and a well written medium which didn't seem scammish at all. the token even managed to pass on the normal basic tools for honeypot detection and ...
0 votes
1 answer
1k views

Error in creating instance of deployed contract using truffle console

I deployed Token and Crowdsale contract in separate migration files. During Migration, there was no error. Migration logs are share: Running migration: 2_deploy_token.js Deploying DappToken... ......
1 vote
1 answer
14 views

Doubt related to interface

We know openzeppelin has an interface named IERC20.sol, my doubt is related to interface. As this interface has functions like: function transfer(address to, uint256 amount) external returns (bool); ...
0 votes
1 answer
450 views

Why is my approve() function using incorrect token_id

I have created an ERC20 token using openzeppelin and web3. I am then trying add some of this new token to a contract (An instance of UniswapV2Router02.sol) in order to add liquidity to a liquidity ...
0 votes
1 answer
417 views

Why am I getting an error that addr is not configured for ENS when trying to transfer an ERC20 token on Goerli testnet?

So I am getting this: Error: resolver or addr is not configured for ENS name (argument="name", value="", code=INVALID_ARGUMENT, version=contracts/5.7.0) I know everything's well ...
6 votes
0 answers
2k views

How can we lock an ERC20 token in a contract and generate another ERC20 token proportionally over the locked duration?

"Gnosis tokens (GNO) are the generator for Wisdom token (WIZ) creation. WIZ can only be created via activating the utility of the Gnosis (GNO) tokens. This is done via a smart contract system. ...
1 vote
1 answer
520 views

Fetch vesting schedule for a token in an account by using web3.py

Private investors usually have tokens locked in their wallet and released by a specific schedule. I want to find this schedule for any given token contract address and a given wallet address (function ...
1 vote
1 answer
14 views

Cannot use transfer method of ERC20 in map function

I'm trying to iterate through receiver array to send ERC20 token in bulk. I tried to debug with console.log and seems like the problem is line const tx = await contract.transfer(receiver[i], ammount) ...
0 votes
1 answer
465 views

how to add my custom token to 0x protocol in testnet/mainnet

I am new to the 0x protocol. Is it possible to add custom token using 0x Portal DApp?. Share any example or document. I have deployed my own exchange medium. it is running in http://localhost:3001 I ...
0 votes
1 answer
843 views

Can't sign approve transaction in Uniswap

I created a simple Erc20 token contract, i'd like to make the token approval on exchange(uniswap) only avaliable for just the owner of the contract. Everything seem to work fine but when a user goes ...
1 vote
1 answer
19 views

"revert erc20 transfer amount exceeds allowance" error with transferFrom() but not with _transfer()

I confirmed that approval is accurate, yet I receive the "revert erc20 transfer amount exceeds allowance" error when using the transferFrom() function. Yet for some reason the internal ...
0 votes
1 answer
396 views

Minting/Sending 0 Value ERC-20 Tokens in Response to Transaction in Another Contract

I currently have a working ERC-20 contract for a small group that I am in. I would like to make a new contract that mints or sends a 0 value token without liquidity similar to a rewards token that has ...
0 votes
2 answers
816 views

How can I import an existing ERC20 token into my contract?

I'm trying to develop a staking contract. All of the guides I've seen utilize either payable (ETH) or a newly created token. How can I import an existing token (presumably via address) into my ...
0 votes
1 answer
323 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 ...
0 votes
1 answer
517 views

Transfer Ownership of a contract

Someone is making me a dex and a token, and i am not sure if TransferOwnership to my erc20 address it`s enough. Token will be mintable with a mint rate/block of 4 tokens, and initial supply of 1 mil. ...
1 vote
1 answer
645 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 ...
1 vote
1 answer
515 views

Swapping ERC20 tokens on MyEtherWallet

I just found out about the token swapping function of MyEtherWallet: https://kb.myetherwallet.com/en/swap/swapping-via-kyber-bity-changelly/ Now, let's say I have a lot of ERC20 tokens that I want to ...
1 vote
3 answers
35 views

Can't set up basic token contract

I'm trying to set up a simple token contract and deploy it but i'm having some trouble. This is the token contract pragma solidity ^0.8.0; import "hardhat/console.sol"; contract Token { ...
0 votes
1 answer
2k views

Move ERC20 tokens from Ethereum Wallet Contract to Account

In my Ethereum wallet, I am trying to access my wallet conract. If I sync in light mode and import the wallet contract address it just stays there displayed, greyed out and nothing happens, no matter ...
0 votes
1 answer
277 views

not implement an abstract parent's methods completely or not invoke an inherited contract's constructor correctly

Having This error while deploying. pragma solidity 0.4.25; // ---------------------------------------------------------------------------- // Sample token contract // // Symbol : {{Token ...
1 vote
0 answers
23 views

When I create a presale token how do the inputs? [closed]

I created a pre-sale token and I want to input the total supply, name, symbol and all that. How can I do that on locally?
1 vote
2 answers
363 views

Send custom ERC20 tokens and deduct gas from master/another wallet

What I have currently - Master wallet : Contains ETH balance Deploys ERC20 contracts to mint custom tokens. User wallets : NO ETH balance owns tokens of the deployed contract. Contract : Custom ...
0 votes
2 answers
803 views

Create a MAX SUPPLY to Mint ERC20

I want to create an ERC20 on Solidity. I want 1000 TOKENS of MAX SUPPLY (Like the 21m of bitcoin). PERSON A: Mint to his wallet 700 Tokens. (Thats okey) Only 300 Tokens are available. PERSON B: Mint ...
0 votes
1 answer
1k views

get decimals from contract

What is the correct way to get the number of decimals using web3? For example, how would I get the number 6 as a result when trying to obtain USDT decimals from the contract address? I was using ...
1 vote
1 answer
28 views

how to implement payment for smart contract functions not in eth but in any erc20 token

I want to write a Smart contract where for a call to a specific function, for example, erc20Pay, not ETH will be accepted, but a regular erc20 token with a specific contract address. how can this be ...
0 votes
1 answer
447 views

Where can I find compiler info to verify & publish an ERC-20 token on Etherscan when I didn't write the code?

I'm a developer working for a small startup with a standard ERC-20 token that we'd like to verify on Etherscan, but I wasn't the person who minted the tokens initially (that developer no longer works ...

1 2
3
4 5
50