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: add instructions for token and system program #12

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bry4ncheng
Copy link

I used this internally and thought it might be helpful for anyone using nostd-entrypoint, I've yet to finish the other instructions - wanted to check If it might be worth supporting.

Most of it is from @febo 's Pinocchio token and system program so thank you for that, was really helpful :D

@Aursen
Copy link
Contributor

Aursen commented Nov 23, 2024

You can find a work here: https://github.com/Aursen/nostdinfo-programs


use crate::ProgramResult;

pub fn invoke_signed(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling this method invoke signed is a bit misleading

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how so? can you elaborate more ser

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/Aursen/nostdinfo-programs/blob/274906c4c3d18f6fa9e3fe8d286106c395ed45b4/crates/invoke/src/lib.rs#L18

For example, in the verified call, we check whether the metas accounts agree with the accounts in the instruction. Since .to_metas-C is account-based, I don't know if it's accurate in this context @cavemanloverboy any ideas?

@Aursen
Copy link
Contributor

Aursen commented Nov 26, 2024

It may be a good idea to optimize the array assignment like pinocchio

@@ -1,5 +1,5 @@
[workspace]
members = ["solana-nostd-entrypoint", "example-program"]
members = ["solana-nostd-entrypoint", "example-program", "system", "token"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe here organize to use the crates folder and the examples

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