@pasosdejesus/m 0.37.11 → 0.37.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@pasosdejesus/m` are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.37.12] - 2026-11-04
|
|
6
|
+
|
|
7
|
+
### Fixed — the scaffolded contracts app typechecks (**`usdt@0.1.4`**)
|
|
8
|
+
|
|
9
|
+
- The contracts app template ships `types/hardhat-chai.d.ts`. The runner implements the Hardhat
|
|
10
|
+
chai matchers (`reverted`, `revertedWith`, `revertedWithCustomError`, `emit`, `withArgs`,
|
|
11
|
+
`changeEtherBalance*`) but no package carries their types, so `pnpm build` failed with
|
|
12
|
+
`Property 'revertedWith' does not exist on type 'Assertion'` as soon as a generated test asserted
|
|
13
|
+
a revert. `tsconfig.json` already listed `./types`, so the declaration was the missing half.
|
|
14
|
+
- Its `.gitignore` covers `/dist` (the `tsc` output) and no longer mentions Hardhat or Ignition.
|
|
15
|
+
- Its `README.md` documents `pnpm tsc` and states what the test runner replaces.
|
|
16
|
+
- `usdt@0.1.4`: the engine's `contracts/` compiles without Hardhat
|
|
17
|
+
(`hardhat.config.ts` → `m-contracts.config.ts`, `compile`/`build` run `run-compile.mjs` over
|
|
18
|
+
`contract:compile`, artifacts regenerated with `solc-js 0.8.26`). The test keeps
|
|
19
|
+
`import hre from 'hardhat'` on purpose, as proof that the runner maps the module; it passes 3/3
|
|
20
|
+
with Hardhat uninstalled.
|
|
21
|
+
|
|
5
22
|
## [0.37.11] - 2026-11-04
|
|
6
23
|
|
|
7
24
|
### Fixed — the managed copy is only executed inside its trust domain
|
|
@@ -34,10 +34,22 @@ cp .env.example .env
|
|
|
34
34
|
pnpm install
|
|
35
35
|
pnpm build # sync MockUSDT, compile, typechain, sync ABIs
|
|
36
36
|
pnpm test # contract:test on @ethereumjs/vm
|
|
37
|
+
pnpm tsc # typecheck contracts, tests and typechain types
|
|
37
38
|
pnpm run:node # local JSON-RPC node (Hardhat accounts funded)
|
|
38
39
|
pnpm clean # remove artifacts/cache/typechain-types/dist
|
|
39
40
|
```
|
|
40
41
|
|
|
42
|
+
## Testing
|
|
43
|
+
|
|
44
|
+
`contract:test` boots an in-memory `@ethereumjs/vm` and runs the Mocha/chai
|
|
45
|
+
tests of `test/`. The runner injects `globalThis.hre`, and a Hardhat-style
|
|
46
|
+
`import hre from 'hardhat'` also works because the runner maps that module to
|
|
47
|
+
the same object.
|
|
48
|
+
|
|
49
|
+
The Hardhat chai matchers (`revertedWith`, `emit` and friends) are implemented
|
|
50
|
+
by the runner but no package ships their types, so `types/hardhat-chai.d.ts`
|
|
51
|
+
declares them for `tsc`.
|
|
52
|
+
|
|
41
53
|
## Deploy and verify
|
|
42
54
|
|
|
43
55
|
`contract:deploy` uses viem. On a local node it uses the node's unlocked accounts; on a testnet it
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export {}
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
namespace Chai {
|
|
5
|
+
interface Assertion {
|
|
6
|
+
reverted: Assertion
|
|
7
|
+
revertedWith(reason: string): Assertion
|
|
8
|
+
revertedWithCustomError(contract: unknown, errorName: string): Assertion
|
|
9
|
+
emit(contract: unknown, event: string, ...args: unknown[]): Assertion
|
|
10
|
+
withArgs(...args: unknown[]): Assertion
|
|
11
|
+
changeEtherBalance(account: unknown, amount: unknown): Assertion
|
|
12
|
+
changeEtherBalances(accounts: unknown[], amounts: unknown[]): Assertion
|
|
13
|
+
changeTokenBalance(token: unknown, account: unknown, amount: unknown): Assertion
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/man/man1/m.1
CHANGED