Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9e10890
chore: upgrade to v4.2.0-nightly.20260409 with local gregojuice
mverzilli Apr 9, 2026
4e6ce3a
Fork token contract and point AMM/PoP deps to local copy
mverzilli Apr 9, 2026
551e53d
feat: add offchain link service for encoding/decoding transfer URLs
mverzilli Apr 9, 2026
a370b82
feat: add sent history service for tracking offchain transfers
mverzilli Apr 9, 2026
b123a59
chore: add qrcode.react dependency for transfer link QR codes
mverzilli Apr 9, 2026
c8a02b4
feat: add Send context with reducer, provider, and state machine
mverzilli Apr 9, 2026
24866c6
feat: add executeTransferOffchain to contract service
mverzilli Apr 9, 2026
d21e427
feat: add Send UI components
mverzilli Apr 9, 2026
dec1846
feat: add Claim page components
mverzilli Apr 9, 2026
eac37bb
feat: add hash routing for claim page and Swap/Send tab bar
mverzilli Apr 9, 2026
6f2a266
feat: wire offchain transfer methods through ContractsContext
mverzilli Apr 9, 2026
c4392f9
chore: add Token to workspace for compilation
mverzilli Apr 9, 2026
a0fb70a
chore: add deploy-subscription-fpc script and graceful FPC handling
mverzilli Apr 9, 2026
69348fd
final tweaks
mverzilli Apr 13, 2026
d6f8334
Merge branch 'main' into feat/p2p-offchain-transfers
mverzilli Apr 13, 2026
aa74e8d
update deps
mverzilli Apr 13, 2026
1a953d6
simplify token
mverzilli Apr 13, 2026
e2436db
remove plans
mverzilli Apr 13, 2026
2b03c96
refactor fpc deployment script
mverzilli Apr 13, 2026
dc36f5c
remove outdated script
mverzilli Apr 13, 2026
a379b3e
minor
mverzilli Apr 13, 2026
ed2c4a3
remove redundant type declaration
mverzilli Apr 13, 2026
467ccfe
ux improvements
mverzilli Apr 13, 2026
7eabe4f
readme and yarn task
mverzilli Apr 13, 2026
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
37 changes: 35 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,41 @@ This will:
- Deploy the ProofOfPassword contract
- Generate a `deployed-addresses.json` file with contract addresses

#### 4. Start the Development Server
#### 4. Deploy the Subscription FPC

GregoSwap uses a [SubscriptionFPC](https://github.com/Thunkar/gregojuice) (Fee Payment
Contract) to sponsor user transactions: the drip, the swap, and the offchain send all
run for free from the user's perspective, with the FPC paying gas in Fee Juice.

If you are testing on a local network, you will need to bootstrap FPC infrastructure.

After the base contracts are in place, you can deploy and configure the FPC with:

```bash
yarn deploy:fpc:local
```

This single command does everything needed to bring the FPC online against the local
sandbox:

- Deploys a fresh `SubscriptionFPC` with generated keys
- Bridges fee juice from L1 (Anvil) to the FPC's L2 address so it can actually pay gas
- Calls `sign_up` on the FPC for each sponsored function declared in
`scripts/deploy-subscription-fpc.ts` (currently: `PoP.check_password_and_mint`,
`AMM.swap_tokens_for_exact_tokens_from`, and
`Token.transfer_in_private_deliver_offchain` on both token contracts)
- Claims the L1→L2 message on behalf of the FPC so its balance is usable
- Writes the FPC address, secret key, and function-selector map into
`src/config/networks/local.json` under `subscriptionFPC`

The script is idempotent over the underlying config: re-running it deploys a new FPC
and overwrites the `subscriptionFPC` block. You can use a different config file via
`NETWORK_CONFIG_PATH`.

Note this is not needed to test on Testnet's or Mainnet's, since there the SubscriptionFPC infrastructure is already set up.

#### 5. Start the Development Server

```bash
yarn serve
yarn dev
```
3 changes: 2 additions & 1 deletion contracts/Nargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[workspace]
members = [
"proof_of_password",
"amm"
"amm",
"token"
]
2 changes: 1 addition & 1 deletion contracts/amm/Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ type = "contract"

[dependencies]
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.2.0-nightly.20260412", directory = "noir-projects/aztec-nr/aztec" }
token = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.2.0-nightly.20260412", directory = "noir-projects/noir-contracts/contracts/app/token_contract" }
token = { path = "../token" }
uint_note = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.2.0-nightly.20260412", directory = "noir-projects/aztec-nr/uint-note" }
4 changes: 2 additions & 2 deletions contracts/proof_of_password/Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ authors = [""]

[dependencies]
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.2.0-nightly.20260412", directory = "noir-projects/aztec-nr/aztec" }
token = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.2.0-nightly.20260412", directory = "noir-projects/noir-contracts/contracts/app/token_contract" }
token = { path = "../token" }
poseidon = { tag = "v0.1.1", git = "https://github.com/noir-lang/poseidon" }
compressed_string = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.2.0-nightly.20260412", directory = "noir-projects/aztec-nr/compressed-string" }
compressed_string = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.2.0-nightly.20260412", directory = "noir-projects/aztec-nr/compressed-string" }
10 changes: 10 additions & 0 deletions contracts/token/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "token_contract"
authors = [""]
type = "contract"

[dependencies]
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.2.0-nightly.20260412", directory = "noir-projects/aztec-nr/aztec" }
uint_note = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.2.0-nightly.20260412", directory = "noir-projects/aztec-nr/uint-note" }
compressed_string = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.2.0-nightly.20260412", directory = "noir-projects/aztec-nr/compressed-string" }
balance_set = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.2.0-nightly.20260412", directory = "noir-projects/aztec-nr/balance-set" }
Loading
Loading