deploy: 586d5491131af34034607c18e31a89d6888e5017

This commit is contained in:
s1fr0 2022-10-10 18:09:01 +00:00
parent 11ab135fb2
commit d986230fc0
2 changed files with 4 additions and 3 deletions

View File

@ -2,7 +2,7 @@
# libtool - Provide generalized library-building support services.
# Generated automatically by config.status (libbacktrace) version-unused
# Libtool was configured on host fv-az747-373:
# Libtool was configured on host fv-az180-278:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,

View File

@ -178,11 +178,11 @@ proc createRLNInstance*(d: int = MerkleTreeDepth): RLNResult {.raises: [Defect,
return res
proc toUInt256*(idCommitment: IDCommitment): UInt256 =
let pk = UInt256.fromBytesBE(idCommitment)
let pk = UInt256.fromBytesLE(idCommitment)
return pk
proc toIDCommitment*(idCommitmentUint: UInt256): IDCommitment =
let pk = IDCommitment(idCommitmentUint.toBytesBE())
let pk = IDCommitment(idCommitmentUint.toBytesLE())
return pk
proc toMembershipIndex(v: UInt256): MembershipIndex =
@ -233,6 +233,7 @@ proc register*(idComm: IDCommitment, ethAccountAddress: Address, ethAccountPrivK
debug "tx log data", arguments=arguments
let
argumentsBytes = arguments.hexToSeqByte()
# In TX log data, uints are encoded in big endian
eventIdCommUint = UInt256.fromBytesBE(argumentsBytes[0..31])
eventIndex = UInt256.fromBytesBE(argumentsBytes[32..^1])
eventIdComm = eventIdCommUint.toIDCommitment()