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

Update READMEs and remove old deployments #44

Merged
merged 2 commits into from
Jul 22, 2023
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
23 changes: 19 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
MAINNET_NODE_URL=
ROPSTEN_NODE_URL=
KOVAN_NODE_URL=
ARBITRUM_NODE_URL=
OPTIMISM_NODE_URL=
BASE_NODE_URL=

GOERLI_NODE_URL=
PRIVATE_KEY_MAINNET=
OPTIMISM_GOERLI_NODE_URL=
ARBITRUM_GOERLI_NODE_URL=
BASE_GOERLI_NODE_URL=

PRIVATE_KEY_TESTNET=
ETHERSCAN_API_KEY=
PRIVATE_KEY=

ETHERSCAN_API_KEY_MAINNET=
ETHERSCAN_API_KEY_OPTIMISM=
ETHERSCAN_API_KEY_ARBITRUM=
ETHERSCAN_API_KEY_BASE=

ETHEREUM_GRAPH_URL=
ARBITRUM_GRAPH_URL=

COINMARKETCAP_API_KEY=
67 changes: 58 additions & 9 deletions packages/perennial-extensions/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,62 @@
# Sample Hardhat Project
# Perennial V2 Extensions

This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.
Extension systems for the Perennial V2 Protocol

Try running some of the following tasks:
## Usage

