Skip to content

Cannot run sol-contract example #83

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

Closed
5elfle5 opened this issue Oct 31, 2022 · 4 comments
Closed

Cannot run sol-contract example #83

5elfle5 opened this issue Oct 31, 2022 · 4 comments

Comments

@5elfle5
Copy link

5elfle5 commented Oct 31, 2022

  1. cd examples/sol-contract
  2. cargo build
    error
    no method named get_current_pricefound for structPriceFeed in the current scope
    examples/sol-contract/src/processor.rs:87:33
    let result1 = feed1.get_current_price().ok_or(ProgramError::Custom(3))?;

If I rollback to commit 'An example contract for solana (#72)' I can go one step further:

  1. cd examples/sol-contract
  2. cargo build
  3. cd scripts
  4. sh build.sh

error
error: failed to select a version for the requirement time = "^0.3"
candidate versions found which didn't match: 0.3.15, 0.3.14, 0.3.13,

@yhzhang0128
Copy link
Contributor

yhzhang0128 commented Oct 31, 2022

Thanks for reporting the issue and sorry for the confusion. We recently updated the Pyth SDK interface causing this issue. I have created a related PR and I expect to have the issue fixed soon, after the PR is merged.

@jayantk
Copy link
Contributor

jayantk commented Nov 1, 2022

PR for reference #84

@5elfle5
Copy link
Author

5elfle5 commented Nov 2, 2022

@yhzhang0128 tried your branch 'adapt-api', still getting error 'failed to select a version for the requirement time = "^0.3"' on 'sh build.sh'

@ali-bahjati
Copy link
Collaborator

ali-bahjati commented Nov 3, 2022

Hi @5elfle5, can you please update your solana cli tools to the latest version? This solves the issue you are facing now. (#85 describes more).

Please reopen the issue if you are facing any other problems.

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

4 participants