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.
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)
Yes the BSC Test Net. Ok I will try that real quick
Are you giving the same address for marketing and team wallet?
Also change router if not deploying on mainnet
Обсуждают сегодня