-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* sequencer support * remove debug print * fix sequencer logic bug * add some guardrails * sequencing per subaccount * remove this * remove comment
- Loading branch information
1 parent
17f1a8c
commit 73f9c1a
Showing
5 changed files
with
288 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{ | ||
"version": "0.1.0", | ||
"name": "sequence_enforcer", | ||
"instructions": [ | ||
{ | ||
"name": "initialize", | ||
"accounts": [ | ||
{ | ||
"name": "sequenceAccount", | ||
"isMut": true, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "authority", | ||
"isMut": false, | ||
"isSigner": true | ||
}, | ||
{ | ||
"name": "systemProgram", | ||
"isMut": false, | ||
"isSigner": false | ||
} | ||
], | ||
"args": [ | ||
{ | ||
"name": "bump", | ||
"type": "u8" | ||
}, | ||
{ | ||
"name": "sym", | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "resetSequenceNumber", | ||
"accounts": [ | ||
{ | ||
"name": "sequenceAccount", | ||
"isMut": true, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "authority", | ||
"isMut": false, | ||
"isSigner": true | ||
} | ||
], | ||
"args": [ | ||
{ | ||
"name": "sequenceNum", | ||
"type": "u64" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "checkAndSetSequenceNumber", | ||
"accounts": [ | ||
{ | ||
"name": "sequenceAccount", | ||
"isMut": true, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "authority", | ||
"isMut": false, | ||
"isSigner": true | ||
} | ||
], | ||
"args": [ | ||
{ | ||
"name": "sequenceNum", | ||
"type": "u64" | ||
} | ||
] | ||
} | ||
], | ||
"accounts": [ | ||
{ | ||
"name": "SequenceAccount", | ||
"type": { | ||
"kind": "struct", | ||
"fields": [ | ||
{ | ||
"name": "sequenceNum", | ||
"type": "u64" | ||
}, | ||
{ | ||
"name": "authority", | ||
"type": "publicKey" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"errors": [ | ||
{ | ||
"code": 6000, | ||
"name": "SequenceOutOfOrder", | ||
"msg": "Sequence out of order" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters