Questions tagged [erc20]

ERC-20 is a smart contract standard defining an interface and a set of rules for development of fungible tokens on the Ethereum platform.

462 questions
0
votes
1 answer

How to Transfer Token via Contact Address

My Solidity Code transfer ETH is working, But ERC20 Token Not Transfer. pragma solidity ^0.5.1; contract Token { function transfer(address to, uint256 value) public returns (bool success); function approve(address _spender, uint256 _value)…
osizbala
  • 1
  • 2
0
votes
2 answers

How to check function is payable or not?

How to check in code (on Solidity side or/and Web3 side) before call contract function, this function is payable or not? For example I found this today in token EURS function transfer (address _to, uint256 _value) public payable returns (bool…
0
votes
1 answer

How can i send back the ether which i used to buy a token in ERC20?

Iam trying to write method in solidity where it checks if the given ether is enough to buy my coin. If its enough I will give them the respective amount of coins but if the ether is not enough I need to send back the ether which is getting used to…
mani deep
  • 1
  • 1
  • 5
0
votes
1 answer

Why does this function fail to withdraw ether from a smart contract?

I used the following code which I thought would be able to withdraw any ether that was deposited to the smart contract. Can you help explain why this might not work? function withdraw() public { require(owner == msg.sender); …
0
votes
0 answers

Questions on MinterRole contract in openzeppelin

I am using the openzeppelin for creating the ICO contract. I am concerned about the MinterRole here. After I develop Token contract, I added the sale contract as a minter using "addMinter" function. Question After the sale is over I do not see…
iappmaker
  • 2,945
  • 9
  • 35
  • 76
0
votes
2 answers

How to keep wallet address of an ERC20 token holder private?

This is the interface that is required for a token to be an ERC20 token contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); …
Test1 Test2
  • 327
  • 2
  • 9
0
votes
1 answer

Warnings by deploying ERC20 token sol,

I want to deploy my contract but I have so many warnings, I don't know every meaning. Gas requirement of function SpastToken.increaseApproval(address,uint256) high. (11 times in other functions) BasicToken.balanceOf(address) : Variables have very…
Cryptogear
  • 39
  • 7
0
votes
1 answer

Unable to get metamask balance and send amount through metamask extension using javascript(web3)

I've integrated metamask on my site, but I need to send amount and also check the balance on ERC 20 token using metamask but nothing works for me.I try different coding and methods on WEB3. Kindly provide the executed code to me. But using below…
BALAJI R
  • 73
  • 1
  • 11
0
votes
1 answer

How ERC20 exchange websites works?

Users can deposit on Binance, for example, various ERC20 tokens, but later then those tokens should be transferred to the Binance cold wallet(wallet used for withdrawing) how those tokens are transferred when the newly generated address doesn't…
DedaDev
  • 4,441
  • 2
  • 21
  • 28
0
votes
1 answer

What GAS ERC20 tokens use?

I would like to know what GAS the ERC20 tokens should use, like when I send OMG transaction, should I use OMG as the Gas or Ethereum as GAS? I don't want to use ETH, so I am figuring out whether I can use the same token (i.e., OMG or other erc20…
Jab2Tech
  • 165
  • 1
  • 14
0
votes
1 answer

Deployed ERC23 Token shows 0 balance in my wallet, where is the issue?

I have created an ERC23 token and deployed it on etherscan using the online remix solidity compiler, everything seems fine, etherscan tracker shows the balance of 200 mil, however no matter what wallet I use, the balance shows 0. Can you please spot…
0
votes
1 answer

Send ERC-20 token from another contract

I am trying to send ERC-20 token that was deposited to my contract address to another address. Here is the ERC-20 contract code - pragma solidity ^0.4.11; /** * Math operations with safety checks */ library SafeMath { function mul(uint a,…
dkpaul91
  • 11
  • 1
  • 3
0
votes
0 answers

What’s the point of checking msg.sender≠0 ? Are there cases where msg.sender can be null?

In the Tronix 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 how a contract can write directly into the ledger…
user2284570
  • 2,891
  • 3
  • 26
  • 74
0
votes
1 answer

Call function on another contract failed

I'm studying solidity. TT3 token generation on test net is no problem, but TT3Token_Test failed. (TT3Token and TT3Token_Test have been deployed to the same wallet…
Kidong
  • 1
  • 1
0
votes
1 answer

ERC20 solidity contract with pre-existing balances - possible?

There's a part of me that thinks that if this is possible it kind of goes against the whole idea of a secure blockchain, but I just want to check and make sure. Is it possible to create and deploy a smartcontract which creates a number of addresses,…
Irresistance
  • 147
  • 1
  • 1
  • 10