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
0answers
6 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
13 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
12 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 = "...
0
votes
2answers
21 views

How can I add mint and burn function to my erc20 contract code? [on hold]

How can I add mint and burn function to my erc20 contract code? This code is working properly but I couldn't add mint and burn function that work. Is there anyone who will help me about fixing this ...
0
votes
1answer
24 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
25 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
41 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
25 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
1answer
26 views

How can I Buy or Sell erc20 token with using web3.js? [on hold]

Which function will I use in web3.js for buying erc20 token from my website?
0
votes
0answers
27 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
22 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
13 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
23 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
14 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
39 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
24 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) { ...
4
votes
2answers
126 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
33 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
95 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
49 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
14 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
26 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
15 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
16 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
56 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
52 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 ...
1
vote
2answers
32 views

ERC20 not recognized by TokenTracker

I have deployed ERC20 with reference to // File: openzeppelin- zos/contracts/token/ERC20/DetailedMintableToken.sol I called the initialized function with owner, name, symbol and decimal value. ...
0
votes
1answer
23 views

Geth + Web3 | web3.eth.getAccounts() returns undefined

I have follow this SO answer for sending ERC20 tokens from 1 address to another. I am running into an issue where I am receiving an error that my from address is invalid Error: Error: ...
0
votes
1answer
28 views

Has ERC20 mining been disrupted?

Do you know why a single address of type contract is mining 38% of 0xbtc? Does it mean that a single person has find a way to mine as much 0xbtc as a whole mining pool? Plus how come a contract is ...
0
votes
1answer
36 views

Gas estimation errored using ERC20 in REMIX

I'm trying to test making some smart-contract that uses DAI ERC20 tokens on Kovan testnet (DAI contract on kovan is 0xc4375b7de8af5a38a93548eb8453a498222c4ff2). I developed this very simple contract ...
0
votes
1answer
24 views

Web3 balance is showing OmiseGo balance but not Bitball

You can see on Etherscan that I have 2 types of tokens in my wallet: https://etherscan.io/address/0xb8fd65fc6919c5b97453eaba6b895144597985b2#tokentxns 2.3 OmiseGo and 10,000 Bitball I have a short ...
1
vote
0answers
46 views

Cannot execute contract in non-intaractive scripts

I want to deploy and to execute ERC-20 contract on geth with non-interactive scripts. But, it seems that non-interactive scripts and console shows different results. Enviroment ubuntu 18.04(docker ...
0
votes
1answer
26 views

I accidentally sent a token to a token contract. Can I get it back? $MWAT [closed]

community! Instead of transferring my ERC20 token $MWAT (RED PLATFORM) to my wallet, I accidentally sent it to the contract itself https://etherscan.io/tx/...
0
votes
1answer
102 views

How to use DAI in my contract

I'm familiar with smart contracts development. Although, every time I developed something, I used traditional ether. For the sake of simplicity, let's assume this contract. pragma solidity ^0.5.0; ...
0
votes
1answer
35 views

How can I freeze an erc20 token in another holder's wallet

Token was compromised and some portions went to a wrong hand, now owners of token wants to freeze that wallet holding it, is there any way to do this.
0
votes
0answers
27 views

ERC20 is not working after deploy

I've deployed an ERC20 like this: const fs = require("fs"); const Web3 = require('web3'); const testnet = 'http://localhost:8545'; const PrivateKeyProvider = require("truffle-privatekey-provider"); ...
0
votes
0answers
24 views

How to detect ERC20 token amount sent in the incoming transaction?

Using python's web3 is there some method to detect how many tokens were sent? I.e. detect how many ERC20 USDT tokens were sent to my account address?
0
votes
2answers
59 views

web3, nodejs - How to put decimals values ​into the toBn function

I want the amount of tokens to be a decimal number. but i heard that toBn is not supported decimals number. When I put in a decimal number, I faced the following error: while converting number 0.15 ...
1
vote
1answer
29 views

Apparently some people send transactions with zero gas and positive gas limit, how do they do this? (and I am NOT planning to this but how)

Have a look at this transaction for example: https://etherscan.io/tx/0x11d96986d36240a5e5e7eab78879aa841631705370e707f15f1488a0b9d6704a 0 gas, 0 ether but plenty of tokens transferred. Obviously the ...
0
votes
1answer
42 views

ERC20.balanceOf changes output without any Transfer events occurred

Here is a use case, There is an interest generating ERC20, where each address may have increasing balances for each blocks from earning interest. Usually, one would need to send a non-standard ...
0
votes
1answer
34 views

Is it possible to send erc20 token when I have 0$ ether but $1000 in the token? [duplicate]

Long story short I have $1000 in one erc20 token contract but 0$ in ETH. Can I at least transfer these $1000 from the token to another address without ethereum asking for gas? That is: just change ...
2
votes
1answer
27 views

Return values after verifying an account balance on private network

When i verify the balance of an account after deploing an ERC20 token, i receive this returns: BN { negative: 0, words: [ 50, <1 empty item> ], length: 1, red: null } I know that "50" is the ...
0
votes
0answers
20 views

ERC1410 Security Token

I am searching for an ERC1410 security token contract source code (must be tested) to implement in another contract, there is a github repo available but it is written in the beginning that the code ...
1
vote
1answer
46 views

Etherscan api for Ropsten testnet

I found this endpoint is to obtain the token balance from Ethereum blockchain, however, I noticed that this function doesn't work on Rospten network. Please advise https://api.etherscan.io/api?module=...
0
votes
1answer
49 views

Is cDAI lost forever if it sent to a DAI address on an exchange?

I accidentally deposited cDAI to my coinbase DAI wallet. Is this lost forever? Info - Transaction hash: 0x9fc0cbfeef6d7de1692272b6312d9711b1685641d793ffb48e94229991a6d936 From: ...
1
vote
1answer
37 views

Fallback function fails when ethers sent from metamask

This is my code snippet for fallback function, If I use it by explicity using "fallback" function on Remix, then equivalent no of tokens do come in my wallet but if I send ethers via metamask directly ...
1
vote
1answer
78 views

How can I collect the tokens inside smart contract that people will send accidentally?

I have an ERC20 token XYZ smart contract created. People will send certain amount of tokens back to the contract address to initiate certain functions. I just want to know that what will happen if ...
0
votes
1answer
27 views

ERC20 transfer showing as 0 but log shows different

Checking the transaction https://www.etherchain.org/tx/e12af4940879c634a63d2c9629449695e07650a4e419e5822ddb18d8469e9948 anyone can check there were 3 DigixGold token transfers. These transfers are ...