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
0 answers
7 views

moving ERC20 tokens from www.coinme.com wallet [closed]

I recently started using Ethereum, switching from bitcoin. i mainly use it for gambling at online casinos.With bitcoin it was a reletively easy process to buy the bitcoin from an atm, then have it ...
0 votes
2 answers
915 views

Message Signing using MyCrypto and MyEtherWallet

I am trying to update my Token information and it is asking me to sign the message using either MyCrypto and MyEther Wallet and proceed. Unfortunately tried both and both of them are not creating ...
0 votes
1 answer
29 views

Bridge of tokens to L2?

I am developing erc20 tokens and Dapps. If we can issue tokens to ethereum and when they are moved (e.g. when we move tokens according to Dapps rules) we can use polygonZkEVM or optimism with high ...
0 votes
2 answers
1k views

Help on transferFrom and Approve functions

We have a token contract A and an Escrow contract B. While transferring token from an address to contract B we are using transferFrom function which overridden from contract A. But in need to do the ...
1 vote
2 answers
844 views

Initial ERC20 Token supply split into 2 or more hardcoded addresses

don't know if someone can help me, but let me explain my problem. For more transparency in my ERC20 token generation smart contract, I want to hardcode the Team Pool (0xA) and Crowdfunding Pool (0xB) ...
0 votes
1 answer
631 views

ERC20: insufficient allowance error after using approve function while testing Vesting Vault fund function [Brownie]

I made a vesting vault with one beneficiary set on construction and a one time fund function which can be only called by the owner. The fund function funds the contract with ERC-20 tokens and sets an ...
1 vote
1 answer
31 views

Ethereum transactions: how decode already decoded input data?

Here is transaction https://etherscan.io/tx/0x1a70dafba58e5cbc10adecb18e2489613b298a4aab0ecb2cbbbfd2ba184cdc39 It makes Swap 0.095 ETH for 1,125.066 VDO on Uniswap V2. If to scroll down, press More ...
0 votes
1 answer
317 views

How to deploy string variable of solidly code in hardhat

In order to deploy a contract, we fetch the smart contract file with hardhat and then deploy it: const Token = await ethers.getContractFactory("Token"); const hardhatToken = await Token....
0 votes
0 answers
7 views

Betting tokens against each other

Is it possible to create 40 erc20 tokens that share the same liquidity and go up and down based on the other 39 tokens? Example: One buys token A and Token B, C amd D go down. Kind of like betting or ...
1 vote
1 answer
721 views

Error Transaction revert / no balance but Balance is there

