Skip to content

Commit

Permalink
chore: pull monorepo changes (#113)
Browse files Browse the repository at this point in the history
* Project import generated by Copybara.

GitOrigin-RevId: 20a39c08b5f2bd4c44c08303a3c29290d20005ce

* chore: Update pnpm lockfile

---------

Co-authored-by: Copybara <[email protected]>
Co-authored-by: gallynaut <[email protected]>
  • Loading branch information
3 people authored Jul 31, 2023
1 parent 33cf78d commit 00eca44
Show file tree
Hide file tree
Showing 37 changed files with 17,382 additions and 583 deletions.
42 changes: 0 additions & 42 deletions examples/README.md

This file was deleted.

4 changes: 2 additions & 2 deletions examples/functions/01_basic_oracle/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ basic_oracle = "BkTMjFhosJ1xKtLMV2xchGtnTDBABLJ45aXzs7x9FdeX"
basic_oracle = "BkTMjFhosJ1xKtLMV2xchGtnTDBABLJ45aXzs7x9FdeX"

[provider]
# cluster = "https://api.devnet.solana.com"
cluster = "https://api.devnet.solana.com"
# wallet = "~/switchboard_environments_v2/devnet/upgrade_authority/upgrade_authority.json"
cluster = "Localnet"
# cluster = "Localnet"
wallet = "~/.config/solana/id.json"

# cluster = "devnet"
Expand Down
4 changes: 2 additions & 2 deletions examples/functions/01_basic_oracle/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions examples/functions/01_basic_oracle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ cpi = ["no-entrypoint"]
default = []

[dependencies]
switchboard-solana = { version = "=0.9.1" }
# switchboard-solana = { version = "0.9.1", path = "../../../rust/switchboard-solana" }
switchboard-solana = { version = "=0.9.5" }
# switchboard-solana = { version = "0.9.4", path = "../../../rust/switchboard-solana" }
bytemuck = "^1"
anchor-lang = { version = "0.28.0", features = [
"init-if-needed",
"allow-missing-optionals"
] }
anchor-lang = { version = "0.28.0" }
4 changes: 0 additions & 4 deletions examples/functions/01_basic_oracle/sgx-function/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
# Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

Expand Down
3 changes: 2 additions & 1 deletion examples/functions/01_basic_oracle/sgx-function/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ futures = "0.3"
serde = "^1"
serde_json = "^1"
switchboard-utils = { version = "0.8.0" }
switchboard-solana = { version = "0.9.1", path = "../../../rust/switchboard-solana" }
# switchboard-solana = { version = "0.9.4", path = "../../../rust/switchboard-solana" }
switchboard-solana = "0.9.5"
2 changes: 1 addition & 1 deletion examples/functions/01_basic_oracle/sgx-function/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ WORKDIR /sgx
COPY --from=builder /sgx/app /sgx

# Get the measurement from the enclave
RUN /get_measurement.sh
RUN /get_measurement.sh && cat /measurement.txt

ENTRYPOINT ["bash", "/boot.sh"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ pub struct RefreshPrices<'info> {
function.load()?.validate(
&enclave_signer.to_account_info()
)? @ BasicOracleError::FunctionValidationFailed
// FunctionAccountData::validate(
// &function.to_account_info(),
// &enclave_signer.to_account_info()
// )? @ BasicOracleError::FunctionValidationFailed
)]
pub function: AccountLoader<'info, FunctionAccountData>,
pub enclave_signer: Signer<'info>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ async fn main() {
// // Finally, emit the signed quote and partially signed transaction to the functionRunner oracle
// // The functionRunner oracle will use the last outputted word to stdout as the serialized result. This is what gets executed on-chain.
// runner.emit(ixs).await.unwrap();
}
}
4 changes: 2 additions & 2 deletions examples/functions/04_randomness_callback/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ url = "https://api.apr.dev"
[provider]
# cluster = "Localnet"
cluster = "https://api.devnet.solana.com"
wallet = "~/.config/solana/id.json"
wallet = "~/switchboard_environments_v2/devnet/upgrade_authority/upgrade_authority.json"

[scripts]
test = "pnpm exec ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
Expand Down Expand Up @@ -44,4 +44,4 @@ address = "sbattyXrzedoNATfc4L31wC9Mhxsi1BmFhTiN8gDshx"
address = "5ExuoQR69trmKQfB95fDsUGsUrrChbGq9PFgt8qouncz"

[[test.validator.clone]] # sb devnet programState
address = "5MFs7RGTjLi1wtKNBFRtuLipCkkjs4YQwRRU9sjnbQbS"
address = "5MFs7RGTjLi1wtKNBFRtuLipCkkjs4YQwRRU9sjnbQbS"
Loading

0 comments on commit 00eca44

Please sign in to comment.