@@ -46,7 +46,7 @@ template wrapValueError(body: untyped) =
4646 except ValueError as exc:
4747 r.raiseUnexpectedValue (exc.msg)
4848
49- proc parseHexOrInt [T](x: string ): T {.raises : [ValueError ].} =
49+ func parseHexOrInt [T](x: string ): T {.raises : [ValueError ].} =
5050 when T is UInt256 :
5151 if x.startsWith (" 0x" ):
5252 UInt256 .fromHex (x)
@@ -258,10 +258,6 @@ proc parseTxJson(txo: TxObject, chainId: ChainId): Result[Transaction, string] =
258258 required (maxFeePerGas)
259259 optional (accessList)
260260 required (authorizationList)
261- of TxEip7873 :
262- required (chainId)
263- optional (accessList)
264- required (initCodes)
265261
266262 # Ignore chainId if txType == TxLegacy
267263 if tx.txType > TxLegacy and tx.chainId != chainId:
@@ -278,7 +274,7 @@ proc parseTxJson(txo: TxObject, chainId: ChainId): Result[Transaction, string] =
278274 required (s, S)
279275 ok (tx)
280276
281- proc readNestedTx (rlp: var Rlp , chainId: ChainId ): Result [Transaction , string ] =
277+ func readNestedTx (rlp: var Rlp , chainId: ChainId ): Result [Transaction , string ] =
282278 try :
283279 let tx = if rlp.isList:
284280 rlp.read (Transaction )
@@ -292,7 +288,7 @@ proc readNestedTx(rlp: var Rlp, chainId: ChainId): Result[Transaction, string] =
292288 except RlpError as exc:
293289 err (exc.msg)
294290
295- proc parseTxs * (ctx: var TransContext , chainId: ChainId )
291+ func parseTxs * (ctx: var TransContext , chainId: ChainId )
296292 {.raises : [T8NError , RlpError ].} =
297293 var numTxs = ctx.txsJson.len
298294 var rlp: Rlp
@@ -311,7 +307,7 @@ proc parseTxs*(ctx: var TransContext, chainId: ChainId)
311307 for item in rlp:
312308 ctx.txList.add rlp.readNestedTx (chainId)
313309
314- proc filterGoodTransactions * (ctx: TransContext ): seq [Transaction ] =
310+ func filterGoodTransactions * (ctx: TransContext ): seq [Transaction ] =
315311 for txRes in ctx.txList:
316312 if txRes.isOk:
317313 result .add txRes.get
@@ -336,7 +332,7 @@ proc parseEnv*(ctx: var TransContext, envFile: string) {.raises: [T8NError].} =
336332 wrapException:
337333 ctx.env = T8Conv .loadFile (envFile, EnvStruct )
338334
339- proc parseTxsRlp * (ctx: var TransContext , hexData: string ) {.raises : [ValueError ].} =
335+ func parseTxsRlp * (ctx: var TransContext , hexData: string ) {.raises : [ValueError ].} =
340336 ctx.txsRlp = hexToSeqByte (hexData)
341337
342338proc parseInputFromStdin * (ctx: var TransContext ) {.raises : [T8NError ].} =
@@ -354,42 +350,42 @@ template stripLeadingZeros(value: string): string =
354350 cidx.inc
355351 value[cidx .. ^ 1 ]
356352
357- proc `@@` * [K, V](x: Table [K, V]): JsonNode
358- proc `@@` * [T](x: seq [T]): JsonNode
353+ func `@@` * [K, V](x: Table [K, V]): JsonNode
354+ func `@@` * [T](x: seq [T]): JsonNode
359355
360- proc to0xHex (x: UInt256 ): string =
356+ func to0xHex (x: UInt256 ): string =
361357 " 0x" & x.toHex
362358
363- proc `@@` (x: uint64 | int64 | int ): JsonNode =
359+ func `@@` (x: uint64 | int64 | int ): JsonNode =
364360 let hex = x.toHex.stripLeadingZeros
365361 % (" 0x" & hex.toLowerAscii)
366362
367- proc `@@` (x: UInt256 ): JsonNode =
363+ func `@@` (x: UInt256 ): JsonNode =
368364 % (" 0x" & x.toHex)
369365
370- proc `@@` (x: Hash32 ): JsonNode =
366+ func `@@` (x: Hash32 ): JsonNode =
371367 % (" 0x" & x.data.toHex)
372368
373- proc `@@` * (x: seq [byte ]): JsonNode =
369+ func `@@` * (x: seq [byte ]): JsonNode =
374370 % (" 0x" & x.toHex)
375371
376- proc `@@` (x: bool ): JsonNode =
372+ func `@@` (x: bool ): JsonNode =
377373 % (if x: " 0x1" else : " 0x0" )
378374
379- proc `@@` (x: openArray [byte ]): JsonNode =
375+ func `@@` (x: openArray [byte ]): JsonNode =
380376 % (" 0x" & x.toHex)
381377
382- proc `@@` (x: FixedBytes | Hash32 | Address ): JsonNode =
378+ func `@@` (x: FixedBytes | Hash32 | Address ): JsonNode =
383379 @@ (x.data)
384380
385- proc toJson (x: Table [UInt256 , UInt256 ]): JsonNode =
381+ func toJson (x: Table [UInt256 , UInt256 ]): JsonNode =
386382 # special case, we need to convert UInt256 into full 32 bytes
387383 # and not shorter
388384 result = newJObject ()
389385 for k, v in x:
390386 result [" 0x" & k.dumpHex] = % (" 0x" & v.dumpHex)
391387
392- proc `@@` (acc: GenesisAccount ): JsonNode =
388+ func `@@` (acc: GenesisAccount ): JsonNode =
393389 result = newJObject ()
394390 if acc.code.len > 0 :
395391 result [" code" ] = @@ (acc.code)
@@ -399,22 +395,22 @@ proc `@@`(acc: GenesisAccount): JsonNode =
399395 if acc.storage.len > 0 :
400396 result [" storage" ] = toJson (acc.storage)
401397
402- proc `@@` [K, V](x: Table [K, V]): JsonNode =
398+ func `@@` [K, V](x: Table [K, V]): JsonNode =
403399 result = newJObject ()
404400 for k, v in x:
405401 result [k.to0xHex] = @@ (v)
406402
407- proc `@@` (x: Bloom ): JsonNode =
403+ func `@@` (x: Bloom ): JsonNode =
408404 % (" 0x" & toHex (x))
409405
410- proc `@@` (x: Log ): JsonNode =
406+ func `@@` (x: Log ): JsonNode =
411407 % {
412408 " address" : @@ (x.address),
413409 " topics" : @@ (x.topics),
414410 " data" : @@ (x.data)
415411 }
416412
417- proc `@@` (x: TxReceipt ): JsonNode =
413+ func `@@` (x: TxReceipt ): JsonNode =
418414 result = % {
419415 " root" : if x.root == default (Hash32 ): % (" 0x" ) else : @@ (x.root),
420416 " status" : @@ (x.status),
@@ -430,29 +426,29 @@ proc `@@`(x: TxReceipt): JsonNode =
430426 if x.txType > TxLegacy :
431427 result [" type" ] = % (" 0x" & toHex (x.txType.int , 1 ))
432428
433- proc `@@` (x: RejectedTx ): JsonNode =
429+ func `@@` (x: RejectedTx ): JsonNode =
434430 % {
435431 " index" : % (x.index),
436432 " error" : % (x.error)
437433 }
438434
439- proc `@@` [T](x: seq [T]): JsonNode =
435+ func `@@` [T](x: seq [T]): JsonNode =
440436 result = newJArray ()
441437 for c in x:
442438 result .add @@ (c)
443439
444- proc `@@` [N, T](x: array [N, T]): JsonNode =
440+ func `@@` [N, T](x: array [N, T]): JsonNode =
445441 result = newJArray ()
446442 for c in x:
447443 result .add @@ (c)
448444
449- proc `@@` [T](x: Opt [T]): JsonNode =
445+ func `@@` [T](x: Opt [T]): JsonNode =
450446 if x.isNone:
451447 newJNull ()
452448 else :
453449 @@ (x.get ())
454450
455- proc `@@` * (x: ExecutionResult ): JsonNode =
451+ func `@@` * (x: ExecutionResult ): JsonNode =
456452 result = % {
457453 " stateRoot" : @@ (x.stateRoot),
458454 " txRoot" : @@ (x.txRoot),
0 commit comments