feat: Paymaster support in Forge create #609
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Forge create didn't support the use of paymaster parameters to be able to use this zksync specific feature to deploy a contract.
Solution
Introduce the ability to pass the paymaster address and input data in Forge create command
zkforge create ./src/Counter.sol:Counter --rpc-url "https://sepolia.era.zksync.dev/" --private-key {PK} --zksync --zk-paymaster-address 0x3cB2b87D10Ac01736A65688F3e0Fb1b070B3eeA3 --zk-paymaster-input $(zkcast calldata "approvalBased(address,uint256,bytes)" 0x31c43ac5e6A0fe62954B9056441b0A214722516e 1000000000000000000 "0x")
https://sepolia.explorer.zksync.io/tx/0xe57788a909df8bb4aae2265558ece52acd082328a46568d0d627db264d1ba039