Uh oh!
There was an error while loading. Please reload this page.
feat(aggregation-mode): add subscription limit and arbitrary expiration lists - #2201
Conversation
Changes to gas cost
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…mode/add-subscription-limit-and-arbitrary-expiracy-lists
…bitrary-expiracy-lists
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Marcos Nicolau <76252340+MarcosNicolau@users.noreply.github.com>
Co-authored-by: Marcos Nicolau <76252340+MarcosNicolau@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
This PR makes two changes to the Aggregation Mode Payment Service contract:
How to test
Note: If you see a
Migrations to run correctly: VersionMismatch(1)error, you have to clean the DB by runningmake agg_mode_docker_clean.Subscription limit
We are lowering the limit and then subscribing with some Anvil rich accounts.
i. Lower the limit:
ii. Transfer to the contract with 2 rich accounts:
iii. Try to transfer with the example account with
make agg_mode_batcher_send_payment, you should see an error, the custom error0xdd6af2ad. This means the current subscription amount has reached the established limit.iv. Increase the limit up to 3:
Now, if you retry step 3, you should be able to subscribe.
Custom expiration subscriptions
Add a custom expiration for the example's address:
Note that you should put the UTC seconds value for the next 5 minutes (for getting this I used this tool).
Now try to send a proof with
make agg_mode_batcher_send_sp1_proof, and if you try in 5 minutes, you should not be able to send more.You can test the Access Roles feature by calling the
addSubscriptionsmethod using the owner address (which is not the same as the admin one):Type of change
Please delete options that are not relevant.
Checklist
testnet, everything else tostaging