-
Notifications
You must be signed in to change notification settings - Fork 107
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(x/intent)!: ability for modules to dynamically resolve variables on Action creation #139
Commits on Apr 3, 2024
-
feat(wardend): prefer context.Context over sdk.Context where possible
This allow us to pass other context to functions. In the future we might exploit this feature for enriching the sdk.Context with more fields.
Configuration menu - View commit details
-
Copy full SHA for 5c92f21 - Browse repository at this point
Copy the full SHA 5c92f21View commit details -
feat(shield): move Environment interface out of internal package
Even if it was type-aliased (= re-exported), the depinject pkg from Cosmos SDK didn't like it. Since Environment is commonly accessed from outside of shield, it makes sense to move it outside the internal/ dir anyway.
Configuration menu - View commit details
-
Copy full SHA for 5c6d560 - Browse repository at this point
Copy the full SHA 5c6d560View commit details -
feat(shield): allow dots (.) in identifier names
In this version of shield we'll treat dots as part of the identifier (i.e. we won't dig much into building "javascript objects" equivalents). It'll be up to the Environment resolving the identifier to do whatever it prefers. E.g. `warden.space.owners` will be treated as a single name. The resolution env from x/warden can split by '.' and resolve 'space' properties individually.
Configuration menu - View commit details
-
Copy full SHA for 1ec0cd3 - Browse repository at this point
Copy the full SHA 1ec0cd3View commit details -
Configuration menu - View commit details
-
Copy full SHA for d8ff2f7 - Browse repository at this point
Copy the full SHA d8ff2f7View commit details -
feat(shield): add custom AST preprocessing
This allows anyone to plug-in an implementer of the Expander interface to change the AST into another AST by replacing any Identifier with another AST node. This will be useful for resolving some Identifiers into Warden addresses and freeze them in time (e.g. when an Action is created).
Configuration menu - View commit details
-
Copy full SHA for b0ca9d2 - Browse repository at this point
Copy the full SHA b0ca9d2View commit details -
feat(shield): add ast.Stringify method to translate an AST back into …
…its string definition
Configuration menu - View commit details
-
Copy full SHA for 243885f - Browse repository at this point
Copy the full SHA 243885fView commit details -
feat(x/intent): inject a constructor for a shield.Expander
We'll use the Expander later, when creating an Action, to process the Intent definition at the time the Action is created.
Configuration menu - View commit details
-
Copy full SHA for 3f75ee0 - Browse repository at this point
Copy the full SHA 3f75ee0View commit details -
feat(x/intent): provide an ast.Expander implementation
The ExpanderManager will dispatch Expander calls based on "namespace", i.e. the first part of an identifier (separated by a dot).
Configuration menu - View commit details
-
Copy full SHA for a739df6 - Browse repository at this point
Copy the full SHA a739df6View commit details -
Configuration menu - View commit details
-
Copy full SHA for f9d9b42 - Browse repository at this point
Copy the full SHA f9d9b42View commit details -
feat(x/intent): move and rename Intent.Addresses to Action.Mentions
This way we can populate this field *after* preprocessing. The Intent stored in the database will have the original definition written by the user, the Intent stored inside the Action will be preprocessed (so the user knows exactly what's being evaluated to decide on its Action).
Configuration menu - View commit details
-
Copy full SHA for 9ff1f3f - Browse repository at this point
Copy the full SHA 9ff1f3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 259a8f8 - Browse repository at this point
Copy the full SHA 259a8f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 35e54e4 - Browse repository at this point
Copy the full SHA 35e54e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0de2035 - Browse repository at this point
Copy the full SHA 0de2035View commit details -
feat(x/warden): provide shield.Expander for warden module
In this initial version, it's able to expand `space.owners` in the list of owners for the space. Only sdk.Msgs that have a SpaceId field are supported at this time.
Configuration menu - View commit details
-
Copy full SHA for 46eb179 - Browse repository at this point
Copy the full SHA 46eb179View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2fb9011 - Browse repository at this point
Copy the full SHA 2fb9011View commit details -
Configuration menu - View commit details
-
Copy full SHA for b0be1b2 - Browse repository at this point
Copy the full SHA b0be1b2View commit details -
Update warden/x/warden/keeper/shield.go
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 570ac20 - Browse repository at this point
Copy the full SHA 570ac20View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e2d7e3 - Browse repository at this point
Copy the full SHA 8e2d7e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 53ee308 - Browse repository at this point
Copy the full SHA 53ee308View commit details