Skip to content

Commit

Permalink
Merge pull request #48 from lidofinance/feat/mellow
Browse files Browse the repository at this point in the history
Add Mellow-related configs AND prettify option
  • Loading branch information
TheDZhon authored Jun 17, 2024
2 parents da194e4 + 8233f24 commit 7674c9a
Show file tree
Hide file tree
Showing 18 changed files with 409 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ digest
config.json
__pycache__
.vscode
node_modules
2 changes: 2 additions & 0 deletions .soliumignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
contracts/Migrations.sol
20 changes: 20 additions & 0 deletions .soliumrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "solium:recommended",
"plugins": [
"security"
],
"rules": {
"quotes": [
"error",
"double"
],
"indentation": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
]
}
}
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@

Diff your Ethereum smart contracts code from GitHub against Blockchain explorer verified source code.

Supports reformatting solidity code by means of prettifier solidity plugin before comparing the sources (option `--prettify`).

## Install

```bash
pipx install git+https://github.com/lidofinance/diffyscan
```

If need `--prettify` option

```shell
npm install
```

## Usage

Set your Etherscan token to fetch verified source code,
Expand All @@ -27,7 +35,7 @@ Set your Github token to query API without strict rate limiting,
export GITHUB_API_TOKEN=<your-github-token>
```

Start script with one of the examples provided
Start script with one of the examples provided (or entire folder of configs)

```bash
diffyscan config_samples/lido_dao_sepolia_config.json
Expand Down Expand Up @@ -82,6 +90,8 @@ This project was developed using these dependencies with their exact versions li

- Python 3.12
- Poetry 1.8
- if need `--prettify` option support:
- npm

Other versions may work as well but were not tested at all.

Expand Down Expand Up @@ -117,3 +127,9 @@ poetry shell
```bash
poetry install
```

5. If need `--prettify` option

