Skip to content
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(intent): render svm acc for fis input #81

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

vinhphuctadang
Copy link
Contributor

@vinhphuctadang vinhphuctadang commented Oct 30, 2024

Context

Drift intent solver needs input of PDA but we can't let user inject it in input as it's so complex
=> This PR supports calculating svm PDA in the background, base on const vars and input.
Now it's using handlebar, a logic-less render library, schema looks like

{{pda "user" (decodeBase58 taker_svm_address) "\0\0" "FLR3mfYrMZUnhqEadNJVwjUhjX8ky9vE9qTtDmkK4vwC"}}

Actually I considered eval() and some logic-less rendering.
Eval is more advanced, flexible but it allows some unsafe function access that can steal user info from webpage, access to network or something else, so I go with logic-less well-known handlebar lib for now

We can consider adding more flexible schema as we go

After this we will have PR for astromesh app: https://github.com/FluxAstromeshLabs/flux-astromesh/pull/62/files

@vinhphuctadang vinhphuctadang changed the title feat: add render svm acc calculation feat: render svm acc for fis input Oct 30, 2024
@vinhphuctadang vinhphuctadang changed the title feat: render svm acc for fis input feat(intent): render svm acc for fis input Oct 30, 2024
@nntruong96 nntruong96 merged commit c7451ac into main Oct 30, 2024
@nntruong96 nntruong96 deleted the f/intent-calculate-svm-acc branch October 30, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants