Quickstart
NiceTry is a Foundry (Solidity) contracts repository, the reference implementation of the Ephemeral Keys Protocol. This page gets you from a clone to a local build, the test suite, and a deterministic deployment.
Prerequisites
- Foundry (
forge,cast): for building, testing, and deploying the contracts. - Node.js 18+: only for the ERC-4337 infrastructure helper under
deploy-4337/. - For live UserOps on a testnet: an RPC endpoint and a bundler/paymaster (e.g. a Pimlico API key).
Clone and build
git clone https://github.com/RivaLabs-Core/NiceTry.git
cd NiceTry
forge install
forge buildThe project targets solc 0.8.30 with via-ir enabled (see foundry.toml).
Run the tests
forge testThe suite covers round-trip cryptographic tests for the FORS+C verifier, the main account and frame-account behavior, and the legacy WOTS/ECDSA account, module, integration, and gas tests under test/other-implementations/.
Deploy
A Forge script lives at script/Deploy.s.sol. Running it deploys, in order:
ForsVerifier- the FORS-only
SimpleAccountFactory - the single
SimpleAccountimplementation (created by the factory constructor)
forge script script/Deploy.s.sol \
--rpc-url <RPC_URL> \
--broadcastThe script uses the standard CREATE2 deployer at 0x4e59b44847b379578588920cA78FbF26c0B4956C, so the verifier and factory land at the same addresses on every chain when the same salts, bytecode, and constructor arguments are used. It targets the canonical ERC-4337 EntryPoint v0.7, which shares one address across mainnet, Sepolia, and major rollups.
Because addresses are deterministic, a user's account address is identical on every supported chain. See SimpleAccountFactory → Multi-chain consistent addresses.
ERC-4337 infrastructure
A TypeScript helper under deploy-4337/ wires up bundler/paymaster infrastructure for sending live UserOperations. Copy its .env.example, fill in your RPC and bundler/paymaster keys, and follow deploy-4337/README.md.
Create and use an account
- Off-chain, derive the user's first FORS+C signer and the initial-signer Merkle root committing one signer per supported chain (Signer, Factory).
- Call
SimpleAccountFactory.createAccount(initialSignerRoot, salt)(or predict the address withgetAddress). - Send the activation UserOp (proves the chain-local first signer against the root, then rotates to the next signer).
- Thereafter, every UserOp signs with the current key and appends the next owner: the account verifies and rotates automatically.
The full byte-level procedure is in the Signer spec.
Demos
NiceTry-Browser-Wallet-Demo- standalone wallet demo with local key management.NiceTry-Metamask-Demo- MetaMask integration demo.NiceTry-Multichain- showcase of stable addresses across chains.
Both wallet demos are runnable from nicetry.xyz.