Merge pull request #12611 from ethereum/fix-bleeps-and-perpetual-pools

Fix breakage in Bleeps and Perpetual Pools external tests
This commit is contained in:
Kamil Śliwak 2022-02-01 19:26:31 +01:00 committed by GitHub
commit a05d2b356a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 4 deletions

View File

@ -1468,7 +1468,8 @@ workflows:
- t_ems_ext: *job_native_test_ext_trident
- t_ems_ext: *job_native_test_ext_euler
- t_ems_ext: *job_native_test_ext_yield_liquidator
- t_ems_ext: *job_native_test_ext_bleeps
# Disabled until we have a fix for https://github.com/wighawag/bleeps/issues/2
#-t_ems_ext: *job_native_test_ext_bleeps
- t_ems_ext: *job_native_test_ext_pool_together
- t_ems_ext: *job_native_test_ext_perpetual_pools
- t_ems_ext: *job_native_test_ext_uniswap

View File

@ -27,6 +27,7 @@ source test/externalTests/common.sh
verify_input "$@"
BINARY_TYPE="$1"
BINARY_PATH="$2"
SELECTED_PRESETS="$3"
function compile_fn { npm run compile; }
function test_fn { npm run test; }
@ -34,8 +35,8 @@ function test_fn { npm run test; }
function bleeps_test
{
local repo="https://github.com/wighawag/bleeps"
local ref_type=tag
local ref=bleeps_migrations # TODO: There's a 0.4.19 contract in 'main' that would need patching for the latest compiler.
local ref_type=branch
local ref=main
local config_file="hardhat.config.ts"
local config_var=config
@ -65,6 +66,12 @@ function bleeps_test
pushd "contracts/"
sed -i 's|"bleeps-common": "workspace:\*",|"bleeps-common": "file:../common-lib/",|g' package.json
sed -i 's/function() public/fallback() external/g' src/externals/WETH9.sol
sed -i 's/this\.balance/address(this).balance/g' src/externals/WETH9.sol
sed -i 's/uint(-1)/type(uint).max/g' src/externals/WETH9.sol
sed -i 's/msg\.sender\.transfer(/payable(msg.sender).transfer(/g' src/externals/WETH9.sol
sed -i 's/^\s*\(Deposit\|Withdrawal\|Approval\|Transfer\)(/emit \1(/g' src/externals/WETH9.sol
neutralize_package_lock
neutralize_package_json_hooks
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"

View File

@ -27,6 +27,7 @@ source test/externalTests/common.sh
verify_input "$@"
BINARY_TYPE="$1"
BINARY_PATH="$2"
SELECTED_PRESETS="$3"
function compile_fn { npm run build; }
function test_fn { npm run test; }

View File

@ -34,7 +34,7 @@ function test_fn { yarn test; }
function perpetual_pools_test
{
local repo="https://github.com/tracer-protocol/perpetual-pools-contracts"
local repo="https://github.com/solidity-external-tests/perpetual-pools-contracts"
local ref_type=branch
local ref=pools-v2
local config_file="hardhat.config.ts"

View File

@ -27,6 +27,7 @@ source test/externalTests/common.sh
verify_input "$@"
BINARY_TYPE="$1"
BINARY_PATH="$2"
SELECTED_PRESETS="$3"
function compile_fn { yarn build; }

View File

@ -27,6 +27,7 @@ source test/externalTests/common.sh
verify_input "$@"
BINARY_TYPE="$1"
BINARY_PATH="$2"
SELECTED_PRESETS="$3"
function compile_fn { yarn compile; }
function test_fn { UPDATE_SNAPSHOT=1 npx hardhat test; }