Skip to main content

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
36 votes
3 answers
24k views

ERC20 vs ERC223. List of differences

Is there a list of improvements that we will have in ERC223? Are there examples of contracts? Is there a migration path for existing ERC20 tokens?
rstormsf's user avatar
  • 4,357
30 votes
4 answers
11k views

How to programmatically detect and accept ETH and ERC20 deposits

I'm looking to replicate the functionality provided by cryptocurrency exchanges such as Kraken and Poloniex when it comes to depositing ETH and tokens. Namely: Users can generate and send funds to ...
Bill B's user avatar
  • 451
29 votes
6 answers
65k views

How to send ERC20 token using Web3 API?

I created some custom token in Ropsten testnet using this guide: https://steemit.com/ethereum/@maxnachamkin/how-to-create-your-own-ethereum-token-in-an-hour-erc20-verified I can send it to other ...
Tomas Navickas's user avatar
27 votes
5 answers
36k views

Paying a transaction fee with an ERC20 token

As far as I understand, one of the ERC20 token's features is that you can pay a transaction fee with it. In other words, you can send them without having Ether. I transferred REP tokens to the ...
tomo's user avatar
  • 351
21 votes
2 answers
44k views

Getting ABI data for ERC20 tokens programatically with Web3 [duplicate]

I am just starting to dive into Web3. I am trying to display the various ERC20 token values for a given Ethereum Address. The pieces I need to do this are: Token Contract Address Token Contract ABI ...
Shawn Tabrizi's user avatar
19 votes
2 answers
16k views

What are the practical uses of Allowance in ERC20 tokens?

I'm studying ERC20 specification and all seems to make sense. Well, all but allowance. I couldn't grasp to the concept and it's usefulness. What should I use it for? (Should I at all?) What are the ...
sigmaxf's user avatar
  • 1,080
18 votes
5 answers
31k views

Etherscan API - Get all token balances

Is there a way with the Etherscan API you can get all the erc20 token balances for a specific address? As explained here, you can see token balances with their web UI (the token tracker dropdown). ...
phoebus's user avatar
  • 315
17 votes
2 answers
40k views

Decimals on ERC20 Tokens

I'm having an odd problem working with some ERC20 token contracts I've written: When I specify a decimal value, let's say 4 here for simplicity, the values show up differently in Mist vs etherscan. ...
Davis Jef's user avatar
  • 171
17 votes
2 answers
4k views

What are the key criteria for meeting the ERC20 token standard?

I'm looking for a clear way to describe "the ERC20 token standard" to regular folks like me who are not developers, and can't seem to find a plain language articulation of the core components of that ...
Tesa's user avatar
  • 2,269
16 votes
5 answers
26k views

Send tokens using approve and transferFrom vs only transfer

We can send tokens using below ERC20 contract methods approve() and transferFrom() transfer() Here if i use 2nd option the tokens are directly transferred, while if i use 1st option its a two step ...
Rishikesh Jadhav's user avatar
16 votes
3 answers
6k views

Accepting an ERC20 Token as Payment

Assuming I have deployed my ERC20 token, and the supply has been dispersed, is there any method of creating a separate contract that accepts that ERC20 token as payment and has user fields that send ...
rudar_man's user avatar
  • 173
15 votes
2 answers
3k views

How can ERC20 token implementations be verified?

The ERC20 Token Standard is great, in that it allows wallets, exchanges, and client implementations to allow users to interface with a variety of tokens in a common way. But how can one of these ...
thedob's user avatar
  • 615
15 votes
2 answers
10k views

Are ERC20 token names unique?

I am curious if ERC20 token names are unique on the Ethereum block chain? For example, what is to stop someone from creating a new token called Golem (GNT) and publishing it to a smart contract? I ...
Vinnie James's user avatar
15 votes
2 answers
3k views

ERC20 Tokens with Rewards?

How hard is it to implement rewards into ERC20 Tokens? By this I mean a ERC20 Token that receives a reward in the form of Ether from a rewardAccount that is distributed evenly between all tokens. ...
milkywaymasta's user avatar
14 votes
3 answers
5k views

Do users of ERC20 coins need to hold Ether?

Suppose there exists Fancycoin, an ERC20 altcoin which has some functionality implemented by the EVM. It does some nontrivial things that take up gas. According to my understanding, I can receive ...
Wapiti's user avatar
  • 419
14 votes
2 answers
901 views

What is the latest secure and compatible token standard?

Most tokens are ERC20 tokens with varying implementations, and varying protections against bugs. However, there is the ERC223 token standard, which is an attempt to fix some of the problems in ERC20. ...
Nakedible's user avatar
  • 191
13 votes
7 answers
23k views

Where can I find ERC20 token faucets for testing?

