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
10 views

I have a question on ZepKit

The ERC20 is implemented referring to the following article. https://blog.zeppelinos.org/getting-started-with-zepkit/ I confirmed Wallet.sol at the console of truffle. Why are the arguments of ...
0
votes
0answers
6 views

Execute `transferFrom` after executing `approve` on erc20

I can not withdraw from adress specified by approve. truffle(development)> erc20.approve("0x9e26730bf972d6ae8840b8f6003a61f57e25ff92", 1).then(b=>res=b) { tx: '...
0
votes
1answer
15 views

I have msg.sender issue

Lets suppose here are user A and smartcontract B and C(sort of regular dapp). A has no token but little ETH for gas, but B has enough tokens(Erc20). A send TX to B B send call to C C receive tokens ...
0
votes
1answer
17 views

How to differentiate a smart contract from a common wallet?

Having an Ethereum address, I need to check whether it is a wallet or a token (ERC-20 contract). How to check? (I need to implement it with Web3js.) Ideally, it should also reject contracts which ...
0
votes
1answer
29 views

Is this logic possible?

Lets suppose here are user A and smartcontract B and C. A has no token but little ETH for gas, but B has enough tokens(Erc20). A send TX to B B send delegatecall to C C receive tokens in B and give ...
0
votes
0answers
13 views

Is it possible user make use of tokens in certain smart contract? [on hold]

Lets suppose a certain smart contract and it has tokens(erc20) in its account. In this contract, transfer function is coded already. Is it possible user make use of tokens in this smart contract with ...
0
votes
0answers
11 views

If I deposit A-tokens to contract, then contract owns A-tokens?

If I deposit A-tokens(erc20) to smartcontract, then smartcontract owns A-tokens? If so, is it possible another user send TX to the smartcontract above to interact with another smartcontract with A-...
0
votes
0answers
13 views

Let's suppose here are 2 EOA(A and B) and 1 contract

Let's suppose here are 2 EOA(A and B) and 1 contract. A has no token, B has 10token(erc20). A approve B to spend 10token(do not consider gas) B execute 2 functions in turn following via contract in ...
0
votes
1answer
12 views

Can I have a listener to cryptocurrencies / tokens reaching a specific address?

Let's say that there is an address called 0x1 There is another address called 0x2 which just released a new token called ABA. Is there a way to constantly listen for 0x1 to see if it receives ABA ...
1
vote
1answer
17 views

Where can I find public and known ERC20-Contracts from existing ICOs

In order to list real live example code for ERC20-Token and Crowdsales at a talk about Smart Contracts I'm looking for such projects? Who can recommend me the real GOOD examples out there (and not ...
0
votes
0answers
20 views

Create an ERC20 Stablecoin

How to create a stable coin with an ERC20 token contract ? Does it require contract to be modified ? Are there some good practices or standards ?
0
votes
0answers
10 views

how do most of contracts sell service(or items) to user usually? [closed]

how most contract sell service to user usually? I think there could be 2 ways 1. user just tap buy button to call buy function in dapp contract then contract does itself 2. when user tap buy button, ...
1
vote
1answer
6 views

When I tap buy button in market how does wallet check my allowance instantly?

On CrytpoKitties, when I tap the buy button in a market, MetaMask comes up and shows if I can buy or not based on allowance instantly. How is this possible? Is it making query? Is it included in kitty'...
1
vote
1answer
11 views

can contract check mining of certain transaction in real time?

I want to make logic following A user send token to B(transaction #1) contract check in realtime whether transaction #1 is mined or not. If it is mined, contract goes to next step. How can I make ...
1
vote
1answer
6 views

Do dapps(contract) check allowance of buyer when he calls buy function?

When a buyer calls a buy function on dapp contract, some dapps check the buyer's allowance before transfer tokens(erc20). Is it usual?
0
votes
2answers
37 views

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

I'm new here and code with openzeppelin framework 2.2.0. There is no error occurred when compiling with solidity 0.5.8. But when I'm going to deploy the contract, I have no bytecode and cannot ...
0
votes
1answer
25 views

Smart contract architecture [closed]

I want to write the smart contract architecture for a new smart contract on Ethereum ERC20, how can I do that, and what does it mean smart contract architecture.
0
votes
1answer
21 views

can A call approve B to spend token though A have no tokens in his account?

can A call approve B to spend token though A have no tokens in his account? does function approve require to check balance of A?
0
votes
1answer
10 views

If i pay some service on certain dapp, does this tx can be reverted because of confirmation?

I paid and got service from dapp. does dapp wait until enough confirmation is settled? or not, is it possible that tx can be reverted?
0
votes
1answer
14 views

Can I make a ERC20 transer after receiving and before N confirmations?

Let's suppouse A user send tokens to B user. It may be hard to consider it to be confirmed yet. At this point B send the tokens received to another address. Could this transaction be successful? Is ...
0
votes
1answer
25 views

Ropsten Test Network

I have created a test token and deployed it on the ropsten test network. I have the full balance in my ether wallet. My question is how can I transfer this token to other wallets? How can I configure ...
1
vote
1answer
32 views

TX fails in private blockchain when trying to access an ERC20 contract from another contract

I have an ERC20 contract and I am trying to access it from another contract, which is a Faucet. In the Faucet I have a function to query an account's balance, and another one to transfer some tokens ...
1
vote
1answer
25 views

ERC20 token balance is always zero

I'm writing a pre-minted ERC20 token contract derived from openzeppelin-solidity like: pragma solidity >=0.4.24; import "../node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; ...
1
vote
0answers
21 views

ERC20 Token support for metamask website payment

I have the following code working in my site to accept ethereum payments in my website via metamask.... <!DOCTYPE html> <html> <head> <script src="https://cdnjs.cloudflare.com/...
1
vote
0answers
12 views

There were reports of certain countries that had issued their own cryptocurrency. What are they?

I've been reading that certain countries with sanctions has issued their own cryptocurrency on the Ethereum blockchain as ERC20 tokens. What are they and which countries? And are they on any exchanges?...
0
votes
0answers
8 views

Is it possible contract suggest certain User(EOA) to do some transaction? [closed]

I send a transaction to contract, then it tells(or suggest) certain user to do something like calling function in another contract. although, user may reject this suggestion, is it make sense in erc20?...
0
votes
1answer
15 views

Does ERC-20 balanceOf function cost no gas?

Given that this is a sample balanceOf function code: function balanceOf(address tokenOwner) public view returns (uint balance) { return balances[tokenOwner]; } and this function is view function,...
0
votes
1answer
9 views

linking the CoreContract and the ERC20 token contract

What is the standard way of making the link between our CoreContract and the ERC20Token contract used by the Core Contract? Are people used to use inheritance like: MyCoreContract is MyERC20Contract { ...
2
votes
2answers
27 views

USD Coin Balance Check By Web3

Now I am getting trouble on checking the USDC balance in my wallet address using web3. USDC is also said that it is ERC20 token, but when I checked the token contract ...
0
votes
1answer
18 views

Staking of coins

I have a question on staking of coins. Suppose there are 10000 tokens in a user wallet, and he wants to put 5000 tokens on staking for a certain time period (i.e That 5000 tokens should go to an ...
0
votes
1answer
22 views

Publish a ERC-20 based token in a private chain [closed]

What are the steps to follow if I want to publish a Togen generated token. Into a exchange platform. The goal is something realted to be able to buy my own token with real money, using a platform like ...
0
votes
1answer
34 views

Can't send ETH to ERC20 contract [closed]

I have ERC20 contract pragma solidity ^0.5.7; library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal ...
0
votes
1answer
10 views

Why contract owner balance 1Token instead of 1000000 in Metamask

I made contract ERC20 token MTCZx https://ropsten.etherscan.io/address/0xf9471198b6f9c364f41Ea66e9a3F8daA637Ee77C#code which can sell MTCZx tokens for ETH. When I deployed it I make query to ...
0
votes
1answer
20 views

Question regarding approval of the token

I am trying to make a smart contract where calling a function named transferERC20, you can deposit your erc20 tokens into the smart contract. Here is the code at the moment: pragma solidity ^0.5.0; ...
0
votes
1answer
18 views

Is it possible to give away ownership to another user regardless of dApp UI?

A user purchased service from certain dApp. Although the dApp does not support any function (or UI) to transfer service purchased between users, is it possible that user give it (ownership) away to ...
1
vote
1answer
32 views

Why transaction to ERC20 token smart contract causes error?

I pushed this contract https://ropsten.etherscan.io/address/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2#code I want to issue test ERC20 token. But when I try to send ETH to my contract I see error. ...
1
vote
2answers
36 views

How can we detect if tokens are transferred to our smart contract and avoid “allow”?

Imagine you have a smart contract that accepts all forms of ERC20s. You want users to call a function by which they will send you their ERC20s and in exchange receive a greeting. Technically we can ...
0
votes
1answer
28 views

I call buy function but another user pay token on behalf of me

Please help me make following process feasible situation: A user wants to buy service(or product) at certain dapp but A has no token(even ETH) in his account so asks B for paying on behalf of. B ...
1
vote
1answer
28 views

How does contract of dapp figure out who buyer is?

How does contract of dapp(eg. market place) figure out who buyer is? If buyer wants to purchase servive(or product) at certain dapp, he should transfer tokens to contract address of the dapp. At ...
1
vote
1answer
37 views

transfer ERC20 Tokens by web3

I'm a beginner of ethereum. I have seen some solutions. I can use sendRawTransaction to transfer costumed tokens from one account to another account. But my boss asked me to use ERC-20 "transfer" ...
0
votes
3answers
23 views

Is it possible to transfer ETH(not erc20) by approve+transferfrom?

Is it possible to transfer ETH(not erc20) by approve+transferfrom? Im so confused about it. Does ETH support itself all erc20 standard functions?
1
vote
2answers
33 views

Is it possible to make approve and transferfrom in single transaction?

I know that owner should call approve in advance then allowed spender call transferfrom to make transaction. We need two steps(tx). Iam curious is it possible to make it by single tx! single step.
0
votes
1answer
7 views

Setting ERC-20 token price

I'm currently trying to set the token price of my ERC-20 token.The problem I'm having is trying to set the price to ETH(0.01) per token, but the closest value I keep getting to is ETH(0.001) per token ...
2
votes
1answer
61 views

How to interact with ERC20 interface?

My target is to send from the ERC20Wrapper.sol deployed contract BAT tokens to my hard coded address. I've created ERC20 Interface: pragma solidity 0.4.18; interface ERC20 { function ...
0
votes
0answers
14 views

How do I send 0.1 tokens from the Parity client to another address using a custom gas price and CLI only?

How do I send 0.1 tokens from the Parity client to another address using a custom gas price and CLI only? Hi, I want to send 0.1 tokens from my Parity client running on Ubuntu to another address. I ...
0
votes
1answer
35 views

How to automatically pre generate thousands of ETH addresses for my app users

I'm building an app where every user will have app-generated ETH Wallet to do transactions with internal ERC20 Tokens. I would like to pre-generate wallets for my users, and assign every wallet upon ...
0
votes
1answer
27 views

Erc20 token smart contract fallback function is disabled, how can I enable it? [closed]

There is a payable fallback function available now on my smart contract, but I want to function it like if someone send 0.01 / 0.05 / 0.10 / 0.50 / 1 ETH and the contract will automatically send the ...
0
votes
1answer
39 views

DAPP WALLET transaction always fails

To improve my skills in solidity I'm working on a "wallet dapp". Based on smart contracts only, users can send ERC20 to another wallet. It works like that: user gives the following parameters: ...
1
vote
1answer
17 views

Is it possible to find a specific statistic for each token?

I'm trying to create some sort of statistic generator related to ERC20s. Let's assume you have 10,000 Token A. I would like to tell users something like: "better than 0.5% of the accounts". Basically ...
0
votes
0answers
29 views

Error for ERC20 transfer The constructor should be payable if you send value

I have two contract 1) ERC20 contract 2) ERC20 token registry contract which is invoking my token contract and making a transfer function call to the token But function call is ending up with an ...