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.

Filter by
Sorted by
Tagged with
1
vote
1answer
17 views

Use a token for two use cases

So I've created a token for my Dapp. I want to have users buy tokens to vote in my app and "elect" people. I also want to use them agin in a court like system. Essentially, I want token holders to be ...
0
votes
1answer
27 views

How to estimate gas in an address with no ETH at all

Say I have received an ERC20 token in my address. Such address has no ETH and no other tokens except the one I just received. If I try to estimate the gas cost of sending the token from that address, ...
0
votes
0answers
14 views

Reading all ERC20 token balances

I am aware that the ERC20 balance is easily obtained in web3js by calling token.methods.balanceOf(ADDRESS); However, I was wondering if there are any new developments or API that can now be used ...
0
votes
1answer
28 views

wallet of goods

I sell goods for tokens. And I would like to make a wallet of goods for each user. So that he sees the amount of each product that he bought. Can I realize this in solidity? For example: through ...
0
votes
1answer
24 views

How to use gas price for faster transaction in erc20 transafer event?

I'm trying to provide a customised gas price for faster transaction ,how can achieve that ? Web3j web3 = Web3j.build(new HttpService("http://")); ERC20 javaToken = ERC20.load(contractAddress,...
0
votes
2answers
15 views

pay for goods with tokens

I pay for goods with tokens. But after the first call to the function, tokens are not removed from the wallet. Please tell me why when I call the function for the first time, tokens are removed, but ...
0
votes
1answer
15 views

Smart contracts, tokens and ether

I am sending some ethers and tokens to my smart contract. So how will the contract differentiate between ethers and tokens? Code will be helpful
4
votes
3answers
117 views
+50

Is it possible to batch approve + transfer with CREATE2?

In our dapp, we currently have the following user flow: Approve the Sablier contract to spend up to x ERC20 tokens Transfer the x ERC20 tokens to the Sablier contract This is not horrible UX, but we'...
0
votes
0answers
23 views

ERC20 Implemented, mint not successful

The transaction shows up on my metamask account for minting but the balance of my new coin is zero. When I looked up the new coin, it was able to identify the token symbol and decimal. Why isn't the ...
0
votes
1answer
25 views

Receiving unknown token into smart contract [closed]

I was wondering if its possible to recognize one way or another a token that is sent to the smart contract, without token being previously registered? Cheers, Casper
1
vote
1answer
22 views

ERC20 coin transaction not successful

I called the mint function on a default coin to send some of my new coin to my METAMASK account but it looks like nothing was received. I can't tell what specifically could have gone wrong, so here's ...
0
votes
2answers
37 views

ERC20 and/or ERC721

Consider the following scenario. A person owns a asset called "A". Now the asset is very high valued and unique but you can allow other persons to own a certain part of that asset. EDIT: Ownership ...
0
votes
1answer
39 views

how to pay for goods with tokens ERC20 [closed]

my english is very bad.i am sorry. I found an example of an auction where you can pay with ethers. I would like to pay with ERC20 tokens. Please tell me how to do this in the placeBID () and ...
3
votes
1answer
41 views

Why Etherscan is reporting negative token balances?

I am wondering if its possible a holder to have negative balances as reported by Etherscan. Bellow are the links for the cases that I spotted: KICK token holder ...
0
votes
1answer
32 views

How to use erc20 transfer in another contract in remix ethereum using metamask?

I read a lot of documentation in here and another web pages, I have a question and I so tried to solved but nothing works for me. I am using this example. It works fine with truffle, but I don't ...
0
votes
0answers
16 views

Golang list unlocked accounts from node

Wondering how would I access an unlocked account on the node (private geth) in golang. The flow I'm looking for is: 1. user unlocks their account (using personal.unlockAccount for example) 2. my app ...
0
votes
2answers
27 views

ERC20 Mixer to transfer fund privatly

I am working on idea to mix erc20 token from one account to many account. i have seen many example but all example has some limitation. like you can mix fixed amount. Sender can mix one ...
0
votes
1answer
17 views

Getting revert error on transfer ether to wallet address

