Skip to content

Commit

Permalink
Add a flattening script
Browse files Browse the repository at this point in the history
  • Loading branch information
bbenligiray committed Aug 18, 2024
1 parent f403a1c commit 8bbd10d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ dist
gas_report

contracts/vendor

*.flat.sol
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ dist
/coverage.json

gas_report

*.flat.sol
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ dist
gas_report

contracts/vendor

*.flat.sol
2 changes: 2 additions & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ dist
gas_report

contracts/vendor

*.flat.sol
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8bbd10d

Please sign in to comment.