Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d0852d9
chore: update gitignore
mkflow27 Mar 4, 2025
abde95d
chore: update gitignore
mkflow27 Mar 5, 2025
6c0490b
chore: add some scripts
mkflow27 Mar 5, 2025
1ad2e98
feat: add review automation for rate providers
mkflow27 Mar 20, 2025
bef613f
fix: network handling
mkflow27 Mar 20, 2025
8951248
fix: block explorer url
mkflow27 Mar 20, 2025
4118683
fix: block explorer url
mkflow27 Mar 20, 2025
8949881
chore: remove script entry
mkflow27 Mar 23, 2025
d9d2a84
docs: usage and script info
mkflow27 Mar 23, 2025
e212e9c
docs: information on network
mkflow27 Mar 23, 2025
dbeea97
style: resort imports
mkflow27 Mar 23, 2025
3228d4a
docs: context on the word upgradeable
mkflow27 Mar 23, 2025
32a8aee
feat: add custom rpc url
mkflow27 Mar 23, 2025
7d12796
refactor: handle rpcs differently
mkflow27 Mar 24, 2025
6755c0e
docs: add rpc url
mkflow27 Mar 24, 2025
11fa88a
docs: notes on custom rpc url
mkflow27 Mar 24, 2025
a863dc3
refactor: stick to old registry format
mkflow27 Mar 24, 2025
8dd1c73
docs: Add info on review finalization
mkflow27 Mar 24, 2025
df471b8
feat: add python environment
mkflow27 Mar 26, 2025
f26df69
Merge branch 'main' into review-automation
mkflow27 Mar 26, 2025
c1d47ce
feat: add hypernative agent creation
mkflow27 Mar 27, 2025
4a6fa56
refactor: remove python env
mkflow27 Mar 27, 2025
4668a6f
docs: cleanup
mkflow27 Mar 27, 2025
449e1f6
Merge branch 'main' into review-automation
mkflow27 Mar 28, 2025
cff33fa
Merge branch 'main' into review-automation
mkflow27 Mar 28, 2025
f0e05df
style: cleanup
mkflow27 Mar 28, 2025
d1bc983
docs: update readme
mkflow27 Mar 28, 2025
3dee02b
style: uncomment to enable agent creation
mkflow27 Mar 28, 2025
15ea681
feat: proper review name generation
mkflow27 Mar 28, 2025
0fb0b51
feat: add rate revert agent
mkflow27 Apr 1, 2025
1554233
fix: filepath
mkflow27 Apr 1, 2025
1d60bd3
fix: wrong index
mkflow27 Apr 1, 2025
1cf8194
feat: add security suite
mkflow27 Apr 1, 2025
148b6bd
fix: review naming
mkflow27 Apr 1, 2025
60d2736
fix: agent rules
mkflow27 Apr 2, 2025
e0a5479
refactor: add rpc url & one upgrade monitoring agent
mkflow27 Apr 2, 2025
51fd0c5
chore: format & lint
mkflow27 Apr 2, 2025
3b5fee2
feat: add avalanche
mkflow27 Apr 3, 2025
5f6d001
Merge branch 'main' into review-automation
mkflow27 Apr 3, 2025
1118da5
docs: readme update
mkflow27 Apr 3, 2025
05d2f56
fix: remove blockNumber
mkflow27 Apr 4, 2025
533cd21
fix: file & entry names
mkflow27 Apr 4, 2025
47c2db2
feat: catch api errors to add to review
mkflow27 Apr 4, 2025
82b4545
Merge branch 'main' into review-automation
mkflow27 Apr 15, 2025
9a4f150
feat: add sonic
mkflow27 Apr 15, 2025
224458b
fix: check if rate provider itself is a proxy
mkflow27 Apr 15, 2025
9b4d966
fix: update sonic demo with updated info
mkflow27 Apr 15, 2025
7ba3617
chore: update default env file
mkflow27 Apr 15, 2025
09cc574
Merge branch 'main' into review-automation
mkflow27 Apr 16, 2025
fd23243
undo sonic demo
mkflow27 Apr 16, 2025
30ec148
docs: update readme
mkflow27 Apr 16, 2025
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
15 changes: 15 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ETHERSCAN_API_KEY=
GNOSISSCAN_API_KEY=
BASESCAN_API_KEY=
OPTIMISM_SCAN_API_KEY=
ARBITRUM_SCAN_API_KEY=
FRAXSCAN_API_KEY=
SNOWTRACE_API_KEY=
SONICSCAN_API_KEY=