contract MyToken is ERC20 { constructor () ERC20("StableToken", "STBL") public { // Mint 100 tokens to msg.sender // Similar to how /...
0 votes
0 answers
8 views

Can I use safeTransfer from OpenZeppelin to send ETH along with ERC20 token?

My contract holds tokenA + ETH. Right now I pay users this way: tokenAcontract.safeTransfer(wallet, amountTokenA); // tokenA Address.sendValue(wallet, amountETH); // ETH Can I do it in one single ...
2 votes
1 answer
540 views

Transfer ERC20 token in mainnet with web3js(succeed in ropsten, failed in mainnet)

I want to transfer some ERC20 tokens in ethereum. I did some preparation work and tried in ropsten, it succeed. Then I changed the used api, wallet address, httpProvicer, contract address, and ran the ...
1 vote
0 answers
20 views

In what ways can abstract contracts or interfaces be used? [duplicate]

I'm currently learning solidity with an udemy course: https://www.udemy.com/course/blockchain-developer/ and the contents of it are also published here: https://ethereum-blockchain-developer.com/000-...
0 votes
1 answer
495 views

For loop for transferFrom

transferFrom method from ERC20 contract interface: function transferFrom(address _from, address _to, uint _value) public; transferFrom function from my contract : function transferFrom(address ...
0 votes
1 answer
307 views

Token holders not showing on mainnet

I got a problem which i can’t understand the reason. Made a erc20 token, and deployed on testnet Here everything goes fine and work as expected, But when i deployed it on mainnet, the block explorer ...
0 votes
1 answer
1k views

Database column type (postgres) for storing erc20 token balances the correct way

I have an app that is pulling all erc20 tokens for each address. Now I want to store these values already calculated to the right amount into my postgres db. Right now, I am using the column type of ...
0 votes
2 answers
498 views

Using Gnosis safe as a multisig owner to ERC20 token contract

I launched a wallet and created a safe on the safe website with 3 owners and 2/3 threshold. Now i have an erc20 token contract which is ownable. I have some functions in erc20 token contract which are ...
1 vote
1 answer
482 views

Multiple timelocks on wallets in contract

I am developing an ERC20 token which needs to have a timelock on a certain wallet that unlocks a certain amount of tokens every month. I am currently using the openzeppelin function: function ...
1 vote
1 answer
166 views

Old ERC-20 TRX Tokens Swap Issue

I tried the instructions given here to swap my old (pre-2018 swap) TRX tokens based on the Ethereum network to the MainNet ones. I sent the tokens to the smart contract address mentioned in the ...
0 votes
1 answer
515 views

Tracking all ERC20 token transfers without using the event logs

I'm currently using the geth implementation. The problem is currently I am tracking erc20 token transfers using purely the erc20 contract event logs and filtering for Transfer event, then saving that ...
1 vote
1 answer
2k views

ERC20 tokens transactions' history from Ethereum node

I have a parity node. I developed a web3.js interface on top of it. I have APIs whose job is to fetch addresses' balances and transactions. Example response of transaction API: { tx_hash: '...
0 votes
1 answer
613 views

Calling a function unsing Web3 - External or Public

I have this function in the smart contract: function _mint(address account, uint256 amount) external onlyOwner { require(account != address(0), "ERC20: mint to the zero address"); ...
1 vote
1 answer
12 views

How to scrape txn fee data from etherscan.io?

I have a long list of TxID's, how can I scrape "txn fee" from every transaction (how much they have paid on chain) without looking at any transaction manually? For an ERC20 token transfers.
0 votes
2 answers
319 views

Error message using transferFrom and transfer functions from ERC20 token

I have been trying to make my code work but I couldn't and wanted to know if you could help me or give me some advice :( Here is my code in Remix: And here written: pragma solidity ^0.8.18; import &...
0 votes
1 answer
395 views

revert SafeERC20: low-level call failed

SIO2 is aave v2 foked version on Astar chain. I want to execute flash loan on it and have the following code: function myFlashLoanCall() public returns (bool){ address receiverAddress = ...
1 vote
1 answer
24 views

I have 1000 BUSD and some BNB stuck in an ERC-20 contract

I know its probably not possible, but I figured I'll ask here, since I cant figure it out myself. Would anyone by any chance, know if its possible to retrieve the funds that are stuck? Link to ...
0 votes
2 answers
11k views

How can I transfer usdt if I do not have eth on account?

Is there any way I can transfer the usdt if I do not have any eth on my account? Actually I want to develop a payment gateway and give each customer an address to pay usdt, Once the payment done, the ...
0 votes
1 answer
1k views

How to handle transferring ERC20 tokens (such as USDT) with delegation to pay the gas fees on behalf of users?

I am working on creating wallets and generating addresses to be provided to a number of users. I am wondering how can I enable them to transfer their ERC20 tokens(such as USDT) without having any Eth ...
0 votes
2 answers
416 views

Transfer existing ERC-20 to BSC

We have an existing running ERC-20 token on main net whith around 200 holders . We would like to move to Binance smart chain or TRON blockcchain as it offers high throuhput and lower tx fees. How ...
2 votes
0 answers
22 views

1inch spot price aggregator fails for some historic blocks but not others

I am trying to price arbitrary ERC-20 tokens at past blocks, and it turns out this is a challenging problem. Currently, I query the Uniswap v3 subgraph at a past block, but this doesn't always return ...
0 votes
2 answers
996 views

Truffle Test AssertionError: error message must contain revert

I can't figure out why this error occurs Here my test js code: var YarockToken = artifacts.require("./YarockToken.sol"); contract('YarockToken', function(accounts) { var tokenInstance; ...
0 votes
1 answer
679 views

How ERC20 Token balance are recovered during Ethereum chain rolling-back

My Answer: Ok, the problem is really with Ganache ... If I use geth, everything is alright. ... ... sorry for your time ... ---------------- The Original Question -------------------- My ...
1 vote
1 answer
420 views

What does this balanceOf function do?

function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } Does the ...
1 vote
1 answer
883 views

How to add a donation function in a smart contract

How would I add a donation function to this type of smart contract https://etherscan.io/address/0x39E5BD6AE0f2aA9240D2ae7fBF49e36F05dd339F#code Basically, what I would like to do is have a small fee ...
1 vote
2 answers
2k views

Ethersjs - get ERC20 contract decimals

I have the following: import { ethers } from "ethers"; import { ws } from "../providers/node"; import abi from "../abi"; export default async (address: string) => { ...
0 votes
1 answer
317 views

Token Price on Swap and CEX/DEX

My question is actually almost similar with this one : How to keep the token price in uniswap the same with the centralized exchange I want to know how to sync token price more deeply : From the link ...
0 votes
1 answer
33 views

Permit and transferFrom function called on an ERC20 which drained a specific token in my wallet

I recently found out I've been drained of around 1600 $ALT tokens in two separate transactions a few days ago. It sucks to lose money, but it sucks even more if you never know how it happened and what ...
1 vote
0 answers
11 views

Tracking total sold not total supply?

I am setting up a pre sale contract, it enables users to purchase the tokens via a prelaunch which they are distributed from the owners (our contract owners) wallet when a user buys them. How are ...
1 vote
1 answer
50 views

Building Cryptocurrency Tracking system for monitoring stolen cryptocurrency transactions

When hackers steal tokens from an account, what they generally do is divert the flow of tokens via multiple proxy accounts making it complicated for the cyber-forensics department to track final ...
0 votes
1 answer
3k views

execution reverted: "ERC20: insufficient allowance" on transfer method (not transferFrom)

I'm developing a Smart Contract that transfer tokens that are owned by the Smart Contract itself. The function to do that is pretty simple: pragma solidity 0.8.1; import "@openzeppelin/contracts/...
0 votes
1 answer
915 views

調用transferFrom的函數時出現錯誤顯示Reason provided by the contract: "ERC20: transfer amount exceeds allowance

What's the problem? pragma solidity ^0.6.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/Initializable.sol"; import "https://github.com/...
0 votes
0 answers
23 views

How I can sent ETH using alias 0xEe address?

How do I send ether through a smart contract using the 0xE alias for it in transactions from the UI? I've been sitting and racking my head for the fifth day. Here's an example of my function, tell me ...
0 votes
0 answers
14 views

Bridging ERC-20 Tokens to SPL Tokens with Tax Features Using Wormhole or Similar Platforms

I'm exploring the possibility of bridging ERC-20 tokens to a similar contract on the Solana blockchain using Wormhole or a comparable platform. My primary concern is the retention of specific token ...
2 votes
2 answers
371 views

How to read multiple destination transactions?

I have a system that read normal token transactions with the 0xa9059cbb method, but now I'm receiving transactions like this 0x5ed78dc97ed6c4a3797be99f04977bbcfd45ca5c0ae97ade16dce69e7ecc558a with ...
1 vote
1 answer
3k views

How to calculate buy/sell tax for an erc20 token?

I want to find buy/sell tax for a given erc20 token sorta like how honeypot.is is able to give that information. To do this I am simulating a swap on hardhat. The only problem is I am unable to find ...
0 votes
1 answer
21 views

How to automatically burn ERC-20 token occasionally?

Is it possible to burn specific amount of ERC-20 token occasionally on some specific web hook event? For example: On a blog site when a new post is published on specific tag, then n amount of token ...
0 votes
1 answer
504 views

How to get v,r,s value for permit() signed token approval for a gnosis-safe as the owner?

I have a gnosis-safe and an ERC-20 contract with permit(owner, spender, value, deadline, v, r, s) method that requires v,r,s of the owner as the argument. I have calculated the required v,r,s value ...
0 votes
0 answers
21 views

Fail with error 'Incorrect Ether amount'

I am trying to set up a very basic presale using Remix IDE. 0x96AAC35C248C48418eF9A939e3eB8b9a64207532 --> Presale Contract 0xF60EeA9ab4B520846CA01D368A08cD4b71B619f8 --> Token itself This is ...
2 votes
1 answer
4k views

How do I automatically mint ERC-20 Tokens Every time the owner wallet transfers coins

I want to start with a total_supply of 1,000 Tokens in the owner wallet. Each token will represent a gram of gold. Every time 1 token is transferred from owner wallet to another wallet, the owner ...
1 vote
1 answer
16 views

Are the any actively used ERC20 tokens that have more than 18 decimals?

My question is if there's a strong reason to support tokens with more than 18 decimals. Please note it's related to, but different from the question "Can an ERC-20 have more than 18 decimals?&...

1
2 3 4 5
51