Stack Exchange Network

Stack Exchange network consists of 175 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
11 views

Revert on ERC20.transferFrom

I am getting Error: Returned error: VM Exception while processing transaction: revert when testing MyContract.deposit() Here are simplified versions of my code to highlight where the issue is ...
0
votes
1answer
11 views

Can use smart contract as payment gateway

Most suggest that cannot use ERC20 token as payment gateway integration .Why?
0
votes
0answers
11 views

How to use allowance on a contract to giveaway tokens to users?

I have a token contract. I want to allow a site to give away my tokens to its users. I read i have to approve the owner of that site as allowance to use a set number of tokens for giving away to its ...
-1
votes
0answers
13 views

Declaration error: please help

pragma solidity ^0.4.16; import './SafeMath.sol'; /** * @title Equality * @dev the interface of PoSTokenStandard */ contract Equality { uint256 public stakeStartTime; uint256 public ...
0
votes
1answer
6 views

How to use 2 different constructors with open-zeppelin

I don't understand well how to implement an smart contract to create a capped Token. If I want to follow the example of a simple token is easy: https://github.com/OpenZeppelin/openzeppelin-solidity/...
0
votes
0answers
5 views

ERC20 token transfer with a multisignature wallet

I have a multisignature wallet(it is a different contract). I have some tokens to transfer to another address(token is an ERC20 and can transfer via (yourContract.methods.transfer(toAddress, amount)) ...
0
votes
1answer
15 views

Can i call transfer function in other contract?

can i call ERC20 token's transfer function in other contract? like transfer AToken from using BContract's function can I?
0
votes
0answers
35 views

I can't get ERC20 token sweep from a contract to work

I wrote this contract below that would create a factory contract which generates user deposit addresses. the user addresses would forward any deposit to the authorized caller on the factory contract, ...
0
votes
0answers
17 views

Transfer/Consult token of node ethereum [on hold]

good morning. I need to implement an ERC20 token in an exchange from a client. I created a node ethereum and synchronized it, I created an ethereum wallet and sent some tokens for that wallet. By ...
0
votes
1answer
47 views

Initial ERC20 Token supply split into 2 or more hardcoded addresses

don't know if someone can help me, but let me explain my problem. For more transparency in my ERC20 token generation smart contract, I want to hardcode the Team Pool (0xA) and Crowdfunding Pool (0xB) ...
0
votes
1answer
20 views

Etherscan “Write Contract” Tab - what is it for?

What is the purpose of the Write Contract Tab in Etherscan? For example, if you look up the QTUM Token Contract on Etherscan (https://bit.ly/2IsddkT) and then tap on the Write Contract TAB, you have ...
0
votes
1answer
11 views

tokens within tokens in ERC20

I want to make a token on ERC20 and that would be staked, and other token would be rewarded as on interest earn. After certain time, that earned token being staked, and third token will came out as on ...
1
vote
1answer
10 views

Is there a token standard that allows the owner of an address to move the tokens in any account under certain conditions?

I am wondering if there exists a token standard (much like ERC-20) that allows for the owner of an address to transfer the tokens out of any address when certain conditions are met? For example, ...
0
votes
0answers
19 views

transaction not processing

The code below is for selling tokens to the smart contract, the INR_ETH.sellTokens() function calls the smart contract. but the code is not working properly, metamask asks for the "approve" part but ...
1
vote
1answer
21 views

How to use own custom token instead of gas price in ether? [duplicate]

I want to make my token and want that the token should be used as gas price. Is that possible,if yes please guide me for the same.
0
votes
0answers
8 views

Token Swap in ERC1400

Any idea about the swapping of tokens under ERC 1400. If anyone knows pleas e share some references documents for the same
0
votes
1answer
12 views

Minted Crowdsale vs Non Minted Crowdsale

I am exploring openzeppelinr-solidity smart contracts for Initial Coin Offering(ICO). There are two options available for a token smart contract one is to have hardcoded total supply tokens or mint a ...
0
votes
1answer
21 views

How to pass arguments to token smart contract generator?

I'm trying to build a 'token generator' smart contract that accepts 3 arguments to then deploy a new token smart contract with those inputs ('strings' for symbol, name, 'address' for owner). I am a ...
0
votes
1answer
23 views

Can we pass some verification values from web to solidity contract?

Is there a way we can pass some value checks from web to solidity contract Just for example if we want to make sure, the person who is calling contract function is present on our website and not suing ...
0
votes
1answer
7 views

Function inside constructor is called from which address?

interface token { function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);} contract CampaignFactory{ token public token_instance; constructor()...
0
votes
1answer
16 views

Allow all ERC20?

So far a user can allow a smart contract or any address on Ethereum blockchain to spend their coins by calling the 'approve' function. If I want to allow address X to spend 250 of my FabulousCoins I ...
0
votes
1answer
37 views

Can we add conditiond in constructor?

I want to know, can we add conditional parameters in constructor. Just for example, in constructor if we have UINT for numberOfTimesAllowed = 1; EDIT I am trying to get balance of user msg.sender ...
2
votes
1answer
30 views

How to use enums for conditions on constructor?

I am learning to code with solidity. need help to solve this I have a membership system where users can have basic, gold, diamond membership types. Users can use coupons every 5 minutes and for basic ...
0
votes
3answers
25 views

How to check tokenBalance of some other contract in my contract

I am looking to check token balance of some other contract into my own contract to see how many tokens of that contract are owned by my user. Is this possible? If yes how to achieve it? I tried this ...
0
votes
1answer
51 views

How to use sendTransaction to send ERC20 tokens through Metamask?

I have a custom ERC20 token and I want to enable metamask support. By this I mean: 1) The user clicks a "Pay using metamask" button 2) The Metamask payment window pops up and with "Pay 100 ABC ...
0
votes
1answer
30 views

How to call a function from deployed contract to another contract?

I created a basic ERC20 token contract and deployed in rinkeby testnet and I got the contract address now I want to call transfer() function from this deployed contract to another contract without ...
0
votes
1answer
13 views

How can I interact with my deployed contract?

What is the simplest way of interacting with a Deployed contract, considering that I am the owner of the contract (Token Contract). I use Truffle/Solidity0.5.0/Open-Zeppelin/node10.15.0 nothing ...
0
votes
0answers
20 views

How to Issue /Mint / Generate additional tokens? Contract is mintable

I have Token on ropsten network (https://ropsten.etherscan.io/token/0x975FB1824F82E446DD3F5c4cb04474468ED7d878) which is Mintable with initial supply of 10B and Mintable Cap up to 50B. My ether ...
0
votes
0answers
32 views

ERC20 Crowdsale Contract Deployed - but Fails to Sell Tokens

I successfully deployed both an ERC20 Token as well as a Crowdsale Contract to the Ropsten Testnet. -I used code from OpenZeppelin's library for both contracts -While the deployments work and I'm ...
0
votes
0answers
31 views

Underflow attack, is it possible here?

Assume that you send X ERC20 SomeCoins and in exchange, you receive X/2 MyCoins. Both ERC20 have 4 decimals. My question is, if the user sends the minimum value or, a value that can't be divided by 2,...
1
vote
1answer
36 views

ERC20 Bytecode for Main net

I'm trying to Deploy my ERC20 contract in Ethereum main net, but I'm not sure about the bytecode. I have seen a lot of tutorials but nobody tell something about uploading on main net and bytecode ...
0
votes
0answers
24 views

Problems with sending ERC20 token

I have ETHSTEEM tokens in my MetaMask wallet (5.3.1) and when I tried to transfer them, 'fast' fee is over 1.3€, while for ETH transfer or AVINOC token it's around 0.01€. Even when I used this high ...
0
votes
1answer
24 views

ERC20 Contract - OpenZeppelin - total confusion

Trying to launch a simple ERC20 Token. I'm finding OpenZeppelin's extensive library - where every Contract seems to import about 4 other Contracts - to be both wonderfully well organized - but also ...
1
vote
2answers
27 views

ERC20 is it possible create them for private users?

I created my erc20 and i would like no one, except me and those people to whom I send them, to generate my tokens. Is it possible to generate all the tokens and send them to one wallet during the ...
1
vote
1answer
19 views

How to burn non burnable ERC20?

Suppose you received 250 HELLOCoins and you want to burn them. Unfortunately, HELLOCoins uses OpenZeppelin ERC20 which implements the following function: function _transfer(address from, address to,...
0
votes
0answers
29 views

How to use a transfer function from an EOA holding a token to a contract address?

I am using an ERC20 token which is used by a smart contact, EOAs also holds tokens How can I use the transfer function for transferring tokens from the EOA to a different Smart Contract address . ...
0
votes
1answer
88 views

Transfer ERC20 token from a smart-contract

I am facing an issue and I can't figure what's going wrong. It is a very simple scenario: A smart-contract, that implements ERC20 and ERC20Mintable from OpenZeppelin. pragma solidity ^0.5.0; ...
0
votes
2answers
30 views

Which ERC standard is suitable for an ICO token to have types?

There will be ICO with multiple cycles... Here, investors can purchase tokens and after a fixed window of 270 days, they can redeem it back. But within this window period, they can transfer tokens to ...
0
votes
0answers
15 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
1answer
15 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
15 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
3
votes
2answers
39 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?
2
votes
1answer
44 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
42 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
51 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
30 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
29 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
23 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
36 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
20 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 &...