TENDERLY_ACCOUNT_SLUG=
TENDERLY_PROJECT_SLUG=
TENDERLY_API_ACCESS_KEY=

HYPERNATIVE_CLIENT_ID=
HYPERNATIVE_CLIENT_SECRET=
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@
# Dependency directories
node_modules/

# Slither
slither/

# Downloads
contracts/

# Environment
.env

# Python
python/venv/
# Environment files
.env
.env
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Ignore all Markdown files:
**/*.md

# Ignore the settings
tsconfig.json
93 changes: 93 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,96 @@ Use this factories gor Gyro pools. They report a static rate custom tailored to
| ---------- | -------------------------------------------|
| Arbitrum | 0xF502791715F287989374c452Fa78b475A3194a90 |
| Base | 0xc0555b555857AAf2b5b28601eaAcFba2F8BBFB09 |
---

## Setup

1. **Install dependencies:**
```sh
npm install
```

2. **Set up environment variables:**
Create a .env file in the root directory and add the necessary environment variables. You can use the .env.example file as a reference.

```sh
cp .env.example .env
```

### Essential Environment Variables:
- **`HYPERNATIVE_CLIENT_ID`**: Your Hypernative API client ID.
- **`HYPERNATIVE_CLIENT_SECRET`**: Your Hypernative API client secret.
- **`TENDERLY_ACCOUNT_SLUG`**: Your Tenderly account slug.
- **`TENDERLY_PROJECT_SLUG`**: Your Tenderly project slug.
- **`TENDERLY_API_ACCESS_KEY`**: Your Tenderly API access key.
- **`ETHERSCAN_API_KEY`**: Your Etherscan API key (for Ethereum).
- **Other API keys**: Depending on the chain, you may need additional API keys (e.g., `GNOSISSCAN_API_KEY`, `BASESCAN_API_KEY`, etc.).

---

## Testing

1. **Run tests:**
```sh
npm test
```

---

## Scripts

The following scripts are available in the package.json file:

- **`npm run test`**: Runs the test suite.
- **`npm run lint`**: Lints the registry.
- **`npm run write-review`**: Generates the rate-provider review.

---

## Running Scripts

### `npm run write-review`

This script generates a review for a specified rate provider. It fetches the necessary data, generates a markdown review file, and updates the registry with the new review information. It additionally creates the Hypernative monitoring agents.

#### Usage:
```sh
npm run write-review -- --rateProviderAddress <address> --network <network> --rateProviderAsset <asset> --rpcUrl <rpcUrl>
```

#### Example:
```sh
npm run write-review -- --rateProviderAddress 0xA4c27E4Aa764312fD958345Ed683c6eeC4581A10 --network mainnet --rateProviderAsset 0x7788A3538C5fc7F9c7C8A74EAC4c898fC8d87d92 --rpcUrl <yourRpcUrl>
```

#### Supported Networks:

**WIP**: This is work in progress and will be updated once more reviews for new networks come in.

The supported networks can be seen in the `write-review.ts` file under the network option:
```typescript
.option('network', {
alias: 'n',
type: 'string',
description: 'The network the rate provider is deployed on',
choices: ['base', 'mainnet', 'arbitrum', 'avalanche', 'gnosis', 'sonic', 'fraxtal', 'optimism'],
demandOption: true,
})
```


---

## Output

The `write-review` script does the following:
1. Updates the `registry.json` file with rate provider information.
2. Generates a markdown review report.
3. Generates the monitoring agents on the hpyernative platform.

### Post-Script Actions:
Before the review is finalized, the user is expected to:
- Add context about the rate provider in the generated markdown file.
- Include audit reports (if available).
- Optionally rename the review file and update the `name` and `review` fields in the registry.

Loading