Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .changeset/add-mocks-deploy-verbosity.md

This file was deleted.

22 changes: 0 additions & 22 deletions .changeset/mock-contract-error-decoding.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/onpoll-decrypt-callbacks.md

This file was deleted.

10 changes: 0 additions & 10 deletions .changeset/permit-validation-valid-permit-flag.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/react-logger-and-web-storage-logs.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/use-cofhe-enabled-hook.md

This file was deleted.

11 changes: 11 additions & 0 deletions examples/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@cofhe/example-react",
"private": true,
"version": "0.4.0",
"version": "0.5.0",
"type": "module",
"scripts": {
"dev": "vite --force",
Expand Down
9 changes: 9 additions & 0 deletions packages/abi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/abi/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 8 additions & 0 deletions packages/foundry-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @cofhe/foundry-plugin

## 0.5.0

### Patch Changes

- Updated dependencies [50bb3e4]
- @cofhe/mock-contracts@0.5.0
2 changes: 1 addition & 1 deletion packages/foundry-plugin/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
31 changes: 31 additions & 0 deletions packages/hardhat-3-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion packages/hardhat-3-plugin/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
42 changes: 42 additions & 0 deletions packages/hardhat-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat-plugin/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
21 changes: 21 additions & 0 deletions packages/mock-contracts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/mock-contracts/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
30 changes: 30 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
23 changes: 23 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
10 changes: 10 additions & 0 deletions packages/site/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/site/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@cofhe/site",
"private": true,
"version": "0.4.0",
"version": "0.5.0",
"type": "module",
"engines": {
"node": ">=22"
Expand Down