@@ -337,8 +337,6 @@ Bytes helper functions
337
337
- ` #asInteger ` will interpret a stack of bytes as a single arbitrary-precision integer (with MSB first).
338
338
- ` #asAccount ` will interpret a stack of bytes as a single account id (with MSB first).
339
339
Differs from ` #asWord ` only in that an empty stack represents the empty account, not account zero.
340
- - ` asAccountNotNil ` will interpret a stack of bytes as a single account id (with MSB first), but will fail if the
341
- stack is empty.
342
340
- ` #asByteStack ` will split a single word up into a ` Bytes ` .
343
341
- ` #range(WS, N, W) ` access the range of ` WS ` beginning with ` N ` of width ` W ` .
344
342
- ` #padToWidth(N, WS) ` and ` #padRightToWidth ` make sure that a ` Bytes ` is the correct size.
@@ -353,13 +351,10 @@ Bytes helper functions
353
351
rule #asInteger(WS) => Bytes2Int(WS, BE, Unsigned) [concrete]
354
352
355
353
syntax Account ::= #asAccount ( Bytes ) [symbol(#asAccount), function]
356
- syntax AccountNotNil ::= #asAccountNotNil ( Bytes ) [symbol(#asAccountNotNil), function]
357
- // ----------------------------------------------------------------------------------------
354
+ // ----------------------------------------------------------------------------------
358
355
rule #asAccount(BS) => .Account requires lengthBytes(BS) ==Int 0
359
356
rule #asAccount(BS) => #asWord(BS) [owise]
360
357
361
- rule #asAccountNotNil(BS) => #asWord(BS) requires lengthBytes(BS) >Int 0
362
-
363
358
syntax Bytes ::= #asByteStack ( Int ) [symbol(#asByteStack), function, total]
364
359
// -----------------------------------------------------------------------------
365
360
rule #asByteStack(W) => Int2Bytes(W, BE, Unsigned) [concrete]
@@ -390,8 +385,7 @@ Accounts
390
385
391
386
``` k
392
387
syntax Account ::= ".Account" | Int
393
- syntax AccountNotNil = Int
394
- // --------------------------
388
+ // -----------------------------------
395
389
396
390
syntax AccountCode ::= Bytes
397
391
// ----------------------------
@@ -468,12 +462,12 @@ Productions related to transactions
468
462
syntax TxData ::= LegacyTx | AccessListTx | DynamicFeeTx | BlobTx
469
463
// -----------------------------------------------------------------
470
464
471
- syntax LegacyTx ::= LegacyTxData ( nonce: Int, gasPrice: Int, gasLimit: Int, to: Account, value: Int, data: Bytes ) [symbol(LegacyTxData)]
472
- | LegacySignedTxData ( nonce: Int, gasPrice: Int, gasLimit: Int, to: Account, value: Int, data: Bytes, networkChainId: Int ) [symbol(LegacySignedTxData)]
473
- syntax AccessListTx ::= AccessListTxData ( nonce: Int, gasPrice: Int, gasLimit: Int, to: Account, value: Int, data: Bytes, chainId: Int, accessLists: JSONs ) [symbol(AccessListTxData)]
474
- syntax DynamicFeeTx ::= DynamicFeeTxData ( nonce: Int, priorityGasFee: Int, maxGasFee: Int, gasLimit: Int, to: Account, value: Int, data: Bytes, chainId: Int, accessLists: JSONs) [symbol(DynamicFeeTxData)]
475
- syntax BlobTx ::= BlobTxData ( nonce: Int, priorityGasFee: Int, maxGasFee: Int, gasLimit: Int, to: AccountNotNil , value: Int, data: Bytes, chainId: Int, accessLists: JSONs, maxBlobGasFee: Int, blobVersionedHashes: List ) [symbol(BlobTxData)]
476
- // ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
465
+ syntax LegacyTx ::= LegacyTxData ( nonce: Int, gasPrice: Int, gasLimit: Int, to: Account, value: Int, data: Bytes ) [symbol(LegacyTxData)]
466
+ | LegacySignedTxData ( nonce: Int, gasPrice: Int, gasLimit: Int, to: Account, value: Int, data: Bytes, networkChainId: Int ) [symbol(LegacySignedTxData)]
467
+ syntax AccessListTx ::= AccessListTxData ( nonce: Int, gasPrice: Int, gasLimit: Int, to: Account, value: Int, data: Bytes, chainId: Int, accessLists: JSONs ) [symbol(AccessListTxData)]
468
+ syntax DynamicFeeTx ::= DynamicFeeTxData ( nonce: Int, priorityGasFee: Int, maxGasFee: Int, gasLimit: Int, to: Account, value: Int, data: Bytes, chainId: Int, accessLists: JSONs) [symbol(DynamicFeeTxData)]
469
+ syntax BlobTx ::= BlobTxData ( nonce: Int, priorityGasFee: Int, maxGasFee: Int, gasLimit: Int, to: Account , value: Int, data: Bytes, chainId: Int, accessLists: JSONs, maxBlobGasFee: Int, blobVersionedHashes: List ) [symbol(BlobTxData)]
470
+ // ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
477
471
478
472
endmodule
479
473
```
0 commit comments