Skip to content

Commit

Permalink
Merge branch 'main' into account-abstraction
Browse files Browse the repository at this point in the history
  • Loading branch information
GopherJ authored Aug 23, 2023
2 parents d0e7c96 + 67a0f41 commit 3a6d53c
Show file tree
Hide file tree
Showing 550 changed files with 7,177 additions and 6,287 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"node/no-missing-import": "off",
"no-unpublished-import": "off",
"no-case-declarations": "off",
"@typescript-eslint/no-non-null-assertion": "off"
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "off"
}
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ coverage.json
/coverage
dist

artifacts-zk/
cache-zk/
zk-libraries.json

keystore/

# Setting for non zero-installs (https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored)
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
18.16.0
35 changes: 24 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ init: submodules

.PHONY: test
test:
npx hardhat test ./test/${TEST_TARGET} --network ${NETWORK} # --verbose

npx hardhat test ./test/${TEST_TARGET} --network ${NETWORK} --no-compile
.PHONY: local-test
local-test:
make MOCHA_JOBS=0 DB_PATH=deployed-contracts.json DEPLOY_START=21 NETWORK=localhost test

.PHONY: slow-test
slow-test:
MOCHA_JOBS=0 DB_PATH=deployed-contracts.json npx hardhat test ./test/${TEST_TARGET} --network ${NETWORK} # --verbose
MOCHA_JOBS=0 DB_PATH=deployed-contracts.json npx hardhat test ./test/${TEST_TARGET} --network ${NETWORK} --no-compile

.PHONY: fast-test
fast-test:
MOCHA_JOBS=4 DB_PATH=:memory: npx hardhat test ./test/${TEST_TARGET} --network ${NETWORK} # --verbose
MOCHA_JOBS=4 DB_PATH=:memory: npx hardhat test ./test/${TEST_TARGET} --network ${NETWORK} --no-compile

.PHONY: size
size:
yarn size

.PHONY: build
build: clean
yarn build
yarn build --network ${NETWORK}
yarn typechain

.PHONY: doc
doc:
Expand All @@ -52,7 +52,7 @@ lint:

.PHONY: coverage
coverage:
yarn coverage
yarn coverage --no-compile

.PHONY: format
format:
Expand Down Expand Up @@ -286,7 +286,7 @@ test-stakefish-nft:

.PHONY: run
run:
npx hardhat run $(SCRIPT_PATH) --network $(NETWORK)
npx hardhat run $(SCRIPT_PATH) --network $(NETWORK) --no-compile

.PHONY: run-task
run-task:
Expand Down Expand Up @@ -396,6 +396,10 @@ deploy-timelock:
deploy-renounceOwnership:
make TASK_NAME=deploy:renounce-ownership run-task

.PHONY: deploy-all-libraries
deploy-all-libraries:
make TASK_NAME=deploy:all-libraries run-task

.PHONY: ad-hoc
ad-hoc:
make SCRIPT_PATH=./scripts/dev/1.ad-hoc.ts run
Expand Down Expand Up @@ -444,6 +448,14 @@ set-timelock-strategy:
acl:
make SCRIPT_PATH=./scripts/dev/13.acl.ts run

.PHONY: zksync-bytecode-hashes
zksync-bytecode-hashes:
make SCRIPT_PATH=./scripts/dev/14.zksync-bytecode-hashes.ts run

.PHONY: redeploy-market
redeploy-market:
make SCRIPT_PATH=./scripts/dev/15.redeploy-market.ts run

