mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 19:36:44 +01:00
Refactor ZKInputs & add struct initialization
Refactor ZKInputs & add struct initialization & add BJJCompressedTo256BigInts util
This commit is contained in:
@@ -2,6 +2,7 @@ package common
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"math/big"
|
||||
"time"
|
||||
|
||||
ethCommon "github.com/ethereum/go-ethereum/common"
|
||||
@@ -34,3 +35,8 @@ func (t TokenID) Bytes() []byte {
|
||||
binary.LittleEndian.PutUint32(tokenIDBytes[:], uint32(t))
|
||||
return tokenIDBytes[:]
|
||||
}
|
||||
|
||||
// BigInt returns the *big.Int representation of the TokenID
|
||||
func (t TokenID) BigInt() *big.Int {
|
||||
return big.NewInt(int64(t))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user