Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
6 views

Where should we actually need to set the token price?

I have seen a video which sets the "token price" in a contract using that token (erc20), If the same token is used in another contact for transferring in another contract with a different value of "...
1
vote
0answers
6 views

How to improve web3 when importing and stop doing the same task over and over again?

When using web3js, you will automatically have to make file to create an instance of that contract which you will use in your main project to interact with. For example, smartContract.js import ...
1
vote
1answer
11 views

Is it allowed to used modifiers in mandatory functions of any token standards that I wish to implement?

As for example, Is it okay to add modifiers in transfer function in ERC20
2
votes
2answers
27 views

What's the reason ERC-20 standard allows 0 value transfer?

ERC-20 says transfer and transferFrom should allow 0-value transfer and fire Transfer event. What's the main benefit of allowing 0-value transfer? Is there any use case?
0
votes
0answers
17 views

How do I collect addresses submitted by users for an ERC20 token airdrop? [on hold]

I'm planning on conducting an airdrop for 30,000 to 50,000 people, the site is ready, the executive summary, the whitepaper, the budget is set and the only thing i need to know is how to save the ...
2
votes
1answer
20 views

How to integrate ERC 721 and 20 to create semi-fungible tokens?

ERC 721 defines non-fungible tokens where each token is unique. But if one needs to create a token where there is a limited supply of various types, is there a an effective way to accomplish this by ...
2
votes
1answer
22 views

How to burn the token without burn method in contract

while time of contract development, management decided to don't burn any token and we will use our token as utility token for apps but now they have decided to burn unsold tokens after ICO. our ...
1
vote
1answer
30 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' ...
0
votes
2answers
26 views

Can smart contract send tokens/eth if it doesn't have a send function?

Let's assume you just created 1,000 tokens at address 0x012345. You, the owner of 0x012345 sent by mistake all tokens and 1ETH to a smart contract with address 0x987654. This smart contract doesn't ...
2
votes
1answer
22 views

Burn the rest of the token after airdrop is complete

I have started to develop blockchain and learn solidity. I tried making a smart contract with the 200M supply, the creator only held 50M of the total supply and the rest was in the smart contract for ...
0
votes
0answers
21 views

ERC-20 decimals issue

I'm using a simple crowdsale contract: pragma solidity >=0.4.22 <0.6.0; contract owned { address public owner; constructor() public { owner = msg.sender; } ...
0
votes
1answer
30 views

Could somebody explain me what is the difference of msg.sender, spender, from, to, owner in ERC20?

I read ERC20 solidity code below. https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/ERC20.sol Then, I couldn't understand what the terms of msg.sender, spender, ...
0
votes
0answers
16 views

Track ERC20 Provenance

I was wondering if there is any way for a smart contract to determine where a specific ERC20 transfer came from. That's to say: Alice and Bob both send a transfer to a smart contract same amount &...
0
votes
0answers
19 views

My smart contract doesn't accept ERC20

NOTICE: The below implementation works. It assumes that the calling addresse has approved both the spender and the contract to carry the transaction. Because they were not approved it was not working. ...
0
votes
0answers
10 views

help start new network from fork ETH (costantinopole) on the PARITY (with geth clients)? [closed]

1. i am copy clone from github ETH on the geth clients with our new blockchain and our copy web myetherwallet wallet..? for start 1 network...new chainid xxx geth -datadir ./tests init genesis.json ...
1
vote
2answers
25 views

OpenZeppelin Starting Balance

I believe that the openzeppelin project have updated their StandardToken smart contract which is now called ERC20.sol. One issue that I have is that the new smart contract has some missing ...
0
votes
2answers
28 views

How to transfer ERC20 tokes from Blockchain wallet to MyEtherWallet?

I got some token and by mistake sent them to my Blockchain ETH address. Now, what is the process of transferring them to MEW? They talk about exporting your private key, what does that mean and to ...
0
votes
1answer
28 views

What does ERC20Interface do in smart contracts?

I found this fantastic code used to generate a smart contract which allows you to send your ERC20 tokens to another address. A simple overview / explanation of how that works is as following: We ...
0
votes
0answers
14 views

How does the dx.exchange peg NASDAQ stocks to the Ethereum blockchain? Can I withdraw them? [closed]

With the recent news of the dx.exchange being able to purchase NASDAQ stocks on the ethereum blockchain. How does it work exactly? Is just another token? Can the stocks be withdrawn as an ERC20 ...
1
vote
1answer
38 views

How do you apply an interest rate on an ERC20 token without making new transactions?

I'm trying to develop an ERC20 token that mints new tokens to holders over time, however I would like to do this in a way that does not require me to make new transactions each time a users balance ...
2
votes
1answer
32 views

Who decides what kind of token reward a miner gets for mining a block?

Preamble: To my understanding, a Bitcoin miner creates a new block, put some necessary information in it incl. some transactions from other participants and one transaction which sends 25 Bitcoin to ...
1
vote
0answers
32 views

Create a Signed Transaction(ERC20) does not work in Objective-C

I have implemented swift Library in my Objective-C code. Here is the code which I have implemented to send ERC20 tokens. - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after ...
0
votes
1answer
23 views

Can I modify contract? [duplicate]

I have issued a contract, but it doesn't contain subtract totalsupply logic, I want to modify the original contract, how can I do that with same contract address? Does some one know? Please help. ...
0
votes
0answers
18 views

Mintable crowdsale restriction issue

I'm working on the simple crowdsale contract and I'm trying to make a mintable token, so when an investor buys tokens, they are will be minted automatically. pragma solidity >=0.4.22 <0.6.0; ...
-1
votes
0answers
49 views

ERC20 Token not appear on approveAndCall function

