diff --git a/.eslintignore b/.eslintignore index a033a3c..abe03f6 100644 --- a/.eslintignore +++ b/.eslintignore @@ -17,3 +17,5 @@ dist gas_report contracts/vendor + +*.flat.sol diff --git a/.gitignore b/.gitignore index 9fae613..7f4d7f0 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ dist /coverage.json gas_report + +*.flat.sol diff --git a/.prettierignore b/.prettierignore index a033a3c..abe03f6 100644 --- a/.prettierignore +++ b/.prettierignore @@ -17,3 +17,5 @@ dist gas_report contracts/vendor + +*.flat.sol diff --git a/.solhintignore b/.solhintignore index a033a3c..abe03f6 100644 --- a/.solhintignore +++ b/.solhintignore @@ -17,3 +17,5 @@ dist gas_report contracts/vendor + +*.flat.sol diff --git a/README.md b/README.md index 404b142..16722af 100644 --- a/README.md +++ b/README.md @@ -37,11 +37,17 @@ Both alternatives can be migrated to using an API3 feed instead through the Api3 NETWORK=polygon PROXY_ADDRESS=0x98643CB1BDA4060d8BD2dc19bceB0acF6F03ae17 yarn deploy-deterministically ``` - You can also just print the expected address after deployment. +You can also just print the expected address after deployment. - ```sh - PROXY_ADDRESS=0x98643CB1BDA4060d8BD2dc19bceB0acF6F03ae17 yarn print-deterministic-deployment-address - ``` +```sh +PROXY_ADDRESS=0x98643CB1BDA4060d8BD2dc19bceB0acF6F03ae17 yarn print-deterministic-deployment-address +``` + +You can flatten the contract to verify it on a block explorer. + +```sh +yarn flatten +``` ## Differences between API3 and Chainlink feed interfaces diff --git a/package.json b/package.json index 90da18e..447b0a6 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "scripts": { "build": "hardhat compile && tsc -p tsconfig.build.json", "deploy-deterministically": "hardhat run scripts/deploy-deterministically.ts --network $NETWORK", + "flatten": "hardhat flatten contracts/Api3ProxyToAggregatorV2V3Interface.sol > Api3ProxyToAggregatorV2V3Interface.flat.sol", "lint": "yarn prettier:check && yarn lint:eslint && yarn lint:solhint", "lint:eslint": "eslint . --ext .js,.ts", "lint:solhint": "solhint ./contracts/**/*.sol",