Skip to content

Commit

Permalink
Add sonic
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Dec 20, 2024
1 parent da4a52d commit 0a5d8a4
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ jobs:
"optimism",
"polygon",
"rootstock",
"sei",
"scroll",
"sei",
"sonic",
"zksync",
]
os: [ubuntu-latest]
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This Subgraph sources events from the Beefy contracts in different networks.
- [Rootstock](https://api.goldsky.com/api/public/project_clu2walwem1qm01w40v3yhw1f/subgraphs/beefy-balances-rootstock/latest/gn)
- [Scroll](https://api.goldsky.com/api/public/project_clu2walwem1qm01w40v3yhw1f/subgraphs/beefy-balances-scroll/latest/gn)
- [Sei](https://api.goldsky.com/api/public/project_clu2walwem1qm01w40v3yhw1f/subgraphs/beefy-balances-sei/latest/gn)
- [Sonic](https://api.goldsky.com/api/public/project_clu2walwem1qm01w40v3yhw1f/subgraphs/beefy-balances-sonic/latest/gn)
- [Zksync](https://api.goldsky.com/api/public/project_clu2walwem1qm01w40v3yhw1f/subgraphs/beefy-balances-zksync/latest/gn)

# Contributing
Expand Down Expand Up @@ -64,18 +65,17 @@ yarn test:lint # run prettier linter

1. Add the network configuration [config/<network>.json](config/).
- `indexerHintPrune` is the number of blocks to keep for the indexer hint, aim for 2 months. Can be set to `"auto"` to prune as much as possible. Recommended for performance and cost. Or set to `"never"` to keep all updates history. ([Thegraph docs](https://thegraph.com/docs/en/cookbook/pruning/#how-to-prune-a-subgraph-with-indexerhints))
2. Add dev RPCs in graph-node config [docker/graph-node/config.toml](docker/graph-node/config.toml).
3. Add the chain in `.github/workflows/Release.yml` to configure deployments.
4. Test the build
- Apply the configuration: `npm run prepare:<chain>`
- Build the application: `npm run build`
- Run Tests: `npm run test`
2. Add the chain in `.github/workflows/Release.yml` to configure deployments.
3. Test the build
- Apply the configuration: `yarn configure <chain>`
- Build the application: `yarn build`
- Run Tests: `yarn test`
- Deploy the new chain in DEV: `./bin/deploy.sh <chain> <dev provider>`
- Test the data in the dev provider subgraph explorer
- Manually deploy the new chain in PROD for the first version: `./bin/deploy.sh <chain> <dev provider>`
5. Update the `Deployments` section subgraph URLs in this README
6. Update the [Balances API](https://github.com/beefyfinance/beefy-balances-api)
7. Standard formatting with `npm run format`
- Manually deploy the new chain in PROD for the first version: `./bin/release.sh <version> <chain> <dev provider>`
4. Update the `Deployments` section subgraph URLs in this README
5. Update the [Balances API](https://github.com/beefyfinance/beefy-balances-api)
6. Standard formatting with `yarn run format`

### How to update the schema

Expand Down
21 changes: 21 additions & 0 deletions config/sonic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"network": "sonic",
"indexerHintPrune": 10800000,
"shareTokenMintAddress": "0x0000000000000000000000000000000000000000",
"burnAddress": "0x000000000000000000000000000000000000dead",
"firstBlock": 491446,

"clmManagerFactoryAddress": "0xD19ab62F83380908D65E344567378cF104cE46c2",
"clmManagerFactoryStartBlock": 491446,
"clmStrategyFactoryAddress": "0xC2cEE7cf27D2Eda09fEc1743f3953dA77Bf1DA61",
"clmStrategyFactoryStartBlock": 491464,
"rewardPoolFactoryAddress": "0x3C0b1765C379833b86A1704997019A7496Afdfae",
"rewardPoolFactoryStartBlock": 491452,
"beefyClassicVaultFactoryAddress": "0x8e0B63846ebEFf857EE35eF3BD3A2df9EF7D6456",
"beefyClassicVaultFactoryStartBlock": 490985,

"beefyContractDeployerAddress": "0xcc536552A6214d6667fBC3EC38965F7f556A6391",
"beefyContractDeployerStartBlock": 517707,

"vaultInitializedEvent": "Initialized(uint8)"
}
4 changes: 4 additions & 0 deletions data/sonic_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"no_factory_vaults": [],
"no_factory_boosts": []
}

0 comments on commit 0a5d8a4

Please sign in to comment.