Repository: hyperlane-xyz/hyperlane-monorepo
Pull request #6218: feat: update svm gas oracles
Author: login: paulbalaji
Created: 2025-05-14T10:52:02Z | Merged: 2025-05-14T13:00:13Z

### Description

feat: update svm gas oracles

### Drive-by changes

interconnect svmbnb<>soon<>solana<>bsc

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->



Diff:
diff --git a/rust/sealevel/environments/mainnet3/gas-oracle-configs.json b/rust/sealevel/environments/mainnet3/gas-oracle-configs.json
index 1a462112e2e..89f8ea9c120 100644
--- a/rust/sealevel/environments/mainnet3/gas-oracle-configs.json
+++ b/rust/sealevel/environments/mainnet3/gas-oracle-configs.json
@@ -2,23 +2,23 @@
   "solanamainnet": {
     "rivalz": {
       "oracleConfig": {
-        "tokenExchangeRate": "239372224587870308412",
-        "gasPrice": "234340482",
+        "tokenExchangeRate": "187056373229658428214",
+        "gasPrice": "342247900",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "everclear": {
       "oracleConfig": {
-        "tokenExchangeRate": "239372224587870308412",
-        "gasPrice": "234340482",
+        "tokenExchangeRate": "187056373229658428214",
+        "gasPrice": "342247900",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "infinityvmmainnet": {
       "oracleConfig": {
-        "tokenExchangeRate": "91246426181641219",
+        "tokenExchangeRate": "104137739516800888",
         "gasPrice": "0",
         "tokenDecimals": 18
       },
@@ -26,12 +26,20 @@
     },
     "sophon": {
       "oracleConfig": {
-        "tokenExchangeRate": "91246426181641219",
-        "gasPrice": "2261877890384",
+        "tokenExchangeRate": "104137739516800888",
+        "gasPrice": "2159824777033",
         "tokenDecimals": 18
       },
       "overhead": 333774
     },
+    "bsc": {
+      "oracleConfig": {
+        "tokenExchangeRate": "62110871980005554012",
+        "gasPrice": "2576829126",
+        "tokenDecimals": 18
+      },
+      "overhead": 166887
+    },
     "svmbnb": {
       "oracleConfig": {
         "tokenExchangeRate": "6211087198000555",
@@ -40,146 +48,146 @@
       },
       "overhead": 600000
     },
+    "soon": {
+      "oracleConfig": {
+        "tokenExchangeRate": "18705637322965842",
+        "gasPrice": "2855",
+        "tokenDecimals": 9
+      },
+      "overhead": 600000
+    },
     "artela": {
       "oracleConfig": {
-        "tokenExchangeRate": "1026217531480017",
-        "gasPrice": "54661512337856",
+        "tokenExchangeRate": "152446195501249",
+        "gasPrice": "419949153702354",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "base": {
       "oracleConfig": {
-        "tokenExchangeRate": "239372224587870308412",
-        "gasPrice": "234340482",
+        "tokenExchangeRate": "187056373229658428214",
+        "gasPrice": "855619625",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "arbitrum": {
       "oracleConfig": {
-        "tokenExchangeRate": "239372224587870308412",
-        "gasPrice": "585851107",
+        "tokenExchangeRate": "187056373229658428214",
+        "gasPrice": "855619625",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "avalanche": {
       "oracleConfig": {
-        "tokenExchangeRate": "2101405194963197274",
-        "gasPrice": "26693853424",
+        "tokenExchangeRate": "2049430713690641488",
+        "gasPrice": "31237772694",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "flowmainnet": {
       "oracleConfig": {
-        "tokenExchangeRate": "44627167102621814",
-        "gasPrice": "1256960858155",
+        "tokenExchangeRate": "38209490419327964",
+        "gasPrice": "1675490829198",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "form": {
       "oracleConfig": {
-        "tokenExchangeRate": "239372224587870308412",
-        "gasPrice": "234340482",
+        "tokenExchangeRate": "187056373229658428214",
+        "gasPrice": "342247900",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "worldchain": {
       "oracleConfig": {
-        "tokenExchangeRate": "239372224587870308412",
-        "gasPrice": "234340482",
+        "tokenExchangeRate": "187056373229658428214",
+        "gasPrice": "342247900",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "optimism": {
       "oracleConfig": {
-        "tokenExchangeRate": "239372224587870308412",
-        "gasPrice": "234340482",
+        "tokenExchangeRate": "187056373229658428214",
+        "gasPrice": "855619625",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "trumpchain": {
       "oracleConfig": {
-        "tokenExchangeRate": "1470892390048056451",
-        "gasPrice": "38136441958",
+        "tokenExchangeRate": "1114273812829769508",
+        "gasPrice": "57454146413",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "ethereum": {
       "oracleConfig": {
-        "tokenExchangeRate": "239372224587870308412",
-        "gasPrice": "1000000000",
+        "tokenExchangeRate": "187056373229658428214",
+        "gasPrice": "1867802855",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "eclipsemainnet": {
       "oracleConfig": {
-        "tokenExchangeRate": "23937222458787030",
-        "gasPrice": "1955",
+        "tokenExchangeRate": "18705637322965842",
+        "gasPrice": "2855",
         "tokenDecimals": 9
       },
       "overhead": 600000
     },
     "superseed": {
       "oracleConfig": {
-        "tokenExchangeRate": "239372224587870308412",
-        "gasPrice": "234340482",
+        "tokenExchangeRate": "187056373229658428214",
+        "gasPrice": "342247900",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "ink": {
       "oracleConfig": {
-        "tokenExchangeRate": "239372224587870308412",
-        "gasPrice": "234340482",
+        "tokenExchangeRate": "187056373229658428214",
+        "gasPrice": "342247900",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
-    "soon": {
-      "oracleConfig": {
-        "tokenExchangeRate": "23937222458787030",
-        "gasPrice": "1955",
-        "tokenDecimals": 9
-      },
-      "overhead": 600000
-    },
     "sonicsvm": {
       "oracleConfig": {
         "tokenExchangeRate": "1500000000000000",
-        "gasPrice": "31196",
+        "gasPrice": "35603",
         "tokenDecimals": 9
       },
       "overhead": 600000
     },
     "treasure": {
       "oracleConfig": {
-        "tokenExchangeRate": "21069803516028955",
-        "gasPrice": "1504591348228",
+        "tokenExchangeRate": "16820119411274646",
+        "gasPrice": "2151008858941",
         "tokenDecimals": 18
       },
       "overhead": 333774
     },
     "hyperevm": {
       "oracleConfig": {
-        "tokenExchangeRate": "2108704909057728572",
-        "gasPrice": "26601447181",
+        "tokenExchangeRate": "2073382393779505692",
+        "gasPrice": "30876914446",
         "tokenDecimals": 18
       },
       "overhead": 166887
     },
     "mint": {
       "oracleConfig": {
-        "tokenExchangeRate": "239372224587870308412",
-        "gasPrice": "234340482",
+        "tokenExchangeRate": "187056373229658428214",
+        "gasPrice": "342247900",
         "tokenDecimals": 18
       },
       "overhead": 166887
@@ -189,23 +197,23 @@
     "ethereum": {
       "oracleConfig": {
         "tokenExchangeRate": "15000000000000000000",
-        "gasPrice": "1000000000",
+        "gasPrice": "1867802855",
         "tokenDecimals": 18
       },
       "overhead": 166460
     },
     "solanamainnet": {
       "oracleConfig": {
-        "tokenExchangeRate": "93995867894608",
-        "gasPrice": "74869",
+        "tokenExchangeRate": "120284594486260",
+        "gasPrice": "85447",
         "tokenDecimals": 9
       },
       "overhead": 600000
     },
     "stride": {
       "oracleConfig": {
-        "tokenExchangeRate": "115107915040",
-        "gasPrice": "10190",
+        "tokenExchangeRate": "219389112813",
+        "gasPrice": "7808",
         "tokenDecimals": 6
       },
       "overhead": 600000
@@ -222,18 +230,26 @@
     },
     "solanamainnet": {
       "oracleConfig": {
-        "tokenExchangeRate": "93995867894608",
-        "gasPrice": "74869",
+        "tokenExchangeRate": "120284594486260",
+        "gasPrice": "85447",
         "tokenDecimals": 9
       },
       "overhead": 600000
+    },
+    "bsc": {
+      "oracleConfig": {
+        "tokenExchangeRate": "4980654032868658976",
+        "gasPrice": "2664685207",
+        "tokenDecimals": 18
+      },
+      "overhead": 159736
     }
   },
   "sonicsvm": {
     "solanamainnet": {
       "oracleConfig": {
         "tokenExchangeRate": "1500000000000000",
-        "gasPrice": "74869",
+        "gasPrice": "85447",
         "tokenDecimals": 9
       },
       "overhead": 600000
diff --git a/typescript/infra/scripts/sealevel-helpers/print-gas-oracles.ts b/typescript/infra/scripts/sealevel-helpers/print-gas-oracles.ts
index c95d355abe8..8c8342c16ae 100644
--- a/typescript/infra/scripts/sealevel-helpers/print-gas-oracles.ts
+++ b/typescript/infra/scripts/sealevel-helpers/print-gas-oracles.ts
@@ -103,10 +103,13 @@ function getChainConnections(
       ['solanamainnet', 'everclear'],
       ['solanamainnet', 'infinityvmmainnet'],
       ['solanamainnet', 'sophon'],
-      // for svmBNB
+      // for svmBNB routes solana<>bsc<>svmbnb<>soon
+      ['solanamainnet', 'bsc'],
       ['svmbnb', 'solanamainnet'],
       ['svmbnb', 'bsc'],
       ['svmbnb', 'soon'],
+      ['soon', 'solanamainnet'],
+      ['soon', 'bsc'],
       // All warp routes
       ...Object.values(WarpRouteIds).map(getWarpChains),
     ];


Reviews:
user: login: daniel-savu
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T11:08:29Z
user: login: paulbalaji
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-14T11:13:03Z
user: login: daniel-savu
body: can confirm running `yarn tsx ./scripts/sealevel-helpers/print-gas-oracles.ts -e mainnet3` locally have me the same output as in `rust/sealevel/environments/mainnet3/gas-oracle-configs.json`
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T11:58:41Z

Review comments:
diff_hunk: @@ -103,10 +103,13 @@ function getChainConnections(
       ['solanamainnet', 'everclear'],
       ['solanamainnet', 'infinityvmmainnet'],
       ['solanamainnet', 'sophon'],
-      // for svmBNB
+      // for svmBNB routes solana<>bsc<>svmbnb<>soon
path: typescript/infra/scripts/sealevel-helpers/print-gas-oracles.ts
user: login: daniel-savu
body: the comments above suggest these entries are unidirectional links (`Returns a record of origin chain -> set of chains that are connected via warp routes.`) rather than bidirectional. Which makes me wonder if we should also add `['solanamainnet', 'svmbnb'],`
created_at: 2025-05-14T11:08:29Z
author_association: CONTRIBUTOR
diff_hunk: @@ -103,10 +103,13 @@ function getChainConnections(
       ['solanamainnet', 'everclear'],
       ['solanamainnet', 'infinityvmmainnet'],
       ['solanamainnet', 'sophon'],
-      // for svmBNB
+      // for svmBNB routes solana<>bsc<>svmbnb<>soon
path: typescript/infra/scripts/sealevel-helpers/print-gas-oracles.ts
user: login: paulbalaji
body: iiuc these are intended to be defined once and we'll add the bidirectional connectivity as part of a reduction afterwards https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/e82b98b583c0d6985ad850d021adf03059864847/typescript/infra/scripts/sealevel-helpers/print-gas-oracles.ts#L129-L147
created_at: 2025-05-14T11:13:03Z
author_association: COLLABORATOR

PR comments:
user: login: changeset-bot[bot]
created_at: 2025-05-14T10:52:05Z
body: ###  ⚠️  No Changeset found

Latest commit: e82b98b583c0d6985ad850d021adf03059864847

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**

<details><summary>This PR includes no changesets</summary>

  When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

</details>

[Click here to learn what changesets are, and how to add one](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/hyperlane-xyz/hyperlane-monorepo/new/pb/solana-soon-update?filename=.changeset/quick-plums-carry.md&value=---%0A%22%40hyperlane-xyz%2Finfra%22%3A%20patch%0A---%0A%0Afeat%3A%20update%20svm%20gas%20oracles%0A)


author_association: NONE
user: login: codecov[bot]
created_at: 2025-05-14T14:05:19Z
body: ## [Codecov](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/6218?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 76.63%. Comparing base [(`e2a4727`)](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/commit/e2a47274c5050a594a2f26054d73a959c7a59921?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) to head [(`e82b98b`)](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/commit/e82b98b583c0d6985ad850d021adf03059864847?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz).
> Report is 1 commits behind head on main.

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##             main    #6218   +/-   ##
=======================================
  Coverage   76.63%   76.63%           
=======================================
  Files         110      110           
  Lines        2166     2166           
  Branches      196      196           
=======================================
  Hits         1660     1660           
  Misses        485      485           
  Partials       21       21           
```

| [Components](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/6218/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) | Coverage Δ | |
|---|---|---|
| [core](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/6218/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) | `87.80% <ø> (ø)` | |
| [hooks](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/6218/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) | `78.14% <ø> (ø)` | |
| [isms](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/6218/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) | `79.94% <ø> (ø)` | |
| [token](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/6218/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) | `90.54% <ø> (ø)` | |
| [middlewares](https://app.codecov.io/gh/hyperlane-xyz/hyperlane-monorepo/pull/6218/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperlane-xyz) | `79.80% <ø> (ø)` | |

</details>
<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE