mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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:
commit
a05d2b356a
@ -1468,7 +1468,8 @@ workflows:
|
|||||||
- t_ems_ext: *job_native_test_ext_trident
|
- t_ems_ext: *job_native_test_ext_trident
|
||||||
- t_ems_ext: *job_native_test_ext_euler
|
- t_ems_ext: *job_native_test_ext_euler
|
||||||
- t_ems_ext: *job_native_test_ext_yield_liquidator
|
- 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_pool_together
|
||||||
- t_ems_ext: *job_native_test_ext_perpetual_pools
|
- t_ems_ext: *job_native_test_ext_perpetual_pools
|
||||||
- t_ems_ext: *job_native_test_ext_uniswap
|
- t_ems_ext: *job_native_test_ext_uniswap
|
||||||
|
@ -27,6 +27,7 @@ source test/externalTests/common.sh
|
|||||||
verify_input "$@"
|
verify_input "$@"
|
||||||
BINARY_TYPE="$1"
|
BINARY_TYPE="$1"
|
||||||
BINARY_PATH="$2"
|
BINARY_PATH="$2"
|
||||||
|
SELECTED_PRESETS="$3"
|
||||||
|
|
||||||
function compile_fn { npm run compile; }
|
function compile_fn { npm run compile; }
|
||||||
function test_fn { npm run test; }
|
function test_fn { npm run test; }
|
||||||
@ -34,8 +35,8 @@ function test_fn { npm run test; }
|
|||||||
function bleeps_test
|
function bleeps_test
|
||||||
{
|
{
|
||||||
local repo="https://github.com/wighawag/bleeps"
|
local repo="https://github.com/wighawag/bleeps"
|
||||||
local ref_type=tag
|
local ref_type=branch
|
||||||
local ref=bleeps_migrations # TODO: There's a 0.4.19 contract in 'main' that would need patching for the latest compiler.
|
local ref=main
|
||||||
local config_file="hardhat.config.ts"
|
local config_file="hardhat.config.ts"
|
||||||
local config_var=config
|
local config_var=config
|
||||||
|
|
||||||
@ -65,6 +66,12 @@ function bleeps_test
|
|||||||
pushd "contracts/"
|
pushd "contracts/"
|
||||||
sed -i 's|"bleeps-common": "workspace:\*",|"bleeps-common": "file:../common-lib/",|g' package.json
|
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_lock
|
||||||
neutralize_package_json_hooks
|
neutralize_package_json_hooks
|
||||||
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"
|
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"
|
||||||
|
@ -27,6 +27,7 @@ source test/externalTests/common.sh
|
|||||||
verify_input "$@"
|
verify_input "$@"
|
||||||
BINARY_TYPE="$1"
|
BINARY_TYPE="$1"
|
||||||
BINARY_PATH="$2"
|
BINARY_PATH="$2"
|
||||||
|
SELECTED_PRESETS="$3"
|
||||||
|
|
||||||
function compile_fn { npm run build; }
|
function compile_fn { npm run build; }
|
||||||
function test_fn { npm run test; }
|
function test_fn { npm run test; }
|
||||||
|
@ -34,7 +34,7 @@ function test_fn { yarn test; }
|
|||||||
|
|
||||||
function perpetual_pools_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_type=branch
|
||||||
local ref=pools-v2
|
local ref=pools-v2
|
||||||
local config_file="hardhat.config.ts"
|
local config_file="hardhat.config.ts"
|
||||||
|
@ -27,6 +27,7 @@ source test/externalTests/common.sh
|
|||||||
verify_input "$@"
|
verify_input "$@"
|
||||||
BINARY_TYPE="$1"
|
BINARY_TYPE="$1"
|
||||||
BINARY_PATH="$2"
|
BINARY_PATH="$2"
|
||||||
|
SELECTED_PRESETS="$3"
|
||||||
|
|
||||||
function compile_fn { yarn build; }
|
function compile_fn { yarn build; }
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ source test/externalTests/common.sh
|
|||||||
verify_input "$@"
|
verify_input "$@"
|
||||||
BINARY_TYPE="$1"
|
BINARY_TYPE="$1"
|
||||||
BINARY_PATH="$2"
|
BINARY_PATH="$2"
|
||||||
|
SELECTED_PRESETS="$3"
|
||||||
|
|
||||||
function compile_fn { yarn compile; }
|
function compile_fn { yarn compile; }
|
||||||
function test_fn { UPDATE_SNAPSHOT=1 npx hardhat test; }
|
function test_fn { UPDATE_SNAPSHOT=1 npx hardhat test; }
|
||||||
|
Loading…
Reference in New Issue
Block a user