Skip to content

Commit

Permalink
Truffle deployment script (opynfinance#320)
Browse files Browse the repository at this point in the history
* update deployment script

* update truffle config

* truffle script to deploy Chainlink pricer contracts

* Fix typo

Co-authored-by: Anton Cheng <[email protected]>

* payable proxy contract deployment script

* update readme

* Fix typo

Co-authored-by: Anton Cheng <[email protected]>

* Fix typo

Co-authored-by: Anton Cheng <[email protected]>

Co-authored-by: Anton Cheng <[email protected]>
  • Loading branch information
haythem96 and antoncoding authored Dec 27, 2020
1 parent 08d715c commit cfc22e4
Show file tree
Hide file tree
Showing 7 changed files with 433 additions and 212 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,42 @@ Run all integration tests:
$ npm run test:integration
```

## Scripts

### Payable Proxy Contract Deployment

To deploy a new `PayableProxyController.sol`, it is recommended to use the `deployPayableProxyController` truffle script inside the `scripts` folder.

**Input**
```sh
truffle exec scripts/deployPayableProxyController.js --network mainnet --controller 0x7d78c401c69c56cb21f4bf80c53afd92be0BBBBB --pool 0xc02aaa39b223fe8d0a0e5c4f27ead9083c7AAaaa --weth 0x5f4eC3Df9cbd43714FE2740f5E3616155cAGAGAG --gas 50000000000
```

**Output**
```sh
Deploying payable proxy contract on mainnet 🍕
Payable proxy contract deployed! 🎉
Transaction hash: 0xebf12fc6603ee857bcabe1c0c6194XX82639a9888776f7ff6e83a409XXXXXXXX
Deployed contract address: 0x669cC97687c792fc5369d7bdd38cXXXXXXXXXX
```

### Chainlink Pricer Deployment

To deploy a new `ChainlinkPricer.sol`, it is recommended to use the `deployChainlinkPricer` truffle script inside the `scripts` folder.

**Input**
```sh
truffle exec scripts/deployChainlinkPricer.js --network mainnet --controller 0x7d78c401c69c56cb21f4bf80c53afd92be0BBBBB --pool 0xc02aaa39b223fe8d0a0e5c4f27ead9083c7AAaaa --weth 0x5f4eC3Df9cbd43714FE2740f5E3616155cAGAGAG --oracle 0xef196aA0e3Cb8EA6d5720557C3B611Eff6OOOOOO --gas 50000000000
```

**Output**
```sh
Deploying chainlink pricer contract on mainnet 🍕
Chainlink pricer deployed! 🎉
Transaction hash: 0xebf12fc6603ee857bcabe1c0c6194XX82639a9888776f7ff6e83a409XXXXXXXX
Deployed contract address: 0x669cC97687c792fc5369d7bdd38cXXXXXXXXXX
```

## Linting

Clean code is the best code, so we've provided tools to automatically lint your projects.
Expand Down
1 change: 1 addition & 0 deletions contracts/pricers/ChainlinkPricer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ contract ChainLinkPricer is OpynPricerInterface {
address public bot;

/**
* @param _bot priveleged address that can call setExpiryPriceInOracle
* @param _asset asset that this pricer will get a price for
* @param _aggregator Chainlink aggregator contract for the asset
* @param _oracle Opyn Oracle address
Expand Down
Loading

0 comments on commit cfc22e4

Please sign in to comment.