169 похожих чатов

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.

4 ответов

18 просмотров

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)

Terry-Brazil Автор вопроса

Are you giving the same address for marketing and team wallet?

Also change router if not deploying on mainnet

Похожие вопросы

Обсуждают сегодня

Какой-то там пердун в 90-х решил, что есть какая-то разная типизация. Кого вообще это волнует?
КТ315
49
void terminal_scroll() { memmove(terminal_buffer, terminal_buffer + VGA_WIDTH, buffer_size - VGA_WIDTH); memset(terminal_buffer + buffer_size - VGA_WIDTH, 0, VGA_WIDTH); ...
Егор
47
Всем привет! Подскажите, пожалуйста, в чем ошибка? Настраиваю подключение к MySQL. Либы лежат рядом с exe. Все как по "учебнику"
Евгений
16
А можете как-то проверить меня по знаниям по ассемблеру?
A A
132
Здравствуйте! У меня появилась возможность купить книгу "Изучай Haskell во имя добра!". Но я где-то слышал, что эта книга устарела. Насколько это правда??
E
22
Здравствуйте! Я вот на stepic решаю задачи на хаскеле https://stepik.org/lesson/8443/step/8?unit=1578 мой код import Data.List (isInfixOf) removing :: String -> [String] ->...
E
10
Камрады, кто тесно работал с vtv, хотел уточнить. Ширина column задаётся жёстко на этапе создания дерева или можно в рантайме ее менять программно (не мышкой)?
Ed Doc
10
да ладно ... что там неочевидного ? глянуть в исх-ки датасета и/или кверика чтобы понять в каком месте и как выполняется обращения к св-вам blablaSQL - минутное дело, даже е...
Сергей
7
Здесь для arm кто-нибудь кодит ?
Nothing
52
Всем привет, у меня есть сервер принимающий входящие HTTP подключения, как проверить, что подключение было через прокси или нет, есть какие то поля в заголовках по которым мо...
Кибер Бомж
8
Карта сайта