## Upgrading to Hardhat for Advanced Testing Datamine Network has successfully migrated its original FLUX smart contract unit tests from the legacy Drizzle framework to Hardhat. This migration modernizes the development workflow and makes it significantly easier for security researchers and community developers to test, verify, and audit the ecosystem's core smart contracts. ## Securing ERC777 Hooks Against Re-Entry As part of this upgrade, a highly complex unit test was introduced within `DamBlockingHolderContractTests.ts` to simulate and analyze potential re-entrancy attack vectors associated with ERC777 token hooks. Because ERC777 tokens utilize transfer hooks, they require precise security safeguards. The newly implemented test validates that while a user can spend their remaining DAM balance before the `lock()` function fully completes, the smart contract's mutex protection successfully prevents calling `unlock()` prematurely. This guarantees that even if a re-entry attempt occurs, it cannot cause any unwanted side-effects or compromise the vault. This rigorous test demonstrates the robust design of the ecosystem's mutex protection, ensuring the core burning and locking mechanisms remain completely secure.