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

Привет всем! Моя голова вот-вот готова взорваться) Опишу самую простую ситуацию. У

меня установлен проект hardhat с его дефолтными файлами.

1. Я запускаю сеть через "npx hardhat node".
2. Компилирую их дефолтный контракт через "npx hardhat compile".
3. Деплою этот контракт в их сеть их дефолтным билд-скриптом "npx hardhat run scripts/deploy.ts", и вижу в консоли что этот контракт задеплоился на такой-то адрес.
4. Подключаю фронт к этой же сети. И точно убеждаюсь что фронт подключен именно к этой сети, выполняя для проверки "await provider.getBlockNumber();" или добавляя новые блоки через "new ethers.JsonRpcProvider('http://localhost:8545').send('hardhat_mine', ['0x100']);". При этом в терминале этой сети hardhat показано что эти блоки добавляются.

А ВОТ ТЕПЕРЬ ПРОБЛЕМА:

5. Выполняю "const contractCode = await provider.getCode("адрес полученный при деплое контракта");"
И в итоге contractCode равен '0x'. Что говорит о том что контракт отсутствует по указанному адресу. Как такое может быть?

4 ответов

84 просмотра

А транзанкцию деплоя с фронта можешь запросить?

Пуховая-Батарейка Автор вопроса
Сверкающий Утёнок
А транзанкцию деплоя с фронта можешь запросить?

Это какой командой? Просто я начинающий еще, сорри)

Пуховая-Батарейка Автор вопроса
Сверкающий Утёнок
Лучшая сюда писать: @eth_newbie

Ок, надеюсь там в чатике есть спецы )

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

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

@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Настойчивый Кварк
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
Льдистая Лужица
2
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Звенящий Циферблат
1
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Длинный Минерал
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Тягучая Ракушка
11
Hello, Is iExec also part of the "inception program" or another one ? Would it be a name to qualified the nature of the relationship between iExec and Nvidia? And does Secret ...
Шепчущая Лощина
8
Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Кофейный Монитор
255
any reference of this implementation?
Хешированная Метель
29
Also, why can’t the community have a vote/ say when it comes to initiatives like buybacks. Isn’t the point of crypto decentralisation? Don’t we deserve input as long term supp...
Средний Гиббон
13
Hi guys, any problem with Pulsebrige? Trying to transfer from wETH to ETH. First it tells me to connect my metamask "through mobile app" not desktop. Then I did and confirmed ...
Искренний Аэростат
13
Карта сайта