Skip to content

Commit

Permalink
chore: deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
wei3erHase committed Aug 20, 2024
1 parent 5407070 commit 6173628
Show file tree
Hide file tree
Showing 19 changed files with 1,913 additions and 1,735 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# HTTPs providers
NODE_URI_ETHEREUM=
NODE_URI_OPTIMISM=
NODE_URI_POLYGON=
NODE_URI_SEPOLIA=
NODE_URI_OPTIMISTICSEPOLIA=

Expand All @@ -11,6 +12,7 @@ TEST_1_PRIVATE_KEY=
# Etherscan (optional, only for verifying smart contracts)
ETHEREUM_ETHERSCAN_API_KEY=
OPTIMISTICETHEREUM_ETHERSCAN_API_KEY=
POLYGON_ETHERSCAN_API_KEY=
SEPOLIA_ETHERSCAN_API_KEY=
OPTIMISTICSEPOLIA_ETHERSCAN_API_KEY=

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ deployments/localhost
deployments/sepoliaDummy
deployments/sepolia
deployments/optimisticSepolia
deployments/**/solcInputs

# Config files
.env
Expand Down
61 changes: 43 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,35 +199,60 @@ For 1 tag manual-deployment and bridging

In `/utils/constants.ts`, one can find the configuration of the strategies chosen by chain. The default for Sepolia is set to refresh each 1/2 day, using periods of 1hr, and comparing a 2hr twap with 500 ticks (+-5%) threshold.

## Address Registry
## Production deployment

Make sure to have the correct addresses for `tokenA` and `tokenB` in `utils/constants.ts` as well as the desired `periodLength`, `strategyCooldown`, `twapPeriod`, and `twapThreshold`. Also check the correct fee, as if an inexistent UniswapV3 pool is referenced, the script will eventually deploy it.

Setup the `receiver` network for the origin chain (e.g. `ethereum`, receiver `polygon`) and select the desired script to run using the origin chain as script selected network (even if the deployment occurs in the sidechain), with the exception of `verify` scripts. Each script will execute the required subsequent ones, so it is not necessary to run them all.

This script will deploy (the OracleFactory if necessary and) the DataReceiver, in the receiver chain of `ethereum` (that it might be `optimism` or `polygon`). This is to enable the off-chain coordination.

```bash
yarn deploy --network ethereum --tags data-receiver
```

Scripts:

**TODO: Update with the latest addresses**
- `data-sender`: deploys DataFeed (mainnet)
- `data-receiver`: deploys OracleFactory and DataReceiver (sidechain)
- `connext-setup`: runs both `data-sender` and `data-receiver` (if not yet deployed) plus deploys Connext SenderAdapter and ReceiverAdapter
- `manual-fetch-observation`: runs `data-receiver` and attempts to fetch a new observation with arbitrary timestamps
- `fetch-observation`: runs `data-receiver` plus deploys DataFeedStrategy and attempts to programatically fetch a new observation
- `bridge-observation`: runs up to `connext-setup` and attempts to bridge a recently fetched observation
- `setup-keeper`: runs up to `connext-setup` and deploys StrategyJob
- `work-job`: (runs up to `setup-keeper` and) attempts to work StrategyJob (requires registration in Keep3r contract)

## Address Registry

#### Testnet

##### Sepolia (sender and _receiver_)
##### Sepolia (sender)

| Contract | Address |
| --------------------- | -------------------------------------------- |
| DataFeed | `0xcDddb7c04000e492E2e6CbD924b595CdaB9DEFa9` |
| DataFeedStrategy | `0x8379506385432f1e02cE516f5A5F52d15E250c88` |
| StrategyJob | `0xa77E459Eba5F1D05Cd22C8a28fB6b2725dfd4D21` |
| Connext SenderAdapter | `0x54B79C4B3E5BA80275B33B5bCaaeC762bf04E558` |

##### OP Sepolia (_receiver_)

| Contract | Address |
| ------------------------- | -------------------------------------------- |
| DataFeed | `0x8Fb68E83831c7e8622e10C154CC0d24856440809` |
| DataFeedStrategy | `0x606e25c67B8d6550075C8085083c763769Cfe2BE` |
| StrategyJob | `0x606e25c67B8d6550075C8085083c763769Cfe2BE` |
| Connext SenderAdapter | `0xF73E6BC8ca4Fec5e9773C4f22E8EBEEEd12733d6` |
| _Connext ReceiverAdapter_ | `0x05a6CEF3f938E8E9b3112CB44e8B9771638989Ed` |
| _DataReceiver_ | `0xa09683377E5cE0bB7eEa90D2b64e3644f7eA1B8a` |
| _OracleFactory_ | `0x0594Dc74043b93Bdb371f01187704C98D45bd4E6` |
| _Connext ReceiverAdapter_ | `0x4839750090571A0fCcBaa3a8Fffe3DE22b4B7D51` |
| _DataReceiver_ | `0x4B11b6BEF9480d62b471a9a91a52C893143Bad19` |
| _OracleFactory_ | `0xa32f6603F9466eF0190CAc36759E41B40653471A` |

##### OP Sepolia (_receiver_)
##### Polygon (_receiver_)

| Contract | Address |
| ------------------------- | -------------------------------------------- |
| _Connext ReceiverAdapter_ | `0x4D81A5C9F7706377df368D1716460da03faEcBcb` |
| _DataReceiver_ | `0x768c227320165A71A4001fE23A0C38CD6B5585c0` |
| _OracleFactory_ | `0xB8aD440Ad7A3298C73258b1Fc202A081Db9107cb` |
| _Connext ReceiverAdapter_ | `0x03A4371f4D531c80741cda05bf39aea5b29dd1eb` |
| _DataReceiver_ | `0xe5BE7f12B94D185f892c4BBe6F88ABE65CE1A8af` |
| _OracleFactory_ | `0x69ceAA797274fd85F3b3a1f5b29857BFD9B9b259` |

##### Whitelisted pipelines:

| Chain - Pool | Chain - OracleSidechain |
| ------------------------------------------------------ | --------------------------------------------------------- |
| Sepolia - `0x317ceCd3eB02158f97DF0B67B788edCda4E066e5` | OP Sepolia - `0x4ECFF2c532d47D7be3D957E4a332AB134cad1fd9` |
| Sepolia - `0x317ceCd3eB02158f97DF0B67B788edCda4E066e5` | Sepolia - `0xED7f635EE962537b4DB13a1e1c3922EC65366fE2` |
| Chain - Pool | Chain - OracleSidechain |
| ------------------------------------------------------ | ----------------------- |
| Sepolia - `0xd0EAFA86eC9C2f3f8f12798974222C645dc8DBF0` | OP Sepolia - `0xTBD` |
Loading

0 comments on commit 6173628

Please sign in to comment.