Warning: Contract code size is 26093 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> token.sol:844:1:
|
844 | contract KermitThePepe is Context, IERC20, Ownable {
| ^ (Relevant source part starts here and spans across multiple lines).
Nov 17, 2023, 12:59 AM
Can anyone help me with this
Nov 17, 2023, 12:59 AM
Did you try optimizer?
Nov 17, 2023, 1:09 AM
How to use
Nov 17, 2023, 1:14 AM
are you using remix?
Nov 17, 2023, 1:15 AM
// Enable the optimizer with a low "runs" value
Used this line in my codes
Used this line in my codes
Yes
Nov 17, 2023, 1:17 AM
https://remix-ide.readthedocs.io/en/latest/compile.html#enable-optimization
Please read that and then try it for yourself
https://sigityudanto.medium.com/solidity-contract-code-size-over-limit-a335298cd33c
Nov 17, 2023, 1:24 AM
Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
Error happened while trying to execute a function inside a smart contract
Error happened while trying to execute a function inside a smart contract
Nov 17, 2023, 1:28 AM
there's error in constructor or your rpc is faulty
Nov 17, 2023, 1:47 AM
No constructors are there
Simple token contract
Nov 17, 2023, 1:48 AM
then error when calling function?
Nov 17, 2023, 1:48 AM
With some taxes
While deployment
Nov 17, 2023, 1:49 AM
deploying right?
Nov 17, 2023, 1:49 AM
Yes
Nov 17, 2023, 1:49 AM
yeah thn constructor error or if it's a error in other function without a constructor (initializer) thn it'll go through
maybe your rpc broken
set gas limit , price manually (be careful and accurate or get rekt)and force send, send some extra gas just to be sure
Nov 17, 2023, 1:50 AM
Deploying on testnet
Nov 17, 2023, 1:50 AM
yeah same thing, manually calculate with correct gas price, gas limit of that chain, you can also set this in metamask just before signing tx
Nov 17, 2023, 1:52 AM
Oh ok
Please check I shared you the code file
Code is this
https://amethyst-smooth-tahr-973.mypinata.cloud/ipfs/QmZrAU1HbYnBhWbakRTUyeywgVfH1eVo4xyewKkGeuzD8J?_gl=1*dfi1cw*_ga*Mjk1NTUzOTEwLjE2OTY1MTY1ODg.*_ga_5RMPXG14TE*MTcwMDE4NTY2MC4xMC4xLjE3MDAxODU3OTkuMTMuMC4w
https://amethyst-smooth-tahr-973.mypinata.cloud/ipfs/QmZrAU1HbYnBhWbakRTUyeywgVfH1eVo4xyewKkGeuzD8J?_gl=1*dfi1cw*_ga*Mjk1NTUzOTEwLjE2OTY1MTY1ODg.*_ga_5RMPXG14TE*MTcwMDE4NTY2MC4xMC4xLjE3MDAxODU3OTkuMTMuMC4w
Nov 17, 2023, 1:57 AM
require(
address(this).balance >= value,
"Address: insufficient balance for call"
);
you definetly can shave off some bytes by upgrading to OZ v5
address(this).balance >= value,
"Address: insufficient balance for call"
);
you definetly can shave off some bytes by upgrading to OZ v5
Nov 17, 2023, 2:30 AM