diff --git a/bridgesync/claimcalldata_test.go b/bridgesync/claimcalldata_test.go index eba5b4c2..48959f97 100644 --- a/bridgesync/claimcalldata_test.go +++ b/bridgesync/claimcalldata_test.go @@ -199,7 +199,7 @@ func TestClaimCalldata(t *testing.T) { expectedClaim.IsMessage = true expectedClaim.GlobalIndex = big.NewInt(425) expectedClaim2.IsMessage = true - expectedClaim2.GlobalIndex = big.NewInt(426) + expectedClaim2.GlobalIndex = big.NewInt(425) tx, err = claimCaller.ClaimMessage2( auth, proofLocal, @@ -235,7 +235,7 @@ func TestClaimCalldata(t *testing.T) { // 2 indirect call claim message (1 ok, 1 reverted) expectedClaim.IsMessage = true - expectedClaim.GlobalIndex = big.NewInt(427) + expectedClaim.GlobalIndex = big.NewInt(426) tx, err = claimCaller.ClaimMessage2( auth, proofLocal, @@ -265,8 +265,8 @@ func TestClaimCalldata(t *testing.T) { // 2 indirect call claim message (1 reverted, 1 ok) expectedClaim2.IsMessage = true - expectedClaim.GlobalIndex = big.NewInt(429) - expectedClaim2.GlobalIndex = big.NewInt(430) + expectedClaim.GlobalIndex = big.NewInt(427) + expectedClaim2.GlobalIndex = big.NewInt(427) tx, err = claimCaller.ClaimMessage2( auth, proofLocal, @@ -296,9 +296,9 @@ func TestClaimCalldata(t *testing.T) { // 2 indirect call claim asset expectedClaim.IsMessage = false - expectedClaim.GlobalIndex = big.NewInt(431) + expectedClaim.GlobalIndex = big.NewInt(428) expectedClaim2.IsMessage = false - expectedClaim2.GlobalIndex = big.NewInt(432) + expectedClaim2.GlobalIndex = big.NewInt(428) tx, err = claimCaller.ClaimAsset2( auth, proofLocal, @@ -335,7 +335,7 @@ func TestClaimCalldata(t *testing.T) { // 2 indirect call claim asset (1 ok, 1 reverted) expectedClaim.IsMessage = false - expectedClaim.GlobalIndex = big.NewInt(433) + expectedClaim.GlobalIndex = big.NewInt(429) tx, err = claimCaller.ClaimAsset2( auth, proofLocal, @@ -367,8 +367,8 @@ func TestClaimCalldata(t *testing.T) { // 2 indirect call claim asset (1 reverted, 1 ok) expectedClaim2.IsMessage = false - expectedClaim.GlobalIndex = big.NewInt(435) - expectedClaim2.GlobalIndex = big.NewInt(436) + expectedClaim.GlobalIndex = big.NewInt(430) + expectedClaim2.GlobalIndex = big.NewInt(430) tx, err = claimCaller.ClaimAsset2( auth, proofLocal, diff --git a/test/contracts/claimmockcaller/ClaimMockCaller.sol b/test/contracts/claimmockcaller/ClaimMockCaller.sol index d2829f41..fdcfc90c 100644 --- a/test/contracts/claimmockcaller/ClaimMockCaller.sol +++ b/test/contracts/claimmockcaller/ClaimMockCaller.sol @@ -76,7 +76,6 @@ contract ClaimMockCaller { if(reverted[0]) { newAmount1 = 0; } - uint256 globalIndex2 = globalIndex + 1; uint256 newAmount2 = amount+1; if(reverted[1]) { newAmount2 = 0; @@ -104,7 +103,7 @@ contract ClaimMockCaller { mstore(x,argSig) mstore(add(x,164),value1) mstore(add(x,1156),value2) - mstore(add(x,2052),globalIndex2) + mstore(add(x,2052),globalIndex) mstore(add(x,2084),mainnetExitRoot) mstore(add(x,2116),rollupExitRoot) mstore(add(x,2148),originNetwork) @@ -174,7 +173,6 @@ contract ClaimMockCaller { if(reverted[0]) { newAmount1 = 0; } - uint256 globalIndex2 = globalIndex + 1; uint256 newAmount2 = amount+1; if(reverted[1]) { newAmount2 = 0; @@ -202,7 +200,7 @@ contract ClaimMockCaller { mstore(x,argSig) mstore(add(x,164),value1) mstore(add(x,1156),value2) - mstore(add(x,2052),globalIndex2) + mstore(add(x,2052),globalIndex) mstore(add(x,2084),mainnetExitRoot) mstore(add(x,2116),rollupExitRoot) mstore(add(x,2148),originNetwork)