From 2e209fda5110e6aab2cfbaeb3290e93c39512751 Mon Sep 17 00:00:00 2001
From: Tom French <15848336+TomAFrench@users.noreply.github.com>
Date: Wed, 7 Dec 2022 15:31:20 +0000
Subject: [PATCH] test: always use abi encoder v2 in fuzz tests (#2121)
---
pkg/pool-utils/test/foundry/BasePoolMath.t.sol | 2 +-
pkg/pool-utils/test/foundry/ComposablePoolLib.t.sol | 1 +
pkg/pool-utils/test/foundry/ExternalFees.t.sol | 1 +
pkg/pool-utils/test/foundry/PoolRegistrationLib.t.sol | 1 +
pkg/pool-weighted/test/foundry/ManagedPoolAumStorageLib.t.sol | 1 +
pkg/pool-weighted/test/foundry/ManagedPoolStorageLib.t.sol | 1 +
pkg/pool-weighted/test/foundry/ManagedPoolTokenStorageLib.t.sol | 1 +
pkg/pool-weighted/test/foundry/ValueCompression.t.sol | 1 +
pkg/pool-weighted/test/foundry/WeightedMath.t.sol | 1 +
.../test/foundry/WeightedMathJoinExitRounding.t.sol | 1 +
pkg/pool-weighted/test/foundry/WeightedMathSwapRounding.t.sol | 1 +
pkg/solidity-utils/test/foundry/FixedPoint.t.sol | 1 +
pkg/solidity-utils/test/foundry/InputHelpers.t.sol | 1 +
pkg/solidity-utils/test/foundry/Math.t.sol | 1 +
pkg/solidity-utils/test/foundry/WordCodec.t.sol | 1 +
15 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/pkg/pool-utils/test/foundry/BasePoolMath.t.sol b/pkg/pool-utils/test/foundry/BasePoolMath.t.sol
index 81197a45ef..9b3326d63a 100644
--- a/pkg/pool-utils/test/foundry/BasePoolMath.t.sol
+++ b/pkg/pool-utils/test/foundry/BasePoolMath.t.sol
@@ -13,6 +13,7 @@
// along with this program. If not, see .
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import { Test } from "forge-std/Test.sol";
import "@balancer-labs/v2-solidity-utils/contracts/math/FixedPoint.sol";
@@ -66,7 +67,6 @@ contract BasePoolMathJoinExitRoundingTest is Test {
bptAmount
);
-
// And check that we didn't get any free tokens
for (uint256 i = 0; i < arrayLength; ++i) {
assertLe(amountsOut[i], amountsIn[i]);
diff --git a/pkg/pool-utils/test/foundry/ComposablePoolLib.t.sol b/pkg/pool-utils/test/foundry/ComposablePoolLib.t.sol
index 8ddc94778c..828ef3dc97 100644
--- a/pkg/pool-utils/test/foundry/ComposablePoolLib.t.sol
+++ b/pkg/pool-utils/test/foundry/ComposablePoolLib.t.sol
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import "forge-std/Test.sol";
diff --git a/pkg/pool-utils/test/foundry/ExternalFees.t.sol b/pkg/pool-utils/test/foundry/ExternalFees.t.sol
index 1cf7d66c48..f77dd919fd 100644
--- a/pkg/pool-utils/test/foundry/ExternalFees.t.sol
+++ b/pkg/pool-utils/test/foundry/ExternalFees.t.sol
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import "forge-std/Test.sol";
diff --git a/pkg/pool-utils/test/foundry/PoolRegistrationLib.t.sol b/pkg/pool-utils/test/foundry/PoolRegistrationLib.t.sol
index 4406debf3b..49bb72406c 100644
--- a/pkg/pool-utils/test/foundry/PoolRegistrationLib.t.sol
+++ b/pkg/pool-utils/test/foundry/PoolRegistrationLib.t.sol
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import "forge-std/Test.sol";
diff --git a/pkg/pool-weighted/test/foundry/ManagedPoolAumStorageLib.t.sol b/pkg/pool-weighted/test/foundry/ManagedPoolAumStorageLib.t.sol
index 5a0d137778..a42b5139b4 100644
--- a/pkg/pool-weighted/test/foundry/ManagedPoolAumStorageLib.t.sol
+++ b/pkg/pool-weighted/test/foundry/ManagedPoolAumStorageLib.t.sol
@@ -13,6 +13,7 @@
// along with this program. If not, see .
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import { Test } from "forge-std/Test.sol";
diff --git a/pkg/pool-weighted/test/foundry/ManagedPoolStorageLib.t.sol b/pkg/pool-weighted/test/foundry/ManagedPoolStorageLib.t.sol
index 278ad9706c..9005e6a19a 100644
--- a/pkg/pool-weighted/test/foundry/ManagedPoolStorageLib.t.sol
+++ b/pkg/pool-weighted/test/foundry/ManagedPoolStorageLib.t.sol
@@ -13,6 +13,7 @@
// along with this program. If not, see .
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import { Test } from "forge-std/Test.sol";
diff --git a/pkg/pool-weighted/test/foundry/ManagedPoolTokenStorageLib.t.sol b/pkg/pool-weighted/test/foundry/ManagedPoolTokenStorageLib.t.sol
index abb8473a41..d1bae16390 100644
--- a/pkg/pool-weighted/test/foundry/ManagedPoolTokenStorageLib.t.sol
+++ b/pkg/pool-weighted/test/foundry/ManagedPoolTokenStorageLib.t.sol
@@ -13,6 +13,7 @@
// along with this program. If not, see .
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import { Test } from "forge-std/Test.sol";
diff --git a/pkg/pool-weighted/test/foundry/ValueCompression.t.sol b/pkg/pool-weighted/test/foundry/ValueCompression.t.sol
index bd58352ed9..960c304acd 100644
--- a/pkg/pool-weighted/test/foundry/ValueCompression.t.sol
+++ b/pkg/pool-weighted/test/foundry/ValueCompression.t.sol
@@ -13,6 +13,7 @@
// along with this program. If not, see .
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import { Test } from "forge-std/Test.sol";
diff --git a/pkg/pool-weighted/test/foundry/WeightedMath.t.sol b/pkg/pool-weighted/test/foundry/WeightedMath.t.sol
index ad30fd10a5..d6d328a7cd 100644
--- a/pkg/pool-weighted/test/foundry/WeightedMath.t.sol
+++ b/pkg/pool-weighted/test/foundry/WeightedMath.t.sol
@@ -13,6 +13,7 @@
// along with this program. If not, see .
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import { Test } from "forge-std/Test.sol";
import "@balancer-labs/v2-solidity-utils/contracts/math/FixedPoint.sol";
diff --git a/pkg/pool-weighted/test/foundry/WeightedMathJoinExitRounding.t.sol b/pkg/pool-weighted/test/foundry/WeightedMathJoinExitRounding.t.sol
index 173aac2c13..2af04f3056 100644
--- a/pkg/pool-weighted/test/foundry/WeightedMathJoinExitRounding.t.sol
+++ b/pkg/pool-weighted/test/foundry/WeightedMathJoinExitRounding.t.sol
@@ -13,6 +13,7 @@
// along with this program. If not, see .
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import { Test } from "forge-std/Test.sol";
import "@balancer-labs/v2-solidity-utils/contracts/math/FixedPoint.sol";
diff --git a/pkg/pool-weighted/test/foundry/WeightedMathSwapRounding.t.sol b/pkg/pool-weighted/test/foundry/WeightedMathSwapRounding.t.sol
index 9816818afb..6017966f9b 100644
--- a/pkg/pool-weighted/test/foundry/WeightedMathSwapRounding.t.sol
+++ b/pkg/pool-weighted/test/foundry/WeightedMathSwapRounding.t.sol
@@ -13,6 +13,7 @@
// along with this program. If not, see .
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import { Test } from "forge-std/Test.sol";
import "@balancer-labs/v2-solidity-utils/contracts/math/FixedPoint.sol";
diff --git a/pkg/solidity-utils/test/foundry/FixedPoint.t.sol b/pkg/solidity-utils/test/foundry/FixedPoint.t.sol
index f591b354fc..b109eb7a55 100644
--- a/pkg/solidity-utils/test/foundry/FixedPoint.t.sol
+++ b/pkg/solidity-utils/test/foundry/FixedPoint.t.sol
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import "forge-std/Test.sol";
diff --git a/pkg/solidity-utils/test/foundry/InputHelpers.t.sol b/pkg/solidity-utils/test/foundry/InputHelpers.t.sol
index a6c1f8aeb7..5b095813d5 100644
--- a/pkg/solidity-utils/test/foundry/InputHelpers.t.sol
+++ b/pkg/solidity-utils/test/foundry/InputHelpers.t.sol
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import "forge-std/Test.sol";
diff --git a/pkg/solidity-utils/test/foundry/Math.t.sol b/pkg/solidity-utils/test/foundry/Math.t.sol
index 48d17616f1..c3fd41d13a 100644
--- a/pkg/solidity-utils/test/foundry/Math.t.sol
+++ b/pkg/solidity-utils/test/foundry/Math.t.sol
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import "forge-std/Test.sol";
diff --git a/pkg/solidity-utils/test/foundry/WordCodec.t.sol b/pkg/solidity-utils/test/foundry/WordCodec.t.sol
index 36eff77a58..ed7362c745 100644
--- a/pkg/solidity-utils/test/foundry/WordCodec.t.sol
+++ b/pkg/solidity-utils/test/foundry/WordCodec.t.sol
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;
+pragma experimental ABIEncoderV2;
import "forge-std/Test.sol";