Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a deposit to batcher method in servicemanager #876

Conversation

NicolasRampoldi
Copy link
Contributor

Description

  • Adds a depositToBatcher function for a user to fund a batcher.

To Test

  • First, run:
cast send <aligned_layer_service_manager_addr> "depositToBatcher(address)" <batcher_addr> --value 1ether --private-key <private_key>
  • Then, check the balance:
cast call <aligned_layer_service_manager_addr> "balanceOf(address)(uint256)" <batcher_addr>
  • Also, try sending directly without calling depositToBatcher:
cast send <aligned_layer_service_manager_addr> --value 1ether --private-key <private_key>
  • Then, check the balance:
cast call <aligned_layer_service_manager_addr> "balanceOf(address)(uint256)" <batcher_addr>

Copy link

github-actions bot commented Aug 27, 2024

Changes to gas cost

Generated at commit: ac066b8ac641dc45b185274da3a4dd19a93ea488, compared to commit: 227441611e7693491e9c3774aca46c5e5c3fe60f

🧾 Summary (10% most significant diffs)

Contract Method Avg (+/-) %
AlignedLayerServiceManager batchesState
receive
+22 ❌
+94 ❌
+4.04%
+0.21%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
AlignedLayerServiceManager 4,435,616 (+22,921) batchesState
createNewTask
receive
567 (+22)
51,160 (+22)
45,059 (+94)
+4.04%
+0.04%
+0.21%
567 (+22)
51,356 (+22)
45,059 (+94)
+4.04%
+0.04%
+0.21%
567 (+22)
51,256 (+22)
45,059 (+94)
+4.04%
+0.04%
+0.21%
567 (+22)
51,859 (+22)
45,059 (+94)
+4.04%
+0.04%
+0.21%
256 (0)
256 (0)
256 (0)

…cemanager-that-doesnt-require-to-be-the-batcher

# Conflicts:
#	contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json
@NicolasRampoldi NicolasRampoldi merged commit 43b266e into main Aug 27, 2024
3 checks passed
@NicolasRampoldi NicolasRampoldi deleted the 871-add-a-deposit-to-batcher-method-in-servicemanager-that-doesnt-require-to-be-the-batcher branch August 27, 2024 19:14
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.

Add a deposit to batcher method in ServiceManager, that doesn't require to be the batcher
3 participants