mirror of
https://github.com/luxfi/cli.git
synced 2026-10-30 17:01:20 +00:00
- Switched from yarn to pnpm for better dependency management - Updated to Node.js 24 in CI workflow - Replaced deprecated packages with modern alternatives: - @nomiclabs/hardhat-* → @nomicfoundation/hardhat-* - ethers v5 → ethers v6 - Removed packages that require node-gyp (waffle, old typechain) - Updated hardhat to v2.22.0 with full Node.js 24 support - Fixed test code for ethers v6 API changes - Significantly reduced native dependencies (only keccak and secp256k1 remain)
21 lines
646 B
TypeScript
21 lines
646 B
TypeScript
import { expect } from "chai"
|
|
import { ethers } from "hardhat"
|
|
import config from "../hardhat.config"
|
|
|
|
describe("Greeter", function () {
|
|
it("Should return the new greeting once it's changed", async function () {
|
|
const Greeter = await ethers.getContractFactory("Greeter")
|
|
const greeter = await Greeter.deploy("Hello, world!")
|
|
await greeter.waitForDeployment()
|
|
|
|
expect(await greeter.greet()).to.equal("Hello, world!")
|
|
|
|
const setGreetingTx = await greeter.setGreeting("Hola, mundo!")
|
|
|
|
// wait until the transaction is mined
|
|
await setGreetingTx.wait()
|
|
|
|
expect(await greeter.greet()).to.equal("Hola, mundo!")
|
|
})
|
|
})
|