Skip to content

chore: rename token to FOLD#1602

Merged
ctrlc03 merged 2 commits into
mainfrom
chore/rename-token-FOLD
Jun 15, 2026
Merged

chore: rename token to FOLD#1602
ctrlc03 merged 2 commits into
mainfrom
chore/rename-token-FOLD

Conversation

@hmzakhalid

@hmzakhalid hmzakhalid commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

Release Notes

  • Documentation

    • Updated guides, diagrams, and examples to consistently use FOLD for license bonding and tFOLD for ticket balances (replacing previous token names).
  • Smart Contracts

    • Updated E3 program setup to use the new registration flow and emit the corresponding event.
    • Updated E3 refund behavior to rely on per-distribution fee token tracking.
  • CLI & Configuration

    • Updated CLI output/help text to reference FOLD/tFOLD and refreshed the terminal banner.
    • Updated deployment/contract metadata and example configurations to match.

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
crisp Ready Ready Preview, Comment Jun 15, 2026 5:10pm
enclave-docs Ready Ready Preview, Comment Jun 15, 2026 5:10pm
interfold-dashboard Ready Ready Preview, Comment Jun 15, 2026 5:10pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 87422b30-0e05-450e-a1c9-71a525f87572

📥 Commits

Reviewing files that changed from the base of the PR and between fc01463 and 47125ed.

📒 Files selected for processing (12)
  • agent/flow-trace/00_INDEX.md
  • agent/flow-trace/01_REGISTRATION.md
  • agent/flow-trace/02_TOKENS_AND_ACTIVATION.md
  • agent/flow-trace/05_FAILURE_REFUND_SLASHING.md
  • agent/flow-trace/06_DEACTIVATION_AND_COMPLETION.md
  • packages/interfold-contracts/artifacts/contracts/interfaces/IBondingRegistry.sol/IBondingRegistry.json
  • packages/interfold-contracts/artifacts/contracts/interfaces/ICiphernodeRegistry.sol/ICiphernodeRegistry.json
  • packages/interfold-contracts/artifacts/contracts/interfaces/IInterfold.sol/IInterfold.json
  • packages/interfold-contracts/artifacts/contracts/interfaces/ISlashingManager.sol/ISlashingManager.json
  • packages/interfold-contracts/artifacts/contracts/token/InterfoldTicketToken.sol/InterfoldTicketToken.json
  • packages/interfold-contracts/test/Interfold.spec.ts
  • packages/interfold-sdk/src/events/types.ts
✅ Files skipped from review due to trivial changes (6)
  • packages/interfold-contracts/artifacts/contracts/interfaces/ISlashingManager.sol/ISlashingManager.json
  • agent/flow-trace/01_REGISTRATION.md
  • packages/interfold-contracts/artifacts/contracts/interfaces/ICiphernodeRegistry.sol/ICiphernodeRegistry.json
  • agent/flow-trace/00_INDEX.md
  • packages/interfold-contracts/artifacts/contracts/interfaces/IBondingRegistry.sol/IBondingRegistry.json
  • agent/flow-trace/05_FAILURE_REFUND_SLASHING.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/interfold-contracts/test/Interfold.spec.ts
  • packages/interfold-contracts/artifacts/contracts/interfaces/IInterfold.sol/IInterfold.json

📝 Walkthrough

Walkthrough

Renames the protocol bonding token from INTF to FOLD and the ticket token from ITK to tFOLD across Solidity contracts, Rust crates, TypeScript scripts/tasks/tests, SDK, and documentation. Simultaneously replaces the mutable enableE3Program/disableE3Program pair with an append-only registerE3Program entrypoint and removes the global feeToken state variable from E3RefundManager.

Changes

INTF→FOLD token rename and enableE3Program→registerE3Program refactor

