Add methods for ZKInputs IntermStates generation

- Add L1Tx TxCompressedData method
- Add PoolL2Tx TxCompressedDataV2 method
- Update ProcessTxs logic
- Add ZKInputs Intermediate States & Fee parameters calculation
This commit is contained in:
arnaucube
2020-11-18 22:16:33 +01:00
parent bf88eb60b8
commit d3a38a3ee1
10 changed files with 388 additions and 76 deletions

View File

@@ -52,3 +52,8 @@ func TokenIDFromBytes(b []byte) (TokenID, error) {
tid := binary.BigEndian.Uint32(b[:4])
return TokenID(tid), nil
}
// TokenIDFromBigInt returns a TokenID with the value of the given *big.Int
func TokenIDFromBigInt(b *big.Int) TokenID {
return TokenID(b.Int64())
}