Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #86 from hermeznetwork/feature/updateRoot
Browse files Browse the repository at this point in the history
Feature/update root
  • Loading branch information
krlosMata authored Oct 13, 2021
2 parents 862a37d + 9df248f commit 3fb220a
Show file tree
Hide file tree
Showing 19 changed files with 2,992 additions and 544 deletions.
17 changes: 8 additions & 9 deletions contracts/hermez/future_versions/HermezV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ contract HermezV2 is InstantWithdrawManagerV2 {
// Verifiers array
VerifierRollup[] public rollupVerifiers;

// Withdraw verifier interface
VerifierWithdrawInterface[MAX_TOKEN_WITHDRAW] public withdrawVerifiers;

// Last account index created inside the rollup
uint48 public lastIdx;

Expand Down Expand Up @@ -135,6 +132,9 @@ contract HermezV2 is InstantWithdrawManagerV2 {

uint256 public constant MAX_TOKEN_WITHDRAW = 8;

// Withdraw verifier interface
VerifierWithdrawInterface[MAX_TOKEN_WITHDRAW] public withdrawVerifiers;

// Withdraw Bjj verifier interface
VerifierWithdrawInterface public withdrawBjjVerfier;

Expand All @@ -158,7 +158,7 @@ contract HermezV2 is InstantWithdrawManagerV2 {
event UpdateFeeAddToken(uint256 newFeeAddToken);

// Event emitted when a withdrawal is done
event WithdrawEvent(
event WithdrawEventNew(
uint192 indexed amountWithdraw,
uint48 indexed idx,
bool indexed instantWithdraw
Expand Down Expand Up @@ -501,7 +501,7 @@ contract HermezV2 is InstantWithdrawManagerV2 {
* @param batchNum Batch number after exit transactions has been done
* @param idxs Index of the exit tree account
* @param instantWithdraws true if is an instant withdraw
* Events: `WithdrawEvent`
* Events: `WithdrawEventNew`
*/
function withdrawMultiToken(
uint256[2] calldata proofA,
Expand Down Expand Up @@ -580,7 +580,7 @@ contract HermezV2 is InstantWithdrawManagerV2 {
msg.sender,
instantWithdraws[i]
);
emit WithdrawEvent(
emit WithdrawEventNew(
amountWithdraws[i],
idxs[i],
instantWithdraws[i]
Expand All @@ -601,7 +601,7 @@ contract HermezV2 is InstantWithdrawManagerV2 {
* @param batchNum Batch number after exit transactions has been done
* @param idx Index of the exit tree account
* @param instantWithdraw true if is an instant withdraw
* Events: `WithdrawEvent`
* Events: `WithdrawEventNew`
*/
function withdrawBjjCircuit(
uint256[2] calldata proofA,
Expand Down Expand Up @@ -659,7 +659,7 @@ contract HermezV2 is InstantWithdrawManagerV2 {
instantWithdraw
);

emit WithdrawEvent(amountWithdraw, idx, instantWithdraw);
emit WithdrawEventNew(amountWithdraw, idx, instantWithdraw);
}

//////////////
Expand Down Expand Up @@ -1022,7 +1022,6 @@ contract HermezV2 is InstantWithdrawManagerV2 {
// L2 TX unused data is padded with 0 at the start
_fillZeros(ptr, l1L2TxsDataLength - dLen);
ptr += l1L2TxsDataLength - dLen;

assembly {
calldatacopy(ptr, dPtr, dLen)
}
Expand Down
230 changes: 0 additions & 230 deletions contracts/hermez/future_versions/lib/verifier2048.sol

This file was deleted.

Loading

0 comments on commit 3fb220a

Please sign in to comment.