Layer / File(s) Summary
Solidity interface and token symbol changes
packages/interfold-contracts/contracts/interfaces/IInterfold.sol, packages/interfold-contracts/contracts/Interfold.sol, packages/interfold-contracts/contracts/E3RefundManager.sol, packages/interfold-contracts/contracts/token/InterfoldToken.sol, packages/interfold-contracts/contracts/token/InterfoldTicketToken.sol, packages/interfold-contracts/contracts/interfaces/IBondingRegistry.sol, packages/interfold-contracts/contracts/registry/BondingRegistry.sol
IInterfold removes enableE3Program/disableE3Program and introduces registerE3Program with the new E3ProgramRegistered event. Interfold.sol implements the append-only entrypoint. E3RefundManager removes the global feeToken public state variable. InterfoldToken and InterfoldTicketToken change their ERC20 symbols to FOLD and tFOLD respectively.
Generated ABI artifacts and SDK event type
packages/interfold-contracts/artifacts/contracts/interfaces/IInterfold.sol/IInterfold.json, packages/interfold-contracts/artifacts/contracts/interfaces/IBondingRegistry.sol/IBondingRegistry.json, packages/interfold-contracts/artifacts/contracts/interfaces/ICiphernodeRegistry.sol/ICiphernodeRegistry.json, packages/interfold-contracts/artifacts/contracts/interfaces/ISlashingManager.sol/ISlashingManager.json, packages/interfold-contracts/artifacts/contracts/token/InterfoldTicketToken.sol/InterfoldTicketToken.json, packages/interfold-sdk/src/events/types.ts
IInterfold.json ABI removes enableE3Program/disableE3Program, swaps ModuleNotEnabled for ModuleAlreadyEnabled, renames the disabled event to E3ProgramRegistered, and adds registerE3Program. Other artifact JSONs receive updated buildInfoId fields and bytecode. SDK InterfoldEventType enum gains E3_PROGRAM_REGISTERED.
Rust EVM helper trait and CLI log updates
crates/evm-helpers/src/contracts.rs, crates/cli/src/ciphernode/license.rs, crates/cli/src/ciphernode/lifecycle.rs, crates/cli/src/ciphernode/mod.rs, crates/cli/src/main.rs
contracts.rs replaces the sol! binding, InterfoldWrite trait method, and InterfoldContract implementation from enable_e3_program to register_e3_program. CLI files update log strings from INTF to FOLD and help text. main.rs updates the OWO ASCII banner.
TypeScript deployment scripts, Hardhat tasks, and fixture wiring
packages/interfold-contracts/scripts/deployInterfold.ts, packages/interfold-contracts/tasks/ciphernode.ts, packages/interfold-contracts/tasks/interfold.ts, templates/default/deploy/default.ts, examples/CRISP/packages/crisp-contracts/deploy/crisp.ts, packages/interfold-contracts/test/fixtures/system.ts
deployInterfold.ts switches to registerE3Program and updates FOLD labels. tasks/ciphernode.ts renames intfAmount to foldAmount and updates all INTF references across three Hardhat tasks. The interfold task, template deploy, and CRISP deploy each switch one call site. Fixture system.ts switches the E3 program wiring call.
CRISP server call sites and redeploy config
examples/CRISP/server/src/cli/commands.rs, examples/CRISP/server/src/server/routes/rounds.rs, examples/CRISP/interfold.config.yaml, examples/CRISP/packages/crisp-contracts/deployed_contracts.json
CRISP server CLI and HTTP route switch from enable_e3_program to register_e3_program. interfold.config.yaml updates contract addresses and deploy blocks. deployed_contracts.json records new addresses and block numbers from a fresh local deployment.
Contract test suite updates
packages/interfold-contracts/test/Interfold.spec.ts, packages/interfold-contracts/test/Registry/BondingRegistry.spec.ts, packages/interfold-contracts/test/E3Lifecycle/E3Integration.spec.ts, packages/interfold-contracts/test/Slashing/CommitteeExpulsion.spec.ts, packages/interfold-contracts/test/Token/InterfoldToken.spec.ts
Interfold.spec.ts replaces enableE3Program/disableE3Program test blocks with registerE3Program assertions. BondingRegistry.spec.ts renames initialINTFBalance to initialFOLDBalance in exit-claim tests. Integration and slashing tests swap intfToken for foldToken as the licenseToken fixture reference.
Documentation and README token rename
docs/pages/architecture-overview.mdx, docs/pages/ciphernode-operators/*, docs/pages/tutorials/*, packages/interfold-contracts/README.md, crates/sortition/Readme.md, agent/flow-trace/*
All user-facing documentation replaces INTF with FOLD and ITK with tFOLD across architecture overview, ciphernode operator guides, tutorials, contract README, sortition sequence diagram, and agent flow-trace guides describing token bonding and activation flows.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • ctrlc03
  • auryn-macmillan

Poem

🐇 Hop hop, the tokens got new names today,
INTF and ITK have both hopped away!
Now FOLD and tFOLD bloom fresh in the code,
registerE3Program lightens the load—
append-only paths down the rabbit hole 🕳️,
No disable, no enable, just register whole!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: rename token to FOLD' accurately summarizes the main change across the codebase: a comprehensive rename from INTF/ITK token naming to FOLD/tFOLD terminology.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/rename-token-FOLD

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

ctrlc03
ctrlc03 previously approved these changes Jun 15, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/pages/tutorials/manage-tickets.mdx (1)

40-56: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Rename etkBalance in the formula to match the new token terminology.

After updating the section to tFOLD (Line 40 and Line 50), the example formula still uses etkBalance on Line 55. Please align this variable name (for example, tFoldBalance or ticketTokenBalance) to avoid mixed legacy terminology.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/pages/tutorials/manage-tickets.mdx` around lines 40 - 56, The example
formula in the ticket management documentation uses the legacy variable name
`etkBalance` which is inconsistent with the updated terminology that now uses
tFOLD throughout the section. Replace the variable name `etkBalance` in the
formula with a new name that aligns with the current token terminology, such as
`tFoldBalance` or `ticketTokenBalance`, to maintain consistent naming throughout
the documentation.
🧹 Nitpick comments (1)
examples/CRISP/server/src/cli/commands.rs (1)

197-206: ⚡ Quick win

Propagate non-benign register_e3_program failures instead of logging and continuing.

Both call sites swallow registration failures and continue to request_e3, which obscures root-cause errors (e.g., auth/config issues) and can lead to confusing downstream failures.

  • examples/CRISP/server/src/cli/commands.rs#L197-L206: after register_e3_program fails, return an error unless a follow-up check confirms the program is already registered.
  • examples/CRISP/server/src/server/routes/rounds.rs#L186-L193: apply the same pattern; avoid continuing silently after a failed registration attempt.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/CRISP/server/src/cli/commands.rs` around lines 197 - 206, In
examples/CRISP/server/src/cli/commands.rs at lines 197-206, when the
`register_e3_program` call fails in the `Err(e)` branch, do not simply log the
error and continue. Instead, return an error unless a follow-up check with
`contract.is_e3_program_enabled(e3_program)` confirms the program is already
registered. Apply the identical error-handling pattern in
examples/CRISP/server/src/server/routes/rounds.rs at lines 186-193 where the
same `register_e3_program` call is made; replace the silent logging of failures
with proper error propagation or verification that the desired state is already
in place.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/pages/ciphernode-operators/registration.mdx`:
- Around line 42-43: The ticketPrice parameter in the status examples uses an
incorrect unit denomination. In docs/pages/ciphernode-operators/registration.mdx
at lines 42-43 (anchor location) and line 110 (sibling location), replace tFOLD
with the correct fee-token unit denomination (such as USDC) for the ticketPrice
values. This change aligns ticketPrice with the fee-token denomination described
later in the document around line 175, ensuring consistency throughout the
documentation where ticketPrice represents a fee-token amount while tFOLD
represents the minted ticket balance token.

In `@examples/CRISP/interfold.config.yaml`:
- Around line 16-21: The interfold.config.yaml file contains a duplicate
bonding_registry mapping key declared at lines 16-17 and again at lines 19-20
with identical values. Remove the duplicate bonding_registry entry (either the
first or second occurrence) to ensure the YAML configuration is valid and avoids
ambiguous key behavior. Keep only a single bonding_registry definition with its
address and deploy_block values.

In
`@packages/interfold-contracts/artifacts/contracts/interfaces/IInterfold.sol/IInterfold.json`:
- Around line 604-605: The InterfoldEventData interface references non-existent
keys E3_PROGRAM_ENABLED and E3_PROGRAM_DISABLED which no longer match the
updated InterfoldEventType enum. Locate the InterfoldEventData interface
definition and replace the references to E3_PROGRAM_ENABLED and
E3_PROGRAM_DISABLED with E3_PROGRAM_REGISTERED to ensure consistency with the
enum that now defines only E3_PROGRAM_REGISTERED.

In `@packages/interfold-contracts/contracts/Interfold.sol`:
- Around line 683-690: The registerE3Program function currently lacks access
control and allows any external account to register E3 programs to the protocol,
which is a security vulnerability. Add an owner-only access control modifier
(such as onlyOwner) to the registerE3Program function to restrict this
capability to the contract owner only, ensuring that only authorized governance
can mutate the E3-program allow-list.

In `@packages/interfold-contracts/test/Interfold.spec.ts`:
- Around line 362-369: The test "registers E3 Program correctly" is validating
fixture state rather than the actual registration flow. It uses e3Program which
is already registered in the fixture setup, so the test passes without
exercising the registerE3Program method. Replace the test to use a fresh,
unregistered program address, call the registerE3Program method with that new
address, and then assert that e3Programs returns true for the newly registered
program to properly validate the registration path.

In `@packages/interfold-sdk/src/events/types.ts`:
- Line 13: In the InterfoldEventData interface, add a new type mapping for the
E3_PROGRAM_REGISTERED enum member that includes an e3Program property (of type
address/string) corresponding to the Solidity event parameter. Additionally,
locate and remove the stale E3_PROGRAM_ENABLED and E3_PROGRAM_DISABLED type
mappings from the InterfoldEventData interface (around lines 109-110) since
these enum members no longer exist in the InterfoldEventType enum, which is
causing TypeScript compilation errors.

---

Outside diff comments:
In `@docs/pages/tutorials/manage-tickets.mdx`:
- Around line 40-56: The example formula in the ticket management documentation
uses the legacy variable name `etkBalance` which is inconsistent with the
updated terminology that now uses tFOLD throughout the section. Replace the
variable name `etkBalance` in the formula with a new name that aligns with the
current token terminology, such as `tFoldBalance` or `ticketTokenBalance`, to
maintain consistent naming throughout the documentation.

---

Nitpick comments:
In `@examples/CRISP/server/src/cli/commands.rs`:
- Around line 197-206: In examples/CRISP/server/src/cli/commands.rs at lines
197-206, when the `register_e3_program` call fails in the `Err(e)` branch, do
not simply log the error and continue. Instead, return an error unless a
follow-up check with `contract.is_e3_program_enabled(e3_program)` confirms the
program is already registered. Apply the identical error-handling pattern in
examples/CRISP/server/src/server/routes/rounds.rs at lines 186-193 where the
same `register_e3_program` call is made; replace the silent logging of failures
with proper error propagation or verification that the desired state is already
in place.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4748edb1-749e-4538-9c43-87f87df909df

📥 Commits

Reviewing files that changed from the base of the PR and between b569b2f and fc01463.

📒 Files selected for processing (43)
  • crates/cli/src/ciphernode/license.rs
  • crates/cli/src/ciphernode/lifecycle.rs
  • crates/cli/src/ciphernode/mod.rs
  • crates/cli/src/main.rs
  • crates/evm-helpers/src/contracts.rs
  • crates/sortition/Readme.md
  • docs/pages/architecture-overview.mdx
  • docs/pages/ciphernode-operators/exits-and-slashing.mdx
  • docs/pages/ciphernode-operators/index.mdx
  • docs/pages/ciphernode-operators/registration.mdx
  • docs/pages/ciphernode-operators/running.mdx
  • docs/pages/ciphernode-operators/tickets-and-sortition.mdx
  • docs/pages/tutorials/deploy-to-testnet.mdx
  • docs/pages/tutorials/manage-tickets.mdx
  • docs/pages/tutorials/using-the-dashboard.mdx
  • examples/CRISP/interfold.config.yaml
  • examples/CRISP/packages/crisp-contracts/deploy/crisp.ts
  • examples/CRISP/packages/crisp-contracts/deployed_contracts.json
  • examples/CRISP/server/src/cli/commands.rs
  • examples/CRISP/server/src/server/routes/rounds.rs
  • packages/interfold-contracts/README.md
  • packages/interfold-contracts/artifacts/contracts/interfaces/IBondingRegistry.sol/IBondingRegistry.json
  • packages/interfold-contracts/artifacts/contracts/interfaces/ICiphernodeRegistry.sol/ICiphernodeRegistry.json
  • packages/interfold-contracts/artifacts/contracts/interfaces/IInterfold.sol/IInterfold.json
  • packages/interfold-contracts/artifacts/contracts/interfaces/ISlashingManager.sol/ISlashingManager.json
  • packages/interfold-contracts/contracts/E3RefundManager.sol
  • packages/interfold-contracts/contracts/Interfold.sol
  • packages/interfold-contracts/contracts/interfaces/IBondingRegistry.sol
  • packages/interfold-contracts/contracts/interfaces/IInterfold.sol
  • packages/interfold-contracts/contracts/registry/BondingRegistry.sol
  • packages/interfold-contracts/contracts/token/InterfoldTicketToken.sol
  • packages/interfold-contracts/contracts/token/InterfoldToken.sol
  • packages/interfold-contracts/scripts/deployInterfold.ts
  • packages/interfold-contracts/tasks/ciphernode.ts
  • packages/interfold-contracts/tasks/interfold.ts
  • packages/interfold-contracts/test/E3Lifecycle/E3Integration.spec.ts
  • packages/interfold-contracts/test/Interfold.spec.ts
  • packages/interfold-contracts/test/Registry/BondingRegistry.spec.ts
  • packages/interfold-contracts/test/Slashing/CommitteeExpulsion.spec.ts
  • packages/interfold-contracts/test/Token/InterfoldToken.spec.ts
  • packages/interfold-contracts/test/fixtures/system.ts
  • packages/interfold-sdk/src/events/types.ts
  • templates/default/deploy/default.ts
💤 Files with no reviewable changes (1)
  • packages/interfold-contracts/contracts/E3RefundManager.sol

Comment thread docs/pages/ciphernode-operators/registration.mdx
Comment thread examples/CRISP/interfold.config.yaml
Comment thread packages/interfold-contracts/contracts/Interfold.sol
Comment thread packages/interfold-contracts/test/Interfold.spec.ts
Comment thread packages/interfold-sdk/src/events/types.ts
@hmzakhalid hmzakhalid changed the title chore: rename token to FOLD chore: rename token to FOLD Jun 15, 2026
@ctrlc03 ctrlc03 merged commit afd5c81 into main Jun 15, 2026
35 checks passed
@ctrlc03 ctrlc03 deleted the chore/rename-token-FOLD branch June 15, 2026 17:45
0xjei pushed a commit that referenced this pull request Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants