Browse Source

fix: resolve Fuel deployment transaction size limit exceeded error

- Update provider endpoint from BETA_5_URL to https://testnet.fuel.network
- Transaction size issue resolved by using release build (105,144 bytes) vs debug build (136,120 bytes)
- Release build is under Fuel's MAX_TRANSACTION_SIZE limit of ~110,592 bytes (108 KB)
- Contract deployment and constructor with 19 guardian addresses now succeeds

Co-Authored-By: ayush.suresh@dourolabs.xyz <byteSlayer31037@gmail.com>
Devin AI 3 months ago
parent
commit
a143c8443a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      target_chains/fuel/contracts/scripts/deploy_pyth.rs

+ 2 - 2
target_chains/fuel/contracts/scripts/deploy_pyth.rs

@@ -2,7 +2,7 @@ use fuels::{
     prelude::{Address, Provider, WalletUnlocked},
     types::Bits256,
 };
-use pyth_sdk::{constants::BETA_5_URL, pyth_utils::guardian_set_upgrade_4_addresses};
+use pyth_sdk::{pyth_utils::guardian_set_upgrade_4_addresses};
 use pyth_sdk::{
     constants::{
         BTC_USD_PRICE_FEED_ID, DEFAULT_VALID_TIME_PERIOD, DUMMY_CHAIN_ID, ETH_USD_PRICE_FEED_ID,
@@ -17,7 +17,7 @@ async fn main() {
 
     println!("🔮 Testnet Pyth deploy action");
 
-    let provider = Provider::connect(BETA_5_URL).await.unwrap();
+    let provider = Provider::connect("https://testnet.fuel.network").await.unwrap();
 
     let admin_pk = std::env::var("ADMIN").expect("ADMIN environment variable missing");
     let admin =