Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: scripts & docs update #430

Merged
merged 6 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The oTokens created by Gamma are cash settled European option, means all the opt

## Documentation

Our docs site is [here](https://opyn.gitbook.io/opyn-v2/get-started/getting-started/). It contains tutorials, explainers, and smart contract documentation. If you'd like to view these docs on github instead, check out [the docs folder](/docs) in the docs repo:
Our docs site is [here](https://opyn.gitbook.io/opyn/getting-started/introduction). It contains tutorials, explainers, and smart contract documentation. If you'd like to view these docs on github instead, check out [the docs folder](/docs) in the docs repo:

- [Smart contracts documentation](SUMMARY.md)
- [UML diagrams](/docs/uml)
Expand Down Expand Up @@ -44,7 +44,10 @@ In a new terminal, launch an Ethereum RPC client, we use the default ganache-cli
$ npm run ganache
```

Switch back to your other terminal and deploy the contracts, and make sure to to setup the deployments parameters in `./migrations/deployment-config.json` file:
Switch back to your other terminal and deploy the contracts, and make sure to:
- Add your infura key in `.infuraKey` file
- Add your wallet mnemonic in `.secret` file
- Setup the deployments parameters in `./migrations/deployment-config.json` file

```sh
# Local deployment
Expand Down
24 changes: 24 additions & 0 deletions docs/contracts-documentation/core/Oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ manages pricers that are used for different assets

## Functions:

- `migrateOracle(address _asset, uint256[] _expiries, uint256[] _prices) (external)`

- `endMigration() (external)`

- `setAssetPricer(address _asset, address _pricer) (external)`

- `setLockingPeriod(address _pricer, uint256 _lockingPeriod) (external)`
Expand Down Expand Up @@ -54,6 +58,26 @@ manages pricers that are used for different assets

- `StablePriceUpdated(address asset, uint256 price)`

### Function `migrateOracle(address _asset, uint256[] _expiries, uint256[] _prices) external`

function to mgirate asset prices from old oracle to new deployed oracle

this can only be called by owner, should be used at the deployment time before setting Oracle module into AddressBook

#### Parameters:

- `_asset`: asset address

- `_expiries`: array of expiries timestamps

- `_prices`: array of prices

### Function `endMigration() external`

end migration process

can only be called by owner, should be called before setting Oracle module into AddressBook

### Function `setAssetPricer(address _asset, address _pricer) external`

sets the pricer for an asset
Expand Down
4 changes: 2 additions & 2 deletions docs/contracts-documentation/libs/FixedPointInt256.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ Examples:

(1) USDC decimals = 6

Input: 5 * 1e6 USDC => Output: 5 * 1e27 (FixedPoint 8.0 USDC)
Input: 5 * 1e6 USDC => Output: 5 * 1e27 (FixedPoint 5.0 USDC)

(2) cUSDC decimals = 8

Input: 5 * 1e6 cUSDC => Output: 5 * 1e25 (FixedPoint 0.08 cUSDC)
Input: 5 * 1e6 cUSDC => Output: 5 * 1e25 (FixedPoint 0.05 cUSDC)

#### Parameters:

Expand Down
Binary file modified docs/control-flow/Gamma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/control-flow/GammaOracle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/uml/GammaAddressbook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/uml/GammaAddressbook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/uml/GammaCalculator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions docs/uml/GammaCalculator.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/uml/GammaController.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading