Skip to content

Commit 1f18151

Browse files
authored
Merge pull request #47 from pyth-network/guibescos/fix-idl
Guibescos/fix idl
2 parents 57955f3 + 7bc8c8b commit 1f18151

File tree

4 files changed

+25
-33
lines changed

4 files changed

+25
-33
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"scripts": {
1313
"test": "jest --config jestconfig.json",
1414
"build": "tsc",
15-
"format": "prettier --write \"src/**/*.ts\"",
15+
"format": "prettier --write \"src/**/*.{ts,json}\"",
1616
"lint": "tslint -p tsconfig.json",
1717
"prepare": "npm run build",
1818
"prepublishOnly": "npm test && npm run lint",

src/__tests__/Anchor.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ test('Anchor', (done) => {
141141
.updPermissions(new PublicKey(6), new PublicKey(7), new PublicKey(8))
142142
.accounts({
143143
upgradeAuthority: PublicKey.unique(),
144-
programAccount: PublicKey.unique(),
145144
programDataAccount: PublicKey.unique(),
146145
})
147146
.instruction()

src/anchor/idl.json

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,6 @@
408408
"isMut": true,
409409
"isSigner": true
410410
},
411-
{
412-
"name": "programAccount",
413-
"isMut": false,
414-
"isSigner": false
415-
},
416411
{
417412
"name": "programDataAccount",
418413
"isMut": false,
@@ -423,11 +418,13 @@
423418
"isMut": true,
424419
"isSigner": false,
425420
"pda": {
426-
"seeds": [{
427-
"kind": "const",
428-
"type": "string",
429-
"value": "permissions"
430-
}]
421+
"seeds": [
422+
{
423+
"kind": "const",
424+
"type": "string",
425+
"value": "permissions"
426+
}
427+
]
431428
}
432429
},
433430
{
@@ -436,18 +433,20 @@
436433
"isSigner": false
437434
}
438435
],
439-
"args": [ {
440-
"name": "masterAuthority",
441-
"type": "publicKey"
442-
},
443-
{
444-
"name": "dataCurationAuthority",
445-
"type": "publicKey"
446-
},
447-
{
448-
"name": "securityAuthority",
449-
"type": "publicKey"
450-
}]
436+
"args": [
437+
{
438+
"name": "masterAuthority",
439+
"type": "publicKey"
440+
},
441+
{
442+
"name": "dataCurationAuthority",
443+
"type": "publicKey"
444+
},
445+
{
446+
"name": "securityAuthority",
447+
"type": "publicKey"
448+
}
449+
]
451450
}
452451
]
453-
}
452+
}

src/anchor/program.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ export function pythOracleProgram(programId: PublicKey, provider: AnchorProvider
1313
}
1414

1515
export function pythOracleCoder(): PythOracleCoder {
16-
return new PythOracleCoder(IDL as PythOracle);
16+
return new PythOracleCoder(IDL as PythOracle)
1717
}
1818

19-
export { default as pythIdl } from "./idl.json";
20-
19+
export { default as pythIdl } from './idl.json'
2120

2221
export type PythOracle = {
2322
version: '2.20.0'
@@ -429,11 +428,6 @@ export type PythOracle = {
429428
isMut: true
430429
isSigner: true
431430
},
432-
{
433-
name: 'programAccount'
434-
isMut: false
435-
isSigner: false
436-
},
437431
{
438432
name: 'programDataAccount'
439433
isMut: false

0 commit comments

Comments
 (0)