hi i m calculate the ether value with token price and quantity of tokens and than sending calculated ether value to seller account but i am getting revert error on remix at escrow.originatorAddress....
0
votes
1answer
25 views

Can I use other tokens in loom network (sidechains)? How does loom network handles it?

How to receive other tokens in the smart contract deployed in loom and keep it in escrow?, this is the code. pragma solidity ^0.5.0; //import ERC20 functionality ... contract Example { ...
0
votes
1answer
28 views

How i can exchange the erc20 with ether

i want to make crypto to crypto smart contract where i need to sell erc20 token and on buyer side i need to calculate the price which i have to send to seller and i have a price of token can you ...
0
votes
2answers
35 views

How to calculate the token price of already deployed ERC20 tokens

I am creating a smart contract, so inside that I have to pass the token in contract and the value of ether will be calculate on behalf of token price please help.
0
votes
1answer
26 views

send erc 20 tokens with full code example

I apologize for posting another question. Here I'm giving the full example code which is giving me the respond: "txHash undefined" when I try to send erc20. I want to fix this code. If you have even ...
0
votes
1answer
25 views

Truffle- how to deploy ERC20 on local, but not public network, without the error “X is an abstract contract or an interface and cannot be deployed”?

So, I have a contract, let's call it contract A, that needs to make call to the Dai contract (referred to as Cash). This contract already exists on Kovan, so in 2deploy_contracts.js I simply set its ...
0
votes
2answers
28 views

Could someone explain basic transferFrom functionality

It seems to me that the following ERC20 function does not check where the message comes from and allow anyone to transfer tokens between two addresses: function transferFrom (address _from, address ...
0
votes
0answers
18 views

custom ERC20 token balance does not show up on my own 0x exchange

I created my own 0x exchange according to the 0x Launch kit and the FAQ. I could add my newly created, custom ERC20 token to my 0x exchange, the token appears and I could even buy/sell them. The ...
0
votes
0answers
34 views

Transfer ERC20 (usdt) token between two addresses using web3.py

Here is my code: token_from = "0x0d0707963952f2fba59dd06f2b425ace40b492fe" token_to = "0x763015f098cf18cfa28baf25653955f271fb63ff" token_to_private_key = "0x0000000000000000000000000000000" ...
1
vote
1answer
29 views

Accept ERC20 tokens back to smart contract

I have created a smart contract (smart contract per invoice) now the contract is between seller and buyer but the money is provided to the smart contract is from the financier. Financier pays the ...
2
votes
1answer
24 views

How can I query an API to get my erc20 token balance of an address in JSON format?

Is there an api where I can query if an address contains an erc20 token? I need it returned in JSON format.
1
vote
2answers
81 views

why did this transaction fail?

I have a smart contract on Ropsten that I'm testing: 0x813870feba76f27ec1AfcF79432e065A4839F7AB Transaction has failed(reverted). What is the problem, because I don't see an error message ...
0
votes
1answer
40 views

ERC20 Token. My transfer function from my token does not work

When I call the function giveFifteenthTokens in my contract problem2_bank, it does not transfer tokens from msg.sender to recipient. Why? My Files: LoanToken.sol pragma solidity ^0.5.8; import "...
0
votes
1answer
13 views

Web3JS: How to Identify that a given transaction was send with either “ERC Token” or “Ether” in value

I'm working on a Smart Contract and it almost ready. To watch transactions I'm using web2js on my server and its working fine. But from a transaction detail how I get confirm that given transaction ...
-1
votes
1answer
67 views

How can I get USDT Test Token [closed]

Can Anyone guide me on how to get the tether(usdt) test token on ethereum in ropsten test network
0
votes
1answer
13 views

ERC20 decimals and gas costs

This question is twofold: The standard number of decimals for an ERC20 token is 18. If we lower this number, can we expect decreased gas costs when creating/transferring the token, since this should ...
1
vote
1answer
22 views

How to deploy more than one contract with Remix

I'm trying to deploy my contracts with Remix to Ropsten, but I don't know how to do it. Can you help me? (I have a ERC20 token contract, and a CrowdSale contract)
0
votes
1answer
14 views

Can I use approve/transferfrom function for ETH coin?

Can I use approve/transferfrom function for ETH coin? Please let me know how to apply approve/transferfrom to ETH as erc20 tokens. Thank you!
0
votes
1answer
13 views

A smart contract's storage problem , further ERC ?

Er .. I have a question about smart contract , a single smart contract's storage capacity Follow the answer is this question: Is there a (theoretical) limit for amount of data that a contract can ...
0
votes
1answer
25 views

Smart Contract overview ERC-20 instead of ERC-721

I have created ERC-721 standard but on etherscan (Ropsten) it's still showing ERC-20 standard in overview Below are my contract code, please share your thought if I'm doing something wrong. contract ...
0
votes
0answers
24 views

Collection of erc20 tokens from multiple addresses

I have main address: const fromAddress There is also an array of addresses and their keys: foreth / keys I need to send all tokens from the addresses of the foreth array to the main address ...
0
votes
1answer
20 views

Automate token distribution?

How can I execute a function on a smart contract from a web-app backend? (Laravel / PHP) My smart contracts holds X tokens. In my MySQL database, users are owed X tokens. I have their wallet ...
1
vote
1answer
27 views

Is this flow possible?

There are three EOAs: A, B, and C. B has no token. TX1: A call approve B for 100 token. TX2: B call transferFrom for 100 token from A to B. TX3: B call transfer 100 token to C. If these three ...
1
vote
1answer
23 views

Are there any risks of undefined behavior when calling a function which doesn't return anything using a prototype of it which returns bool?

According to the ERC-20 Token Standard, functions transfer and transferFrom should return a boolean value indicating success or failure: interface IERC20Token { function transfer(address _to, ...
2
votes
1answer
36 views

Unique identification of transfers

https://github.com/ethereum/go-ethereum/blob/master/core/types/log.go#L40 // Derived fields. These fields are filled in by the node // but not secured by consensus. ... // index of the log in the ...
0
votes
0answers
27 views

How to get BNB ERC-20 address from Binance API?

I was going trying to use the binance API for getting the token address for the BNB ERC-20 token. But using just BNB as the asset name returns the Binance Chain address for the BNB token. I have ...
1
vote
1answer
31 views

can a smart contract autonomously hold erc20 tokens or ETH?

I want to make a simple smart contract, but I don't know if smart contracts are capable of what I desire. Please tell me if they are: a user can send ETH (or any ERC20 token) to the smart contract ...
0
votes
1answer
26 views

How to handle an ERC20 token which does not return true/false at the end of transfer/transferFrom

The ERC20 Token Standard dictates that functions transfer and transferFrom should return true for success and false for failure. However, various ERC20 tokens deployed on the network have not ...
0
votes
1answer
33 views

I am using already deployed tokens in my contract

My question is if I'm not implementing ERC-20 methods in my contract, but I'm using already deployed ERC-20 contract methods in my contract, so can we say this will be ERC-20 compliant contract? ...
1
vote
0answers
25 views

How to recieve notification of incoming transaction in metamask mobile in real time

I have a erc-20 token in the ropsten testnet and i am using my metamask for admin my token, and i just want to recieve a notification via sms, to take screenshot, whatsapp or another way frendly user, ...
1
vote
1answer
51 views

msg.sender problem for calling ERC20 token contract from another contract returns contract address

when i am going to call approve function of erc20 contract.log prints tokenOwner and tokenSpender address same which is contract address msg.sender returns contract address. but i want tokenWner = ...
1
vote
0answers
32 views

Web3.py transfer call failing, not sure why

I am trying to learn how to work with ethereum and ERC20 tokens. I have managed to setup ganache and deploy my contract. I can see it on ganache and I can connect and read the balance of the token on ...
2
votes
2answers
56 views

Calling function on ERC20 contract through staticcall gives wrong result

I've made two functions to interact with a local ERC20 token. Here they are: pragma solidity ^0.5.0; contract GardenTestContract { function getBalanceOf(address _address) public view returns (...

1 2 3 4 5 23