```shell
npm install
```
29 changes: 29 additions & 0 deletions config_samples/mellow/common_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"contracts": {
"0xaf108ae0AD8700ac41346aCb620e828c03BB8848": "Vault",
"0x1EB0e946D7d757d7b085b779a146427e40ABBCf8": "ERC20TvlModule",
"0x39c62c6308bed7b0832cafc2bea0c0edc7f2060c": "Initializer",
"0x1E1d1eD64e4F5119F60BF38B322Da7ea5A395429": "DefaultBondTvlModule",
"0xD8619769fed318714d362BfF01CA98ac938Bdf9b": "DefaultBondModule",
"0x955Ff4Cc738cDC009d2903196d1c94C8Cfb4D55d": "ManagedRatiosOracle",
"0x1Dc89c28e59d142688D65Bd7b22C4Fd40C2cC06d": "ChainlinkOracle",
"0x6A8d8033de46c68956CCeBA28Ba1766437FF840F": "ConstantAggregatorV3",
"0x94336dF517036f2Bf5c620a1BC75a73A37b7bb16": "WStethRatiosAggregatorV3",
"0x02BB349832c58E892a20178b9696e2b93A3a9b0f": "DefaultProxyImplementation"
},
"explorer_hostname": "api.etherscan.io",
"explorer_token_env_var": "ETHERSCAN_TOKEN",
"github_repo": {
"url": "https://github.com/mellow-finance/mellow-lrt",
"commit": "60e9a87eb970be5ee1d4f1f14ccc9919b2b2fbcc",
"relative_root": ""
},
"dependencies": {
"lib/openzeppelin-contracts/contracts": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
}
}
}
23 changes: 23 additions & 0 deletions config_samples/mellow/mevcap_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"contracts": {
"0x2dEc4fDC225C1f71161Ea481E23D66fEaAAE2391": "VaultConfigurator",
"0xD2635fa0635126bAfdD430b9614c0280d37a76CA": "ManagedValidator",
"0xc3A149b5Ca3f4A5F17F5d865c14AA9DBb570F10A": "DefaultBondStrategy",
"0xdC1741f9bD33DD791942CC9435A90B0983DE8665": "DepositWrapper"
},
"explorer_hostname": "api.etherscan.io",
"explorer_token_env_var": "ETHERSCAN_TOKEN",
"github_repo": {
"url": "https://github.com/mellow-finance/mellow-lrt",
"commit": "60e9a87eb970be5ee1d4f1f14ccc9919b2b2fbcc",
"relative_root": ""
},
"dependencies": {
"lib/openzeppelin-contracts/contracts": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
}
}
}
22 changes: 22 additions & 0 deletions config_samples/mellow/mevcap_oz_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"contracts": {
"0x5fD13359Ba15A84B76f7F87568309040176167cd": "TransparentUpgradeableProxy",
"0xc24891B75ef55fedC377c5e6Ec59A850b12E23ac": "ProxyAdmin"
},
"explorer_hostname": "api.etherscan.io",
"explorer_token_env_var": "ETHERSCAN_TOKEN",
"github_repo": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
},
"dependencies": {
"lib/openzeppelin-contracts/contracts": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
}
}
}
23 changes: 23 additions & 0 deletions config_samples/mellow/p2p_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"contracts": {
"0x84b240E99d4C473b5E3dF1256300E2871412dDfe": "VaultConfigurator",
"0x6AB116ac709c89D90Cc1F8cD0323617A9996bA7c": "ManagedValidator",
"0xA0ea6d4fe369104eD4cc18951B95C3a43573C0F6": "DefaultBondStrategy",
"0x41A1FBEa7Ace3C3a6B66a73e96E5ED07CDB2A34d": "DepositWrapper"
},
"explorer_hostname": "api.etherscan.io",
"explorer_token_env_var": "ETHERSCAN_TOKEN",
"github_repo": {
"url": "https://github.com/mellow-finance/mellow-lrt",
"commit": "60e9a87eb970be5ee1d4f1f14ccc9919b2b2fbcc",
"relative_root": ""
},
"dependencies": {
"lib/openzeppelin-contracts/contracts": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
}
}
}
22 changes: 22 additions & 0 deletions config_samples/mellow/p2p_oz_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"contracts": {
"0x7a4EffD87C2f3C55CA251080b1343b605f327E3a": "TransparentUpgradeableProxy",
"0x17AC6A90eD880F9cE54bB63DAb071F2BD3FE3772": "ProxyAdmin"
},
"explorer_hostname": "api.etherscan.io",
"explorer_token_env_var": "ETHERSCAN_TOKEN",
"github_repo": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
},
"dependencies": {
"lib/openzeppelin-contracts/contracts": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
}
}
}
23 changes: 23 additions & 0 deletions config_samples/mellow/re7_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"contracts": {
"0x214d66d110060dA2848038CA0F7573486363cAe4": "VaultConfigurator",
"0x0483B89F632596B24426703E540e373083928a6A": "ManagedValidator",
"0xcE3A8820265AD186E8C1CeAED16ae97176D020bA": "DefaultBondStrategy",
"0x70cD3464A41B6692413a1Ba563b9D53955D5DE0d": "DepositWrapper"
},
"explorer_hostname": "api.etherscan.io",
"explorer_token_env_var": "ETHERSCAN_TOKEN",
"github_repo": {
"url": "https://github.com/mellow-finance/mellow-lrt",
"commit": "60e9a87eb970be5ee1d4f1f14ccc9919b2b2fbcc",
"relative_root": ""
},
"dependencies": {
"lib/openzeppelin-contracts/contracts": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
}
}
}
22 changes: 22 additions & 0 deletions config_samples/mellow/re7_oz_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"contracts": {
"0x84631c0d0081FDe56DeB72F6DE77abBbF6A9f93a": "TransparentUpgradeableProxy",
"0xF076CF343DCfD01BBA57dFEB5C74F7B015951fcF": "ProxyAdmin"
},
"explorer_hostname": "api.etherscan.io",
"explorer_token_env_var": "ETHERSCAN_TOKEN",
"github_repo": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
},
"dependencies": {
"lib/openzeppelin-contracts/contracts": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
}
}
}
23 changes: 23 additions & 0 deletions config_samples/mellow/steakhouse_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"contracts": {
"0xe6180599432767081beA7deB76057Ce5883e73Be": "VaultConfigurator",
"0xdB66693845a3f72e932631080Efb1A86536D0EA7": "ManagedValidator",
"0x7a14b34a9a8EA235C66528dc3bF3aeFC36DFc268": "DefaultBondStrategy",
"0x24fee15BC11fF617c042283B58A3Bda6441Da145": "DepositWrapper"
},
"explorer_hostname": "api.etherscan.io",
"explorer_token_env_var": "ETHERSCAN_TOKEN",
"github_repo": {
"url": "https://github.com/mellow-finance/mellow-lrt",
"commit": "60e9a87eb970be5ee1d4f1f14ccc9919b2b2fbcc",
"relative_root": ""
},
"dependencies": {
"lib/openzeppelin-contracts/contracts": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
}
}
}
22 changes: 22 additions & 0 deletions config_samples/mellow/steakhouse_oz_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"contracts": {
"0xBEEF69Ac7870777598A04B2bd4771c71212E6aBc": "TransparentUpgradeableProxy",
"0xed792a3fDEB9044C70c951260AaAe974Fb3dB38F": "ProxyAdmin"
},
"explorer_hostname": "api.etherscan.io",
"explorer_token_env_var": "ETHERSCAN_TOKEN",
"github_repo": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
},
"dependencies": {
"lib/openzeppelin-contracts/contracts": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
}
}
}
31 changes: 31 additions & 0 deletions config_samples/mellow/symbioticfi_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"contracts": {
"0xC329400492c6ff2438472D4651Ad17389fCb843a": "DefaultCollateral"
},
"explorer_hostname": "api.etherscan.io",
"explorer_token_env_var": "ETHERSCAN_TOKEN",
"github_repo": {
"url": "https://github.com/symbioticfi/collateral",
"commit": "4a38fadd5ee3f0b0422caa5f195a31e626498621",
"relative_root": ""
},
"dependencies": {
"lib/openzeppelin-contracts/contracts": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "932fddf69a699a9a80fd2396fd1a2ab91cdda123",
"relative_root": "contracts",
"//": "version 5.0.0"
},
"lib/openzeppelin-contracts-upgradeable/contracts": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable",
"commit": "625fb3c2b2696f1747ba2e72d1e1113066e6c177",
"relative_root": "contracts",
"//": "release-v5.0"
},
"lib/permit2": {
"url": "https://github.com/Uniswap/permit2",
"commit": "cc56ad0f3439c502c246fc5cfcc3db92bb8b7219",
"relative_root": ""
}
}
}
21 changes: 21 additions & 0 deletions config_samples/mellow/symbioticifi_oz_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"contracts": {
"0x1BC8FCFbE6Aa17e4A7610F51B888f34583D202Ec": "TransparentUpgradeableProxy"
},
"explorer_hostname": "api.etherscan.io",
"explorer_token_env_var": "ETHERSCAN_TOKEN",
"github_repo": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
},
"dependencies": {
"lib/openzeppelin-contracts/contracts": {
"url": "https://github.com/OpenZeppelin/openzeppelin-contracts",
"commit": "dbb6104ce834628e473d2173bbc9d47f81a9eec3",
"relative_root": "contracts",
"//": "version 5.0.2"
}
}
}
Loading

0 comments on commit 7674c9a

Please sign in to comment.