```shell
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.ts
### Pre Requisites

Before running any command, make sure to install dependencies. Run this in the root workspace as well to capture package patches:

```sh
$ yarn
```

### Compile

Compile the smart contracts with Hardhat:

```sh
$ yarn compile
```

This also generates the Typechain types

### Test

Run the Mocha tests:

```sh
$ yarn test
```

To run tests against a Mainnet fork, set your `MAINNET_NODE_URL` in the root `.env` and run

```sh
$ yarn test:integration
```

### Gas Report

To get a gas report based on unit test calls:

```sh
$ yarn gasReport
```

### Deploy contract to netowrk (requires Mnemonic and infura API key)

```
npx hardhat run --network rinkeby ./scripts/deploy.ts
```

### Validate a contract with etherscan (requires API ke)

```
npx hardhat verify --network <network> <DEPLOYED_CONTRACT_ADDRESS> "Constructor argument 1"
```

### Added plugins

- Gas reporter [hardhat-gas-reporter](https://hardhat.org/plugins/hardhat-gas-reporter.html)
- Etherscan [hardhat-etherscan](https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html)
26 changes: 7 additions & 19 deletions packages/perennial-oracle/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
# Solidity Template
# Perennial V2 Oracle

Uses

- [Hardhat](https://github.com/nomiclabs/hardhat): compile and run the smart contracts on a local development network
- [TypeChain](https://github.com/ethereum-ts/TypeChain): generate TypeScript types for smart contracts
- [Ethers](https://github.com/ethers-io/ethers.js/): Ethereum library and wallet implementation
- [Waffle](https://github.com/EthWorks/Waffle): tooling for writing comprehensive smart contract tests
- [Solhint](https://github.com/protofire/solhint): Solidity linter
- [Prettier Plugin Solidity](https://github.com/prettier-solidity/prettier-plugin-solidity): code formatter

This is a GitHub template, which means you can reuse it as many times as you want. You can do that by clicking the "Use this
template" button at the top of the page.
Oracle systems for the Perennial V2 Protocol

## Usage

### Pre Requisites

This repo works best with Node.js v16.x.x, this is preconfigured for users of [asdf](https://asdf-vm.com/).

Before running any command, make sure to install dependencies:
Before running any command, make sure to install dependencies. Run this in the root workspace as well to capture package patches:

```sh
$ yarn
Expand All @@ -42,13 +30,14 @@ Run the Mocha tests:
$ yarn test
```

To run tests against a Mainnet fork, set your `ALCHEMY_KEY` in `.env` and run
To run tests against a Mainnet fork, set your `MAINNET_NODE_URL` in the root `.env` and run

```sh
$ yarn test-integration
$ yarn test:integration
```

### Gas Report

To get a gas report based on unit test calls:

```sh
Expand All @@ -61,14 +50,13 @@ $ yarn gasReport
npx hardhat run --network rinkeby ./scripts/deploy.ts
```

### Validate a contract with etherscan (requires API key)
### Validate a contract with etherscan (requires API ke)

```
npx hardhat verify --network <network> <DEPLOYED_CONTRACT_ADDRESS> "Constructor argument 1"
```

### Added plugins

- Contract Sizer [hardhat-contract-sizer](https://github.com/ItsNickBarry/hardhat-contract-sizer)
- Gas reporter [hardhat-gas-reporter](https://hardhat.org/plugins/hardhat-gas-reporter.html)
- Etherscan [hardhat-etherscan](https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html)
26 changes: 7 additions & 19 deletions packages/perennial-payoff/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
# Solidity Template
# Perennial V2 Payoff

Uses

- [Hardhat](https://github.com/nomiclabs/hardhat): compile and run the smart contracts on a local development network
- [TypeChain](https://github.com/ethereum-ts/TypeChain): generate TypeScript types for smart contracts
- [Ethers](https://github.com/ethers-io/ethers.js/): Ethereum library and wallet implementation
- [Waffle](https://github.com/EthWorks/Waffle): tooling for writing comprehensive smart contract tests
- [Solhint](https://github.com/protofire/solhint): Solidity linter
- [Prettier Plugin Solidity](https://github.com/prettier-solidity/prettier-plugin-solidity): code formatter

This is a GitHub template, which means you can reuse it as many times as you want. You can do that by clicking the "Use this
template" button at the top of the page.
Payoff functions for the Perennial V2 Protocol

## Usage

### Pre Requisites

This repo works best with Node.js v16.x.x, this is preconfigured for users of [asdf](https://asdf-vm.com/).

Before running any command, make sure to install dependencies:
Before running any command, make sure to install dependencies. Run this in the root workspace as well to capture package patches:

```sh
$ yarn
Expand All @@ -42,13 +30,14 @@ Run the Mocha tests:
$ yarn test
```

To run tests against a Mainnet fork, set your `ALCHEMY_KEY` in `.env` and run
To run tests against a Mainnet fork, set your `MAINNET_NODE_URL` in the root `.env` and run

```sh
$ yarn test-integration
$ yarn test:integration
```

### Gas Report

To get a gas report based on unit test calls:

```sh
Expand All @@ -61,14 +50,13 @@ $ yarn gasReport
npx hardhat run --network rinkeby ./scripts/deploy.ts
```

### Validate a contract with etherscan (requires API key)
### Validate a contract with etherscan (requires API ke)

```
npx hardhat verify --network <network> <DEPLOYED_CONTRACT_ADDRESS> "Constructor argument 1"
```

### Added plugins

- Contract Sizer [hardhat-contract-sizer](https://github.com/ItsNickBarry/hardhat-contract-sizer)
- Gas reporter [hardhat-gas-reporter](https://hardhat.org/plugins/hardhat-gas-reporter.html)
- Etherscan [hardhat-etherscan](https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html)
26 changes: 7 additions & 19 deletions packages/perennial-vault/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
# Solidity Template
# Perennial V2 Vault

Uses

- [Hardhat](https://github.com/nomiclabs/hardhat): compile and run the smart contracts on a local development network
- [TypeChain](https://github.com/ethereum-ts/TypeChain): generate TypeScript types for smart contracts
- [Ethers](https://github.com/ethers-io/ethers.js/): Ethereum library and wallet implementation
- [Waffle](https://github.com/EthWorks/Waffle): tooling for writing comprehensive smart contract tests
- [Solhint](https://github.com/protofire/solhint): Solidity linter
- [Prettier Plugin Solidity](https://github.com/prettier-solidity/prettier-plugin-solidity): code formatter

This is a GitHub template, which means you can reuse it as many times as you want. You can do that by clicking the "Use this
template" button at the top of the page.
Vault for the Perennial V2 Protocol

## Usage

### Pre Requisites

This repo works best with Node.js v16.x.x, this is preconfigured for users of [asdf](https://asdf-vm.com/).

Before running any command, make sure to install dependencies:
Before running any command, make sure to install dependencies. Run this in the root workspace as well to capture package patches:

```sh
$ yarn
Expand All @@ -42,13 +30,14 @@ Run the Mocha tests:
$ yarn test
```

To run tests against a Mainnet fork, set your `ALCHEMY_KEY` in `.env` and run
To run tests against a Mainnet fork, set your `MAINNET_NODE_URL` in the root `.env` and run

```sh
$ yarn test-integration
$ yarn test:integration
```

### Gas Report

To get a gas report based on unit test calls:

```sh
Expand All @@ -61,14 +50,13 @@ $ yarn gasReport
npx hardhat run --network rinkeby ./scripts/deploy.ts
```

### Validate a contract with etherscan (requires API key)
### Validate a contract with etherscan (requires API ke)

```
npx hardhat verify --network <network> <DEPLOYED_CONTRACT_ADDRESS> "Constructor argument 1"
```

### Added plugins

- Contract Sizer [hardhat-contract-sizer](https://github.com/ItsNickBarry/hardhat-contract-sizer)
- Gas reporter [hardhat-gas-reporter](https://hardhat.org/plugins/hardhat-gas-reporter.html)
- Etherscan [hardhat-etherscan](https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html)
8 changes: 4 additions & 4 deletions packages/perennial/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Perennial Protocol
# Perennial V2 Protocol

Perpetual synthetics protocol.

## Usage

### Pre Requisites

Before running any command, make sure to install dependencies:
Before running any command, make sure to install dependencies. Run this in the root workspace as well to capture package patches:

```sh
$ yarn
Expand All @@ -30,10 +30,10 @@ Run the Mocha tests:
$ yarn test
```

To run tests against a Mainnet fork, set your `ALCHEMY_KEY` in `.env` and run
To run tests against a Mainnet fork, set your `MAINNET_NODE_URL` in the root `.env` and run

```sh
$ yarn test-integration
$ yarn test:integration
```

### Gas Report
Expand Down
1 change: 0 additions & 1 deletion packages/perennial/deployments/goerli/.chainId

This file was deleted.

Loading
Loading