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
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 ...
25
votes
5answers
25k 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 ...
26
votes
5answers
36k 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 ...
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 ...
34
votes
3answers
22k 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?
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 ...
8
votes
1answer
3k 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 ...
9
votes
4answers
13k 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('...
8
votes
2answers
10k 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. ...
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
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 ...
4
votes
1answer
2k views

Can my Ethereum Based Tokens / Coins be traded on a crypto currency exchange?

I am building my own Crypto based on Ethereum Blockchain. Is it possible for this newly created currency to be traded on any crypto currency exchange? And secondly, will my new currency be compatible ...
1
vote
1answer
6k views

How to get Logo instead of ERC20 TOKEN on transfer page?

How to change this: to this: on etherscan token detail page?
1
vote
2answers
512 views

I need to send tokens from my eth address with 0 gas fee

I need to send tokens from my eth address with 0 gas fee.On my address has script autobot which automatically sends ether to self or on other address after getting within 1-2 minutes,sometimes 3-7 ...
1
vote
3answers
810 views

how to calculate 1% of erc20 18 decimal token?

I am building a system that should calculate the 1% of the tokens sent to it. I am thinking that it is ok to deal with large numbers but when it comes to smaller numbers like 1 token or 2 token [not ...
1
vote
1answer
95 views

TX fails in private blockchain when trying to access an ERC20 contract from another contract

I have an ERC20 contract and I am trying to access it from another contract, which is a Faucet. In the Faucet I have a function to query an account's balance, and another one to transfer some tokens ...
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, ...
7
votes
2answers
2k 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, ...
5
votes
1answer
3k views

Does The Ethereum Wallet / Mist Standard Multisig Wallet Support ERC20 Tokens?

This question was prompted by Any multisig wallets for Ether?: Are there any multisig wallets available for ether and other ethereum-based tokens?
3
votes
1answer
280 views

How to build an Ethereum hot wallet for an exchange

I’m developing an exchange. When a new user register on website we will create new eth wallet for them. When they deposit USDT on their wallet how can I transfer that USDT amount to another address (...
0
votes
2answers
484 views

How is a contract determined to be ERC20 compliant?

How is it exactly determined whether a contract is ERC20 compliant and who determines it? After reading Do I have to implement ERC20 signature as separate contract and use inheritance? and some ...
5
votes
3answers
1k views

Dealing with the short address attack

I'm writing a contract for an ERC20 token, based on Zepellin contracts. I noticed that their code doesn't handle the short address attack. Does it mean I shouldn't care about it?
4
votes
2answers
2k views

Wallet for ERC-20 Tokens

I'm working to understand ERC-20 tokens. I believe that I'm confused on a detail based on a previous SO question. Please allow me to use the Basic Attention Token (BAT) as an example. I have a Ledger ...
3
votes
1answer
4k views

Web3 sending custom tokens by using the transfer function. Need to set the from account

Looking to code WEB3 to be able to send custom tokens out programmatically. However, I am not sure where to specify the user account that actually sends the token. This is the code I have thus far. ...
3
votes
2answers
6k views

No visibility specified. Defaulting to “public”. function Ownable() {}

I'm trying to learn how to create tokens using Solidity/MIST. I have modified a pre existing contract on a functioning token but I am having an error whenever I insert it into Ropsten. The contract ...
4
votes
2answers
2k 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 ...
2
votes
1answer
5k views

Can I “cancel” a token transfer transaction by sending ether?

The OMG transaction is listed here on etherscan. I initiated it around 7:30 AM this morning, even though the timestamp on that page always seems to restart everytime I refresh the page. I found a ...
0
votes
2answers
505 views

How to call this solidity function with Web3js when executing the contract?

I’m new with ethereum. I’m definitely struggling with the last 4 parameter of this function, so I’m asking the problem directly. mapping(address => uint256) nonces; /* * Proxy transfer token. ...
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 ...
4
votes
2answers
5k views

Send Custom ERC20 Tokens from one Address to another

How to send custom ERC20 tokens from one wallet to another, if i want to send EBTC/ECASH custom ERC20 tokens. I wrote a method that can send the ether from one account to another, how could i do the ...
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 ...
10
votes
2answers
16k 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 ...
5
votes
2answers
933 views

Common Gas Wallet for ERC20 Wallets?

We have a wallet structure where users send tokens to individual user wallet addresses generated for them, we then sweep all the funds in the user's wallets to a centralized pool. The individual ...
15
votes
2answers
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 ...
3
votes
2answers
1k views

Recieve payments in Ethereum ERC-20 tokens in web-services

I want to receive payments in my web-service in ethereum tokens, for example, Eos or Rep. And, of course, I must provide each user with different addresses for payment to determine who is the payer, ...
10
votes
4answers
10k 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 ...
1
vote
2answers
924 views

Create a contract that safely swaps one token for another?

If I mint a token and the contract doesn't have all the features I needed from the offset, is there a way I could develop a new contract for a new token and create a way in which people can send the ...
6
votes
1answer
979 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 ...
3
votes
2answers
2k views

Can I get an ERC20 balance n blocks back in time?

By calling a running Ethereum node through the getBalance API, you can get the Ethereum balance N blocks back as explained here. This is useful if you would only like to trust a balance which has been ...
3
votes
1answer
1k views

How to query token transfers like etherscan.io?

Look at this. We are able to see tx, from, to, value etc... How is etherscan achieving this? I badly need this kind of functionality in my app. How can I list token transfers for a ERC20 contract? ...
3
votes
2answers
959 views

How do I create a crowdsale that only accepts a specific erc20 token?

Let's say you've created and issued an ERC20 token. You then create a crowdsale and only want to accept the token you issued, not Ethereum. Is this possible?
3
votes
4answers
4k views

Are there ropsten ERC20 testnet tokens?

I am trying to write an application using web3.js and I want to integrate some ERC20 functionality. But rather than muddy up the mainnet, I'd like to try things on the Testnet first. I see that https:/...
3
votes
1answer
3k views

How to find out the rate of ETH in USD in the contract?

I have a function which can rate ETH in USD. How can I find out the rate of ETH in USD in automatic mode? Can this be done in Solidty? Or do I have to use a third-party language, for example, ...
3
votes
1answer
1k views

Multiple Token Classes Within One Contract for ERC20 Standard

Is it possible to make one ERC20 compliant token contract, but have different classes of tokens circulating under the same token name? e.g. You are distributing concert tickets validated by a token ...
2
votes
2answers
193 views

What are the risks of using tokens that appear to have ERC20 standard?

Say someone sends some ERC20 (supposedly) tokens to my ETH address. I then use transfer() function to send these tokens to some other address. The question is - by using a "transfer" function do I ...
1
vote
1answer
60 views

Solidity Syntax question

What happens if a function is being passed before { into another function? Like DetailedERC20(_name, _symbol, TOKEN_DECIMALS) in this example: function MyToken(Registry _registry, string _name, ...
1
vote
5answers
3k 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 ...
1
vote
0answers
275 views

Naming conventions for ERC-20 instancies [duplicate]

Given a contract that implements ERC-20. Is there a naming convention for new instancies such as its symbol? We are used to 3 chars but that range will run out at some time in future. I am asking ...
1
vote
2answers
683 views

Warning: “throw” is deprecated in favour of “revert()”, “require()” and “assert()”. throw;

my question is if "THROW" is deprecated then what i have to put instead throw in the following solidity code ? // This function creates Tokens function createTokens() payable { if(...
1
vote
2answers
1k views

How to set and get marketprice of token in contract? [closed]

I am building a simple erc-20 token. I don't have an idea as how token price is setup. However, I need to get my token's market price inside another contract. If you see this example of token BOMB, it ...