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
1answer
22 views

How do you expose the ethereum private key from the brave browser?

I have some funds on the brave browser, but how do I extract the ethereum private key from the brave browser?
1
vote
0answers
19 views

A token transfer enable/disable function works fine in 0.10.0 but not working in Mist 0.11.1

So i have this contract where i have a function to enable/disable transfer of the contract's token. it works fine in Mist 0.10.0 but when i try to call the disable/enable function, it gives me the ...
0
votes
1answer
8 views

Add Custom Data to ERC20 token transfer

I'm in a situation to implement the following scenario, Need to transfer ERC20 standard token(own by my contract) to some another wallet. When recording transaction on Ethereum, need to add custom ...
0
votes
0answers
19 views

How to create security tokens? [on hold]

I want to create a security token. I want to know what is best standard to follow towards creating it?
1
vote
1answer
19 views

Getting and storing address of erc20 contract after dynamically creating it

I have a function which dynamically creates an ERC20 contract on calling a function in another contract as follows: function createDao(string _tokenName) public payable { tokenNumberIndex = ...
0
votes
0answers
21 views

How could I set my ERC20 token image to be displayed in MetaMask?

Does Metamask load erc20 token image from etherscan? ref: How to verify token after etherscan, and submit icon If not, how do I set my erc20 token icon image to be displayed in Metamask? thanks.
0
votes
1answer
29 views

Transaction reverted during contract execution [Reverted]

I sent ETH to a contract address, and the transaction "failed" saying : Warning! Error encountered during contract execution [Reverted]. contract address and transaction failure here: https://...
0
votes
1answer
18 views

Intializing ERC20 token using payable constructor from another function of different contract

I have an erc20 contract which is deployed from another contract as following: function createDao(string _tokenName) public payable returns (address tokenAddress) { tokenNumberIndex = safeAdd(...
0
votes
0answers
37 views

Only owner can do the transfer of ERC20 token

Is it possible that only a single address (the owner's address, who published the Smart Contract) that can perform the transfer of ERC20 token from one address to another? So this company (owner) ...
0
votes
0answers
10 views

how to make an erc20-token transaction in cpp-ethereum?

how to make an erc20-token transaction in cpp-ethereum? Most confused is how to make the 'data' parameter. If possible, plese give me a sample code, thank you~ I've make a eth transaction like ...
0
votes
0answers
32 views

ERC20 Token transfer gas/gasLimit problem

Transfering ERC20 token to an address using KyberNetworkProxy trade function. Asked this question previously came to these results Transaction fails and successfully transfer ERC20 tokens too. ...
2
votes
2answers
36 views

Can i freeze portion of ERC20 tokens via smart-contract?

The Freezing functionality is to impose the restrictions on sales of some portion of ERC20 tokens for certain time periods in Admin Dashboard when transferring the ERC20 tokens to buyers. The Admin ...
1
vote
0answers
22 views

How to integrate ledger wallet in REACT DAPP? [closed]

i cant seem to find a way to integrate ledger wallet in react DAPP. Like which library to use. Any kind of guidance and starting material would be helpful. Thank You
1
vote
1answer
22 views
0
votes
2answers
21 views

Token transfer not dropped no event on MetaMask

I am using the following contract Fixed Contract Example And using this example to transfer token Transfer token example Everything goes fine, i see no error what so ever except MetaMask doesn't ...
1
vote
1answer
69 views

Wallets report 0 balance for address but balanceOf is right

Given this contract using Openzeppelin lib: contract Token is StandardToken, Ownable { string public name = ""; string public symbol = ""; uint8 public decimals = 18; constructor(...
1
vote
2answers
35 views

MEW says not a valid erc20 token but don't see errors

I created a token prior to this one that is fine. I used the same template, followed the same exact steps to create another token but getting the not valid erc20 error. https://ropsten.etherscan.io/...
1
vote
1answer
30 views

How ERC20 and ERC721 deals with confirmation level

a smart contract store the internal balance per owner. when we transfer tokens from Owner A to Owner B, we update the internal balance sheet. but the internal balance sheet is a most recent snap shot. ...
0
votes
1answer
38 views

Send accurate ERC 20 custom token

I have one issue, I can't send accurate custom ERC 20 token to an ether address. Here is my custom token detail. Balance: 0.000000000000000324 BucksTec Decimals: 18 I sent 44 tokens to an ...
2
votes
1answer
53 views

Is ERC 865 safe to use?

Would like to implement ERC 865 (pay transfer fees with token instead of eth) or similar functionality in my smart contract. Is ERC 865 safe and audited currently? If not, is there any implementation ...
0
votes
1answer
26 views

Get allowance list after approve function in erc 20

A ➜ approve(spender, amount) B ➜ transferFrom(sender, buyer, amount) allowance(address tokenOwner, address spender) I am seeing that this function can be call only if the person know the address of ...
0
votes
2answers
35 views

contract address returning '0x0000000000000000000000000000000000000000'

I am rying to get the address of public variable tokenContract of datatype contract but its returning the address as ''0x0000000000000000000000000000000000000000'' below is the code for the same ...
0
votes
1answer
22 views

If new smart contract is created with same symbol or name, is there any way owner/creator can access new contract?

I know of a situation where this was done, and somehow the creator /owner of last contract was able to transfer funds in new contract to several wallets. Was it because same symbol was used? Is there ...
0
votes
1answer
28 views

receiveAprroval through tokenRecipient interface

I received an error by the compiler regarding the following solidity code and I would like to know what's this error and what's the fix? interface tokenRecipient { function receiveApproval(...
0
votes
2answers
34 views

What does a user have to provide to be able to retrieve the balance of his account?

I am building an angular based app with ionicframework. In this app the user shall be able to retrieve his balance of an erc-20 token. Using web3js's web3.eth.getBalance(MY_ADDRESS) i have to retrieve ...
0
votes
2answers
27 views

Can i use a contract which is deployed

I just have a question in my mind. can I use the contracts which are already deployed so that I can use them without even myself have to deploy it again. For example, take SafeMath I think I would ...
1
vote
1answer
31 views

Transfer Token value is decimal when define decimals in smart contract?

I am new to ethereum block-chain. I create a ERC20 base smart contract. I set decimals values 18. When I call transfer function and pass the address and value parameters. So it's convert no.of token ...
0
votes
1answer
16 views

acess variable from token contract to ico contract , both placed in diffrent files

//token.sol pragma solidity ^0.4.24; /*import "./Ownable.sol"; */ contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) ...
1
vote
1answer
21 views

Quick question: can a function send multiple tokens?

And by the question I mean if I can send a couple of few different ERC20's or let's say even 1 ERC20 + some amount of ether in one function?
0
votes
1answer
28 views

getting error web3.toWei is not a function when testing

i have installed web3 latest version 1.0.0-beta.36. i am using helper libraries which i used from openzeppelin when i am running the test cases using truffle test it shows error as TypeError: web3....
0
votes
0answers
34 views

Is there a tool to lookup ERC20 token type via an address?

I'm currently coding on the 0x platform and need to determine the type of token (for example WETH or ZIL) from the token's address. Is there a utility out there that allows me to do this easily?
1
vote
1answer
43 views

Not able to deploy crowdsale

when i am doing truffle migrate.i am able to deploy my crowdsale contract but my token contract is getting deployed but not the crowdsale contract. var Sportist = artifacts.require("./Sportist.sol"); ...
0
votes
1answer
99 views

Web3 js 1.0 is throwing big number error while transfering tokens

When I tried to transfer more then 1000 tokens, it's throwing an error like as mentioned below (I'm using web3 js 1.0.0 34 beta version). Error: [number-to-bn] while converting number 1e+23 to BN....
0
votes
1answer
26 views

showing error when doing npm install to install openzeppelin it shows error [closed]

when i am trying to install the dependencies using npm install from openzeppelin.it shows error as Error: Can't find Python executable "python", you can set the PYTHON env variable.
1
vote
1answer
29 views

what is pausable token in erc-20 openzeppelin

I want to know about the pausable token in openzeppelin.what are the advantages that we will get after making our ERC-20 token pausable.
0
votes
1answer
56 views

Move ERC20 tokens from Ethereum Wallet Contract to Account

In my Ethereum wallet i am trying to access my wallet conract. If I sync in light mode and import the wallet contract address it just stays there displayed, greyed out and nothing happens, no matter ...
0
votes
1answer
51 views

How to handle both string and bytes32 method returns?

I have the following code to extract ERC20 token symbols from addresses: const AllTokenSymbols = await Promise.all( allTokens.map(tokenAddress => { const tokenContract = new web3.eth....
0
votes
2answers
39 views

Which one should we use ERC-20 or ERC-223

we know that there is new update for ERC20 that is ERC-223 now wich one should we use ?
0
votes
1answer
48 views

Unable to load Solidity contract using `compile_files` function with web3.py

I am new to ethereum block-chain. I created a ERC20 smart-contract with help of open-zeppelin framework. I used py-solc package for solidity compilation with python. I imported compile_files function ...
0
votes
3answers
37 views

Error when trying to add a payable function in erc20

Most of the ERC20 examples on the internet have this function: // ------------------------------------------------------------------------ // Don't accept ETH // --------------------------------------...
0
votes
1answer
18 views

Tracking ERC20 token movement in the smart contract

I am writing a smart contract that allows users to stake ERC20 tokens and get a discount on a product they buy in the store. At first, the user will transfer tokens to the contract and then based on ...
0
votes
0answers
45 views

Crowdsale Contract reverting transactions

i made a Crowdsale contract and a token to go with it. when i tried using the crowdsale contract it reverted my transaction. before i used cappedcrowdsale.sol from openzeppelin it worked fine. i have ...
2
votes
2answers
36 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 (...
0
votes
1answer
42 views

ERC20 transferFrom function results in “Error: gas required exceeds allowance or always failing transaction ”

I'm trying to learn my way around ERC20 tokens and upon attempting to create a lottery contract for an erc20 token the transferFrom function always spawns an error, specifically "Error: gas required ...
0
votes
1answer
104 views

How do I call Approve() function from the contract creator's address? ERC20 token escrow

I am trying to send ERC20 token into an escrow contract so that it could transfer them to relevant stake holders. The part that I am stuck in is properly using the approve function. From my escrow ...
1
vote
3answers
33 views

ERC-20 transferFrom implementation potential flaw…or not?

Let's say transferFrom function is implemented in a next manner: function transferFrom (address _from, address _to, uint256 _value) public returns (bool success) { uint256 spenderAllowance = ...
2
votes
2answers
54 views

Using Constructor in Solidity

How can I use constructor in the following solidity codes. pragma solidity 0.4.24; contract owned { address public owner; function owned() public { owner = msg....
1
vote
1answer
28 views

ERC20 verification for arbitrary address

I'm trying to verify if an arbitrary contract complies ERC20. While doing so I'm checking if the contract code has the following markers: totalSupply() - 18160ddd balanceOf(address) - 70a08231 ...
2
votes
1answer
28 views

Can someone imitate and create a fake erc20 contract? If so, how can we identify a contract?

If a project A deployed a erc20 token contract Mytoken, can a scammer create another Mytoken with some internal data modified (e.g., founder address)? Can etherscan identify such fake contracts? Or ...
1
vote
0answers
16 views

Referencing interfaces from other contracts

I am trying to deploy a contract which has an external function with no implementation body. Remix and truffle have problems with this. I know that abstract interfaces can't be deployed, but how were ...