Skip to content

Commit

Permalink
feat(#559): Use pyth oracle for mobile onboarding (#566)
Browse files Browse the repository at this point in the history
* Use pyth oracle for mobile onboarding

* Fix tests

* Fix dev workflow
  • Loading branch information
ChewingGlass authored Feb 5, 2024
1 parent 474a4ce commit 1b751e9
Show file tree
Hide file tree
Showing 11 changed files with 152 additions and 565 deletions.
2 changes: 1 addition & 1 deletion Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ address = "propFYxqmVcufMhk5esNMrexq2ogHbbC2kP9PU1qxKs" # Proposal
address = "66t3XARU6Ja3zj91gDZ2KoNLJHEMTYPSKqJWYb6PJJBA" # Proposal IDL

[[test.validator.clone]]
address = "moraMdsjyPFz8Lp1RJGoW4bQriSF5mHE7Evxt7hytSF" # Mobile price oracle
address = "JBaTytFv1CmGNkyNiLu16jFMXNZ49BGfy4bYAYZdkxg5" # Mobile price oracle

# Pyth price oracle
[[test.validator.clone]]
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

1 change: 0 additions & 1 deletion packages/helium-admin-cli/src/create-dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@ export async function run(args: any = process.argv) {
await sendInstructionsOrSquads({
provider,
instructions: [
ComputeBudgetProgram.setComputeUnitLimit({ units: 400000 }),
await hemProgram.methods
.initializeDataOnlyV0({
authority,
Expand Down
5 changes: 0 additions & 5 deletions packages/helium-admin-cli/src/create-subdao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {
} from '@solana/spl-governance';
import { getAssociatedTokenAddress } from '@solana/spl-token';
import {
ComputeBudgetProgram,
LAMPORTS_PER_SOL,
PublicKey,
SystemProgram,
Expand Down Expand Up @@ -331,9 +330,6 @@ export async function run(args: any = process.argv) {
.initializeRegistrarV0({
positionUpdateAuthority: null,
})
.preInstructions([
ComputeBudgetProgram.setComputeUnitLimit({ units: 500000 }),
])
.accounts({
realm,
realmGoverningTokenMint: subdaoKeypair.publicKey,
Expand Down Expand Up @@ -459,7 +455,6 @@ export async function run(args: any = process.argv) {
await sendInstructionsOrSquads({
provider,
instructions: [
ComputeBudgetProgram.setComputeUnitLimit({ units: 500000 }),
await initSubdaoMethod.instruction(),
],
executeTransaction: true,
Expand Down
7 changes: 5 additions & 2 deletions packages/helium-entity-manager-sdk/src/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ export const heliumEntityManagerResolvers = combineResolvers(
mint: "dntMint",
owner: "maker",
}),
resolveIndividual(async ({ path }) => {
resolveIndividual(async ({ path, provider }) => {
if (path[path.length - 1] == "dntPrice") {
return new PublicKey("moraMdsjyPFz8Lp1RJGoW4bQriSF5mHE7Evxt7hytSF");
if (provider.connection.rpcEndpoint.includes("devnet") || provider.connection.rpcEndpoint.includes("test")) {
return new PublicKey("BmUdxoioVgoRTontomX8nBjWbnLevtxeuBYaLipP8GTQ");
}
return new PublicKey("JBaTytFv1CmGNkyNiLu16jFMXNZ49BGfy4bYAYZdkxg5");
}
}),
resolveIndividual(async ({ path, args, accounts, provider }) => {
Expand Down
24 changes: 12 additions & 12 deletions packages/monitor-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"registry": "https://registry.npmjs.org/"
},
"license": "Apache-2.0",
"version": "0.6.27",
"version": "0.6.26",
"description": "Prometheus monitoring of important accounts on Solana",
"repository": {
"type": "git",
Expand All @@ -33,17 +33,17 @@
},
"dependencies": {
"@coral-xyz/anchor": "^0.28.0",
"@helium/account-fetch-cache": "^0.6.27",
"@helium/circuit-breaker-sdk": "^0.6.27",
"@helium/data-credits-sdk": "^0.6.27",
"@helium/helium-entity-manager-sdk": "^0.6.27",
"@helium/helium-sub-daos-sdk": "^0.6.27",
"@helium/idls": "^0.6.27",
"@helium/lazy-distributor-sdk": "^0.6.27",
"@helium/lazy-transactions-sdk": "^0.6.27",
"@helium/price-oracle-sdk": "^0.6.27",
"@helium/spl-utils": "^0.6.27",
"@metaplex-foundation/mpl-bubblegum": "^3.0.0",
"@helium/account-fetch-cache": "^0.6.26",
"@helium/circuit-breaker-sdk": "^0.6.26",
"@helium/data-credits-sdk": "^0.6.26",
"@helium/helium-entity-manager-sdk": "^0.6.26",
"@helium/helium-sub-daos-sdk": "^0.6.26",
"@helium/idls": "^0.6.26",
"@helium/lazy-distributor-sdk": "^0.6.26",
"@helium/lazy-transactions-sdk": "^0.6.26",
"@helium/price-oracle-sdk": "^0.6.26",
"@helium/spl-utils": "^0.6.26",
"@metaplex-foundation/mpl-bubblegum": "^0.7.0",
"@metaplex-foundation/mpl-token-metadata": "^2.10.0",
"@solana/spl-account-compression": "^0.1.7",
"@solana/spl-token": "^0.3.8",
Expand Down
Loading

0 comments on commit 1b751e9

Please sign in to comment.