From 0a5d8a4cf301bc4279b578bda16d23beff389d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pr=C3=A9vost?= <998369+prevostc@users.noreply.github.com> Date: Fri, 20 Dec 2024 22:36:52 +0100 Subject: [PATCH] Add sonic --- .github/workflows/Release.yml | 3 ++- README.md | 20 ++++++++++---------- config/sonic.json | 21 +++++++++++++++++++++ data/sonic_data.json | 4 ++++ 4 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 config/sonic.json create mode 100644 data/sonic_data.json diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index f4bcb96..3f00e3a 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -31,8 +31,9 @@ jobs: "optimism", "polygon", "rootstock", - "sei", "scroll", + "sei", + "sonic", "zksync", ] os: [ubuntu-latest] diff --git a/README.md b/README.md index 0801737..ad7d24f 100644 --- a/README.md +++ b/README.md @@ -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 @@ -64,18 +65,17 @@ yarn test:lint # run prettier linter 1. Add the network configuration [config/.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:` - - 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 ` + - Build the application: `yarn build` + - Run Tests: `yarn test` - Deploy the new chain in DEV: `./bin/deploy.sh ` - Test the data in the dev provider subgraph explorer - - Manually deploy the new chain in PROD for the first version: `./bin/deploy.sh ` -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 ` +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 diff --git a/config/sonic.json b/config/sonic.json new file mode 100644 index 0000000..137c1af --- /dev/null +++ b/config/sonic.json @@ -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)" +} diff --git a/data/sonic_data.json b/data/sonic_data.json new file mode 100644 index 0000000..a62cc40 --- /dev/null +++ b/data/sonic_data.json @@ -0,0 +1,4 @@ +{ + "no_factory_vaults": [], + "no_factory_boosts": [] +}