-
Notifications
You must be signed in to change notification settings - Fork 2
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
authenticated calls using arbitrary cpi [poc and draft] #38
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #38 +/- ##
========================================
+ Coverage 8.60% 8.94% +0.33%
========================================
Files 1 3 +2
Lines 244 313 +69
========================================
+ Hits 21 28 +7
- Misses 223 285 +62 ☔ View full report in Codecov by Sentry. |
.pack(); | ||
|
||
// NOTE: calling function in other program without passing accounts seems very limitting in what can be done | ||
// every account that instruction interacts with has to be predetermined and set before the call, and various callable contracts might have different behavior and need different accounts |
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.
Do you think it is a set of data that could be potentially represented during the call on ZetaChain using a standard?
A bit like the idea of the Bitcoin memo standard.
User provide a generate bytes input, following a standard, this input is decoded to represent the full call on Solana.
This could be a generic field that we would need to other chain, it seems there will be lot of considerations to have as well for TON smart contract calls
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.
I was not refering to data, but accounts. Accounts that solana programs interact with have to be determined before the call, that is how state is changed with stateless solana programs - state is maintained in accounts that program interacts with, not the program itself (difference with solidity where smart contracts contain state as well). Also important, program can not access those accounts when it executes transaction, the only way is that account need to be passed with instruction, basically preloaded before execution happens.
For example, if someone wants to have on_call(data)
in their solana program, i would expect they want to somehow store that data, or modify existing data etc, but in order for program to access any state, account containing the state has to be sent inside instruction - in case of making generic calls to on_call
not sure how we can pass any account there, maybe something generic, but not sure.
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.
Also important, program can not access those accounts when it executes transaction, the only way is that account need to be passed with instruction, basically preloaded before execution happens.
Yes, but this is a piece of information that could be passed in the gateway on ZetaChain?
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.
I believe it would have to be in call to gateway execute function already and then passed to on_call. But still not sure what we should send there.
@brewmaster012 what do you think about this, could you please check when you get a chance?
Still just poc - please check comments with
NOTE:
for discussion questions and findings.