Skip to content

Commit a4d03d7

Browse files
committed
fix(lazer): update solana contract setup script
1 parent 629f011 commit a4d03d7

File tree

4 files changed

+764
-93
lines changed

4 files changed

+764
-93
lines changed

lazer/contracts/solana/package.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@
44
"fix:format": "prettier --write **/*.*",
55
"test:format": "prettier --check **/*.*",
66
"test:anchor": "CARGO_TARGET_DIR=\"$PWD/target\" anchor test",
7-
"test": "pnpm run test:format && pnpm run test:anchor"
7+
"test": "pnpm run test:format && pnpm run test:anchor",
8+
"setup": "anchor build && pnpm ts-node scripts/setup.ts"
89
},
910
"dependencies": {
1011
"@coral-xyz/anchor": "^0.30.1"
1112
},
1213
"devDependencies": {
13-
"chai": "^4.3.4",
14-
"mocha": "^9.0.3",
15-
"ts-mocha": "^10.0.0",
1614
"@types/bn.js": "^5.1.0",
1715
"@types/chai": "^4.3.0",
1816
"@types/mocha": "^9.0.0",
17+
"@types/yargs": "^17.0.33",
18+
"chai": "^4.3.4",
19+
"mocha": "^9.0.3",
20+
"prettier": "^2.6.2",
21+
"ts-mocha": "^10.0.0",
22+
"ts-node": "^10.9.2",
1923
"typescript": "^4.3.5",
20-
"prettier": "^2.6.2"
24+
"yargs": "^17.7.2"
2125
}
2226
}

lazer/contracts/solana/programs/pyth-lazer-solana-contract/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ use {
66
declare_id!("pytd2yyk641x7ak7mkaasSJVXh6YYZnC7wTmtgAyxPt");
77

88
pub mod storage {
9-
use anchor_lang::declare_id;
9+
use anchor_lang::prelude::{pubkey, Pubkey};
1010

11-
declare_id!("3rdJbqfnagQ4yx9HXJViD4zc4xpiSqmFsKpPuSCQVyQL");
11+
pub const ID: Pubkey = pubkey!("3rdJbqfnagQ4yx9HXJViD4zc4xpiSqmFsKpPuSCQVyQL");
1212

1313
#[test]
1414
fn test_storage_id() {

lazer/contracts/solana/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"lib": ["es2015"],
66
"module": "commonjs",
77
"target": "es6",
8-
"esModuleInterop": true
8+
"esModuleInterop": true,
9+
"resolveJsonModule": true
910
}
1011
}

0 commit comments

Comments
 (0)