-
Notifications
You must be signed in to change notification settings - Fork 13
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
Smart sessions helpers #109
Comments
What does 'policy state' refer to in this context? Does it indicate whether a policy has been enforced in a specific smart session? I'm referring to the Policy section in the ModuleSDK documentation and the ModuleSDK source code to understand policies. Are there additional resources or references I should review? |
so the policy state refers to the configuration of the policies, which are held in state/storage. these policies are in this pr I think the specific helpers that would be useful are
these should be in the form of getter functions like this one. in terms of structure, these should be in the lmk if anything else is unclear on this |
For ERC20SpendingLimitPolicy, should I write the code for the helper based on the current state of the contract as seen here or do you want me to write it based on the state of the contract as it is in the PR that you have mentioned? |
Also, I noticed that the policy contracts are not deployed on Ethereum mainnet. Are they deployed on any other chain? Where can I test them? |
based on the prs for all of them - will deploy the remaining ones from the pr to eth sepolia tomorrow |
here are the updated contracts on sepolia:
|
Alright, will proceed with that |
@kopy-kat can you elaborate on the 2nd(toConfigId helper) and 3rd(action policy fallback constants) requirements here |
3 is very easy its just constants for these flags: https://github.com/erc7579/smartsessions/blob/4f8481f91cb30f96a8ee04188415363128eda0fb/contracts/DataTypes.sol#L197-L198 for 2, the policies you integrated take in a configId for the view functions which is different to permissionId. its a bit complicated since depending on the policy type it works a bit differently, see here: https://github.com/erc7579/smartsessions/blob/4f8481f91cb30f96a8ee04188415363128eda0fb/contracts/lib/IdLib.sol#L37-L71. but I think we'd want to have a helper where you pass the permission id and policy type and then it gets you the right config id |
Describe the feature you would like
Add:
Additional context
No response
The text was updated successfully, but these errors were encountered: