Skip to content

Commit

Permalink
Merge pull request #302 from Opty-Fi/feat/polygon-deployment
Browse files Browse the repository at this point in the history
feat/polygon-deployment
  • Loading branch information
dhruvinparikh authored Apr 12, 2022
2 parents aff1925 + 70f7c14 commit de6157d
Show file tree
Hide file tree
Showing 113 changed files with 38,998 additions and 330 deletions.
7 changes: 1 addition & 6 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ node_modules/
typechain/
specification_docs/
deployments/
contracts/protocol/team-defi-adapters
contracts/protocol/earn-protocol-configuration
contracts/protocol/defi-adapters
contracts/protocol/curve-metapool-deposit-adapter
contracts/protocol/curve-metapool-gauge-adapter
contracts/protocol/curve-metapool-swap-adapter
contracts/protocol/curve-polygon-adapter
contracts/protocol/adapters
# files
.solcover.js
2 changes: 2 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
env:
MAINNET_NODE_URL: ${{ secrets.MAINNET_NODE_URL}}
COINMARKETCAP_API: ${{ secrets.COINMARKETCAP_API}}
POLYGON_NODE_URL: ${{ secrets.POLYGON_NODE_URL}}
REPORT_GAS: true
MNEMONIC: ${{ secrets.MNEMONIC}}
STAGING_NETWORK_URL: ${{secrets.STAGING_NETWORK_URL}}
Expand Down Expand Up @@ -55,6 +56,7 @@ jobs:
run: |
yarn test-fast:mainnet
yarn test-fast:vaultv2-upgrade-test:mainnet
yarn test-fast:vaultv2-strategy:polygon
- name: Send GitHub Action trigger data to Slack workflow
id: slack
uses: slackapi/[email protected]
Expand Down
35 changes: 25 additions & 10 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
[submodule "contracts/protocol/team-defi-adapters"]
path = contracts/protocol/team-defi-adapters
url = [email protected]:Opty-Fi/team-defi-adapters.git
[submodule "contracts/protocol/earn-protocol-configuration"]
path = contracts/protocol/earn-protocol-configuration
url = [email protected]:Opty-Fi/earn-protocol-configuration.git
[submodule "contracts/protocol/defi-adapters"]
path = contracts/protocol/defi-adapters
url = https://github.com/Opty-Fi/defi-adapters.git
[submodule "contracts/protocol/curve-metapool-swap-adapter"]
path = contracts/protocol/curve-metapool-swap-adapter
[submodule "contracts/protocol/adapters/ethereum/team-defi-adapters"]
path = contracts/protocol/adapters/ethereum/team-defi-adapters
url = [email protected]:Opty-Fi/team-defi-adapters.git
[submodule "contracts/protocol/adapters/defi-adapters"]
path = contracts/protocol/adapters/defi-adapters
url = [email protected]:Opty-Fi/defi-adapters.git
[submodule "contracts/protocol/adapters/ethereum/curve-metapool-swap-adapter"]
path = contracts/protocol/adapters/ethereum/curve-metapool-swap-adapter
url = [email protected]:Opty-Fi/curve-metapool-swap-adapter.git
[submodule "contracts/protocol/curve-metapool-gauge-adapter"]
path = contracts/protocol/curve-metapool-gauge-adapter
[submodule "contracts/protocol/adapters/ethereum/curve-metapool-gauge-adapter"]
path = contracts/protocol/adapters/ethereum/curve-metapool-gauge-adapter
url = [email protected]:Opty-Fi/curve-metapool-gauge-adapter.git
[submodule "contracts/protocol/adapters/polygon/curve-polygon-adapter"]
path = contracts/protocol/adapters/polygon/curve-polygon-adapter
url = [email protected]:Opty-Fi/curve-polygon-adapter.git
[submodule "contracts/protocol/adapters/polygon/aave-polygon-adapter"]
path = contracts/protocol/adapters/polygon/aave-polygon-adapter
url = [email protected]:Opty-Fi/aave-polygon-adapter.git
[submodule "contracts/protocol/adapters/polygon/sushiswap_pools_adapter"]
path = contracts/protocol/adapters/polygon/sushiswap_pools_adapter
url = [email protected]:Opty-Fi/sushiswap_pools_adapter.git
[submodule "contracts/protocol/adapters/polygon/quickswap-pool-polygon"]
path = contracts/protocol/adapters/polygon/quickswap-pool-polygon
url = [email protected]:Opty-Fi/quickswap-pool-polygon.git
[submodule "contracts/protocol/adapters/polygon/apeswap-pool-polygon"]
path = contracts/protocol/adapters/polygon/apeswap-pool-polygon
url = [email protected]:Opty-Fi/apeswap-pool-polygon.git
4 changes: 1 addition & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
**/node_modules
**/typechain
**/specification_docs
contracts/protocol/team-defi-adapters
contracts/protocol/earn-protocol-configuration
contracts/protocol/defi-adapters
contracts/protocol/*-adapter
contracts/protocol/adapters

# files
*.env
Expand Down
4 changes: 1 addition & 3 deletions .solhintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ contracts/libraries/
contracts/utils/
contracts/dependencies/
contracts/mocks/
contracts/protocol/team-defi-adapters
contracts/protocol/earn-protocol-configuration
contracts/protocol/defi-adapters
contracts/protocol/*-adapter
contracts/protocol/adapters
186 changes: 172 additions & 14 deletions cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,12 @@ Options:
Usage: set best strategy or default best strategy
Options:
--token required <address> the address of token
--riskprofilecode required <number> the code of risk profile
--strategyhash required <string> the keccak256 hash of strategy
--strategyprovider required <address> the address of strategyProvider
--isdefault required <bool> whether set best default strategy or not
--network optional <string> name of the network provider (default: hardhat)
--token required <address> the address of token
--risk-profile-code required <number> the code of risk profile
--strategy-name required <string> the name of strategy
--strategy-provider required <address> the address of strategyProvider
--is-default required <bool> whether set best default strategy or not
--network optional <string> name of the network provider (default: hardhat)
```

- Example:
Expand All @@ -356,10 +356,10 @@ Options:
yarn hardhat set-best-strategy \
--network localhost \
--riskprofilecode 1 \
--strategyprovider 0x0000000000000000000000000000000000000000 \
--strategyhash 0x0000000000000000000000000000000000000000 \
--strategy-provider 0x0000000000000000000000000000000000000000 \
--strategy-name "wmatic-DEPOSIT-Aave-amWMATIC" \
--token 0x0000000000000000000000000000000000000000 \
--isdefault true
--is-default true
```

### unpause-vault
Expand Down Expand Up @@ -390,7 +390,7 @@ Usage: perform actions in the vault contract
Options:
--vault required <address> the address of vault
--user required <address> account address of the user
--action required <string> "DEPOSIT" || "WITHDRAW" || "REBALANCE"
--action required <string> "DEPOSIT" || "WITHDRAW" || "REBALANCE" || "VAULT-DEPOSIT-ALL-TO-STRATEGY"
--merkle-proof required <string> merkle proofs in stringified form
--useall optional <bool> use whole balance (default: false)
--amount optional <number> amount of token (default: 0)
Expand Down Expand Up @@ -532,8 +532,8 @@ Usage: execute a get action in smart contract
Options:
--name required <address> the name of contract
--address required <address> the address of smart contract
--functionabi required <string> a get function abi
--params optional <array> the required params of the function (default: "")
--functionabi required <string> a get function abi
--params optional <array> the required params of the function (default: "")
--network optional <string> name of the network provider (default: hardhat)
```

Expand All @@ -559,7 +559,7 @@ Usage: get price per full share of the vault
Options:
--vault required <address> the address of vault
--block-number <number> block number
--block-number optional <number> block number (default: current block number)
--network optional <string> name of the network provider (default: hardhat)
```

Expand All @@ -579,7 +579,7 @@ Usage: get total supply of the vault
Options:
--vault required <address> the address of vault
--block-number <number> block number
--block-number optional <number> block number (default: current block number)
--network optional <string> name of the network provider (default: hardhat)
```

Expand All @@ -591,3 +591,161 @@ Options:
--vault 0x0000000000000000000000000000000000000000 \
--block-number 1234567
```

### change-vault-proxy-v2-admin

```
Usage: change vault proxy admin
Options:
--vault required <address> the address of vault
--new-admin required <number> the address of new admin
--network optional <string> name of the network provider (default: hardhat)
```

- Example:

```
yarn hardhat change-vault-proxy-v2-admin \
--network localhost \
--vault 0x0000000000000000000000000000000000000000 \
--new-admin 0x0000000000000000000000000000000000000000
```

### set-pending-governance

```
Usage: set pending governance
Options:
--registry required <address> the address of registry
--new-pending-governance required <number> the address of pending governance
--network optional <string> name of the network provider (default: hardhat)
```

- Example:

```
yarn hardhat set-pending-governance \
--network localhost \
--registry 0x0000000000000000000000000000000000000000 \
--new-pending-governance 0x0000000000000000000000000000000000000000
```

### accept-pending-governance

```
Usage: accept pending governance
Options:
--registry required <address> the address of registry
--network optional <string> name of the network provider (default: hardhat)
```

- Example:

```
yarn hardhat accept-pending-governance \
--network localhost \
--registry 0x0000000000000000000000000000000000000000 \
```

### transfer-operation-ownership

```
Usage: transfer all operator roles to same address
Options:
--registry required <address> the address of registry
--new-operator required <address> the address of new operator
--network optional <string> name of the network provider (default: hardhat)
```

- Example:

```
yarn hardhat transfer-operation-ownership \
--network localhost \
--registry 0x0000000000000000000000000000000000000000 \
--new-operator 0x0000000000000000000000000000000000000000 \
```

### transfer-operator

```
Usage: transfer operator
Options:
--registry required <address> the address of registry
--new-operator required <address> the address of new finance operator
--network optional <string> name of the network provider (default: hardhat)
```

- Example:

```
yarn hardhat transfer-operator \
--network localhost \
--registry 0x0000000000000000000000000000000000000000 \
--new-operator 0x0000000000000000000000000000000000000000 \
```

### transfer-finance-operator

```
Usage: transfer finance operator
Options:
--registry required <address> the address of registry
--new-finance-operator required <address> the address of new finance operator
--network optional <string> name of the network provider (default: hardhat)
```

- Example:

```
yarn hardhat transfer-finance-operator \
--network localhost \
--registry 0x0000000000000000000000000000000000000000 \
--new-finance-operator 0x0000000000000000000000000000000000000000 \
```

### transfer-risk-operator

```
Usage: transfer risk operator
Options:
--registry required <address> the address of registry
--new-risk-operator required <address> the address of new risk operator
--network optional <string> name of the network provider (default: hardhat)
```

- Example:

```
yarn hardhat transfer-risk-operator \
--network localhost \
--registry 0x0000000000000000000000000000000000000000 \
--new-risk-operator 0x0000000000000000000000000000000000000000 \
```

### transfer-strategy-operator

```
Usage: transfer strategy operator
Options:
--registry required <address> the address of registry
--new-strategy-operator required <address> the address of new strategy operator
--network optional <string> name of the network provider (default: hardhat)
```

- Example:

```
yarn hardhat transfer-strategy-operator \
--network localhost \
--registry 0x0000000000000000000000000000000000000000 \
--new-strategy-operator 0x0000000000000000000000000000000000000000 \
```
1 change: 1 addition & 0 deletions contracts/protocol/adapters/defi-adapters
Submodule defi-adapters added at 17cf95
1 change: 1 addition & 0 deletions contracts/protocol/adapters/polygon/aave-polygon-adapter
Submodule aave-polygon-adapter added at 78b560
1 change: 1 addition & 0 deletions contracts/protocol/adapters/polygon/apeswap-pool-polygon
Submodule apeswap-pool-polygon added at d6d2cd
1 change: 1 addition & 0 deletions contracts/protocol/adapters/polygon/curve-polygon-adapter
Submodule curve-polygon-adapter added at d891e3
1 change: 1 addition & 0 deletions contracts/protocol/adapters/polygon/quickswap-pool-polygon
Submodule quickswap-pool-polygon added at 61c059
1 change: 0 additions & 1 deletion contracts/protocol/defi-adapters
Submodule defi-adapters deleted from 86e3e6
Loading

0 comments on commit de6157d

Please sign in to comment.