Skip to content

Conversation

@JuArce
Copy link
Collaborator

@JuArce JuArce commented Sep 22, 2025

Test(batcher): add script to test unlocked funds flow

Description

This PR send proofs and unlock funds to test the batcher is removing those proofs

Closes #2125

How to Test

  1. make anvil_start
  2. make batcher_start_local
  3. make aggregator_start ENVIRONMENT=devnet
  4. make operator_full_registration CONFIG_FILE=./config-files/config-operator-1.yaml ENVIRONMENT=devnet
  5. make operator_start CONFIG_FILE=./config-files/config-operator-1.yaml ENVIRONMENT=devnet
  6. Deposit to batcher
aligned deposit-to-batcher \
    --amount 1ether \
    --private_key 0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e \
    --network devnet \
    --rpc_url http://localhost:8545
  1. Run the script
./scripts/unlocked_funds/test_unlocked_funds.sh scripts/unlocked_funds/.env.devnet

You should see logs like:

[2025-09-22 17:55:56] [INFO] 🚀 Running...
[2025-09-22 17:55:56] [INFO] ⏳ Locking funds...
[2025-09-22 17:56:01] [INFO] ✅ Lock transaction successful
[2025-09-22 17:56:01] [INFO] ⏳ Sending proof to Aligned...
[2025-09-22 18:01:01] [INFO] ⏳ Unlocking funds...
[2025-09-22 18:01:02] [INFO] ✅ Unlock transaction successful
[2025-09-22 18:05:47] [INFO] ✅ Test successful - UserFundsUnlocked event detected

Type of change

  • Test

Checklist

  • “Hotfix” to testnet, everything else to staging
  • Linked to Github Issue
  • This change depends on code or research by an external entity
    • Acknowledgements were updated to give credit
  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.
  • This change is an Optimization
    • Benchmarks added/run
  • Has a known issue
  • If your PR changes the Operator compatibility (Ex: Upgrade prover versions)
    • This PR adds compatibility for operator for both versions and do not change crates/docs/examples
    • This PR updates batcher and docs/examples to the newer version. This requires the operator are already updated to be compatible

@JuArce JuArce self-assigned this Sep 26, 2025
@JuArce JuArce linked an issue Oct 14, 2025 that may be closed by this pull request
@JuArce JuArce added this pull request to the merge queue Oct 14, 2025
Merged via the queue into staging with commit f7e49f6 Oct 14, 2025
1 check passed
@JuArce JuArce deleted the 2125-testbatcher-add-script-to-test-unlocked-funds-flow branch October 14, 2025 15:51
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.

test(batcher): add script to test unlocked funds flow

4 participants