When I use the function approveAndCall on my Token contract (ropsten) and Metamask is triggered, my token name and value do not appear, only the gas calculation. I have added a custom token to ...
0
votes
0answers
13 views

Meatamask and Ganche-cli generating different signs for the same hash

I'm have created ERC865 token so that users can send tokens without having ether. I followed 1 and 2. My contract recovering the correct address after generating the sign using Metamask customized ...
0
votes
2answers
30 views

API for ERC20 token balance - EtherScan

Is there any API for ERC20 token balance of an address for a particular contract?
0
votes
1answer
41 views

Why is the totalSupply of this token statically initialized to 5500000000?

contract UnixERC20 is StandardToken { function() { throw; } string public name; uint8 public decimals; string public symbol; string public version = 'H1.0'; ...
0
votes
1answer
11 views

Stream ethereum (ERC20) transactions (node.js)

I would like to get discord message every time when address receive ERC20 token. Is there any way to stream Ethereum transactions? I tried https://github.com/AlexanderC/ethereum-transaction-stream ...
0
votes
0answers
38 views

Error: [ethjs-abi] invalid hex or buffer, must be a prefixed alphanumeric even length hex string

While recovering address from hash and sign, getting above error. myHash = '0xd0109ef5f602b69354acd389a2c752f9b80ef6bbce92a922ae8853d43a027b68'; mySign = '...
2
votes
2answers
29 views

OpenZeppelin crowdsale token ownership

Using the non-modified OpenZeppelin code to create a mintable and burnable ERC20 token and a crowdsale contract, once ownership of the token is transferred to the crowdsale contract, is it possible to ...
1
vote
3answers
36 views

Cost-effective way to calculate final user balance based on variable events

Apologies for the title. I'm not sure what would be a more descriptive way to name this question. Assume there is a contract which has 3 potential parties. Buyers, sellers and shareholders. Buyers/...
1
vote
2answers
33 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, ...
1
vote
2answers
25 views

What is the ERC20 token?

in a contract I saw that I had the token erc20. Who could explain to me what is the erc20 and what is it for? please
-3
votes
0answers
28 views

Airdrop doesn't deducted from msg.sender. This contracts has bugs, how to fix it?

Total amount supply limit to 10Billions but suddenly the airdrop sending 1E+59 (I Think is over one hundred thousand trillion ) to a airdrop participant. ---Code from comment follows--- contract **...
0
votes
1answer
26 views

Supply amount exceed total supply! Why the quantity supply shown 1.00 E+59

the quantity amount over the total supply, shown 1E +59 Airdrop solidity code maybe got something problem, does someone had idea?? Can't check for token Holder, "Sorry, We Are Unable To Generate The ...
0
votes
0answers
23 views

How to generate sign to pass to transferPreSigned(), contract is not asking for sign while transfer()

I'm creating ERC865 token so that users can send tokens without having ether. I followed 1 and 2. As per 1, sender will sign transaction object while calling transfer() but I'm unable to see any "...
1
vote
1answer
40 views

Problem with approve and transferFrom for making payments using ERC20 Token Contract

I have a contract that uses the ERC20 token contract for making payments. Now, in the ERC20 token contract we have the following implementation of approve function: function approve(address _spender,...
0
votes
1answer
12 views

What does mining software do when two tx are sent in one block with incremented nonces, but the second tx relies on the completion of the first?

If I call approve and transferFrom on an ERC20 token in two transactions, with the nonces being 1 and 2, respectively, how do the miners know which to accept first? Do the miners choose the ordering ...
1
vote
0answers
17 views

What are the available ethereum/erc20 standard wallet on China's appstore?

Heard that ImToken wallet is removed from Chinese appstore ; Am looking for a ethereum based wallet that could be downloaded from the Chinese appstore.
5
votes
3answers
210 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
vote
0answers
40 views

Etherscan Verifying Contract Code: Error! Constructor arguments provided but might be unncessary because source code contains a public constructor

I'm trying to verify my solidity code through etherscan but it gave me this Error! Constructor arguments provided but might be unncessary because source code contains a public constructor. Tip: ...
0
votes
1answer
25 views

How to save and retrieve the investors address in a crowdsale contract

I am writing a ICO code which should have the following functionalities To save the address of every investor and To retrieve all the investors address and the amount invested Question What is the ...
0
votes
1answer
49 views

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

I can't implement ERC223 contract. remix said " This contract does not implement all functions and thus cannot be created." please tell me what bad it is. pragma solidity ^0.4.25; library ...
0
votes
2answers
33 views

Is it ok to store tokens at 0x0?

I would like to store tokens somewhere else than my wallet due to security reasons. I made a voting system contract and when more than 50% of authorized voters vote for yes, contract transfers limited ...
1
vote
0answers
35 views

Is there any way to integrate ERC20 token as payment to ecommerce [closed]

If want to integrate ERC20 token to integrate as paymen to a website. how can?
1
vote
1answer
230 views

How to hide my eth balance [duplicate]

i want to hide my eth balance from myetherwallet, etherscan , ethplorer .how to hide my eth balance in my ether wallet , etherscan , ethplorer. any methods available, please reply thanks
1
vote
1answer
22 views

Token transfer is not working

I am trying to transfer a token from a token contract. the control reaches till the point where I have the transfer statement later it fails. I do not understand why it is failing. I made sure the ...
3
votes
2answers
31 views

ERC standard that allows sending tokens from many origins to one destination in one transaction?

I know that any kind of operation over a token is possible so long as you implement the smart contract that achieves what you desire. For example, a function multisend can be developed that allows ...
1
vote
1answer
33 views

msg.sender problem for calling ERC20 token contract from another contract

I am using a ERC20 Token contract as indicated below. (I have deleted the irrelevant portions). pragma solidity ^0.4.24; import "../node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol"; ...