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

🚀 Add PaymasterStake Script for Enhanced Paymaster Flexibility #87

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

qd-qd
Copy link
Member

@qd-qd qd-qd commented Apr 15, 2024

Overview

This PR introduces a new script, PaymasterStake, designed to facilitate the staking of funds for Paymaster contracts within the project. This script enhances the flexibility and ease of managing Paymaster staking, particularly for automated deployment and testing environments. It leverages environment variables to customize the staking process, making it adaptable to various scenarios. This operation is required because the paymaster access its own storage

Changes

  • New Script Addition: Introduced PaymasterStake.s.sol in the script/Paymaster directory. This script provides a straightforward method for staking funds into the Paymaster contract using solidity scripts.

  • Environment Variable Support: The script uses environment variables PAYMASTER, AMOUNT, and optionally UNSTAKE_DELAY_SEC to dynamically set the Paymaster address, the amount to stake, and the unstake delay. This allows for customization without code changes.

  • Default Unstake Delay: A default unstake delay of 1 day (recommended by Alchemy) is set, which can be overridden via environment variables. This provides a sensible default while offering the flexibility to adjust as needed.

- Add new script for easy staking of funds into
Paymaster contracts with configurable delay

This operation is required because the paymaster
access it own storage
@qd-qd qd-qd self-assigned this Apr 15, 2024
@qd-qd qd-qd merged commit 0ffa52a into main Apr 15, 2024
3 checks passed
@qd-qd qd-qd deleted the script/paymaster-add-stake branch April 15, 2024 14:18
Copy link

Changes to gas cost

Generated at commit: 7d281076d3f6c58a10a2338202a3fb44fe3fe33c, compared to commit: b6471eed46f4773476090613d1d470c11201fab7

🧾 Summary (20% most significant diffs)

Contract Method Avg (+/-) %

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Paymaster 1,187,223 (0) postOp 22,227 (0) 0.00% 22,840 (-1) -0.00% 22,419 (0) 0.00% 24,075 (0) 0.00% 512 (0)

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.

1 participant