I want to use the Ethereum test network to test token transfers and such, but I can't find any token faucet or anything like it so I can't try out things. Google didn't show anything, only Ethereum ...
Victor's user avatar
  • 443
13 votes
1 answer
11k views

What is IERC20?

I understand the ERC20 standards which includes the functions like totalSupply() balanceOf() allowance() transfer() approve() transferFrom() When I check the openzeppelin, I could see "contract ...
iappmaker's user avatar
  • 813
12 votes
2 answers
19k views

What is minting? how is minting prevented after ICO?

I am trying to know how ICO works (on a high, intuition-level), somehow it is hard to find information on the following questions. As I understand this minting is the process where you create the ...
solaire's user avatar
  • 275
12 votes
4 answers
6k views

Is it possible to batch approve + transfer an ERC-20 token?

In our dapp, we currently have the following user flow: Approve the Sablier contract to spend up to x ERC20 tokens Transfer the x ERC20 tokens to the Sablier contract This is not super bad UX, but ...
Paul Razvan Berg's user avatar
12 votes
8 answers
16k views

ProviderError: Error: Transaction reverted: function selector was not recognized and there's no fallback function

I'm trying to call a function[propose] from Openzeppelin governor.sol. The function is like this... function propose( address[] memory targets, uint256[] memory values, bytes[] ...
Muhammed Adil's user avatar
11 votes
2 answers
4k views

Collecting ERC20 balances from multiple addresses?

I'm building a dApp that involves creating unique accounts for individual users for ERC20 deposits [I keep the addresses and private keys in a centralized database], for popular ERC20 tokens like BNB, ...
king_geedorah's user avatar
11 votes
1 answer
6k views

Make function payable for a specific ERC20 token?

When a method is payable, it's possible to send ether to the contract while calling it, and the function can check the amount sent through msg.value. How can I make a function receive something other ...
matthias_buehlmann's user avatar
11 votes
3 answers
13k views

How to get an ERC20 token listed in etherscan.io

In etherscan.io, under the TOKEN drop down menu, there is a list of tokens, and it is indicated that they all are ERC20 standard tokens 1) How do they get listed? Do we have to register a new ERC20 ...
jfjobidon's user avatar
  • 773
11 votes
3 answers
3k views

What’s the point of checking msg.sender≠0 ? Are there cases where msg.sender can be null?

In the Tron contract (a large ICO listed on many exchanges) lies this modifier which is used for all token transfers : modifier validAddress { assert(0x0 != msg.sender); _; } I understand ...
user2284570's user avatar
  • 1,018
11 votes
1 answer
2k views

Is it possible to create ICO crowdsale seamlessly accepting multiple assets?

Most of the ICO crowdsales accept ETH only. Some accept BTC. Very few accept other assets. I was thinking about creating crowdsale that would accept as many assets as possible. While creating, ...
Mars Robertson's user avatar
10 votes
4 answers
31k views

How to transfer ERC20 tokens using web3js

I've read some docs, run parity in docker container, and being able to connect and get token balance of an account const Web3 = require('web3'), const web3 = new Web3(new Web3.providers.HttpProvider('...
user16150's user avatar
  • 101
10 votes
2 answers
27k views

How can i transfer ERC20 tokens from a contract to an user account?

I have deployed an ERC20 token (contract A) and the tokens are being used for a service in my other contract (Contract B). I can easily transfer tokens from an user owned account(EOA) to Contract B ...
tushalien's user avatar
  • 123
10 votes
2 answers
5k views

What address(0) stands for?

In the contract for EOS crowdsale: https://etherscan.io/address/0xd0a6e6c54dbc68db5db3a091b171a77407ff7ccf#code line 469: assert(address(EOS) == address(0)); "assert" will test if both sides of ...
jfjobidon's user avatar
  • 773
10 votes
3 answers
17k views

What does it really mean to burn tokens?

I don't quite understand what it really means to burn tokens. Since the blockchain is immutable, there should be no way to delete the record. Thus, in my understanding, to burn the token merely ...
sflow's user avatar
  • 373
10 votes
1 answer
3k views

Will it ever be possible to group multiple ERC20 tokens into a single transaction?

Specifically, if I wanted to send multiple different tokens to a smart contract, but it was important to the contracts function that all tokens arrive at the same time, could I put; 20 Token A 45 ...
PaddyLosty's user avatar
10 votes
1 answer
1k views

Writing secure Smart Contracts in Solidity?

With the DAO hack, it becomes even more important for developers to write secure smart contracts and be aware of pitfalls. Are there any good reference points/links which can describe the best ...
10 votes
1 answer
13k views

How much gas does an ERC20 transfer cost?

ERC20 is an interface and not a contract definition. And since gas is paid for each executed machine instruction, it is not possible to specify precisely how much a call to transfer costs for an ERC20 ...
Thorkil Værge's user avatar
10 votes
2 answers
4k views

