Skip to content

Commit

Permalink
trigger admin (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinlau20100 authored Sep 5, 2023
1 parent 68d0abc commit a1e80c4
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Version changes are pinned to SDK releases.

## Unreleased

- Add trigger admin to state account. ([#264](https://github.com/zetamarkets/sdk/pull/264))

## [1.8.1] 2023-09-01

- Default reduceOnly to true in trigger orders. ([#263](https://github.com/zetamarkets/sdk/pull/263))
Expand Down
27 changes: 26 additions & 1 deletion src/idl/zeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,27 @@
],
"args": []
},
{
"name": "updateTriggerAdmin",
"accounts": [
{
"name": "state",
"isMut": true,
"isSigner": false
},
{
"name": "admin",
"isMut": false,
"isSigner": true
},
{
"name": "newAdmin",
"isMut": true,
"isSigner": true
}
],
"args": []
},
{
"name": "updateReferralsAdmin",
"accounts": [
Expand Down Expand Up @@ -6710,12 +6731,16 @@
]
}
},
{
"name": "triggerAdmin",
"type": "publicKey"
},
{
"name": "padding",
"type": {
"array": [
"u8",
338
306
]
}
}
Expand Down
1 change: 1 addition & 0 deletions src/program-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface State {
nativeOpenInterestLimit: anchor.BN;
haltStates: Array<HaltStateV2>;
haltStatesPadding: Array<HaltStateV2>;
triggerAdmin: PublicKey;
padding: Array<number>;
}

Expand Down
54 changes: 52 additions & 2 deletions src/types/zeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,27 @@ export type Zeta = {
],
"args": []
},
{
"name": "updateTriggerAdmin",
"accounts": [
{
"name": "state",
"isMut": true,
"isSigner": false
},
{
"name": "admin",
"isMut": false,
"isSigner": true
},
{
"name": "newAdmin",
"isMut": true,
"isSigner": true
}
],
"args": []
},
{
"name": "updateReferralsAdmin",
"accounts": [
Expand Down Expand Up @@ -6710,12 +6731,16 @@ export type Zeta = {
]
}
},
{
"name": "triggerAdmin",
"type": "publicKey"
},
{
"name": "padding",
"type": {
"array": [
"u8",
338
306
]
}
}
Expand Down Expand Up @@ -11091,6 +11116,27 @@ export const IDL: Zeta = {
],
"args": []
},
{
"name": "updateTriggerAdmin",
"accounts": [
{
"name": "state",
"isMut": true,
"isSigner": false
},
{
"name": "admin",
"isMut": false,
"isSigner": true
},
{
"name": "newAdmin",
"isMut": true,
"isSigner": true
}
],
"args": []
},
{
"name": "updateReferralsAdmin",
"accounts": [
Expand Down Expand Up @@ -16799,12 +16845,16 @@ export const IDL: Zeta = {
]
}
},
{
"name": "triggerAdmin",
"type": "publicKey"
},
{
"name": "padding",
"type": {
"array": [
"u8",
338
306
]
}
}
Expand Down

0 comments on commit a1e80c4

Please sign in to comment.