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) ...

1
vote
0answers
21 views

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

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

How to hide my eth balance

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
0
votes
0answers
8 views

Unable to pass the value to function's parameter in Remix

I am testing a contract which has a transfer function which accepts the array of values and address. It works fine when I pass a smaller value as mentioned in the below transaction. https://ropsten....
0
votes
0answers
40 views

Safe deploy of ERC20Mintable token and crowdsale contract

I have created the Token contract and the crowdsale contract using open Zeppelin library. After migrating the Token and crowdsale contract, I have added the crowdsale contract address as a minter in ...
1
vote
1answer
17 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
18 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"; ...
0
votes
1answer
14 views

Error creating contracts on Ethereum wallet. Need help [duplicate]

I am trying to create an ERC20 token off of ethereum, but when I put the code in the editor in the ethereum wallet, I get a weird error. It says: "throw" is deprecated in favour of "revert()", "...
2
votes
1answer
15 views

How to get amount of ERC20 tokens sent in tx from tx hash? (Web3.js)

I have tx hash and I would like to see how much ERC20 tokens was sent in this transaction. How can I do this with web3.js? Thank you.
1
vote
2answers
27 views

Why can't I catch solidity errors testing with truffle?

I'm testing the ERC20 standard. I try to send a transaction from an account with balance=0, which should throw an error. I'm trying to catch it. In my test function, I'm using the following: ...
3
votes
1answer
18 views

Which is the expected behavior trying to get an undefined mapping value?

