-
Notifications
You must be signed in to change notification settings - Fork 370
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(contract): withdraw_from_service_manager in BatcherPaymentService.sol #1772
base: staging
Are you sure you want to change the base?
feat(contract): withdraw_from_service_manager in BatcherPaymentService.sol #1772
Conversation
Changes to gas cost
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
userData[msg.sender].balance += msg.value; | ||
userData[msg.sender].unlockBlockTime = 0; | ||
emit PaymentReceived(msg.sender, msg.value); | ||
if (msg.sender != address(alignedLayerServiceManager)) { // `alignedLayerServiceManager.withdraw()` triggers `receive()` (and with only 2300 gas) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MauroToscano does it make sense to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uri mentioned it doesn't work without that, you can try just in case
withdraw_from_service_manager in BatcherPaymentService.sol
Description
AlignedLayerServiceManager has a
withdraw()
function, which is currently not accesible to the Batcher, since he pays through the BatcherPaymentService.With this function, the Batcher will be able to withdraw funds from AlignedLayerServiceManager.
How to Test
Addresses:
balanceOf
batcherPaymentService
onAlignedLayerServiceManager
Note: The anvil deployment script already funds the Batcher balance with 1ETH
The output should be
The batcherPaymentService owner is
0x14dC79964da2C08b23698B3D3cc7Ca32193d9955
, and it private key is0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356
(Address 7 in anvil)AlignedLayerServiceManager
The output should be
The output should be
Type of change
Please delete options that are not relevant.
Checklist
testnet
, everything else tostaging