Skip to content

Commit a05d2b3

Browse files
authored
Merge pull request #12611 from ethereum/fix-bleeps-and-perpetual-pools
Fix breakage in Bleeps and Perpetual Pools external tests
2 parents f4e0270 + 1e0a695 commit a05d2b3

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,8 @@ workflows:
14681468
- t_ems_ext: *job_native_test_ext_trident
14691469
- t_ems_ext: *job_native_test_ext_euler
14701470
- t_ems_ext: *job_native_test_ext_yield_liquidator
1471-
- t_ems_ext: *job_native_test_ext_bleeps
1471+
# Disabled until we have a fix for https://github.com/wighawag/bleeps/issues/2
1472+
#-t_ems_ext: *job_native_test_ext_bleeps
14721473
- t_ems_ext: *job_native_test_ext_pool_together
14731474
- t_ems_ext: *job_native_test_ext_perpetual_pools
14741475
- t_ems_ext: *job_native_test_ext_uniswap

test/externalTests/bleeps.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@ source test/externalTests/common.sh
2727
verify_input "$@"
2828
BINARY_TYPE="$1"
2929
BINARY_PATH="$2"
30+
SELECTED_PRESETS="$3"
3031

3132
function compile_fn { npm run compile; }
3233
function test_fn { npm run test; }
3334

3435
function bleeps_test
3536
{
3637
local repo="https://github.com/wighawag/bleeps"
37-
local ref_type=tag
38-
local ref=bleeps_migrations # TODO: There's a 0.4.19 contract in 'main' that would need patching for the latest compiler.
38+
local ref_type=branch
39+
local ref=main
3940
local config_file="hardhat.config.ts"
4041
local config_var=config
4142

@@ -65,6 +66,12 @@ function bleeps_test
6566
pushd "contracts/"
6667
sed -i 's|"bleeps-common": "workspace:\*",|"bleeps-common": "file:../common-lib/",|g' package.json
6768

69+
sed -i 's/function() public/fallback() external/g' src/externals/WETH9.sol
70+
sed -i 's/this\.balance/address(this).balance/g' src/externals/WETH9.sol
71+
sed -i 's/uint(-1)/type(uint).max/g' src/externals/WETH9.sol
72+
sed -i 's/msg\.sender\.transfer(/payable(msg.sender).transfer(/g' src/externals/WETH9.sol
73+
sed -i 's/^\s*\(Deposit\|Withdrawal\|Approval\|Transfer\)(/emit \1(/g' src/externals/WETH9.sol
74+
6875
neutralize_package_lock
6976
neutralize_package_json_hooks
7077
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"

test/externalTests/elementfi.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ source test/externalTests/common.sh
2727
verify_input "$@"
2828
BINARY_TYPE="$1"
2929
BINARY_PATH="$2"
30+
SELECTED_PRESETS="$3"
3031

3132
function compile_fn { npm run build; }
3233
function test_fn { npm run test; }

test/externalTests/perpetual-pools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function test_fn { yarn test; }
3434

3535
function perpetual_pools_test
3636
{
37-
local repo="https://github.com/tracer-protocol/perpetual-pools-contracts"
37+
local repo="https://github.com/solidity-external-tests/perpetual-pools-contracts"
3838
local ref_type=branch
3939
local ref=pools-v2
4040
local config_file="hardhat.config.ts"

test/externalTests/trident.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ source test/externalTests/common.sh
2727
verify_input "$@"
2828
BINARY_TYPE="$1"
2929
BINARY_PATH="$2"
30+
SELECTED_PRESETS="$3"
3031

3132
function compile_fn { yarn build; }
3233

test/externalTests/uniswap.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ source test/externalTests/common.sh
2727
verify_input "$@"
2828
BINARY_TYPE="$1"
2929
BINARY_PATH="$2"
30+
SELECTED_PRESETS="$3"
3031

3132
function compile_fn { yarn compile; }
3233
function test_fn { UPDATE_SNAPSHOT=1 npx hardhat test; }

0 commit comments

Comments
 (0)