Skip to content

Update example sol-anchor-contract #107 #108

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

Merged

Conversation

lastemp
Copy link
Contributor

@lastemp lastemp commented May 26, 2023

test_result_1
test_result_2

@guibescos
Copy link
Contributor

guibescos commented May 31, 2023

Hey! Thanks so much for the contribution. This is a well overdue cleanup. However I can't merge it because anchor test doesn't work.
This is because the Pyth accounts you're trying to read in the tests like pythLoanAccount and pythCollateralAccount don't exist in localnet.
I think you can fix this by adding some [[test.validator.clone]] in the Anchor.toml. That will clone accounts from another network for your local tests. Look at this Anchor.toml from Armani for more ideas https://github.com/coral-xyz/soulbound/blob/master/Anchor.toml

Let us know if you have the bandwidth to address this issue.

@lastemp
Copy link
Contributor Author

lastemp commented May 31, 2023

Hey! Thanks so much for the contribution. This is a well overdue cleanup. However I can't merge it because anchor test doesn't work. This is because the Pyth accounts you're trying to read in the tests like pythLoanAccount and pythCollateralAccount don't exist in localnet. I think you can fix this by adding some [[test.validator.clone]] in the Anchor.toml. That will clone accounts from another network for your local tests. Look at this Anchor.toml from Armani for more ideas https://github.com/coral-xyz/soulbound/blob/master/Anchor.toml

Let us know if you have the bandwidth to address this issue.

Thanks for the guidance, this has now been resolved.

Copy link
Contributor

@guibescos guibescos left a comment

Choose a reason for hiding this comment

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

Thanks so much, I made some extra cleanup. Welcome to the Pyth contributor club!

@guibescos guibescos merged commit bac6e6a into pyth-network:main Jun 2, 2023
@lastemp
Copy link
Contributor Author

lastemp commented Jun 2, 2023

Thanks so much, I made some extra cleanup. Welcome to the Pyth contributor club!

@guibescos You are welcome, I am also grateful for your guidance and help.

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