Skip to content

feat(evm): add identity registry, restricted bond and HTLC - #8

Merged
MukulKolpe merged 1 commit into
OpenTokenizedAssetStandard:mainfrom
MukulKolpe:feat/evm-leg
Oct 26, 2026
Merged

MukulKolpe merged 1 commit into
OpenTokenizedAssetStandard:mainfrom
MukulKolpe:feat/evm-leg

Conversation

@MukulKolpe

Copy link
Copy Markdown
Member

Summary

Adds the asset leg of Flow A as Solidity contracts for Sepolia: a hash-only identity registry, a restricted bond in the ERC-3643 placement, and a SHA-256 HTLC. Denials revert with OTASDenied(code), so the OTAS reason code travels in the revert data.

Type of change

  • Schemas or reason-code registry
  • Conformance vectors or Python tools
  • Simulated demo
  • EVM contracts (live/evm)
  • Sui Move package (live/sui)
  • Live runner (live/runner)
  • Scripts or CI
  • Documentation
  • Other:

Related issues

Closes #7

Details

  • Toolchain: solc 0.8.28, optimizer at 200 runs, Cancun EVM. forge-std is a submodule pinned to v1.17.0.
  • OTASIdentityRegistry: credential hashes and a revoked flag per claim topic. check() returns codes in a fixed order (paused, frozen, sender, receiver), which the Sui leg will mirror. Settlement escrows are registered as system accounts so they can hold restricted units.
  • OTASBond: ERC-20-compatible, with Restricted, Freezable, ForceTransferable and AtomicLeg behaviours. otasCanTransfer is the OTAS interface convention, not the ERC-3643 function of a similar name. returnFromEscrow lets an escrow return a sender's own units without an eligibility check, so a credential that lapses while units are in escrow can't strand them.
  • OTASHTLC: SHA-256 hashlock, because Sui exposes the same function, so one preimage opens both legs. A leg locks only if delivery would be allowed now. Claiming is permissionless but delivers only to the receiver fixed at lock time, and re-checks that receiver's eligibility. Refunds go to the sender after the timelock.
$ cd live/evm && forge test
Ran 1 test suite: 10 tests passed, 0 failed, 0 skipped (10 total tests)

For schema and contract changes

  • No reason code was removed or renumbered (OTASReasons mirrors reasons-v1.json)
  • Conformance vectors cover the change on every rail it affects
  • Tests added or updated (forge test)
  • Artifacts rebuilt with live/scripts/build-artifacts.sh and committed
  • Ran the live demo (local nodes or testnet)

Checklist

  • All commits are signed off for DCO (git commit -s)
  • My git name/email match my sign-off and GitHub account
  • This targets main
  • CI is green
  • No private keys, .keys/ files or other secrets are included

Notes for reviewers

Signed-off-by: Mukul Kolpe <mukulkolpe45@gmail.com>
@MukulKolpe
MukulKolpe merged commit f05a0fc into OpenTokenizedAssetStandard:main Oct 26, 2026
5 checks passed
@MukulKolpe
MukulKolpe deleted the feat/evm-leg branch October 26, 2026 11:13
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.

[Rail]: Ethereum leg - identity registry, restricted bond and HTLC

1 participant