@@ -30,6 +30,12 @@ module NODE
3030 syntax KItem ::= "#handleRequestFile"
3131 | "#removeRequestFile"
3232 | #handleRequest(String)
33+
34+ syntax Step ::= setLedgerSequence(Int) [symbol(setLedgerSequence)]
35+ // ----------------------------------------------------------------------
36+ rule [setLedgerSequence]:
37+ <k> setLedgerSequence(SEQ) => .K ... </k>
38+ <ledgerSequenceNumber> _ => SEQ </ledgerSequenceNumber>
3339```
3440
3541HexBytes: decode a lowercase hex string to Bytes (big-endian, length = hex length / 2).
@@ -104,10 +110,11 @@ JSON request format (key order is significant — must match Python's json.dumps
104110
105111where each <step > is one of:
106112
107- { "op": "setAccount", "account": "<hex32 >", "balance": <int > }
108- { "op": "deployContract", "from": "<hex32 >", "address": "<hex32 >", "wasmHash": "<hex32 >" }
109- { "op": "callTx", "from": "<hex32 >", "fromIsContract": <bool >,
110- "func": "<name >", "to": "<hex32 >", "args": [ <scval >, ... ] }
113+ { "op": "setLedgerSequence", "sequence": <int > }
114+ { "op": "setAccount", "account": "<hex32 >", "balance": <int > }
115+ { "op": "deployContract", "from": "<hex32 >", "address": "<hex32 >", "wasmHash": "<hex32 >" }
116+ { "op": "callTx", "from": "<hex32 >", "fromIsContract": <bool >,
117+ "func": "<name >", "to": "<hex32 >", "args": [ <scval >, ... ] }
111118
112119SCVal arg encoding (key order also significant):
113120
@@ -131,6 +138,9 @@ SCVal arg encoding (key order also significant):
131138 rule #decodeSteps(.JSONs) => .Steps
132139 rule #decodeSteps(S:JSON, SS:JSONs) => #decodeStep(S) #decodeSteps(SS)
133140
141+ rule #decodeStep({ "op" : "setLedgerSequence" , "sequence" : SEQ:Int })
142+ => setLedgerSequence(SEQ)
143+
134144 rule #decodeStep({ "op" : "setAccount" , "account" : ACCT:String , "balance" : BAL:Int })
135145 => setAccount(Account(HexBytes(ACCT)), BAL)
136146
0 commit comments