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
6
votes
1 answer

Can we deploy same ERC20-token on different blockchains?

I want to deploy my own ERC-20 token on different blockchains, so is there any possibility to deploy the same token contract on different blockchains. If we do that we can't give the same name and symbol for three blockchains. can anybody tell me…
6
votes
8 answers

Unhandled Rejection (Error): call revert exception

I am getting this error message when trying to interact with my smart contract on my react front end. I am running localhost3000 and which requires metamask to sign in. Unhandled Rejection (Error): call revert exception (method="symbol()",…
Luke
  • 83
  • 1
  • 1
  • 5
6
votes
1 answer

ERC20 Tokens Transferred Information from Transaction Hash

EtherScan provides a API for transaction details It's part of Geth/Parity Proxy APIs by name eth_getTransactionByHash, But I am unable to get information what ERC20 token was transferred and how many. I need Token Details and Number of token…
Mangesh
  • 2,257
  • 4
  • 24
  • 51
5
votes
2 answers

Uniswap: How to read token price with API

In my PHP code (or Javascript) I would like to read erc20 (Ethereum) token price from Uniswap - it is trading there. I cannot find any API call to return me the price. I am looking to get price for this token: VIRGIN TOKEN:…
Tioman Island
  • 91
  • 1
  • 1
  • 5
5
votes
1 answer

How can I Buy or Sell erc20 token with using web3.js?

Which function will I use in web3.js for buying erc20 token from my website?
5
votes
1 answer

how to fix "insufficient funds for gas * price + value"?

windows 10 Home x64 bignumber.js@^7.2.1 openzeppelin-solidity@1.10.0 react@16.4.1 react-dom@16.4.1 truffle@4.1.13 web3@1.0.0-beta.34 Full version reference: https://github.com/tooploox/ethereum-ico-examples/blob/master/package.json I have done a…
user9460187
4
votes
1 answer

Sending ERC-20 tokens fails. Transaction succeeds, but no tokens are sent

When I run the following code, it accurately gets the token balance for both addresses and the transaction even goes through (I can see it on the testnet), although no tokens are sent. I've tried a variety of things including replacing the signed…
snollygolly
  • 1,858
  • 2
  • 17
  • 31
4
votes
1 answer

Fetch proper execution price from Uniswap V2

I'm trying to undertand Uniswap v2 SDK. I've written simple function, to fetch result of trading: 1 WETH for Dai 1 DAI for WETH My question is, why the first trade result is really accurate with what Uniswap Interface is returning, but the second…
Karzel
  • 928
  • 9
  • 24
4
votes
3 answers

How to differentiate buying and selling erc-20 tokens on uniswap in token contract

Is there a way to check which direction is transfer() of erc-20 token if someone is selling or buying our tokens for eth (i mean uniswap for example)?
kasper
  • 161
  • 1
  • 3
  • 14
4
votes
1 answer

How to sign a erc20 token transaction using web3j java

I want to transfer erc20 tokens from one account to another. I know that I can use transfer or transferFrom function of smart contract wrapper class. But in my case, erc20 token transaction is needed to be signed at client side. And there is no way…
Jayendra Singh
  • 147
  • 2
  • 10
4
votes
2 answers

Transfer ERC20 token from one account to another using PHP

This issue has caused a good pain among PHP developers to figure out a way to work with ERC20 contracts/token, i.e. perform certain actions like retrieving contract’s basic constants/information (e.g. name, symbol, decimals, totalSupply), checking…
Furqan Siddiqui
  • 401
  • 3
  • 7
4
votes
1 answer

Right way to get ethereum ERC-20 tokens information

Can somebody tell me the right way to get info (decimals count, name and symbol) of the ERC-20 token from the Ethereum blockchain? I supposed that it could be done through the calls of the appropriate functions decimals(), name(), symbol() to the…
Alsofter
  • 63
  • 2
  • 5
4
votes
1 answer

Failing to send an ERC20 token using web3.js

I've been struggling to send a token transaction using web3 still after I've read several posts and guides. I'm using human-standard-token-abi to get the ERC20 abi. I'm just trying to transfer 10 ZRX from one address of mine to another. Here's the…
jawknee530
  • 319
  • 4
  • 12
3
votes
3 answers

Calculate ERC20 token buy/sell tax

I am trying to implement a method for calculating token buy/sell tax. The one that devs implement it in the transfer() function. I've done some research and there are 2 options. eth_call - simulate a swap, calculate the difference deploy the ERC20…
kakakakakakakk
  • 467
  • 10
  • 31
3
votes
1 answer

erc20 claim token transfer function doesn't work

I have this contract and trying to call the claimFreeToken function. Contract already doesn't have enough tokens but the function doesn't return an error and also token doesn't receive. Where did I overlook it? // SPDX-License-Identifier: MIT pragma…
1
2
3
30 31