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
7 votes
1 answer
855 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.
0x8000's user avatar
  • 609
6 votes
1 answer
6k views

Why is it considered a bad practice to burn tokens to 0x0 when creating an ERC20 token?

The Consensys Smart Contract Best Practices guide recommends to prevent transferring tokens to the 0x0 address. I understand that 80M or more is locked at this address, but so what? Why is that bad, ...
Maxime Dupré's user avatar
6 votes
1 answer
868 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 ...
Mikko Ohtamaa's user avatar
6 votes
1 answer
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 ...
Basit Raza's user avatar
6 votes
1 answer
2k views

Accepting ERC-20 Tokens as payment

I'm looking to integrate ERC-20 Token into my shop. Now I have a lot of products so I need automated system to keep track of payments. I did some reading and it looks like if I write smart contract to ...
Luka Isailovic's user avatar
5 votes
1 answer
5k views

What denomination should I issue my ERC20 token by?

Following the "Create a cryptocurrency" tutorial on ethereum.org, I ended up with the following function (stripped down): function () payable { if (msg.value == 0) { return; } uint256 tokens =...
matthewninja's user avatar
5 votes
1 answer
6k views

How to use ecrecover() and what it is?

It’s a simple question, but I couldn’t find an answer. In an ERC20 contract lies this code //The nonce for avoid transfer replay attacks mapping(address => uint256) nonces; . uint256 nonce = ...
user2284570's user avatar
  • 1,018
5 votes
1 answer
21k views

Costs for sending ERC20 token

I want to move a small amount of OMG tokens to a different address. I have no ether at this address, so I guess I have to transfer some to this address in order to pay the transaction fee. If I want ...
user1981275's user avatar
5 votes
3 answers
4k views

ERC20 :: Transferring tokens without sender gas

Let's assume we have 50 ERC20 tokens that we would like to support (deposits) on our website. People are depositing tokens to the ETH adresses we've generated for them. In the end of the day, we want ...
susanoo's user avatar
  • 51
5 votes
1 answer
3k views

Get ERC-20 token transfer transaction for some address with JSON-RPC node

How can I get ERC-20 token transfer transactions for some address with JSON-RPC node? Input: Token Contract address Token Contract ABI Address Start block End block Output: JSON with list of token ...
Dmytro Zarezenko's user avatar
5 votes
3 answers
5k views

The most cost effective way to perform an Airdrop of tokens

I am doing a project where I create a token and try to airdrop it to as many people as possible. The challenge is to figure out the most cost-effective way to do so. I had two options: Create a "...
Valentyn Vasylenko's user avatar
5 votes
3 answers
7k 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 ...
double_aces's user avatar
4 votes
2 answers
1k views

Ethereum implementation of a non-fungible but divisible token? (ERC721 seems not to work for that)

I am struggling currently with finding the right implementation possibility for a token with the following properties: Asset-backed token based on a non-fungible asset (like a piece of art) More than ...
Sascha's user avatar
  • 41
4 votes
1 answer
2k views

what's the point of merkle distributor?

I am trying to understand why Merkle Distributor AKA merkle airdrop is used. I understand how it works, but what I don't understand is why it's a better option. People use it when there's ICO and they ...
Nika Kurashvili's user avatar
4 votes
2 answers
233 views

Is there a certification process or agency for ERC-20 tokens?

The EMV site claims that their token contracts are officialy ERC-20 certified and is listed here (then they give their EtherScan address). My question is whether there is a certification agency or ...
NealWalters's user avatar
4 votes
1 answer
4k views

Max possible ERC20 Tokens allowed with 18 decimals?

I would like my token to have the maximum possible amount of tokens issued as a novelty. I would like to use 18 decimals standard ERC20 token, what value can I put in to get the maximum amount of ...
daniel metlitski's user avatar
4 votes
2 answers
2k views

Is there a way to get the logs for all transactions in a block?

I am building a system that monitors ERC20 token deposits to a large number of ethereum addresses (1-4 million). While I have not tried, I do not think that the parity clients would be able to support ...
The Yellow's user avatar
4 votes
2 answers
969 views

Why do we grant access to our funds instead of just sending them to the smart contract?

In DeFi I have seen that users are prompted to give access to their funds. Why not just send those funds to the smart contract instead? What is the advantage of this design?
YulePale's user avatar
  • 1,853
4 votes
3 answers
8k views

How many Ethereum-based tokens are there?

(Possibly a little off-topic, but along the lines of previous questions like "How many nodes are supporting Ethereum Classic?" and "How many pre-sale addresses are there?", perhaps... ) The question "...
Richard Horrocks's user avatar
4 votes
2 answers
13k views

What is the use case of transferFrom function in ERC20 token contract?

In @openZeppelin's ERC20 implementation here is the code for function transferFrom: function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { ...
user938363's user avatar
4 votes
1 answer
474 views

How to implement user deposits for tokens for an exchange

If we generate new deposit addresses for every user we face following problems: - we need to transfer tokens from individual wallets to our exchange wallets - we need to fund the wallets with ether to ...
jeff's user avatar
  • 603
3 votes
2 answers
2k views

Can we modify ERC20 functions?

I have to create and transfer token using ERC 20.Inside the standard interface of ERC 20, we have function approve(address spender,using token) which inturn approves spender to take some token from (...
Hari Prasath's user avatar
3 votes
1 answer
1k views

Auction data on-chain or off-chain

Currently I am trying to build a NFT marketplace and I am currently at a point where I need to make a design choice. In my current contract I have the data about the auction on chain. And every bid is ...
zanzoken's user avatar
  • 135
3 votes
3 answers
2k views

Simple transfer erc20 from address to address on web page

This is questions: Using Solidity, how can I transfer ERC20 tokens from the current address to another? Transferring an ERC20 token from one address to another ERC20 token transfer to another address ...
Nikola Lukic's user avatar
3 votes
3 answers
745 views

How do nework bridges work e.g. ethereum to polygon/matic bridge

I understand what a bridge does but I 'm interested in knowing how it works under the hood. How does it work when transferring assets from one network to another. Lets take for example the ethereum to ...
rjs's user avatar
  • 131
3 votes
2 answers
237 views

How to get ERC 721/1155 and ERC-20 data?

How do I get all the NFTs (ERC-721 & 1155) and Tokens (ERC-20) for a wallet address? Is there an API for this? Irwing Tello
Irwing Tello's user avatar
3 votes
2 answers
5k views

ParserError: Source "@openzeppelin/contracts/token/ERC20/ERC20.sol" not found:

I keep getting this error, would be really cool to get help. I've heard that I need to install a program, forgot which but I'm not so sure that's a great idea to start with and is not the fix to this ...
Feynman's user avatar
  • 231
3 votes
1 answer
2k views

Contract Fallback function with ERC20

I see the fallback function of a contract as a way of "depositing" an Ether value to the contract. My question is very simple I guess, but I couldn't find the answer yet. Is it possible to develop a ...
João Quintanilha's user avatar
3 votes
1 answer
729 views

Cannot transfer ERC20 token, "Bad instruction" error

I'm trying to transfer an ERC20 token from account A to account B. Account A deployed the contract and owns all tokens. Looks like I'm missing something very obvious. Every time I try to transfer ...
oldhomemovie's user avatar
3 votes
1 answer
6k views

How can I identify that transaction is ERC20 token creation contract?

I think I can identify it by parsing input data of then transaction then checking it declares the required functions and events. Are there any good ways or tools? Update 1 Sebastian gave me the ...
zono's user avatar
  • 1,483
3 votes
1 answer
2k views

value transfer did not complete most likely as a result of a revert opcode

When i want to send some eth to an erc20 contract i receive the following error: "value transfer did not complete most likely as a result of a revert opcode". I modified the fallback function in ...
alle.manfredi's user avatar
3 votes
1 answer
2k views

How To Call Multisend Contract

If I have the contract with the code contract Airdropper is Ownable { function multisend(address _tokenAddr, address[] dests, uint256[] values) onlyOwner returns (uint256) { uint256 i = 0; ...
James's user avatar
  • 141
2 votes
2 answers
2k views

Can you use a generic ABI and grab any Smart Contract by its contract address?

This might be a basic question, but I was walking through how to interact with the DAI (an ERC20 token) smart contract in Web3.js which led to this: const daiTokenAddress = "...
webbyweb's user avatar
  • 133
2 votes
3 answers
3k views

How to get my ERC20 token listed on Metamask

I would like to add my ERC20 token to Metamask, so that when users type its name into the search bar, it shows up along with its logo. Currently users can add their tokens manually. But, I'm wondering ...
user3362334's user avatar
2 votes
3 answers
1k views

ERC20 contract not able to transfer large amount of tokens

I am building an ERC20 Token. I want to the decimals properly so that people can do transaction in deciamls also. So, I am trying to transfer 10^21 tokens from my address to another. Minted tokens : ...
Darth Vader's user avatar
2 votes
0 answers
110 views

Why do some contracts use multiple balance and supply variables? [duplicate]

I'm trying to understand smart contracts. Now I do understand the basic template. However, many token's I see on the internet use different code. Many of them have a different way of storing balances ...
Skywalker's user avatar
2 votes
1 answer
2k views

0x0000000000000000000000000000000000000000 address behaviour

I have a question about the possibly strange behaviours of address: 0x0000000000000000000000000000000000000000 We know that: ETH + ERC20 tokens sent there are burnt Upon creation of a new smart ...
Clem's user avatar
  • 21
2 votes
2 answers
1k views

What is best practice for transferFrom out of these two ways

I want to know which among these is best practice when dealing with transferFrom. that is when one should wrap it in require and when not to. require(token.transferFrom(msg.sender, address(0),token ...
Sabreena's user avatar
2 votes
3 answers
752 views

NFT ERC 721 smart contracts

According to my understanding ERC721 smart contracts hold a list a "NFTs/owners" the same way ERC20 smart contracts hold a list of "owners/token balance". NFT are digital assets ...
alberto's user avatar
  • 23
2 votes
1 answer
1k views

How to interact with my ropsten smart contract

I've looked for hours online for how to interact with contracts but I've yet to find an efficient way to do so. My contract is deployed at 0x09B81faA7fB51E5Af79b0241243e58297aC84158 on the ropsten ...
financial_physician's user avatar
2 votes
1 answer
2k views

Whats the best way to distribute tokens

If I create a token, and then want to distribute it to 1000 people, I am worried about the gas price of those transactions. Which is why I wanted to analyse the different options for distributing and ...
Webeng's user avatar
  • 895
2 votes
3 answers
2k views

How does this code from ERC223 standard implementation work?

Here is a code snippet from the ERC223-token-standard. function transfer(address _to, uint _value, bytes _data) { // Standard function transfer similar to ERC20 transfer with no _data . // ...
Kashish Khullar's user avatar
2 votes
1 answer
274 views

Why standard tokens inherit interface?

I was wondering why most tokens inherit from an ERC20 interface, instead of just implementing all the functions directly. Are there are any problems that arise if the interface functions are just ...
arete's user avatar
  • 609
2 votes
1 answer
896 views

Overriding ERC-20 methods

It seems clear that you can override the ERC-20 methods (transfer, etc) to have them do non-standard things in addition to the intended functionality. Is it true that as long as you implement those ...
will_durant's user avatar
  • 1,154
2 votes
3 answers
8k views

Get the value of ERC20 tokens transferred using the Etherscan API

I am using Etherscan API to get transaction and other details for addresses. I need to find out no. of tokens transferred between two addresses. For Ex - for Below TxHash I see 1564+ tokens ...
garg10may's user avatar
  • 724
2 votes
1 answer
1k views

What determines the price of the ERC-20 token on a trading exchange?

I know that ERC-20 tokens are traded in pairs on the trading exchanges, but what essentially determines the price in USD? I would like to know if there's a specific algorithm that does the calculation....
Anji P's user avatar
  • 45
2 votes
1 answer
3k views

Subscribe to all token transfers for entire blockchain

I am looking how to subscribe to all token transfer events within entire blockchain. I wonder how is this is implemented on etherscan.io https://ropsten.etherscan.io/tokentxns I searched thought ...
Max's user avatar
  • 201
2 votes
3 answers
2k views

How can i transfer erc 20 tokens manually in bulk?

Can anyone help me with how to transfer tokens manually in bulk?as i have to transfer tokens to multiple ETH addresses but cannot waste time transferring it one by one.
jisha abraham's user avatar
2 votes
2 answers
3k views

How can I call transfer function of a ERC20 token contract from another contract?

I want to exchange token for a commodity using smart contracts. I have deployed my token contract address in my private block chain network. How should I create another contract that exchanges a ...
Roger Ganga's user avatar
2 votes
3 answers
11k views

Can I receive ERC20 tokens on my address hosted on Coinbase

I have an account on Coinbase and have an ETH Wallet with them. If someone sends their ERC20 token, will there be any issues receiving it?
Mr. T's user avatar
  • 345