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

А вот я тестю свой контракт на форке mainnet. И

для каждого теста приходится деплоить его снова тк у меня есть в тестах трансфер 10 токенов и я потом проверяю что баланс у адреса 10, а не предыдущий баланс+10. Имеет ли смысл перенести деплой в тест? или всеже писать проверки от предыдущего баланса

6 ответов

2 просмотра

Hardhat + mocha возьми для тестов, будешь все форкать и деплоить одной командой

Vladimir
Hardhat + mocha возьми для тестов, будешь все форк...

npx hardhat run scripts/deploy.js --network localhost меняю адрес в файле теста и npx hardhat test --network localhost

Viacheslav! Острорылая Акула
npx hardhat run scripts/deploy.js --network localh...

--network hardhat и он будет свежую версию сети каждый раз создавать ну а в тесте делашеь before() и кладешь туда всю инициализацию

Viacheslav! Острорылая Акула
npx hardhat run scripts/deploy.js --network localh...

Если я все правильно понял, то Деплой в тест лучше засунуть в beforeEach()

D K
Если я все правильно понял, то Деплой в тест лучш...

а не в beforeAll? oO зачем перед каждым it деплоить..

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

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

Friends, how can I find my Wazirx wallet address?
Silm Silm
31
My 7 year old daughter recognizes the Bitcoin symbol and knows it's currency. What are the top ,3-5 most basic important concepts to convey to a kid about BCH? I started with ...
Big Hair
24
How the price of ANVL is decided? The buying pressure comes just from staking which is very slow, while the selling pressure might be huge. What are the benefits for those who...
MJ Javvaji @muralijavvaji
13
How many Cashfusion server now?
Crypto life
22
But I'm wondering how exactly we can increase our chances of winning. Do you think it's just a matter of luck, or are there specific actions we need to take to qualify?
Luqman Ayman
12
The main vulnerable points of #Monero There is an axiom in computer security that says that a system is as safe as its most vulnerable point. Monero is a #privacy blockchain ...
LiberLion
15
About MEXC If anyone uses it, tell me please Is there a chance (how high) of forced KYC or assets freeze if I deposit XMR to swap and withdraw to stablecoins?
:)
9
Anyone aware of any active or past frauds going in in the BCH ecosystem?
CRYPTOwhistleblowers
14
When will the snapshot of AGIX be taken for the pending airdrops (RJV, CGV, HYPC, SOPH, TWIN)? I assume it will be before ASI, right? In that case, is it better to leave them ...
Javi B.
23
Pelé, how can I send you screenshots of the airdrop scam? It's a Telegram page just like this one. It says official and sends you to a page where it gives you the addresses wh...
Piketi
8
Карта сайта