Ok I am not much of one to ask questions. But I have been trying to figure this out for 4 or so hours and it is probably something stupid. This is the error I get
Deploying 'TOKENNAME'
---------------------
Error: *** Deployment Failed ***
"TOKENNAME" hit a require or revert statement somewhere in its constructor. Try:
* Verifying that your constructor params satisfy all require conditions.
* Adding reason strings to your require statements.
This is the constructor code.
constructor() ERC20("TOKENNAME", "SYMBL") {
marketingWallet = 0xc7CEaB8622DEBc187C78887989d3319cAE17649D;
teamWallet = 0x56716bd49218F24a0Af6353D578f054AA6D22871;
developmentWallet = 0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82;
// IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x10ED43C718714eb63d5aA57B78B54704E256024E);
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3); //TESTNET PCS
// Create a uniswap pair for this new token
address _uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
uniswapV2Router = _uniswapV2Router;
uniswapV2Pair = _uniswapV2Pair;
_setAutomatedMarketMakerPair(_uniswapV2Pair, true);
// exclude from paying fees or having max transaction amount
excludeFromFees(marketingWallet, true);
excludeFromFees(teamWallet, true);
excludeFromFees(developmentWallet, true);
excludeFromFees(address(this), true);
excludeFromFees(owner(), true);
/*
_mint is an internal function in ERC20.sol that is only called here,
and CANNOT be called ever again
*/
_mint(owner(), 100000000000 * (10**18));
}
Any idea what I am missing? The migration file is not trying to pass any arguments to the constructor at deployment or anything.
Oct 20, 2021, 1:56 AM
Also the constructor for ERC20 that is passing in the name and symbol variables.
constructor (string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
constructor (string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
Oct 20, 2021, 2:01 AM
what network r u deploying on? BSC testnet?
try comment that _mint function out, and see if it deploys
(wont have any tokens after deploy but will prove that the transfer is broken or not)
try comment that _mint function out, and see if it deploys
(wont have any tokens after deploy but will prove that the transfer is broken or not)
Oct 20, 2021, 2:15 AM
Yes the BSC Test Net. Ok I will try that real quick
Oct 20, 2021, 2:17 AM
i dunno actually ... _mint should be safe unless u have a overload _beforeTokenTransfer or something, send contract if u want 🙃
Oct 20, 2021, 2:20 AM
Ok so I am not sure if it was one of two things. Either I had unsaved changes this whole time or it was a gas issue. When I was in the config file I upped the gas a little bit and it went though fine.
Thank you very much :)
Oct 20, 2021, 2:24 AM
a new pooptoken is born 🎆
Oct 20, 2021, 2:24 AM
lol no this one will have actual utility ready at launch and will be far from a shitcoin. This is actually something I am making for another project (which very well may be a shit coin lol) but the code will be vastly expanded on for my contract.
Oct 20, 2021, 2:28 AM