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
33
votes
3answers
21k 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?
25
votes
5answers
32k 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 ...
25
votes
5answers
18k 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 ...
22
votes
3answers
6k 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 ...
16
votes
2answers
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 ...
15
votes
2answers
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 ...
14
votes
1answer
6k 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 ...
14
votes
2answers
861 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. ...
13
votes
3answers
4k 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 ...
13
votes
2answers
2k 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. ...
12
votes
3answers
4k 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 ...
11
votes
3answers
11k 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 ...
11
votes
1answer
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, ...
9
votes
4answers
12k 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('...
9
votes
1answer
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 ...
9
votes
2answers
2k 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 ...
9
votes
3answers
6k views

Etherscan API - Get all token balances

Is there a way with the Etherscan API so that you can get all the erc20 token balances for a specific address? As explained here, you can see them with their web UI (the token tracker dropdown). Does ...
8
votes
2answers
14k 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 ...
8
votes
1answer
2k 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 ...
8
votes
1answer
842 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 ...
8
votes
1answer
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 ...
8
votes
1answer
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/...
7
votes
1answer
5k 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 ...
7
votes
1answer
5k 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....
7
votes
2answers
7k 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. ...
7
votes
4answers
427 views

Is it possible to batch approve + transfer with CREATE2?

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 ...
7
votes
1answer
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 ...
7
votes
1answer
2k views

ERC20 Token and effective way to store dividends

I want to create a token that will allow an effective way to iterate through and update dividend values per token holder address. With my current idea, I'd have to manage 2 structures to keep ERC20 ...
7
votes
3answers
739 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 ...
7
votes
1answer
824 views

Buy Gnosis tokens with geth

How to participate to Gnosis pre-sale using geth javascript console? In gnosis official blog is described how to do it using parity but there's no information on how to do it using geth.
7
votes
2answers
992 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:...
6
votes
2answers
1k 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, ...
6
votes
2answers
2k 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 ...
6
votes
2answers
2k views

Are mineable tokens possible?

I'm a bit puzzled about the ethereum.org/token example which states further down in the advanced examples that it can be coupled to proof-of-work. I really like the idea of mining a token. The example ...
6
votes
1answer
2k views

ERC20 vs ERC721

Is there a list of changes that making ERC721 become non-fungible token and different from ERC20? Are there examples of ERC721 contracts? Is there any drawback of ERC721?
6
votes
1answer
990 views

Prevent double withdrawal ERC20 API attack

How do I prevent against the double withdrawal attack described in ERC20 API: An Attack Vector on Approve/TransferFrom Methods and initially posted here? An example of the attack: Alice allows ...
6
votes
1answer
1k views

How to get all ethereum address list which have my token?

I want a list of all ethereum address which have my ERC20 token in their account. Anyone have an idea how to get list address. beause i want give divided to each account which have my ERC20 token.
6
votes
1answer
713 views

How does one see all tokens owned by an account?

Sorry, I do not understand this very well. But with tokens (let's say those which follow ERC20), can one ethereum address own multiple tokens? How would one determine the names and balances of those ...
6
votes
1answer
5k 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 ...
6
votes
2answers
2k views

Why throw is deprecated in solidity

Why throw is deprecated in solidity? Is there any drawbacks? I also found below on Github Even if we remove throw as a feature, the keyword should be kept. We might be able to introduce something ...
6
votes
1answer
1k views

How to interface function of deployed contract in new contract?

I have deployed Standard token contract using mist. Now I want to create interface functions for the deployed contract. contract MyToken { function mint(address _to, uint256 _amount) onlyOwner ...
6
votes
1answer
311 views

Is it possible to transfer ERC20 tokens without sending a transaction to the contract address?

I'm trying to reverse engineer etherscan so I can make my own explorer. While I was checking Augur token transfers I found a transaction where both the to and from address where different from the ...
6
votes
2answers
2k views

How do ERC-20 Tokens work?

I thought I understood ERC-20 tokens. However, I wanted to purchase a small amount of basic attention token (like $5) to learn and experiment with. That's when I realized that I didn't understand them ...
6
votes
1answer
197 views

Gasless transaction and easy token Solidity receiver callbacks for ERC-20 tokens

I am planning a token swap for an old pre-ERC-20 token. The new token will have its ledger smart contract written from a scratch. While doing it, I would like to integrate new EIP features to the ...
6
votes
2answers
1k views

Smart contract erc20 code snippet to prevent buyer token transfers

I´m going to start a token pre-sale and I want to be able to send the tokens to the buyer but prevent the buyer to send tokens to another wallet. I tried the following in my ERC20 smart contract but ...
5
votes
5answers
8k 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 ...
5
votes
1answer
2k views

Someone sent 0 ETH to my contract and got 134100 tokens

we have just finished a phase of our ICO and we were looking among the transactions. Someone managed to send 0 ETH to our contract and in return got 130 000 tokens. How did he do that and how ...
5
votes
2answers
3k 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 ...
5
votes
3answers
5k views

Interface Function

I understand that the following function is used to link the ico contract to the token. Appreciate if someone could explain how to use the function, and exactly how it works. Thank you. /** * @title ...
5
votes
3answers
644 views

How is Metamask able to send erc20 tokens without ABI?

When I use web3js and Truffle, I cannot send tokens to another wallet without the Token Contract ABI. But Metamask only requires the token contract address to recognize and send the ERC20 tokens. How ...

1
2 3 4 5
26