Skip to content

Commit 9083a2c

Browse files
authored
Merge pull request #13 from webb-tools/integration-tests
Integration tests
2 parents 51bc496 + cd9db5a commit 9083a2c

File tree

8 files changed

+948
-194
lines changed

8 files changed

+948
-194
lines changed

contracts/anchors/bridged/AnchorPoseidon2.sol

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ abstract contract AnchorPoseidon2 is MerkleTreePoseidon, ReentrancyGuard {
9494
uint32 insertedIndex = _insert(_commitment);
9595
commitments[_commitment] = true;
9696
_processDeposit();
97-
9897
emit Deposit(_commitment, insertedIndex, block.timestamp);
98+
9999
}
100100

101101
/** @dev this function is defined in a child contract */
@@ -120,19 +120,11 @@ abstract contract AnchorPoseidon2 is MerkleTreePoseidon, ReentrancyGuard {
120120
) external payable nonReentrant {
121121
require(_fee <= denomination, "Fee exceeds transfer value");
122122
require(!nullifierHashes[_nullifierHash], "The note has been already spent");
123-
require(isKnownRoot(_root), "Cannot find your merkle root"); // Make sure to use a recent one
123+
require(isKnownRoot(_root), "Cannot find your merkle root");
124124
address rec = address(_recipient);
125125
address rel = address(_relayer);
126126
bytes32[1] memory neighbors = getLatestNeighborRoots();
127-
// console.log(uint256(_nullifierHash));
128-
// console.log(uint256(uint160(rec)));
129-
// console.log(uint256(uint160(rel)));
130-
// console.log(_fee);
131-
// console.log(_refund);
132-
// console.log(uint256(chainID));
133-
// console.log(uint256(_root));
134-
// console.log(uint256(neighbors[0]));
135-
// console.logBytes(_proof);
127+
136128
uint256[8] memory inputs;
137129
inputs[0] = uint256(_nullifierHash);
138130
inputs[1] = uint256(uint160(rec));

contracts/anchors/bridged/LinkableAnchorPoseidon2.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ abstract contract LinkableAnchorPoseidon2 is AnchorPoseidon2, ILinkableAnchor {
6363
// emit update event
6464
bytes32[1] memory neighbors = getLatestNeighborRoots();
6565
emit RootHistoryUpdate(block.timestamp, neighbors);
66-
6766
}
6867

6968
function updateEdge(

0 commit comments

Comments
 (0)