diff --git a/.changeset/add-mocks-deploy-verbosity.md b/.changeset/add-mocks-deploy-verbosity.md deleted file mode 100644 index 1b3acebd..00000000 --- a/.changeset/add-mocks-deploy-verbosity.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@cofhe/hardhat-plugin': minor ---- - -Add `@cofhe/hardhat-3-plugin` and `@cofhe/foundry-plugin` packages. - -**`@cofhe/hardhat-3-plugin`** — Hardhat 3 plugin with the same mock contract deployment, `network.cofhe` API, logging, and faucet task as the v2 plugin, adapted to the Hardhat 3 plugin/hook model. - -**`@cofhe/foundry-plugin`** — Foundry test utilities: `CofheTest` base contract (`deployMocks`, `expectPlaintext`, `getPlaintext`) and `CofheClient` SDK mock (`connect`, `createInE*`, `decryptForTx`, `decryptForView`, permits). Usable as a git submodule or npm package, with `remappings.txt` for Hardhat 3 Solidity test compatibility. - -**`mocksDeployVerbosity` config option** added to both Hardhat plugins: - -- `''` — silent -- `'v'` — single summary line (new default) -- `'vv'` — full per-contract deployment logs (previous default behavior) diff --git a/.changeset/mock-contract-error-decoding.md b/.changeset/mock-contract-error-decoding.md deleted file mode 100644 index d9385e19..00000000 --- a/.changeset/mock-contract-error-decoding.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -'@cofhe/mock-contracts': minor -'@cofhe/hardhat-plugin': minor -'@cofhe/hardhat-3-plugin': minor ---- - -Decode custom errors from deployed mock contracts by name instead of raw hex selectors. - -**`@cofhe/mock-contracts`** - -- Replaced transient storage (`tstore`/`tload`) in `MockACL.sol` with block-number-based storage, removing the EVM `cancun` requirement and lowering the Solidity pragma to `>=0.8.19`. -- Removed `bytecode` and `deployedBytecode` fields from published artifacts — they are now sourced at runtime from Hardhat's own compilation output. - -**`@cofhe/hardhat-plugin`** - -- Overrides `TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS` to inject a stub file that imports all mock contracts, so Hardhat compiles them and registers their artifacts. This lets the Hardhat network decode mock contract custom errors by name (e.g. `PermissionInvalid_Expired`) rather than raw hex. -- Deployment bytecode is now fetched from `hre.artifacts.readArtifact()` instead of the pre-built artifact bundle. - -**`@cofhe/hardhat-3-plugin`** - -- Calls `hre.solidity.build()` during the `hre.created` hook to compile mock contracts once at startup, enabling the EDR to decode their custom errors by name. -- `deployFixed` and `deployVariable` now source bytecode from `hre.artifacts.readArtifact()`, ensuring the deployed bytecode matches Hardhat's build info — which is required for error decoding on variable-address contracts like `MockACL`. diff --git a/.changeset/onpoll-decrypt-callbacks.md b/.changeset/onpoll-decrypt-callbacks.md deleted file mode 100644 index 36e761c8..00000000 --- a/.changeset/onpoll-decrypt-callbacks.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@cofhe/sdk': minor -'@cofhe/react': minor -'@cofhe/site': minor ---- - -Add `onPoll` callback support for decrypt polling (tx + view) so consumers can observe poll progress. - -- SDK decrypt helpers accept `onPoll` and emit `{ operation, requestId, attemptIndex, elapsedMs, intervalMs, timeoutMs }` once per poll attempt. -- React wiring supports passing the callback end-to-end. -- Docs updated with usage examples. diff --git a/.changeset/permit-validation-valid-permit-flag.md b/.changeset/permit-validation-valid-permit-flag.md deleted file mode 100644 index 3b311d8c..00000000 --- a/.changeset/permit-validation-valid-permit-flag.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@cofhe/sdk': minor -'@cofhe/react': minor ---- - -Tighten permit validation and treat invalid permits as missing. - -- SDK: `PermitUtils.validate` now enforces schema + signed + not-expired (use `PermitUtils.validateSchema` for schema-only validation). -- SDK: `ValidationResult.error` is now a typed union (`'invalid-schema' | 'expired' | 'not-signed' | null`). -- React: rename `disabledDueToMissingPermit` to `disabledDueToMissingValidPermit` in read/decrypt hooks and token balance helpers, and disable reads when the active permit is invalid. diff --git a/.changeset/react-logger-and-web-storage-logs.md b/.changeset/react-logger-and-web-storage-logs.md deleted file mode 100644 index 56a97fe0..00000000 --- a/.changeset/react-logger-and-web-storage-logs.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@cofhe/react': patch -'@cofhe/sdk': patch ---- - -Improve logging ergonomics across React + web SDK. - -- Add a configurable internal logger to `@cofhe/react` via `createCofheConfig({ react: { logger } })`. -- Make `@cofhe/sdk` `createWebStorage` logging opt-in via `createWebStorage({ enableLog })`. diff --git a/.changeset/use-cofhe-enabled-hook.md b/.changeset/use-cofhe-enabled-hook.md deleted file mode 100644 index eba148e8..00000000 --- a/.changeset/use-cofhe-enabled-hook.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@cofhe/react': minor ---- - -Add the `useCofheEnabled` hook to read `TaskManager.isEnabled()` from the connected chain. diff --git a/examples/react/CHANGELOG.md b/examples/react/CHANGELOG.md index 7a1adde1..4b37c65f 100644 --- a/examples/react/CHANGELOG.md +++ b/examples/react/CHANGELOG.md @@ -1,5 +1,16 @@ # @cofhe/example-react +## 0.5.0 + +### Patch Changes + +- Updated dependencies [788a6e2] +- Updated dependencies [9a06012] +- Updated dependencies [503536a] +- Updated dependencies [09bf7c9] + - @cofhe/sdk@0.5.0 + - @cofhe/react@0.5.0 + ## 0.4.0 ### Patch Changes diff --git a/examples/react/package.json b/examples/react/package.json index 94225f17..2c02c931 100644 --- a/examples/react/package.json +++ b/examples/react/package.json @@ -1,7 +1,7 @@ { "name": "@cofhe/example-react", "private": true, - "version": "0.4.0", + "version": "0.5.0", "type": "module", "scripts": { "dev": "vite --force", diff --git a/packages/abi/CHANGELOG.md b/packages/abi/CHANGELOG.md index 32d7ead8..91f087ce 100644 --- a/packages/abi/CHANGELOG.md +++ b/packages/abi/CHANGELOG.md @@ -1,5 +1,14 @@ # @cofhe/abi Changelog +## 0.5.0 + +### Patch Changes + +- Updated dependencies [788a6e2] +- Updated dependencies [9a06012] +- Updated dependencies [503536a] + - @cofhe/sdk@0.5.0 + ## 0.4.0 ### Patch Changes diff --git a/packages/abi/package.json b/packages/abi/package.json index 3239d240..355a5f7c 100644 --- a/packages/abi/package.json +++ b/packages/abi/package.json @@ -1,6 +1,6 @@ { "name": "@cofhe/abi", - "version": "0.4.0", + "version": "0.5.0", "type": "module", "description": "ABI utilities for Fhenix FHE contracts", "types": "./dist/index.d.ts", diff --git a/packages/foundry-plugin/CHANGELOG.md b/packages/foundry-plugin/CHANGELOG.md new file mode 100644 index 00000000..867db5fc --- /dev/null +++ b/packages/foundry-plugin/CHANGELOG.md @@ -0,0 +1,8 @@ +# @cofhe/foundry-plugin + +## 0.5.0 + +### Patch Changes + +- Updated dependencies [50bb3e4] + - @cofhe/mock-contracts@0.5.0 diff --git a/packages/foundry-plugin/package.json b/packages/foundry-plugin/package.json index 684eaf11..326ed12a 100644 --- a/packages/foundry-plugin/package.json +++ b/packages/foundry-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@cofhe/foundry-plugin", - "version": "0.4.0", + "version": "0.5.0", "description": "Foundry plugin for CoFHE — Write and test FHE enabled contracts", "license": "MIT", "repository": { diff --git a/packages/hardhat-3-plugin/CHANGELOG.md b/packages/hardhat-3-plugin/CHANGELOG.md new file mode 100644 index 00000000..b87f0e2e --- /dev/null +++ b/packages/hardhat-3-plugin/CHANGELOG.md @@ -0,0 +1,31 @@ +# @cofhe/hardhat-3-plugin + +## 0.5.0 + +### Minor Changes + +- 50bb3e4: Decode custom errors from deployed mock contracts by name instead of raw hex selectors. + + **`@cofhe/mock-contracts`** + + - Replaced transient storage (`tstore`/`tload`) in `MockACL.sol` with block-number-based storage, removing the EVM `cancun` requirement and lowering the Solidity pragma to `>=0.8.19`. + - Removed `bytecode` and `deployedBytecode` fields from published artifacts — they are now sourced at runtime from Hardhat's own compilation output. + + **`@cofhe/hardhat-plugin`** + + - Overrides `TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS` to inject a stub file that imports all mock contracts, so Hardhat compiles them and registers their artifacts. This lets the Hardhat network decode mock contract custom errors by name (e.g. `PermissionInvalid_Expired`) rather than raw hex. + - Deployment bytecode is now fetched from `hre.artifacts.readArtifact()` instead of the pre-built artifact bundle. + + **`@cofhe/hardhat-3-plugin`** + + - Calls `hre.solidity.build()` during the `hre.created` hook to compile mock contracts once at startup, enabling the EDR to decode their custom errors by name. + - `deployFixed` and `deployVariable` now source bytecode from `hre.artifacts.readArtifact()`, ensuring the deployed bytecode matches Hardhat's build info — which is required for error decoding on variable-address contracts like `MockACL`. + +### Patch Changes + +- Updated dependencies [50bb3e4] +- Updated dependencies [788a6e2] +- Updated dependencies [9a06012] +- Updated dependencies [503536a] + - @cofhe/mock-contracts@0.5.0 + - @cofhe/sdk@0.5.0 diff --git a/packages/hardhat-3-plugin/package.json b/packages/hardhat-3-plugin/package.json index bb183ca5..bdfd1d9e 100644 --- a/packages/hardhat-3-plugin/package.json +++ b/packages/hardhat-3-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@cofhe/hardhat-3-plugin", - "version": "0.4.0", + "version": "0.5.0", "description": "Hardhat 3 plugin for CoFHE — deploys mock contracts and wires up the hre.cofhe interface", "type": "module", "main": "./dist/index.js", diff --git a/packages/hardhat-plugin/CHANGELOG.md b/packages/hardhat-plugin/CHANGELOG.md index 5d524147..77c00a3f 100644 --- a/packages/hardhat-plugin/CHANGELOG.md +++ b/packages/hardhat-plugin/CHANGELOG.md @@ -1,5 +1,47 @@ # @cofhe/hardhat-plugin Changelog +## 0.5.0 + +### Minor Changes + +- f78beb7: Add `@cofhe/hardhat-3-plugin` and `@cofhe/foundry-plugin` packages. + + **`@cofhe/hardhat-3-plugin`** — Hardhat 3 plugin with the same mock contract deployment, `network.cofhe` API, logging, and faucet task as the v2 plugin, adapted to the Hardhat 3 plugin/hook model. + + **`@cofhe/foundry-plugin`** — Foundry test utilities: `CofheTest` base contract (`deployMocks`, `expectPlaintext`, `getPlaintext`) and `CofheClient` SDK mock (`connect`, `createInE*`, `decryptForTx`, `decryptForView`, permits). Usable as a git submodule or npm package, with `remappings.txt` for Hardhat 3 Solidity test compatibility. + + **`mocksDeployVerbosity` config option** added to both Hardhat plugins: + + - `''` — silent + - `'v'` — single summary line (new default) + - `'vv'` — full per-contract deployment logs (previous default behavior) + +- 50bb3e4: Decode custom errors from deployed mock contracts by name instead of raw hex selectors. + + **`@cofhe/mock-contracts`** + + - Replaced transient storage (`tstore`/`tload`) in `MockACL.sol` with block-number-based storage, removing the EVM `cancun` requirement and lowering the Solidity pragma to `>=0.8.19`. + - Removed `bytecode` and `deployedBytecode` fields from published artifacts — they are now sourced at runtime from Hardhat's own compilation output. + + **`@cofhe/hardhat-plugin`** + + - Overrides `TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS` to inject a stub file that imports all mock contracts, so Hardhat compiles them and registers their artifacts. This lets the Hardhat network decode mock contract custom errors by name (e.g. `PermissionInvalid_Expired`) rather than raw hex. + - Deployment bytecode is now fetched from `hre.artifacts.readArtifact()` instead of the pre-built artifact bundle. + + **`@cofhe/hardhat-3-plugin`** + + - Calls `hre.solidity.build()` during the `hre.created` hook to compile mock contracts once at startup, enabling the EDR to decode their custom errors by name. + - `deployFixed` and `deployVariable` now source bytecode from `hre.artifacts.readArtifact()`, ensuring the deployed bytecode matches Hardhat's build info — which is required for error decoding on variable-address contracts like `MockACL`. + +### Patch Changes + +- Updated dependencies [50bb3e4] +- Updated dependencies [788a6e2] +- Updated dependencies [9a06012] +- Updated dependencies [503536a] + - @cofhe/mock-contracts@0.5.0 + - @cofhe/sdk@0.5.0 + ## 0.4.0 ### Patch Changes diff --git a/packages/hardhat-plugin/package.json b/packages/hardhat-plugin/package.json index 11d8e7d2..6ef09ff1 100644 --- a/packages/hardhat-plugin/package.json +++ b/packages/hardhat-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@cofhe/hardhat-plugin", - "version": "0.4.0", + "version": "0.5.0", "main": "./dist/index.js", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", diff --git a/packages/mock-contracts/CHANGELOG.md b/packages/mock-contracts/CHANGELOG.md index 5523884c..a6e4a970 100644 --- a/packages/mock-contracts/CHANGELOG.md +++ b/packages/mock-contracts/CHANGELOG.md @@ -1,5 +1,26 @@ # @cofhe/mock-contracts Changelog +## 0.5.0 + +### Minor Changes + +- 50bb3e4: Decode custom errors from deployed mock contracts by name instead of raw hex selectors. + + **`@cofhe/mock-contracts`** + + - Replaced transient storage (`tstore`/`tload`) in `MockACL.sol` with block-number-based storage, removing the EVM `cancun` requirement and lowering the Solidity pragma to `>=0.8.19`. + - Removed `bytecode` and `deployedBytecode` fields from published artifacts — they are now sourced at runtime from Hardhat's own compilation output. + + **`@cofhe/hardhat-plugin`** + + - Overrides `TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS` to inject a stub file that imports all mock contracts, so Hardhat compiles them and registers their artifacts. This lets the Hardhat network decode mock contract custom errors by name (e.g. `PermissionInvalid_Expired`) rather than raw hex. + - Deployment bytecode is now fetched from `hre.artifacts.readArtifact()` instead of the pre-built artifact bundle. + + **`@cofhe/hardhat-3-plugin`** + + - Calls `hre.solidity.build()` during the `hre.created` hook to compile mock contracts once at startup, enabling the EDR to decode their custom errors by name. + - `deployFixed` and `deployVariable` now source bytecode from `hre.artifacts.readArtifact()`, ensuring the deployed bytecode matches Hardhat's build info — which is required for error decoding on variable-address contracts like `MockACL`. + ## 0.4.0 ## 0.3.2 diff --git a/packages/mock-contracts/package.json b/packages/mock-contracts/package.json index 271d6466..5fb1f61e 100644 --- a/packages/mock-contracts/package.json +++ b/packages/mock-contracts/package.json @@ -1,6 +1,6 @@ { "name": "@cofhe/mock-contracts", - "version": "0.4.0", + "version": "0.5.0", "description": "Mock smart contracts for testing CoFHE with FHE primitives locally", "main": "./dist/index.js", "module": "./dist/index.mjs", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 0c4a0283..00923faa 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,35 @@ # @cofhe/react +## 0.5.0 + +### Minor Changes + +- 788a6e2: Add `onPoll` callback support for decrypt polling (tx + view) so consumers can observe poll progress. + + - SDK decrypt helpers accept `onPoll` and emit `{ operation, requestId, attemptIndex, elapsedMs, intervalMs, timeoutMs }` once per poll attempt. + - React wiring supports passing the callback end-to-end. + - Docs updated with usage examples. + +- 9a06012: Tighten permit validation and treat invalid permits as missing. + + - SDK: `PermitUtils.validate` now enforces schema + signed + not-expired (use `PermitUtils.validateSchema` for schema-only validation). + - SDK: `ValidationResult.error` is now a typed union (`'invalid-schema' | 'expired' | 'not-signed' | null`). + - React: rename `disabledDueToMissingPermit` to `disabledDueToMissingValidPermit` in read/decrypt hooks and token balance helpers, and disable reads when the active permit is invalid. + +- 09bf7c9: Add the `useCofheEnabled` hook to read `TaskManager.isEnabled()` from the connected chain. + +### Patch Changes + +- 503536a: Improve logging ergonomics across React + web SDK. + + - Add a configurable internal logger to `@cofhe/react` via `createCofheConfig({ react: { logger } })`. + - Make `@cofhe/sdk` `createWebStorage` logging opt-in via `createWebStorage({ enableLog })`. + +- Updated dependencies [788a6e2] +- Updated dependencies [9a06012] +- Updated dependencies [503536a] + - @cofhe/sdk@0.5.0 + ## 0.4.0 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 4ffce071..3c8afd3b 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@cofhe/react", - "version": "0.4.0", + "version": "0.5.0", "main": "./dist/index.cjs", "module": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index 167aff0b..e82cfba0 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,5 +1,28 @@ # @cofhe/sdk Changelog +## 0.5.0 + +### Minor Changes + +- 788a6e2: Add `onPoll` callback support for decrypt polling (tx + view) so consumers can observe poll progress. + + - SDK decrypt helpers accept `onPoll` and emit `{ operation, requestId, attemptIndex, elapsedMs, intervalMs, timeoutMs }` once per poll attempt. + - React wiring supports passing the callback end-to-end. + - Docs updated with usage examples. + +- 9a06012: Tighten permit validation and treat invalid permits as missing. + + - SDK: `PermitUtils.validate` now enforces schema + signed + not-expired (use `PermitUtils.validateSchema` for schema-only validation). + - SDK: `ValidationResult.error` is now a typed union (`'invalid-schema' | 'expired' | 'not-signed' | null`). + - React: rename `disabledDueToMissingPermit` to `disabledDueToMissingValidPermit` in read/decrypt hooks and token balance helpers, and disable reads when the active permit is invalid. + +### Patch Changes + +- 503536a: Improve logging ergonomics across React + web SDK. + + - Add a configurable internal logger to `@cofhe/react` via `createCofheConfig({ react: { logger } })`. + - Make `@cofhe/sdk` `createWebStorage` logging opt-in via `createWebStorage({ enableLog })`. + ## 0.4.0 ### Patch Changes diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 48652073..5045fce4 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@cofhe/sdk", - "version": "0.4.0", + "version": "0.5.0", "type": "module", "description": "SDK for Fhenix COFHE coprocessor interaction", "main": "./dist/core.cjs", diff --git a/packages/site/CHANGELOG.md b/packages/site/CHANGELOG.md index d89dc88b..c26d960f 100644 --- a/packages/site/CHANGELOG.md +++ b/packages/site/CHANGELOG.md @@ -1,5 +1,15 @@ # @cofhe/site +## 0.5.0 + +### Minor Changes + +- 788a6e2: Add `onPoll` callback support for decrypt polling (tx + view) so consumers can observe poll progress. + + - SDK decrypt helpers accept `onPoll` and emit `{ operation, requestId, attemptIndex, elapsedMs, intervalMs, timeoutMs }` once per poll attempt. + - React wiring supports passing the callback end-to-end. + - Docs updated with usage examples. + ## 0.4.0 ### Minor Changes diff --git a/packages/site/package.json b/packages/site/package.json index 319075ec..47001194 100644 --- a/packages/site/package.json +++ b/packages/site/package.json @@ -1,7 +1,7 @@ { "name": "@cofhe/site", "private": true, - "version": "0.4.0", + "version": "0.5.0", "type": "module", "engines": { "node": ">=22"