.PHONY: transfer-tokens
transfer-tokens:
make SCRIPT_PATH=./scripts/dev/2.transfer-tokens.ts run
Expand Down Expand Up @@ -671,15 +683,16 @@ hardhat:
.PHONY: anvil
anvil:
anvil \
$(if $(FORK),--fork-url https://eth-$(FORK).alchemyapi.io/v2/$(ALCHEMY_KEY) --no-rate-limit,) \
$(if $(FORK),--chain-id 522,--chain-id 31337) \
--tracing \
$(if $(FORK),--fork-url https://eth-$(FORK).alchemyapi.io/v2/$(ALCHEMY_KEY) --chain-id 522 --no-rate-limit,--chain-id 31337) \
$(if $(FORK_BLOCK_NUMBER),--fork-block-number $(FORK_BLOCK_NUMBER),) \
$(if $(DEPLOYER_MNEMONIC),--mnemonic "${DEPLOYER_MNEMONIC}",--mnemonic "test test test test test test test test test test test junk") \
--host 0.0.0.0 \
--state-interval 60 \
--dump-state state.json \
$(if $(wildcard state.json),--load-state state.json,) \
--disable-block-gas-limit \
--code-size-limit 100000 \
--timeout 9000000

.PHONY: image
image:
Expand All @@ -701,7 +714,7 @@ shutdown:
docker-compose \
down \
--remove-orphans > /dev/null 2>&1 || true
docker volume prune -f
docker volume prune -f || true
sudo rm -fr redis-data || true
sudo rm -fr logs || true
sudo rm -fr state.json || true
Expand Down
2 changes: 1 addition & 1 deletion contracts/apestaking/AutoCompoundApe.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import "../dependencies/openzeppelin/upgradeability/Initializable.sol";
import "../dependencies/openzeppelin/upgradeability/OwnableUpgradeable.sol";
Expand Down
4 changes: 2 additions & 2 deletions contracts/apestaking/AutoYieldApe.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import "../dependencies/openzeppelin/upgradeability/Initializable.sol";
import "../dependencies/openzeppelin/upgradeability/ERC20Upgradeable.sol";
Expand All @@ -8,7 +8,7 @@ import "../dependencies/openzeppelin/contracts/IERC20.sol";
import "../dependencies/openzeppelin/contracts/SafeERC20.sol";
import "../dependencies/openzeppelin/contracts/SafeCast.sol";
import "../dependencies/openzeppelin/contracts/Address.sol";
import "../dependencies/univ3/interfaces/ISwapRouter.sol";
import "../dependencies/uniswapv3-periphery/interfaces/ISwapRouter.sol";
import "../dependencies/yoga-labs/ApeCoinStaking.sol";
import "../interfaces/IAutoYieldApe.sol";
import "../interfaces/IYieldInfo.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/apestaking/P2PPairStaking.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import "../dependencies/openzeppelin/upgradeability/Initializable.sol";
import "../dependencies/openzeppelin/upgradeability/OwnableUpgradeable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/apestaking/base/CApe.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import "../../dependencies/openzeppelin/upgradeability/ContextUpgradeable.sol";
import "../../dependencies/openzeppelin/upgradeability/PausableUpgradeable.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import {BDaoDataTypes} from "../libraries/types/BDaoDataTypes.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import {BDaoDataTypes} from "../libraries/types/BDaoDataTypes.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

library BDaoDataTypes {
struct ReserveData {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

library ConfigTypes {
struct InitReserveInput {
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/blur-exchange/BlurExchange.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import "../openzeppelin/upgradeability/Initializable.sol";
import "../openzeppelin/upgradeability/UUPSUpgradeable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/blur-exchange/EIP712.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import {Order, Fee} from "./OrderStructs.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/blur-exchange/ExecutionDelegate.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import "../openzeppelin/contracts/IERC20.sol";
import "../openzeppelin/contracts/IERC721.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/blur-exchange/IBlurExchange.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import {Input, Order} from "./OrderStructs.sol";
import "./IExecutionDelegate.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

interface IExecutionDelegate {
function approveContract(address _contract) external;
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/blur-exchange/IMatchingPolicy.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import {Order, AssetType} from "./OrderStructs.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/blur-exchange/IPolicyManager.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

interface IPolicyManager {
function addPolicy(address policy) external;
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/blur-exchange/MerkleVerifier.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

/**
* @title MerkleVerifier
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/blur-exchange/OrderStructs.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

enum Side { Buy, Sell }
enum SignatureVersion { Single, Bulk }
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/blur-exchange/PolicyManager.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import {Ownable} from "../openzeppelin/contracts/Ownable.sol";
import {EnumerableSet} from "../openzeppelin/contracts/EnumerableSet.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import {Order, AssetType} from "./OrderStructs.sol";
import {IMatchingPolicy} from "./IMatchingPolicy.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/chainlink/AggregatorInterface.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
// Chainlink Contracts v0.8
pragma solidity ^0.8.10;
pragma solidity ^0.8.0;

interface AggregatorInterface {
function latestAnswer() external view returns (int256);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
pragma solidity ^0.8.0;

import "./AggregatorInterface.sol";
import "./AggregatorV3Interface.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/chainlink/AggregatorV3Interface.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
function decimals() external view returns (uint8);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
pragma solidity ^0.8.0;

interface ICLSynchronicityPriceAdapter {
/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/delegation/DelegationRegistry.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.10;
pragma solidity ^0.8.0;

import {IDelegationRegistry} from "./IDelegationRegistry.sol";
import {EnumerableSet} from "../openzeppelin/contracts/EnumerableSet.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/delegation/IDelegationRegistry.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.10;
pragma solidity ^0.8.0;

/**
* @title An immutable registry contract to be deployed as a standalone primitive
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/erc721-collections/IMoonBird.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

/**
@title MoonBirds contract interface
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import {IERC20} from "../../openzeppelin/contracts/IERC20.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GNU
pragma solidity >=0.5.0;
pragma solidity ^0.8.0;

interface IWETH {
function deposit() external payable;
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/math/PRBMath.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Unlicense
pragma solidity >=0.8.4;
pragma solidity ^0.8.0;

/// @notice Emitted when the result overflows uint256.
error PRBMath__MulDivFixedPointOverflow(uint256 prod1);
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/math/PRBMathSD59x18.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Unlicense
pragma solidity >=0.8.4;
pragma solidity ^0.8.0;

import "./PRBMath.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/math/PRBMathUD60x18.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Unlicense
pragma solidity >=0.8.4;
pragma solidity ^0.8.0;

import "./PRBMath.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/math/SqrtLib.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

library SqrtLib {
function sqrt(uint256 x) internal pure returns (uint256 z) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;
pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "./Context.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/openzeppelin/contracts/Address.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.10;
pragma solidity ^0.8.0;

/**
* @dev Collection of functions related to the address type
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/openzeppelin/contracts/Base64.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)

pragma solidity ^0.8.10;
pragma solidity ^0.8.0;

/**
* @dev Provides a set of functions to operate with Base64 strings.
Expand Down
2 changes: 1 addition & 1 deletion contracts/dependencies/openzeppelin/contracts/Context.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
pragma solidity ^0.8.0;

/*
* @dev Provides information about the current execution context, including the
Expand Down
Loading

0 comments on commit 3a6d53c

Please sign in to comment.