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

Could i pass signer seeds to initialize api to let my contract to create pool with tokens hold by contract itself. #19

Open
benhaben opened this issue Jul 31, 2024 · 3 comments

Comments

@benhaben
Copy link

benhaben commented Jul 31, 2024

image

@benhaben
Copy link
Author

Could i pass signer seeds to initialize api to let my contract to create pool with tokens hold by contract itself.
It seems we only can intialzlize token by eoa address.

@benhaben benhaben changed the title Could i Could i pass signer seeds to initialize api to let my contract to create pool with tokens hold by contract itself. Jul 31, 2024
@liupan163
Copy link

@benhaben Hello, sir. I have the same requirement. Did you successfully achieve that using a contract to create a pool?

@RainRaydium
Copy link
Contributor

Yes.
I thank you can specify your program's authority as the creator, and ensure that your program authority has enough sols to pay the rent, and the program authority is not allocated any space.
Because when the solana system program creates an account to transfer rent, the lamports from account is not allowed to have any data.
refer:https://github.com/solana-labs/solana/blob/master/programs/system/src/system_processor.rs#L192

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

No branches or pull requests

3 participants