In ERC20 standard, _allowed is defined as: mapping (address => mapping (address => uint256)) private _allowed; and the getter function is defined as: function allowance(address owner, address ...
2
votes
1answer
38 views

How can obtain the value of erc20 token in transaction? [duplicate]

i want to get the token's transferring value like this: https://etherscan.io/address/0x27054b13b1b798b345b591a4d22e6562d47ea75a#tokentxns How can obtain the value of erc20 token in transaction? https:...
1
vote
0answers
19 views

Possible ERC-20 improvement: Token-specific ENS equivalent

With ENS still providing quite a difficult user experience for the average user, I'm wondering why standards like ERC-20 don't implement a simple mapping allowing people to set names equivalent to ...
0
votes
0answers
11 views

Which technology is right for lowering ERC20 transaction fees

What I want to achieve: My users sending ERC20 tokens between each other with low transaction fees usually between known routes (such as user A usually sends to user B and vice versa). What is the ...
1
vote
2answers
22 views

Do I need gas for each account to transfer ERC20 token?

I'm in the process of creating my own ERC20 Token. The idea is similar to have a loyalty wallet where I'm able to send points to my customers. Also, the idea is to make some transfer functions to ...
1
vote
1answer
39 views

using ERC token to login website [closed]

recently I want to write some website login program using ERC tokens ,can anyone show me the way to do that ? an idea or a route are both good for me
0
votes
1answer
27 views

The use of ERC20 tokens in a private ethereum network

I am being told to use a private blockchain instead of the public one in attempt to cut gas cost. But I was hit with the problem of the value of ether and tokens in this private blockchain. I am ...
1
vote
1answer
48 views

Why does this function not need a require statement?

Why does the following function not need a require statment? function transferFrom(address from, address to, uint256 value) public returns (bool) { _allowed[from][msg.sender] = _allowed[from][...
1
vote
0answers
36 views

How to get back the ownership from crowdsale?

When I started crowdsale, I transferred token ownership to the crowdsale contract. When the sale finished, I'd like to send back the ownership to token so that the next crowdsale will start. How can I ...
1
vote
1answer
26 views

Largest possible Supply an Ethereum token that can be created?

What is the largest possible token supply an ERC-20 that can be created?
1
vote
2answers
68 views

DappHub Multiply Function

Could someone explain the use of performing a multiplication such as this? I mean the logic is fine, but what is the importance from a security point of view? function mul(uint x, uint y) internal ...
2
votes
1answer
50 views

Passing one contract instance as an argument to the constructor of another contract

I need to use the functions of the ERC20 contract in another contract. The ERC20 contract is from the openZeppelin contract library. I found the following code on a website: import "../../...
0
votes
3answers
35 views

Is it possible Refund the ETH within ERC20 Contracts?

if user sent the 1.5 ETH then accepted the 1 ETH, but 0.5 ETH should be refunded to sender. I tried like msg.sender.transfer(0.5) and tried like msg.sender.transfer(500000000000000000) but nothing ...
1
vote
2answers
49 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
votes
0answers
22 views

tried to allocate and transfer ERC20 tokens but it doesn't work

User sends 0.5 ETH and, based on the calculation, 104.5 tokens should be credited. I'm trying to make the figure round (100) and refund the remaining 4.5. Here's my code: uint256 Tokens = (((0.5 ...
0
votes
2answers
21 views

Subtract to get decimal values in ERC20 Contract

I tried to split real and decimal values. For eg. 209/100 => 2.09 So i want to store 2 is one variable and 0.09 into another variable. but its return zero always. uint256 realToken = (209/100) ; ...
2
votes
1answer
78 views

I accidentally sent ERC20 tokens to my Ledger Live wallet, which does not support them. How do I get the tokens out?

The Ledger Live wallet does not support ERC 20 tokens. How do I see and remove ERC20 tokens accidentally sent to a Ledger Live wallet address?
0
votes
1answer
35 views

Web3js send ERC20 token with my own mining machine

Is it possible to send custom ERC20 token using my own mining machine? We have a big website where we are going to use our own Custom token but the problem is when we send tokens to the user we need ...
1
vote
2answers
31 views

Is there any decentralized exchange with zero trading fees for ERC-20 tokens at the moment?

Is there any decentralized exchange with zero trading fees for ERC-20 tokens at the moment? All fees except gas fees should be zero. I already tried Bancor and Kyber but, as far as I can tell, they ...
1
vote
2answers
38 views

What are the use cases of tokens? How they are different than ethers?

I am searching for the ERC20. From what I found is that , tokens allow us to have our coins based on smart contracts. But I am little bit confused about the use cases of tokens? When I should use them ...
0
votes
0answers
21 views

Error in sendTransaction() of deployed contract using truffle console

I deployed Token and Crowdsale contracts on Ganache network. For testing, I'm using Truffle console and followed below steps: 1) Create an instance of both contracts DappTokenCrowdsale.deployed()....
1
vote
1answer
34 views

Is the `totalSupply` method necessary?

If you have a public variable like this: uint256 public totalSupply; Is it necessary to also include a totalSupply method to a standard ERC20 contract? I know there is a getter that Solidity ...
0
votes
1answer
37 views

Error in creating instance of deployed contract using truffle console

I deployed Token and Crowdsale contract in separate migration files. During Migration, there was no error. Migration logs are share: Running migration: 2_deploy_token.js Deploying DappToken... ......
2
votes
1answer
25 views

Is it possible to check the Thrid party token ( USDT ) within my ERC223 contracts?

I want to check how many tokens are received in my contracts, so that I am able to allocate MY TOKENS to the TOKEN Sender. I tried several ways like approveAndCall, but its not working. I don't ...
2
votes
2answers
16 views

What are the difference between _from, _spender and _to address in Ethereum in Solidity?

What are the difference between _from, _spender and _to address in these functions below? function transferFrom(address _from, address _to, uint256 _value) public{/*...*/} function approve(address ...
3
votes
1answer
126 views

Check division is integer or float solidity

Suppose i have a contract with decimals and total Supply as follow. How can i check if tokenAmountInWei pass in is integer value in form of ether. decimals = 18 totalSupply = 1000000 function ...
4
votes
1answer
33 views

Why do we have to “deposit” into a decentralized exchange?

On a centralized exchange (like coinbase), I understand why we have to deposit money into it in order to trade. But about decentralized exchange, as I've read about, it has some kinds of "atomic swap"...
1
vote
1answer
31 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
1answer
43 views

How do I call the burnFrom() function once my contract is deployed?

I'm using the Openzeppelin library in my contract where MyToken is StandardBurnableToken. Once I deploy that and I want to burn a set amount of the initial supply how do I call the function? I don't ...
1
vote
1answer
20 views

Best practices on handling both Ξ and tokens

I'm writing a contract which handles both Ξ and ERC20 tokens. I know that many dApps use WETH and I understand what it does, but I'm not sure if it was integrated because that's the only way to ...
0
votes
1answer
42 views

Calling the burn function

I am using the openzeppelin library and importing the StandardBurnableToken.sol logic into MyContract.sol here is a code pragma solidity ^0.4.17; import "/openzeppelin-solidity/contracts/token/...
0
votes
1answer
87 views

Time Lock and vesting smart contract

I would like to create a smart contract that will take care of locking and/or vesting funds to several beneficiaries (inputted by the owner of the smart contract). The funds that it will vest and lock ...
1
vote
1answer
22 views

Scenario and solution when multisend function fail

Assume that we have two MultiSend function, one for ether and another for ERC20/ERC223 token respectively. My question is what would happen if one or more of the address fail. Will all the ...
2
votes
2answers
81 views

Any quick, easy ways to convert ERC-20 tokens?

Are there any quick ways to convert my Airdrop ERC-20 tokens from various old ETH wallets to ETH/BTC...? Looks like I've got a few hundred $ kicking around in old Airdrop tokens. I've seen a few ...
0
votes
1answer
31 views

Truffle migrate code with library, interface and contract

Suppose that I have a token contract as follow. How can i write the new migration.js file in truffle to deploy the contract? TestCoin.sol import "openzeppelin-solidity/contracts/math/SafeMath.sol"; ...
1
vote
1answer
59 views

Upcoming Ethereum hard fork and ERC-20 token as fiat money

The ethereum network may face a new hard fork with the release of Ethereum 2.0 (scalability fixes) Is it true that we might have two parallel ethereum networks each running a different consensus ...
0
votes
1answer
28 views

Generate random address for ERC20 Token deposit and consolidation?

I'm trying to implement a mechanism to generate random addresses for users to deposit ERC20 tokens and then consolidate the deposited tokens to a cold wallet address later, somewhat like what an ...
1
vote
1answer
35 views

ERC 223 receiving contract logic

I try to search on ERC 223 receiving contract implementation online but most of them just providing the interface. I am wondering if it is possible to do something like this for ERC 223 receiving ...
0
votes
1answer
48 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 ...
0
votes
0answers
47 views

Calculating gas needed to transfer tokens

Suppose I have a wallet with erc20 token balance in it and with zero ethereum balance. I need to send tokens to another wallet. But before I need to send some eth to this wallet to pay gas for tokens'...