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
0
votes
0answers
17 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
15 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
14 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
28 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? ...
0
votes
0answers
17 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, ...
0
votes
1answer
38 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 = ...
0
votes
0answers
18 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
41 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 (...
0
votes
1answer
23 views

Do I need ETH in my exchange account to send out ERC-20 tokens to an external wallet?

I'm new into ERC-20 tokens. Let's say I buy an ERC-20 token in an exchange with USD. When I want to transfer that token to my own external wallet (say Nano S), do I need some ETH in the exchange (...
0
votes
1answer
29 views

ERC20 vulnerability? Executing transferFrom undesirably

Say I have a contract called MyContract, and I require to send 100000 DAI to it. Ideally, I'd firstly call approve(<address of A>, 100000e18) in DAI's contract itself. Secondly, I'd execute, for ...
0
votes
1answer
34 views

How can i make a simple chartjs chart with ethereum contract address

i would like to have a chart on my site that prints the last price of a certain erc20 token i have seen a widget from ethplorer but i rather build my own chart but i cant find any documentation for ...
0
votes
1answer
44 views

Need help: Error: Transaction has been reverted by the EVM:

Could anyone point me at what is the problem here? I tried to send ERC20 tokens by using ERC20 trasferFrom function. I have executed a sendSignedTransaction and got an error as follows: Error: ...
-1
votes
1answer
38 views

How to build ERC20 based stablecoin?

I want to build stablecoin for my college project. I am thinking of developing ERC20 token pegged with fiat currency. Can someone please suggest me best tutorials/guides to build stablecoin on ERC20?
0
votes
1answer
23 views

truffle test - does not Assert (Erc20, Solidity)

I am probably doing something wrong but can't see what exactly. Code: pragma solidity ^0.5.8; import "truffle/Assert.sol"; contract TestABC { function totalSupplyTest() public { bool a ...
0
votes
1answer
23 views

What's the difference between the typical ERC20 Transfer(from, to, value) and the same but with bytes, e.q.: Trasnfer(from, to, value, msg.data)?

Better question: Can I send the bytes to a function that lacks this definition? In other words, say I have: event Transfer(address,address,uint256, bytes); And then: function transfer(msg....
-1
votes
1answer
46 views

Unable to test a smart contract on ropsten test network

I launch and verify an ERC20 based smart contract on a ropsten test network which allows user to interact with the contract (send eth to it and the contract automatically send token in returns as in ...
0
votes
0answers
22 views

SendSignedTransaction is not sending tokens

I tried to use sendSignedTransaction function, it signed and sent the transaction successfully(i think), but it's not transferring tokens as it ought to. It's basically not doing the intended task 😔 ...
0
votes
0answers
17 views

How can i send transaction with the another “From” address

I have created two test tokens and a contract. But when i call transferFrom function with web3 (i called approve function first), it is successful when the from address is the account that deployed it ...
0
votes
1answer
70 views

Web3js - Internal Transaction Data (Event Logs): Token Transfers, Contract Creations, & Internal ETH Transfers

I'm currently recording transaction data via Web3js, while directly connected to a local Geth full archive node via IPC, and I was wondering if there was a more elegant way to record internal ...
1
vote
1answer
65 views

Web3js & Web3.py ERC20 Name, Symbol, & Decimals call(): Results in Web3.exceptions & OverflowError for Some But Not All Existing Contracts

I'm building simple Javascript & Python 3 scripts using the Web3 module to output ERC20 token names, symbols, and decimals from any given contract address. The standard ERC20_ABI json file was ...
0
votes
1answer
43 views

Payable external function call not updating state variables

I'm trying to get buyToken() to update the balance of the caller. I'm using Truffle and Ganache, running tests, but the testBuyToken() function keeps failing, apparently the BALANCES variable isn't ...
0
votes
1answer
43 views

Service for selling ERC20 Token directly for fiat?

So currently our ERC20 token is trading on several DEX's. There is quite some volume but some potentially interested people have given us feedback on the process being a little bit too much for them. (...
0
votes
2answers
46 views

Super simple token with Open Zeppelin

I want to create a super simple token for my community. I read some tutorials and I found this code: pragma solidity ^0.5.2; import "./lib/oz/contracts/token/ERC20/ERC20Pausable.sol"; import "./lib/...
-1
votes
1answer
59 views

How many projects are there which implement ERC1155 standard?

New ERC1155 standard which is thought to be an improved version of ERC721 and ERC20. But I see many projects still prefer ERC20 or ERC721 standards. If so, do you know any projects implementing ...
1
vote
0answers
10 views

Offchain voting

Are there any voting based approaches where voting would happen off chain, via signed messages, but then the result could be indepedently verified or even stored on chain? Voting rights are based on ...
0
votes
0answers
19 views

Trying to send ERC20 token with Javascript button without success

I am trying to send an ERC20 token with the following code via web3.js. It was working until a week ago and then it stopped. Am I doing something wrong? Upon clicking it no longer interacts with ...
0
votes
1answer
19 views

Why is my code calculating incorrectly, it feels right to me?

Why does this keep returning 0? And yes, it is above the claimtime. It does it for every address. I don't know what's wrong? function ViewDividendOwed(address _addr) public view returns (uint256) { ...
0
votes
1answer
18 views

Tokens are not being transferred with web3js

i have been using following code for transferring tokens from wallet to another with the use of web3js. async Transfer(eth_address, amount){ let tokenAddress = "...
-1
votes
1answer
29 views

Can we send tokens with data input? [duplicate]

Can we send tokens with data input? I did a bit of research on erc20 but maybe this is quite complicated. Will erc 721 do this?
1
vote
0answers
43 views

How to get DAI using Web3.js

I'm building a Web3 app and I'm trying it out on the Kovan testnet. I'm trying to get some DAI. As far as I understand it the way to get DAI is to: Exchange ETH for WETH. Use Sai Tub contract to open ...
1
vote
2answers
48 views

Advantages of using Tokens?

Why should I use a (ERC 20) Token instead of just using Ether? What advatages does it have, besides making money out of nothing?
0
votes
0answers
11 views

Custom modfier in erc20 transfer [duplicate]

Is it possible to add a custom parameter in the erc20 transfer function without breaking the erc20 standard? What I want to do is have off-chain whitelist base on the signatures, I would like users ...
0
votes
1answer
33 views

How to set different signer and gas payer for a single transaction

I am trying to make a transaction of DAI tokens from user wallet 0xDAIUserWallet to some random token contract say 0xRandomContractAddress. In this scenario I am using the private key of DAI User to ...
0
votes
0answers
29 views

How to transfer ERC20 token from one account to another account but paying the transaction fee from third account?

I want to transfer token from account A to account B by paying transaction fee from account C.I have tried the following logic but token transfer from contract to contract mean contract transfer token ...
0
votes
0answers
24 views

How to build an ethereum based wallet with custom UI?

I have been interested in ethereum for quite some time now and have always wanted to learn ethereum development. I decided to create my custom erc20 tokens i was able to create 2,00,000 tokens. Now i ...
0
votes
1answer
17 views

JSON-RPC: TheDao contract returning not null values for not existing methods in the contract

When using the geth JSON-RPC eth_call to retrieve some ERC20 token contracts symbol and name information, it comes up the case of TheDao contract. I was expecting to receive a null/empty string like ...
0
votes
1answer
28 views

Can I put a lock on an already issued erc20 token?

Can I put a lock on an already issued erc20 token? I have issued a fixed erc20 and I want to know if it is possible to apply locku to smart contracts.
0
votes
0answers
16 views

How can link metamask wallet to create Android and web wallet for ERC20 token

I studied Solidity and Web3.js .I still need to know how can use metamask wallet that use in chrome extension to create as a mobile wallet and web wallet for client side.
0
votes
1answer
70 views

erc20 token swap contract example needed

is there a contract example which allows to exchange one erc20 for another? i have 2 tokens i want to exchange from tokenA to tokenB 1:1 and keep 1% as a fee the sender should just make a normal ...
0
votes
1answer
40 views

ERC20 Token transfer fails

I'm struggling with transferring my own ERC20 Token. I got following code: contract AccountingToken is ERC20, ERC20Detailed { constructor () public ERC20Detailed("AccountingToken", "MAC", 18) { ...
5
votes
2answers
169 views

Common Gas Wallet for ERC20 Wallets?

We have a wallet structure where users send tokens to individual user wallet addresses generated for them, we then sweep all the funds in the user's wallets to a centralized pool. The individual ...
0
votes
1answer
40 views

Detect failed token transfer via RPC

It seems like Etherscan can detect failed token transfer even though the transaction itself is successful and the gas isn't used completely. Like in this transfer of Huobi Tokens Is there a way to ...
0
votes
0answers
96 views

Remix never returns a transaction - but everything works - why?

This code supposedly works. Its supposed to let the owner withdrawal collected ERC20 tokens in a contract. It calls the balanceOf() for the erc20, then calls transfer(). Only have this error when ...
0
votes
3answers
69 views

Publish and verify the source contract code in Ethscan. I tried it but it keeps failing. Can anyone help me?

this is the token: MovieMarketCoin https://etherscan.io/token/0xa0005edc8897fe1f9e2705a1682431497a504657 Source code is here: https://github.com/Gh4Algebra/MovieMarketCoin I followed other answers ...
0
votes
0answers
16 views

Which one is more secure and easier to mange among eth.accounts.create, personal.newAccount & eth.accounts.wallet.add

Here are what I knew about them: eth.accounts.create: Generate an address and private key for transaction but did not stored in anywhere. personal.newAccount: Create an account under node, so that ...
0
votes
1answer
31 views

Are there any good ways to express conditional ownership on ERC20 or ERC721 tokens?

I'm currently looking for any good ways to express conditional ownership on tokens. I look into approve function of both ERC20/ERC721 but, it seems that function may be disapproved by the owner and ...
0
votes
1answer
17 views

How to get initial balances for all those who bought tokens?

Is it possible to get the initial balances for all those accounts who bought ERC20 tokens? If that’s possible, how that can be achieved? I’m wondering if there is any way of getting that information ...
0
votes
1answer
17 views

What can you change and adapt when you create an Erc 20 token?

I saw this list of things that can be modified for your token. I can't find it but it listed all the different uses and things that can be changed about your token such as the max supply etc.
0
votes
3answers
79 views

Can we add custom data in ERC20 token?

Is there any way that we can add hex data in ERC20 transaction? Let s say we want to keep track of why we send the token and other detailed information. How can we achieve that?
0
votes
1answer
69 views

Contract Fallback function with ERC20

I see the fallback function of a contract as a way of "depositing" an Ether value to the contract. My question is very simple I guess, but I couldn't find the answer yet. Is it possible to develop a ...