![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@matterlabs/hardhat-zksync-chai-matchers
Advanced tools
Hardhat plugin that adds zkSync-specific capabilities to the Chaiassertion library, making your smart contract tests easy to write and read
zkSync Era's integration into the Chai assertion library is enabled by this Hardhat plugin, adding capabilities that make writing and reading smart contract tests easy."
Ensure you are using the correct version of the plugin with ethers:
For plugin version <1.0.0:
For plugin version ≥1.0.0:
To install hardhat-zksync-chai-matchers plugin, run:
npm install -D @matterlabs/hardhat-zksync-chai-matchers
or
yarn add -D @matterlabs/hardhat-zksync-chai-matchers @nomicfoundation/hardhat-chai-matchers chai @nomiclabs/hardhat-ethers ethers
After installing it, add the plugin to your Hardhat config:
import "@matterlabs/hardhat-zksync-chai-matchers";
Then you'll be able to use the matchers in your tests.
changeEtherBalance
Assert that the ether balance of an address changed by a specific amount:
await expect(() =>
sender.transfer({
to: receiver.address,
amount: 2000,
})
).to.changeEtherBalance(sender.address, -2000);
changeTokenBalance
Assert that an ERC20 token balance of an address changed by a specific amount:
await expect(sender.transfer({ to: receiver.address, amount: 5, token: token.address })).to.changeTokenBalance(token, sender, -5);
await expect(token.transfer(receiver.address, 5)).to.not.changeTokenBalance(token, sender, 0);
revertedWithCustomError
Assert that a transaction reverted with a specific custom error:
await expect(contract.setAmount(100)).to.be.reverted;
You can also use regular chai matchers like:
await expect(contract.setAmount(100)).to.emit(contract, "AmountUpdated");
expect("0x36615Cf349d7F6344891B1e7CA7C72883F5dc049").to.be.properAddress;
expect(await contract.getAmount()).to.equal(100);
In addition to the hardhat-zksync-chai-matchers, zkSync's Era website offers a variety of resources including:
Guides to get started: Learn how to start building on zkSync Era.
Hardhat zkSync Era plugins: Overview and guides for all Hardhat zkSync Era plugins.
Hyperscaling: Deep dive into hyperscaling on zkSync Era.
Contributions are always welcome! Feel free to open any issue or send a pull request.
Go to CONTRIBUTING.md to learn about steps and best practices for contributing to zkSync hardhat tooling base repository.
zkSync Era Discord server: for questions and feedback.
Follow zkSync Era on Twitter
FAQs
Hardhat plugin that adds zkSync-specific capabilities to the Chaiassertion library, making your smart contract tests easy to write and read
The npm package @matterlabs/hardhat-zksync-chai-matchers receives a total of 2,240 weekly downloads. As such, @matterlabs/hardhat-zksync-chai-matchers popularity was classified as popular.
We found that @matterlabs/hardhat-zksync-chai-matchers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.