Questions tagged [smock]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
0 answers

How to mock smart contract with hardhat and ethers v6

I found here 2 ways to mock Smart contract but they all limited to ethers.js v5: @nomiclabs/hardhat-waffle @defi-wonderland/smock Today hardhat-toolbox is at version 4 and migrated away from hardhat-...
codekoriko's user avatar
0 votes
1 answer

Solidity: Mock function return value

I'm writing an ERC-721 contract but I'm struggling to write a proper unit test when all token ids are minted. Function I want to test: uint256 public constant MAX_SUPPLY = 10000; function ...
rpajunen's user avatar
0 votes
2 answers

Invalid Chai property when testing smart contract

In a hardhat project I'm using smock to mock an ERC20 contract and chai's calledOnce to assert: const {expect} = require("chai") const {artifacts, ethers} = require("hardhat&...
forhas's user avatar
  • 785