Skip to main content

New answers tagged

0 votes

Help ERC-20 contract, ERROR Txn: Contract creation code storage out of gas

This is the .sol file of the contract: // SPDX-License-Identifier: MIT // Compatible with OpenZeppelin Contracts ^5.0.0 pragma solidity ^0.8.20; import "@openzeppelin/[email protected]/...
UNDERDOG's user avatar
0 votes

Help ERC-20 contract, ERROR Txn: Contract creation code storage out of gas

Good morning, I'm researching how to calculate gas using Node and a web3.js script, but this morning I added some ETH to Metamask and connected to Remix. All the ETH I had was sent to another account ...
UNDERDOG's user avatar
0 votes

Automate the use of approve() without having to do it manually

In order to approve a contract to spend tokens on behalf of the user, the user must call the approve function of the corresponding token contract by passing in the contract address as spender and the ...
SYED ASAD KAZMI's user avatar
1 vote

Help ERC-20 contract, ERROR Txn: Contract creation code storage out of gas

It seems that your contract deployment failed due to insufficient gas, as indicated by the 'out of gas' error during contract creation. To resolve this, review and optimize your contract code for gas ...
Awais Ahmad's user avatar
0 votes

I tranfer taiko token through ERC20 network which is a wrong network address How can i recover my taiko token

I'm sorry to hear about your issue with transferring Taiko tokens to the wrong network address. Recovering tokens sent to the wrong network can be very complicated, but there might be a chance to ...
Lorcann Rauzduel's user avatar
0 votes

How does the contract handle tax deductions for simple buy and sell transactions when the token is listed on any decentralized exchange (DEX)?

Here is a code example : // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable....
Lorcann Rauzduel's user avatar
0 votes

what is the way to find out if a selected token will revert at 0 transfer

You can simulate a transaction using eth_call for example. With ethers v5 (docs), it's something like this: await tokenContract.callStatic.transfer(from, to, 0); You can simply check if it raises any ...
0xSanson's user avatar
  • 3,294
0 votes

Somebody created a clone of my ERC20 token on the binance.mainnet - is this common?

Yes, it is common for tokens to be cloned on the Binance mainnet. Token names are just a string variable in smart contracts, so it is possible for multiple tokens to have the same name. This is not ...
Dappfort's user avatar
1 vote
Accepted

TESTS FOR MY ERC20 TOKEN IS NOT WORKING

It's great that you are learnig new things For 1st and 2nd error In ES6 using node module ethers, you can convert Wei to Ether as follows: import { ethers } from "ethers"; const WeiToEther = ...
Vinit_2311's user avatar
1 vote
Accepted

Two or more base classes define function with same name and parameter types

This is because both of the contracts you are inheriting are inherited from ERC20 itself. This code should work, as you need to override the _update function only. import "@openzeppelin/contracts/...
Zartaj Afser's user avatar
  • 4,414
2 votes

Lost $80 and never got anything back

The transaction reverted because it ran out of gas. In total 0.021467342409539578 ETH was consumed by the transaction. That's where your money went.
Ougi's user avatar
  • 155
0 votes

Unknown Selector Error (0x98296c54) in BIGTTokenTest.t.sol

Run foundryup command to update your foundry
Milos Djurica's user avatar
0 votes

invalid opcode: opcode 0x5f not defined

I was faced with this issue, because ERC721URIStorage.sol from openzeppelin requires solidity 0.8.20+, but truffle build don't work with 0.8.20 by default. So you need set evmVersion as @SKYBITDEV3 ...
Albert Aleksieiev's user avatar

Top 50 recent answers are included