What is the best way to handle multiple NFTs of the same collection in ERC1155?

I'm learning ERC1155, and I'm a bit confused. This is OpenZeppelin's example of an ERC1155 Contract: They state that Thor's Hammer is an NFT (because only 1 was minted), while Gold is Fungible. ...
António Gonçalves's user avatar
9 votes
1 answer
8k views

How to impose a timelock || Vesting for ERC20 tokens during ICO(Crowdsale)

Hello I am writing a crowdsale using Zeppelin-Solidity where I need to integrate the token lock function so the ERC20 tokens can be locked for a specific period of time. The zeppelin-solidity seems ...
Qasid Labeed's user avatar
9 votes
2 answers
2k views

ERC721 NFT minting to accept custom ERC20 token as payment

When creating the contract for minting NFTs using the erc-721 standard, I want to be able to accept payment from my own erc-20 token instead of 'ETH'. How can this be accomplished?
Philitician's user avatar
9 votes
2 answers
15k views

Approve contract to withdraw funds from users's wallet

I want to achieve the following flow: A user clicks a button allowing my contract to spend funds on the user's behalf A user clicks a second button whereupon funds are transferred from the user's ...
Conviley's user avatar
  • 390
9 votes
1 answer
1k views

Are there any other "smart contract standards" like ERC20?

QUESTION: I know that ERC20 is a token standard which means there are a set of functions that a contract has to include to be ERC20 compatible. I find this a clever approach and was wondering if ...
Balázs Sáros's user avatar
9 votes
2 answers
3k views

Best way of accepting ERC20 tokens in my service

I need to allow users to deposit and extract ERC20 tokens in my service, and I'm wondering what's the best way of implementing that. My idea is to generate an account for each user, and when a user ...
Paul's user avatar
  • 427
9 votes
1 answer
5k views

Difference and relationship (if any) between ERC and EIP

Understand that ERC stands for Ethereum Request for Comments while EIP stands for Ethereum Improvement Proposal. I refer to ERC20. Are these request for comments (erc) translated to improvement ...
Nathan Aw's user avatar
  • 1,954
8 votes
5 answers
12k 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
8 votes
1 answer
24k views

How do fronrunning and sniper bots work?

If you ever traded in defi, you probably have seen coins getting sniped at the very second of their launch and drastically inflating the prices. I assume these bots are written in js, ad using web3 ...
Itsjonie's user avatar
  • 259
8 votes
1 answer
3k views

How to exchange between ERC20 token and ETH automatically

I've created an ERC20 token. Now I want to use this token. Is it available to swap between ETH and the token automatically like the followings? What I want: UserA send 1 ETH to the token owner's ...
zono's user avatar
  • 1,483
8 votes
2 answers
1k views

What's the point of returning a value in a non-constant function?

As we know you can't get the return value of a non-constant function Still ERC20 does this a lot, for example: function approve(address _spender, uint256 _value) returns (bool success) Hypothesis:...
Roland Kofler's user avatar
8 votes
4 answers
12k views

Tracking tokenholders of a token with web3

If I have a token address how can I navigate and find certain things like: tokenholder addresses transactions for the token holders including when they made the transaction I'm new to smart ...
Parth Patel's user avatar
8 votes
1 answer
7k views

Where is the ERC 20 token code?

I've read about and understand the idea behind the ERC20 Token Standard, but is there an official contract people can download and use? Or is it an official list of functions a smart contract should ...
velua's user avatar
  • 193
8 votes
1 answer
2k views

Performing a smart escrow with ERC20 tokens

After developing a token Smart Contract that is compliant with the ERC20 standard https://github.com/ethereum/EIPs/issues/20 (is that the same as token API https://github.com/ethereum/wiki/wiki/...
Juan Ignacio Pérez Sacristán's user avatar
7 votes
2 answers
15k views

Web3 js 1.0 is throwing big number error while transfering tokens

When I tried to transfer more then 1000 tokens, it's throwing an error like as mentioned below (I'm using web3 js 1.0.0 34 beta version). Error: [number-to-bn] while converting number 1e+23 to BN....
user324534's user avatar
7 votes
2 answers
3k views

This contract does not implement all functions and thus cannot be created

I followed the tutorial found here: https://steemit.com/ethereum/@maxnachamkin/how-to-create-your-own-ethereum-token-in-an-hour-erc20-verified I tried to create this contract using Remix. I had to ...
user3803688's user avatar
7 votes
1 answer
4k views

Can an ERC-20 have more than 18 decimals?

I've seen most tokens use 18 decimals and USDC use 6 decimals. Is it possible for a token to have over 18?
caker's user avatar
  • 195

1
2 3 4 5
52