diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b19db8e..75d90fd7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,3 +151,86 @@ jobs: mkdir -p yttrium/libs/$abi_name cp target/${{ matrix.target }}/release/libuniffi_yttrium.so yttrium/libs/$abi_name/ + + + flutter: + runs-on: macos-latest-xlarge + + steps: + # Checkout repository + - name: Checkout repository + uses: actions/checkout@v3 + + # Cache Flutter dependencies + - name: Cache Flutter dependencies + uses: actions/cache@v3 + with: + path: ~/.pub-cache + key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.yaml') }} + restore-keys: | + ${{ runner.os }}-flutter- + + # Install Rust toolchain + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rust-src + + # Cache Cargo dependencies + - name: Cache Cargo dependencies + uses: actions/cache@v3 + with: + path: ~/.cargo + key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }} + restore-keys: | + ${{ runner.os }}-cargo- + + # Install Java 17 + - name: Install Java 17 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '17' + architecture: x86_64 + cache: 'gradle' + + # Cache Gradle + - name: Cache Gradle + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + # Install Flutter + - name: Install Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '3.24.5' + + # Install flutter_rust_bridge_codegen + - name: Install flutter_rust_bridge_codegen + run: | + cargo install flutter_rust_bridge_codegen + + # Get package dependencies + - name: Get package dependencies + shell: bash + working-directory: crates/yttrium_dart + run: | + flutter pub get + + # Generate Dart Bindings + - name: Generate Dart Bindings + shell: bash + working-directory: crates/yttrium_dart + run: | + flutter_rust_bridge_codegen generate --config-file flutter_rust_bridge.yaml + + - run: git diff crates/yttrium_dart + - run: if [ -n "$(git diff crates/yttrium_dart)" ]; then exit 1; fi diff --git a/crates/kotlin-ffi/src/lib.rs b/crates/kotlin-ffi/src/lib.rs index fb08edd3..8b0c936c 100644 --- a/crates/kotlin-ffi/src/lib.rs +++ b/crates/kotlin-ffi/src/lib.rs @@ -14,16 +14,14 @@ use { yttrium::{ account_client::{AccountClient as YAccountClient, SignerType}, chain_abstraction::{ - self, - amount::Amount, api::{ route::{RouteResponse, RouteResponseAvailable}, status::{StatusResponse, StatusResponseCompleted}, - Transaction as CATransaction, + InitialTransaction, }, client::Client, currency::Currency, - route_ui_fields::TransactionFee, + route_ui_fields::RouteUiFields, }, config::Config, private_key_service::PrivateKeyService, @@ -86,50 +84,6 @@ uniffi::custom_type!(FFIBytes, String, { lower: |obj| obj.to_string(), }); -#[derive(Debug, uniffi::Record)] -pub struct RouteUiFields { - pub route: Vec, - pub bridge: Vec, - pub initial: TxnDetails, - pub local_total: Amount, -} - -impl From - for RouteUiFields -{ - fn from( - source: yttrium::chain_abstraction::route_ui_fields::RouteUiFields, - ) -> Self { - Self { - route: source.route.into_iter().map(Into::into).collect(), - bridge: source.bridge, - initial: source.initial.into(), - local_total: source.local_total, - } - } -} - -#[derive(Debug, uniffi::Record)] -pub struct TxnDetails { - pub transaction: CATransaction, - pub estimate: Eip1559Estimation, - pub fee: TransactionFee, -} - -impl From - for TxnDetails -{ - fn from( - source: yttrium::chain_abstraction::route_ui_fields::TxnDetails, - ) -> Self { - Self { - transaction: source.transaction, - estimate: source.estimate.into(), - fee: source.fee, - } - } -} - #[derive(Clone, Copy, Debug, PartialEq, Eq, uniffi::Record)] pub struct Eip1559Estimation { /// The base fee per gas. @@ -149,31 +103,6 @@ impl From for Eip1559Estimation { } } -// uniffi::custom_type!(Eip1559Estimation, FfiEip1559Estimation, { -// try_lift: |val| Ok(Eip1559Estimation { -// max_fee_per_gas: val.max_fee_per_gas.to(), -// max_priority_fee_per_gas: val.max_priority_fee_per_gas.to(), -// }), -// lower: |obj| FfiEip1559Estimation { -// max_fee_per_gas: U128::from(obj.max_fee_per_gas), -// max_priority_fee_per_gas: U128::from(obj.max_priority_fee_per_gas), -// }, -// }); - -#[derive(uniffi::Record)] -pub struct InitTransaction { - pub from: FFIAddress, - pub to: FFIAddress, - pub value: FFIU256, - pub gas: FFIU64, - pub gas_price: FFIU256, - pub data: FFIBytes, - pub nonce: FFIU64, - pub max_fee_per_gas: FFIU256, - pub max_priority_fee_per_gas: FFIU256, - pub chain_id: String, -} - #[derive(uniffi::Record)] pub struct PreparedSendTransaction { pub hash: String, @@ -215,11 +144,10 @@ impl ChainAbstractionClient { pub async fn route( &self, - transaction: InitTransaction, + initial_transaction: InitialTransaction, ) -> Result { - let ca_transaction = CATransaction::from(transaction); self.client - .route(ca_transaction) + .route(initial_transaction) .await .map_err(|e| FFIError::General(e.to_string())) } @@ -227,11 +155,10 @@ impl ChainAbstractionClient { pub async fn get_route_ui_fields( &self, route_response: RouteResponseAvailable, - initial_transaction: chain_abstraction::api::Transaction, currency: Currency, ) -> Result { self.client - .get_route_ui_fields(route_response, initial_transaction, currency) + .get_route_ui_fields(route_response, currency) .await .map(Into::into) .map_err(|e| FFIError::General(e.to_string())) @@ -447,23 +374,6 @@ impl From for YTransaction { } } -impl From for CATransaction { - fn from(source: InitTransaction) -> Self { - CATransaction { - from: source.from, - to: source.to, - value: source.value, - gas: source.gas, - gas_price: source.gas_price, - data: source.data, - nonce: source.nonce, - max_fee_per_gas: source.max_fee_per_gas, - max_priority_fee_per_gas: source.max_priority_fee_per_gas, - chain_id: source.chain_id, - } - } -} - #[cfg(test)] mod tests { use { diff --git a/crates/yttrium/src/chain_abstraction/api/mod.rs b/crates/yttrium/src/chain_abstraction/api/mod.rs index 4ef855b6..12d6ab09 100644 --- a/crates/yttrium/src/chain_abstraction/api/mod.rs +++ b/crates/yttrium/src/chain_abstraction/api/mod.rs @@ -1,5 +1,10 @@ use { - alloy::primitives::{Address, Bytes, U256, U64}, + alloy::{ + network::TransactionBuilder, + primitives::{Address, Bytes, U128, U256, U64}, + rpc::types::TransactionRequest, + }, + alloy_provider::utils::Eip1559Estimation, serde::{Deserialize, Serialize}, }; @@ -7,21 +12,90 @@ pub mod fungible_price; pub mod route; pub mod status; +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[cfg_attr(feature = "uniffi", derive(uniffi_macros::Record))] +#[serde(rename_all = "camelCase")] +pub struct InitialTransaction { + // CAIP-2 chain ID + pub chain_id: String, + + pub from: Address, + pub to: Address, + pub value: U256, + pub input: Bytes, +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[cfg_attr(feature = "uniffi", derive(uniffi_macros::Record))] #[serde(rename_all = "camelCase")] pub struct Transaction { + // CAIP-2 chain ID + pub chain_id: String, + pub from: Address, pub to: Address, pub value: U256, - pub gas: U64, - pub data: Bytes, + pub input: Bytes, + + pub gas_limit: U64, pub nonce: U64, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[cfg_attr(feature = "uniffi", derive(uniffi_macros::Record))] +#[serde(rename_all = "camelCase")] +pub struct FeeEstimatedTransaction { // CAIP-2 chain ID pub chain_id: String, - // deprecated - pub gas_price: U256, - pub max_fee_per_gas: U256, - pub max_priority_fee_per_gas: U256, + pub from: Address, + pub to: Address, + pub value: U256, + pub input: Bytes, + + pub gas_limit: U64, + pub nonce: U64, + + pub max_fee_per_gas: U128, + pub max_priority_fee_per_gas: U128, +} + +impl FeeEstimatedTransaction { + pub fn from_transaction_and_estimate( + transaction: Transaction, + estimate: Eip1559Estimation, + ) -> Self { + Self { + chain_id: transaction.chain_id, + from: transaction.from, + to: transaction.to, + value: transaction.value, + input: transaction.input, + gas_limit: transaction.gas_limit, + nonce: transaction.nonce, + max_fee_per_gas: U128::from(estimate.max_fee_per_gas), + max_priority_fee_per_gas: U128::from( + estimate.max_priority_fee_per_gas, + ), + } + } + + pub fn into_transaction_request(self) -> TransactionRequest { + let chain_id = self + .chain_id + .strip_prefix("eip155:") + .unwrap() + .parse::() + .unwrap(); + TransactionRequest::default() + .with_chain_id(chain_id.to()) + .with_from(self.from) + .with_to(self.to) + .with_value(self.value) + .with_input(self.input) + .with_gas_limit(self.gas_limit.to()) + .with_nonce(self.nonce.to()) + .with_max_fee_per_gas(self.max_fee_per_gas.to()) + .with_max_priority_fee_per_gas(self.max_priority_fee_per_gas.to()) + } } diff --git a/crates/yttrium/src/chain_abstraction/api/route.rs b/crates/yttrium/src/chain_abstraction/api/route.rs index ca27a76c..5def2283 100644 --- a/crates/yttrium/src/chain_abstraction/api/route.rs +++ b/crates/yttrium/src/chain_abstraction/api/route.rs @@ -1,5 +1,5 @@ use { - super::Transaction, + super::{InitialTransaction, Transaction}, crate::chain_abstraction::amount::Amount, alloy::primitives::{utils::Unit, Address, U256}, relay_rpc::domain::ProjectId, @@ -16,7 +16,7 @@ pub struct RouteQueryParams { #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct RouteRequest { - pub transaction: Transaction, + pub transaction: InitialTransaction, } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] diff --git a/crates/yttrium/src/chain_abstraction/client.rs b/crates/yttrium/src/chain_abstraction/client.rs index 904a883c..4896cb3f 100644 --- a/crates/yttrium/src/chain_abstraction/client.rs +++ b/crates/yttrium/src/chain_abstraction/client.rs @@ -13,7 +13,7 @@ use { StatusQueryParams, StatusResponse, StatusResponseCompleted, STATUS_ENDPOINT_PATH, }, - Transaction, + InitialTransaction, Transaction, }, currency::Currency, error::{RouteError, WaitForSuccessError}, @@ -65,7 +65,7 @@ impl Client { pub async fn route( &self, - transaction: Transaction, + transaction: InitialTransaction, ) -> Result { let response = self .client @@ -89,7 +89,6 @@ impl Client { pub async fn get_route_ui_fields( &self, route_response: RouteResponseAvailable, - initial_transaction: Transaction, local_currency: Currency, // TODO use this to e.g. modify priority fee // _speed: String, @@ -101,7 +100,7 @@ impl Client { let chains = route_response .transactions .iter() - .chain(std::iter::once(&initial_transaction)) + .chain(std::iter::once(&route_response.initial_transaction)) .map(|t| t.chain_id.clone()) .collect::>(); println!("chains: {chains:?}"); @@ -174,8 +173,8 @@ impl Client { .with_from(txn.from) .with_to(txn.to) .with_value(txn.value) - .with_gas_limit(txn.gas.to()) - .with_input(txn.data.clone()) + .with_gas_limit(txn.gas_limit.to()) + .with_input(txn.input.clone()) .with_nonce(txn.nonce.to()) .with_chain_id( txn.chain_id @@ -199,7 +198,7 @@ impl Client { .map(|txn| l1_data_fee(txn.clone(), self)), ); let initial_l1_data_fee_future = - l1_data_fee(initial_transaction.clone(), self); + l1_data_fee(route_response.initial_transaction.clone(), self); let (fungibles, eip1559_fees, route_l1_data_fees, initial_l1_data_fee) = tokio::try_join!( @@ -219,7 +218,7 @@ impl Client { let eip1559_estimation = *eip1559_fees.get(&txn.chain_id).unwrap(); println!("l1_data_fee: {l1_data_fee}"); let fee = U256::from(eip1559_estimation.max_fee_per_gas) - .checked_mul(U256::from(txn.gas)) + .checked_mul(U256::from(txn.gas_limit)) .expect("fee overflow") .checked_add(l1_data_fee) .expect("fee overflow in adding"); @@ -241,7 +240,7 @@ impl Client { )); } let estimated_initial_transaction = estimate_gas_fees( - initial_transaction, + route_response.initial_transaction.clone(), &eip1559_fees, initial_l1_data_fee, ); diff --git a/crates/yttrium/src/chain_abstraction/route_ui_fields.rs b/crates/yttrium/src/chain_abstraction/route_ui_fields.rs index b1a70a64..12f2ddb4 100644 --- a/crates/yttrium/src/chain_abstraction/route_ui_fields.rs +++ b/crates/yttrium/src/chain_abstraction/route_ui_fields.rs @@ -1,7 +1,9 @@ use { super::{ amount::Amount, - api::{route::RouteResponseAvailable, Transaction}, + api::{ + route::RouteResponseAvailable, FeeEstimatedTransaction, Transaction, + }, }, crate::chain_abstraction::{ amount::from_float, @@ -14,7 +16,7 @@ use { }; #[derive(Debug)] -// #[cfg_attr(feature = "uniffi", derive(uniffi_macros::Record))] +#[cfg_attr(feature = "uniffi", derive(uniffi_macros::Record))] pub struct RouteUiFields { pub route: Vec, pub local_route_total: Amount, @@ -25,10 +27,9 @@ pub struct RouteUiFields { } #[derive(Debug)] -// #[cfg_attr(feature = "uniffi", derive(uniffi_macros::Record))] +#[cfg_attr(feature = "uniffi", derive(uniffi_macros::Record))] pub struct TxnDetails { - pub transaction: Transaction, - pub estimate: Eip1559Estimation, + pub transaction: FeeEstimatedTransaction, pub fee: TransactionFee, } @@ -105,7 +106,12 @@ pub fn get_route_ui_fields( }) .unwrap(), ); - route.push(TxnDetails { transaction: item.0, estimate: item.1, fee }); + route.push(TxnDetails { + transaction: FeeEstimatedTransaction::from_transaction_and_estimate( + item.0, item.1, + ), + fee, + }); } let initial_fee = compute_amounts( @@ -124,8 +130,10 @@ pub fn get_route_ui_fields( .unwrap(), ); let initial = TxnDetails { - transaction: estimated_initial_transaction.0, - estimate: estimated_initial_transaction.1, + transaction: FeeEstimatedTransaction::from_transaction_and_estimate( + estimated_initial_transaction.0, + estimated_initial_transaction.1, + ), fee: initial_fee, }; @@ -218,36 +226,27 @@ mod tests { from: address!("9CAaB7E1D1ad6eaB4d6a7f479Cb8800da551cbc0"), to: token_contract_2, value: U256::ZERO, - gas: U64::ZERO, - gas_price: U256::ZERO, - data: bytes!("a9059cbb000000000000000000000000228311b83daf3fc9a0d0a46c0b329942fc8cb2ed00000000000000000000000000000000000000000000000000000000001e8480"), + gas_limit: U64::ZERO, + input: bytes!("a9059cbb000000000000000000000000228311b83daf3fc9a0d0a46c0b329942fc8cb2ed00000000000000000000000000000000000000000000000000000000001e8480"), nonce: U64::ZERO, - max_fee_per_gas: U256::ZERO, - max_priority_fee_per_gas: U256::ZERO, chain_id: chain_id_2.clone(), }; let route_transaction_1 = Transaction { from: address!("9CAaB7E1D1ad6eaB4d6a7f479Cb8800da551cbc0"), to: token_contract_1, value: U256::ZERO, - gas: U64::from(0xf9e82), - gas_price: U256::from(0xd40606), - data: bytes!("095ea7b30000000000000000000000003a23f943181408eac424116af7b7790c94cb97a5000000000000000000000000000000000000000000000000000000000016cd3e"), + gas_limit: U64::from(0xf9e82), + input: bytes!("095ea7b30000000000000000000000003a23f943181408eac424116af7b7790c94cb97a5000000000000000000000000000000000000000000000000000000000016cd3e"), nonce: U64::from(0x29), - max_fee_per_gas: U256::ZERO, - max_priority_fee_per_gas: U256::ZERO, chain_id: chain_id_1.clone(), }; let route_transaction_2 = Transaction { from: address!("9CAaB7E1D1ad6eaB4d6a7f479Cb8800da551cbc0"), to: address!("3a23F943181408EAC424116Af7b7790c94Cb97a5"), value: U256::ZERO, - gas: U64::from(0xf9e82), - gas_price: U256::from(0xd40606), - data: bytes!("0000019b792ebcb9000000000000000000000000000000000000000000000000000000000016cd3e000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000010e10000000000000000000000000000000000000000000000000000000000001b3b00000000000000000000000000000000000000000000000000000000000000020000000000000000000000009caab7e1d1ad6eab4d6a7f479cb8800da551cbc00000000000000000000000009caab7e1d1ad6eab4d6a7f479cb8800da551cbc00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda029130000000000000000000000000b2c639c533813f4aa9d7837caf62653d097ff850000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000016bc5d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000675a91e700000000000000000000000000000000000000000000000000000000675ae5edd00dfeeddeadbeef765753be7f7a64d5509974b0d678e1e3149b02f4"), + gas_limit: U64::from(0xf9e82), + input: bytes!("0000019b792ebcb9000000000000000000000000000000000000000000000000000000000016cd3e000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000010e10000000000000000000000000000000000000000000000000000000000001b3b00000000000000000000000000000000000000000000000000000000000000020000000000000000000000009caab7e1d1ad6eab4d6a7f479cb8800da551cbc00000000000000000000000009caab7e1d1ad6eab4d6a7f479cb8800da551cbc00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda029130000000000000000000000000b2c639c533813f4aa9d7837caf62653d097ff850000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000016bc5d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000675a91e700000000000000000000000000000000000000000000000000000000675ae5edd00dfeeddeadbeef765753be7f7a64d5509974b0d678e1e3149b02f4"), nonce: U64::from(0x2a), - max_fee_per_gas: U256::ZERO, - max_priority_fee_per_gas: U256::ZERO, chain_id: chain_id_1.clone(), }; @@ -333,9 +332,30 @@ mod tests { ); println!("fields: {fields:?}"); - assert_eq!(fields.route[0].estimate, chain_1_estimated_fees); - assert_eq!(fields.route[1].estimate, chain_1_estimated_fees); - assert_eq!(fields.initial.estimate, chain_2_estimated_fees); + assert_eq!( + fields.route[0].transaction.max_fee_per_gas.to::(), + chain_1_estimated_fees.max_fee_per_gas + ); + assert_eq!( + fields.route[0].transaction.max_priority_fee_per_gas.to::(), + chain_1_estimated_fees.max_priority_fee_per_gas + ); + assert_eq!( + fields.route[1].transaction.max_fee_per_gas.to::(), + chain_1_estimated_fees.max_fee_per_gas + ); + assert_eq!( + fields.route[1].transaction.max_priority_fee_per_gas.to::(), + chain_1_estimated_fees.max_priority_fee_per_gas + ); + assert_eq!( + fields.initial.transaction.max_fee_per_gas.to::(), + chain_2_estimated_fees.max_fee_per_gas + ); + assert_eq!( + fields.initial.transaction.max_priority_fee_per_gas.to::(), + chain_2_estimated_fees.max_priority_fee_per_gas + ); let total_fee = fields.local_total.as_float_inaccurate(); let combined_fees = diff --git a/crates/yttrium/src/chain_abstraction/tests.rs b/crates/yttrium/src/chain_abstraction/tests.rs index 212a4678..1a25bd34 100644 --- a/crates/yttrium/src/chain_abstraction/tests.rs +++ b/crates/yttrium/src/chain_abstraction/tests.rs @@ -5,7 +5,7 @@ use { api::{ route::{BridgingError, RouteResponse, RouteResponseError}, status::StatusResponse, - Transaction, + InitialTransaction, Transaction, }, client::Client, currency::Currency, @@ -380,31 +380,17 @@ async fn bridging_routes_routes_available() { } assert!(chain_1_address_1_token.token_balance().await >= required_amount); - let transaction = Transaction { + let transaction = InitialTransaction { from: source.address(), to: *chain_2_address_1_token.token.address(), value: U256::ZERO, - // gas: U64::ZERO, - // https://reown-inc.slack.com/archives/C0816SK4877/p1731962527043399 - gas: U64::from(50000), // until Blockchain API estimates this - data: ERC20::transferCall { + input: ERC20::transferCall { to: destination.address(), amount: send_amount, } .abi_encode() .into(), - nonce: U64::from({ - let token = chain_2_address_1_token; - token - .provider - .get_transaction_count(token.params.account_address) - .await - .unwrap() - }), chain_id: chain_2.eip155_chain_id().to_owned(), - gas_price: U256::ZERO, - max_fee_per_gas: U256::ZERO, - max_priority_fee_per_gas: U256::ZERO, }; println!("input transaction: {:?}", transaction); @@ -422,12 +408,12 @@ async fn bridging_routes_routes_available() { println!("route result in ({:#?}): {:?}", start.elapsed(), result); assert_eq!(result.transactions.len(), 2); - result.transactions[0].gas = U64::from(60000 /* 55437 */); // until Blockchain API estimates this - result.transactions[1].gas = U64::from(140000 /* 107394 */); // until Blockchain API estimates this + result.transactions[0].gas_limit = U64::from(60000 /* 55437 */); // until Blockchain API estimates this + result.transactions[1].gas_limit = U64::from(140000 /* 107394 */); // until Blockchain API estimates this let start = Instant::now(); let route_ui_fields = client - .get_route_ui_fields(result.clone(), transaction.clone(), Currency::Usd) + .get_route_ui_fields(result.clone(), Currency::Usd) .await .unwrap(); println!( @@ -743,30 +729,16 @@ async fn happy_path() { } assert!(source.token_balance(&sources).await >= required_amount); - let initial_transaction = Transaction { + let initial_transaction = InitialTransaction { from: source.address(&sources), to: *source.other().bridge_token(&sources).token.address(), value: U256::ZERO, - // gas: U64::ZERO, - // https://reown-inc.slack.com/archives/C0816SK4877/p1731962527043399 - gas: U64::from(50000), // until Blockchain API estimates this - data: ERC20::transferCall { + input: ERC20::transferCall { to: source.other().address(&sources), amount: send_amount, } .abi_encode() .into(), - nonce: U64::from({ - let token = match source { - Source::Left => &chain_2_address_1_token, - Source::Right => &chain_1_address_2_token, - }; - token - .provider - .get_transaction_count(token.params.account_address) - .await - .unwrap() - }), chain_id: source .other() .bridge_token(&sources) @@ -774,9 +746,6 @@ async fn happy_path() { .chain .eip155_chain_id() .to_owned(), - gas_price: U256::ZERO, - max_fee_per_gas: U256::ZERO, - max_priority_fee_per_gas: U256::ZERO, }; println!("input transaction: {:?}", initial_transaction); @@ -795,16 +764,12 @@ async fn happy_path() { // TODO it's possible this is only 1 transaction due to already being // approved: https://reown-inc.slack.com/archives/C0816SK4877/p1732813465413249?thread_ts=1732787456.681429&cid=C0816SK4877 assert_eq!(result.transactions.len(), 2); - result.transactions[0].gas = U64::from(60000 /* 55437 */); // until Blockchain API estimates this - result.transactions[1].gas = U64::from(140000 /* 107394 */); // until Blockchain API estimates this + result.transactions[0].gas_limit = U64::from(60000 /* 55437 */); // until Blockchain API estimates this + result.transactions[1].gas_limit = U64::from(140000 /* 107394 */); // until Blockchain API estimates this let start = Instant::now(); let route_ui_fields = client - .get_route_ui_fields( - result.clone(), - initial_transaction.clone(), - Currency::Usd, - ) + .get_route_ui_fields(result.clone(), Currency::Usd) .await .unwrap(); println!( @@ -818,8 +783,8 @@ async fn happy_path() { .with_from(txn.from) .with_to(txn.to) .with_value(txn.value) - .with_gas_limit(txn.gas.to()) - .with_input(txn.data) + .with_gas_limit(txn.gas_limit.to()) + .with_input(txn.input) .with_nonce(txn.nonce.to()) .with_chain_id( txn.chain_id @@ -835,7 +800,7 @@ async fn happy_path() { let mut transactions_with_fees = vec![]; for (txn, route_ui_fields) in result.transactions.into_iter().zip(route_ui_fields.route).chain( - std::iter::once(initial_transaction) + std::iter::once(result.initial_transaction) .zip(std::iter::once(route_ui_fields.initial)), ) { @@ -1331,30 +1296,16 @@ async fn happy_path_full_dependency_on_route_ui_fields() { } assert!(source.token_balance(&sources).await >= required_amount); - let initial_transaction = Transaction { + let initial_transaction = InitialTransaction { from: source.address(&sources), to: *source.other().bridge_token(&sources).token.address(), value: U256::ZERO, - // gas: U64::ZERO, - // https://reown-inc.slack.com/archives/C0816SK4877/p1731962527043399 - gas: U64::from(50000), // until Blockchain API estimates this - data: ERC20::transferCall { + input: ERC20::transferCall { to: source.other().address(&sources), amount: send_amount, } .abi_encode() .into(), - nonce: U64::from({ - let token = match source { - Source::Left => &chain_2_address_1_token, - Source::Right => &chain_1_address_2_token, - }; - token - .provider - .get_transaction_count(token.params.account_address) - .await - .unwrap() - }), chain_id: source .other() .bridge_token(&sources) @@ -1362,9 +1313,6 @@ async fn happy_path_full_dependency_on_route_ui_fields() { .chain .eip155_chain_id() .to_owned(), - gas_price: U256::ZERO, - max_fee_per_gas: U256::ZERO, - max_priority_fee_per_gas: U256::ZERO, }; println!("input transaction: {:?}", initial_transaction); @@ -1383,8 +1331,8 @@ async fn happy_path_full_dependency_on_route_ui_fields() { // TODO it's possible this is only 1 transaction due to already being // approved: https://reown-inc.slack.com/archives/C0816SK4877/p1732813465413249?thread_ts=1732787456.681429&cid=C0816SK4877 assert_eq!(result.transactions.len(), 2); - result.transactions[0].gas = U64::from(60000 /* 55437 */); // until Blockchain API estimates this - result.transactions[1].gas = U64::from(140000 /* 107394 */); // until Blockchain API estimates this + result.transactions[0].gas_limit = U64::from(60000 /* 55437 */); // until Blockchain API estimates this + result.transactions[1].gas_limit = U64::from(140000 /* 107394 */); // until Blockchain API estimates this assert_eq!(result.metadata.funding_from.len(), 1); assert_eq!(result.metadata.funding_from.first().unwrap().symbol, "USDC"); @@ -1450,11 +1398,7 @@ async fn happy_path_full_dependency_on_route_ui_fields() { let start = Instant::now(); let route_ui_fields = client - .get_route_ui_fields( - result.clone(), - initial_transaction.clone(), - Currency::Usd, - ) + .get_route_ui_fields(result.clone(), Currency::Usd) .await .unwrap(); println!( @@ -1463,24 +1407,6 @@ async fn happy_path_full_dependency_on_route_ui_fields() { route_ui_fields ); - fn map_transaction(txn: Transaction) -> TransactionRequest { - TransactionRequest::default() - .with_from(txn.from) - .with_to(txn.to) - .with_value(txn.value) - .with_gas_limit(txn.gas.to()) - .with_input(txn.data) - .with_nonce(txn.nonce.to()) - .with_chain_id( - txn.chain_id - .strip_prefix("eip155:") - .unwrap() - .parse::() - .unwrap() - .to(), - ) - } - // Provide gas for transactions let mut prepared_faucet_txns = HashMap::new(); for txn in route_ui_fields @@ -1524,10 +1450,8 @@ async fn happy_path_full_dependency_on_route_ui_fields() { let mut pending_bridge_txn_hashes = Vec::with_capacity(route_ui_fields.route.len()); - for TxnDetails { transaction, estimate, .. } in route_ui_fields.route { - let txn = map_transaction(transaction) - .with_max_fee_per_gas(estimate.max_fee_per_gas) - .with_max_priority_fee_per_gas(estimate.max_priority_fee_per_gas); + for TxnDetails { transaction, .. } in route_ui_fields.route { + let txn = transaction.into_transaction_request(); let provider = provider_for_chain(&Chain::from_eip155_chain_id( &format!("eip155:{}", txn.chain_id.unwrap()), )); @@ -1609,11 +1533,8 @@ async fn happy_path_full_dependency_on_route_ui_fields() { &initial_transaction.chain_id, )); - let original = map_transaction(route_ui_fields.initial.transaction) - .max_fee_per_gas(route_ui_fields.initial.estimate.max_fee_per_gas) - .max_priority_fee_per_gas( - route_ui_fields.initial.estimate.max_priority_fee_per_gas, - ); + let original = + route_ui_fields.initial.transaction.into_transaction_request(); let start = Instant::now(); loop { @@ -1749,22 +1670,17 @@ async fn bridging_routes_routes_insufficient_funds() { let send_amount = U256::from(1_500_000); // 1.5 USDC (6 decimals) - let transaction = Transaction { + let transaction = InitialTransaction { from: account_1.address(), to: *chain_1_address_2_token.token.address(), value: U256::ZERO, - gas: U64::ZERO, - data: ERC20::transferCall { + input: ERC20::transferCall { to: account_2.address(), amount: send_amount, } .abi_encode() .into(), - nonce: U64::ZERO, chain_id: chain_1.eip155_chain_id().to_owned(), - gas_price: U256::ZERO, - max_fee_per_gas: U256::ZERO, - max_priority_fee_per_gas: U256::ZERO, }; println!("input transaction: {:?}", transaction); diff --git a/crates/yttrium_dart/generate_bindings.sh b/crates/yttrium_dart/generate_bindings.sh index 3288218c..2bc90a8d 100644 --- a/crates/yttrium_dart/generate_bindings.sh +++ b/crates/yttrium_dart/generate_bindings.sh @@ -1,4 +1,5 @@ #!/bin/bash # run this script from inside /crates/yttrium_dart/ +rm -r lib/generated/* flutter_rust_bridge_codegen generate --config-file flutter_rust_bridge.yaml diff --git a/crates/yttrium_dart/lib/generated/frb_generated.dart b/crates/yttrium_dart/lib/generated/frb_generated.dart index 4437b9a5..eb875056 100644 --- a/crates/yttrium_dart/lib/generated/frb_generated.dart +++ b/crates/yttrium_dart/lib/generated/frb_generated.dart @@ -67,7 +67,7 @@ class YttriumDart extends BaseEntrypoint '2.7.0'; @override - int get rustContentHash => 1789961500; + int get rustContentHash => 1083921087; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( @@ -166,7 +166,7 @@ abstract class YttriumDartApi extends BaseApi { Future crateChainAbstractionClientRoute( {required ChainAbstractionClient that, - required InitTransaction transaction}); + required InitialTransaction initialTransaction}); Future crateChainAbstractionClientStatus( {required ChainAbstractionClient that, required String orchestrationId}); @@ -178,64 +178,6 @@ abstract class YttriumDartApi extends BaseApi { required BigInt checkIn, required BigInt timeout}); - String crateInitTransactionAutoAccessorGetChainId( - {required InitTransaction that}); - - Bytes crateInitTransactionAutoAccessorGetData( - {required InitTransaction that}); - - Address crateInitTransactionAutoAccessorGetFrom( - {required InitTransaction that}); - - U64 crateInitTransactionAutoAccessorGetGas({required InitTransaction that}); - - U256 crateInitTransactionAutoAccessorGetGasPrice( - {required InitTransaction that}); - - U256 crateInitTransactionAutoAccessorGetMaxFeePerGas( - {required InitTransaction that}); - - U256 crateInitTransactionAutoAccessorGetMaxPriorityFeePerGas( - {required InitTransaction that}); - - U64 crateInitTransactionAutoAccessorGetNonce({required InitTransaction that}); - - Address crateInitTransactionAutoAccessorGetTo( - {required InitTransaction that}); - - U256 crateInitTransactionAutoAccessorGetValue( - {required InitTransaction that}); - - void crateInitTransactionAutoAccessorSetChainId( - {required InitTransaction that, required String chainId}); - - void crateInitTransactionAutoAccessorSetData( - {required InitTransaction that, required Bytes data}); - - void crateInitTransactionAutoAccessorSetFrom( - {required InitTransaction that, required Address from}); - - void crateInitTransactionAutoAccessorSetGas( - {required InitTransaction that, required U64 gas}); - - void crateInitTransactionAutoAccessorSetGasPrice( - {required InitTransaction that, required U256 gasPrice}); - - void crateInitTransactionAutoAccessorSetMaxFeePerGas( - {required InitTransaction that, required U256 maxFeePerGas}); - - void crateInitTransactionAutoAccessorSetMaxPriorityFeePerGas( - {required InitTransaction that, required U256 maxPriorityFeePerGas}); - - void crateInitTransactionAutoAccessorSetNonce( - {required InitTransaction that, required U64 nonce}); - - void crateInitTransactionAutoAccessorSetTo( - {required InitTransaction that, required Address to}); - - void crateInitTransactionAutoAccessorSetValue( - {required InitTransaction that, required U256 value}); - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_AccountClient; @@ -254,18 +196,6 @@ abstract class YttriumDartApi extends BaseApi { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_AccountClientConfigPtr; - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Address; - - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Address; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_AddressPtr; - - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Bytes; - - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Bytes; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_BytesPtr; - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_ChainAbstractionClient; @@ -282,13 +212,13 @@ abstract class YttriumDartApi extends BaseApi { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_ConfigPtr; RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_InitTransaction; + get rust_arc_increment_strong_count_InitialTransaction; RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_InitTransaction; + get rust_arc_decrement_strong_count_InitialTransaction; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_InitTransactionPtr; + get rust_arc_decrement_strong_count_InitialTransactionPtr; RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_RouteResponse; @@ -316,18 +246,6 @@ abstract class YttriumDartApi extends BaseApi { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_StatusResponseCompletedPtr; - - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_U256; - - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_U256; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_U256Ptr; - - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_U64; - - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_U64; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_U64Ptr; } class YttriumDartApiImpl extends YttriumDartApiImplPlatform @@ -1109,14 +1027,14 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform @override Future crateChainAbstractionClientRoute( {required ChainAbstractionClient that, - required InitTransaction transaction}) { + required InitialTransaction initialTransaction}) { return handler.executeNormal(NormalTask( callFfi: (port_) { final serializer = SseSerializer(generalizedFrbRustBinding); sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( that, serializer); - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - transaction, serializer); + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( + initialTransaction, serializer); pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 29, port: port_); }, @@ -1126,7 +1044,7 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform decodeErrorData: sse_decode_error, ), constMeta: kCrateChainAbstractionClientRouteConstMeta, - argValues: [that, transaction], + argValues: [that, initialTransaction], apiImpl: this, )); } @@ -1134,7 +1052,7 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform TaskConstMeta get kCrateChainAbstractionClientRouteConstMeta => const TaskConstMeta( debugName: 'ChainAbstractionClient_route', - argNames: ['that', 'transaction'], + argNames: ['that', 'initialTransaction'], ); @override @@ -1202,559 +1120,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform argNames: ['that', 'orchestrationId', 'checkIn', 'timeout'], ); - @override - String crateInitTransactionAutoAccessorGetChainId( - {required InitTransaction that}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 32)!; - }, - codec: SseCodec( - decodeSuccessData: sse_decode_String, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorGetChainIdConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorGetChainIdConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_get_chain_id', - argNames: ['that'], - ); - - @override - Bytes crateInitTransactionAutoAccessorGetData( - {required InitTransaction that}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 33)!; - }, - codec: SseCodec( - decodeSuccessData: - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorGetDataConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorGetDataConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_get_data', - argNames: ['that'], - ); - - @override - Address crateInitTransactionAutoAccessorGetFrom( - {required InitTransaction that}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 34)!; - }, - codec: SseCodec( - decodeSuccessData: - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorGetFromConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorGetFromConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_get_from', - argNames: ['that'], - ); - - @override - U64 crateInitTransactionAutoAccessorGetGas({required InitTransaction that}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 35)!; - }, - codec: SseCodec( - decodeSuccessData: - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorGetGasConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorGetGasConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_get_gas', - argNames: ['that'], - ); - - @override - U256 crateInitTransactionAutoAccessorGetGasPrice( - {required InitTransaction that}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 36)!; - }, - codec: SseCodec( - decodeSuccessData: - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorGetGasPriceConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorGetGasPriceConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_get_gas_price', - argNames: ['that'], - ); - - @override - U256 crateInitTransactionAutoAccessorGetMaxFeePerGas( - {required InitTransaction that}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 37)!; - }, - codec: SseCodec( - decodeSuccessData: - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorGetMaxFeePerGasConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorGetMaxFeePerGasConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_get_max_fee_per_gas', - argNames: ['that'], - ); - - @override - U256 crateInitTransactionAutoAccessorGetMaxPriorityFeePerGas( - {required InitTransaction that}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 38)!; - }, - codec: SseCodec( - decodeSuccessData: - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256, - decodeErrorData: null, - ), - constMeta: - kCrateInitTransactionAutoAccessorGetMaxPriorityFeePerGasConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta - get kCrateInitTransactionAutoAccessorGetMaxPriorityFeePerGasConstMeta => - const TaskConstMeta( - debugName: - 'InitTransaction_auto_accessor_get_max_priority_fee_per_gas', - argNames: ['that'], - ); - - @override - U64 crateInitTransactionAutoAccessorGetNonce( - {required InitTransaction that}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 39)!; - }, - codec: SseCodec( - decodeSuccessData: - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorGetNonceConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorGetNonceConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_get_nonce', - argNames: ['that'], - ); - - @override - Address crateInitTransactionAutoAccessorGetTo( - {required InitTransaction that}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 40)!; - }, - codec: SseCodec( - decodeSuccessData: - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorGetToConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorGetToConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_get_to', - argNames: ['that'], - ); - - @override - U256 crateInitTransactionAutoAccessorGetValue( - {required InitTransaction that}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 41)!; - }, - codec: SseCodec( - decodeSuccessData: - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorGetValueConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorGetValueConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_get_value', - argNames: ['that'], - ); - - @override - void crateInitTransactionAutoAccessorSetChainId( - {required InitTransaction that, required String chainId}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - sse_encode_String(chainId, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 42)!; - }, - codec: SseCodec( - decodeSuccessData: sse_decode_unit, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorSetChainIdConstMeta, - argValues: [that, chainId], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorSetChainIdConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_set_chain_id', - argNames: ['that', 'chainId'], - ); - - @override - void crateInitTransactionAutoAccessorSetData( - {required InitTransaction that, required Bytes data}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - data, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 43)!; - }, - codec: SseCodec( - decodeSuccessData: sse_decode_unit, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorSetDataConstMeta, - argValues: [that, data], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorSetDataConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_set_data', - argNames: ['that', 'data'], - ); - - @override - void crateInitTransactionAutoAccessorSetFrom( - {required InitTransaction that, required Address from}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - from, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 44)!; - }, - codec: SseCodec( - decodeSuccessData: sse_decode_unit, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorSetFromConstMeta, - argValues: [that, from], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorSetFromConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_set_from', - argNames: ['that', 'from'], - ); - - @override - void crateInitTransactionAutoAccessorSetGas( - {required InitTransaction that, required U64 gas}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - gas, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 45)!; - }, - codec: SseCodec( - decodeSuccessData: sse_decode_unit, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorSetGasConstMeta, - argValues: [that, gas], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorSetGasConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_set_gas', - argNames: ['that', 'gas'], - ); - - @override - void crateInitTransactionAutoAccessorSetGasPrice( - {required InitTransaction that, required U256 gasPrice}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - gasPrice, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 46)!; - }, - codec: SseCodec( - decodeSuccessData: sse_decode_unit, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorSetGasPriceConstMeta, - argValues: [that, gasPrice], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorSetGasPriceConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_set_gas_price', - argNames: ['that', 'gasPrice'], - ); - - @override - void crateInitTransactionAutoAccessorSetMaxFeePerGas( - {required InitTransaction that, required U256 maxFeePerGas}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - maxFeePerGas, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 47)!; - }, - codec: SseCodec( - decodeSuccessData: sse_decode_unit, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorSetMaxFeePerGasConstMeta, - argValues: [that, maxFeePerGas], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorSetMaxFeePerGasConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_set_max_fee_per_gas', - argNames: ['that', 'maxFeePerGas'], - ); - - @override - void crateInitTransactionAutoAccessorSetMaxPriorityFeePerGas( - {required InitTransaction that, required U256 maxPriorityFeePerGas}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - maxPriorityFeePerGas, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 48)!; - }, - codec: SseCodec( - decodeSuccessData: sse_decode_unit, - decodeErrorData: null, - ), - constMeta: - kCrateInitTransactionAutoAccessorSetMaxPriorityFeePerGasConstMeta, - argValues: [that, maxPriorityFeePerGas], - apiImpl: this, - )); - } - - TaskConstMeta - get kCrateInitTransactionAutoAccessorSetMaxPriorityFeePerGasConstMeta => - const TaskConstMeta( - debugName: - 'InitTransaction_auto_accessor_set_max_priority_fee_per_gas', - argNames: ['that', 'maxPriorityFeePerGas'], - ); - - @override - void crateInitTransactionAutoAccessorSetNonce( - {required InitTransaction that, required U64 nonce}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - nonce, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 49)!; - }, - codec: SseCodec( - decodeSuccessData: sse_decode_unit, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorSetNonceConstMeta, - argValues: [that, nonce], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorSetNonceConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_set_nonce', - argNames: ['that', 'nonce'], - ); - - @override - void crateInitTransactionAutoAccessorSetTo( - {required InitTransaction that, required Address to}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - to, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 50)!; - }, - codec: SseCodec( - decodeSuccessData: sse_decode_unit, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorSetToConstMeta, - argValues: [that, to], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorSetToConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_set_to', - argNames: ['that', 'to'], - ); - - @override - void crateInitTransactionAutoAccessorSetValue( - {required InitTransaction that, required U256 value}) { - return handler.executeSync(SyncTask( - callFfi: () { - final serializer = SseSerializer(generalizedFrbRustBinding); - sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - that, serializer); - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - value, serializer); - return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 51)!; - }, - codec: SseCodec( - decodeSuccessData: sse_decode_unit, - decodeErrorData: null, - ), - constMeta: kCrateInitTransactionAutoAccessorSetValueConstMeta, - argValues: [that, value], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateInitTransactionAutoAccessorSetValueConstMeta => - const TaskConstMeta( - debugName: 'InitTransaction_auto_accessor_set_value', - argNames: ['that', 'value'], - ); - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_AccountClient => wire .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient; @@ -1771,20 +1136,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform get rust_arc_decrement_strong_count_AccountClientConfig => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClientConfig; - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_Address => wire - .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_Address => wire - .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress; - - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Bytes => - wire.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes; - - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Bytes => - wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes; - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_ChainAbstractionClient => wire .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient; @@ -1802,12 +1153,12 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerConfig; RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_InitTransaction => wire - .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction; + get rust_arc_increment_strong_count_InitialTransaction => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction; RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_InitTransaction => wire - .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction; + get rust_arc_decrement_strong_count_InitialTransaction => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction; RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_RouteResponse => wire @@ -1833,18 +1184,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform get rust_arc_decrement_strong_count_StatusResponseCompleted => wire .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponseCompleted; - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_U256 => - wire.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256; - - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_U256 => - wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256; - - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_U64 => wire - .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64; - - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_U64 => wire - .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64; - @protected AccountClient dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -1861,22 +1200,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform return AccountClientConfigImpl.frbInternalDcoDecode(raw as List); } - @protected - Address - dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return AddressImpl.frbInternalDcoDecode(raw as List); - } - - @protected - Bytes - dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return BytesImpl.frbInternalDcoDecode(raw as List); - } - @protected ChainAbstractionClient dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( @@ -1895,11 +1218,11 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform } @protected - InitTransaction - dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + InitialTransaction + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return InitTransactionImpl.frbInternalDcoDecode(raw as List); + return InitialTransactionImpl.frbInternalDcoDecode(raw as List); } @protected @@ -1912,34 +1235,19 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform @protected StatusResponse - dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponse( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return StatusResponseImpl.frbInternalDcoDecode(raw as List); - } - - @protected - StatusResponseCompleted - dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponseCompleted( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return StatusResponseCompletedImpl.frbInternalDcoDecode( - raw as List); - } - - @protected - U256 - dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponse( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return U256Impl.frbInternalDcoDecode(raw as List); + return StatusResponseImpl.frbInternalDcoDecode(raw as List); } @protected - U64 dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - dynamic raw) { + StatusResponseCompleted + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponseCompleted( + dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return U64Impl.frbInternalDcoDecode(raw as List); + return StatusResponseCompletedImpl.frbInternalDcoDecode( + raw as List); } @protected @@ -1967,14 +1275,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform raw as List); } - @protected - InitTransaction - dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return InitTransactionImpl.frbInternalDcoDecode(raw as List); - } - @protected AccountClient dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -2000,14 +1300,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform raw as List); } - @protected - InitTransaction - dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return InitTransactionImpl.frbInternalDcoDecode(raw as List); - } - @protected AccountClient dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -2024,22 +1316,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform return AccountClientConfigImpl.frbInternalDcoDecode(raw as List); } - @protected - Address - dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return AddressImpl.frbInternalDcoDecode(raw as List); - } - - @protected - Bytes - dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return BytesImpl.frbInternalDcoDecode(raw as List); - } - @protected ChainAbstractionClient dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( @@ -2058,11 +1334,11 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform } @protected - InitTransaction - dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + InitialTransaction + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return InitTransactionImpl.frbInternalDcoDecode(raw as List); + return InitialTransactionImpl.frbInternalDcoDecode(raw as List); } @protected @@ -2090,21 +1366,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform raw as List); } - @protected - U256 - dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return U256Impl.frbInternalDcoDecode(raw as List); - } - - @protected - U64 dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return U64Impl.frbInternalDcoDecode(raw as List); - } - @protected String dco_decode_String(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -2239,24 +1500,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } - @protected - Address - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return AddressImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - Bytes - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return BytesImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - @protected ChainAbstractionClient sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( @@ -2276,11 +1519,11 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform } @protected - InitTransaction - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + InitialTransaction + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return InitTransactionImpl.frbInternalSseDecode( + return InitialTransactionImpl.frbInternalSseDecode( sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } @@ -2311,23 +1554,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } - @protected - U256 - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return U256Impl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - U64 sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return U64Impl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - @protected AccountClient sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -2355,15 +1581,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } - @protected - InitTransaction - sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return InitTransactionImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - @protected AccountClient sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -2391,15 +1608,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } - @protected - InitTransaction - sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return InitTransactionImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - @protected AccountClient sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -2418,24 +1626,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } - @protected - Address - sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return AddressImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - Bytes - sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return BytesImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - @protected ChainAbstractionClient sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( @@ -2455,11 +1645,11 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform } @protected - InitTransaction - sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + InitialTransaction + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return InitTransactionImpl.frbInternalSseDecode( + return InitialTransactionImpl.frbInternalSseDecode( sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } @@ -2490,23 +1680,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } - @protected - U256 - sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return U256Impl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - U64 sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return U64Impl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - @protected String sse_decode_String(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -2653,24 +1826,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform serializer); } - @protected - void - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - Address self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as AddressImpl).frbInternalSseEncode(move: true), serializer); - } - - @protected - void - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - Bytes self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as BytesImpl).frbInternalSseEncode(move: true), serializer); - } - @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( @@ -2692,11 +1847,11 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform @protected void - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - InitTransaction self, SseSerializer serializer) { + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( + InitialTransaction self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as InitTransactionImpl).frbInternalSseEncode(move: true), + (self as InitialTransactionImpl).frbInternalSseEncode(move: true), serializer); } @@ -2730,24 +1885,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform serializer); } - @protected - void - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - U256 self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as U256Impl).frbInternalSseEncode(move: true), serializer); - } - - @protected - void - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - U64 self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as U64Impl).frbInternalSseEncode(move: true), serializer); - } - @protected void sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -2778,16 +1915,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform serializer); } - @protected - void - sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - InitTransaction self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as InitTransactionImpl).frbInternalSseEncode(move: false), - serializer); - } - @protected void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -2818,16 +1945,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform serializer); } - @protected - void - sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - InitTransaction self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as InitTransactionImpl).frbInternalSseEncode(move: false), - serializer); - } - @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -2848,24 +1965,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform serializer); } - @protected - void - sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - Address self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as AddressImpl).frbInternalSseEncode(move: null), serializer); - } - - @protected - void - sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - Bytes self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as BytesImpl).frbInternalSseEncode(move: null), serializer); - } - @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( @@ -2887,11 +1986,11 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform @protected void - sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - InitTransaction self, SseSerializer serializer) { + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( + InitialTransaction self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as InitTransactionImpl).frbInternalSseEncode(move: null), + (self as InitialTransactionImpl).frbInternalSseEncode(move: null), serializer); } @@ -2925,24 +2024,6 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform serializer); } - @protected - void - sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - U256 self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as U256Impl).frbInternalSseEncode(move: null), serializer); - } - - @protected - void - sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - U64 self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize( - (self as U64Impl).frbInternalSseEncode(move: null), serializer); - } - @protected void sse_encode_String(String self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -3204,46 +2285,6 @@ class AccountClientImpl extends RustOpaque implements AccountClient { that: this, userOperationHash: userOperationHash); } -@sealed -class AddressImpl extends RustOpaque implements Address { - // Not to be used by end users - AddressImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - AddressImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - YttriumDart.instance.api.rust_arc_increment_strong_count_Address, - rustArcDecrementStrongCount: - YttriumDart.instance.api.rust_arc_decrement_strong_count_Address, - rustArcDecrementStrongCountPtr: - YttriumDart.instance.api.rust_arc_decrement_strong_count_AddressPtr, - ); -} - -@sealed -class BytesImpl extends RustOpaque implements Bytes { - // Not to be used by end users - BytesImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - BytesImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - YttriumDart.instance.api.rust_arc_increment_strong_count_Bytes, - rustArcDecrementStrongCount: - YttriumDart.instance.api.rust_arc_decrement_strong_count_Bytes, - rustArcDecrementStrongCountPtr: - YttriumDart.instance.api.rust_arc_decrement_strong_count_BytesPtr, - ); -} - @sealed class ChainAbstractionClientImpl extends RustOpaque implements ChainAbstractionClient { @@ -3278,9 +2319,10 @@ class ChainAbstractionClientImpl extends RustOpaque YttriumDart.instance.api.crateChainAbstractionClientEstimateFees( that: this, chainId: chainId); - Future route({required InitTransaction transaction}) => + Future route( + {required InitialTransaction initialTransaction}) => YttriumDart.instance.api.crateChainAbstractionClientRoute( - that: this, transaction: transaction); + that: this, initialTransaction: initialTransaction); Future status({required String orchestrationId}) => YttriumDart.instance.api.crateChainAbstractionClientStatus( @@ -3319,107 +2361,24 @@ class ConfigImpl extends RustOpaque implements Config { } @sealed -class InitTransactionImpl extends RustOpaque implements InitTransaction { +class InitialTransactionImpl extends RustOpaque implements InitialTransaction { // Not to be used by end users - InitTransactionImpl.frbInternalDcoDecode(List wire) + InitialTransactionImpl.frbInternalDcoDecode(List wire) : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users - InitTransactionImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + InitialTransactionImpl.frbInternalSseDecode( + BigInt ptr, int externalSizeOnNative) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: YttriumDart - .instance.api.rust_arc_increment_strong_count_InitTransaction, + .instance.api.rust_arc_increment_strong_count_InitialTransaction, rustArcDecrementStrongCount: YttriumDart - .instance.api.rust_arc_decrement_strong_count_InitTransaction, + .instance.api.rust_arc_decrement_strong_count_InitialTransaction, rustArcDecrementStrongCountPtr: YttriumDart - .instance.api.rust_arc_decrement_strong_count_InitTransactionPtr, + .instance.api.rust_arc_decrement_strong_count_InitialTransactionPtr, ); - - String get chainId => - YttriumDart.instance.api.crateInitTransactionAutoAccessorGetChainId( - that: this, - ); - - Bytes get data => - YttriumDart.instance.api.crateInitTransactionAutoAccessorGetData( - that: this, - ); - - Address get from => - YttriumDart.instance.api.crateInitTransactionAutoAccessorGetFrom( - that: this, - ); - - U64 get gas => - YttriumDart.instance.api.crateInitTransactionAutoAccessorGetGas( - that: this, - ); - - U256 get gasPrice => - YttriumDart.instance.api.crateInitTransactionAutoAccessorGetGasPrice( - that: this, - ); - - U256 get maxFeePerGas => - YttriumDart.instance.api.crateInitTransactionAutoAccessorGetMaxFeePerGas( - that: this, - ); - - U256 get maxPriorityFeePerGas => YttriumDart.instance.api - .crateInitTransactionAutoAccessorGetMaxPriorityFeePerGas( - that: this, - ); - - U64 get nonce => - YttriumDart.instance.api.crateInitTransactionAutoAccessorGetNonce( - that: this, - ); - - Address get to => - YttriumDart.instance.api.crateInitTransactionAutoAccessorGetTo( - that: this, - ); - - U256 get value => - YttriumDart.instance.api.crateInitTransactionAutoAccessorGetValue( - that: this, - ); - - set chainId(String chainId) => YttriumDart.instance.api - .crateInitTransactionAutoAccessorSetChainId(that: this, chainId: chainId); - - set data(Bytes data) => YttriumDart.instance.api - .crateInitTransactionAutoAccessorSetData(that: this, data: data); - - set from(Address from) => YttriumDart.instance.api - .crateInitTransactionAutoAccessorSetFrom(that: this, from: from); - - set gas(U64 gas) => YttriumDart.instance.api - .crateInitTransactionAutoAccessorSetGas(that: this, gas: gas); - - set gasPrice(U256 gasPrice) => - YttriumDart.instance.api.crateInitTransactionAutoAccessorSetGasPrice( - that: this, gasPrice: gasPrice); - - set maxFeePerGas(U256 maxFeePerGas) => - YttriumDart.instance.api.crateInitTransactionAutoAccessorSetMaxFeePerGas( - that: this, maxFeePerGas: maxFeePerGas); - - set maxPriorityFeePerGas(U256 maxPriorityFeePerGas) => - YttriumDart.instance.api - .crateInitTransactionAutoAccessorSetMaxPriorityFeePerGas( - that: this, maxPriorityFeePerGas: maxPriorityFeePerGas); - - set nonce(U64 nonce) => YttriumDart.instance.api - .crateInitTransactionAutoAccessorSetNonce(that: this, nonce: nonce); - - set to(Address to) => YttriumDart.instance.api - .crateInitTransactionAutoAccessorSetTo(that: this, to: to); - - set value(U256 value) => YttriumDart.instance.api - .crateInitTransactionAutoAccessorSetValue(that: this, value: value); } @sealed @@ -3483,43 +2442,3 @@ class StatusResponseImpl extends RustOpaque implements StatusResponse { .instance.api.rust_arc_decrement_strong_count_StatusResponsePtr, ); } - -@sealed -class U256Impl extends RustOpaque implements U256 { - // Not to be used by end users - U256Impl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - U256Impl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - YttriumDart.instance.api.rust_arc_increment_strong_count_U256, - rustArcDecrementStrongCount: - YttriumDart.instance.api.rust_arc_decrement_strong_count_U256, - rustArcDecrementStrongCountPtr: - YttriumDart.instance.api.rust_arc_decrement_strong_count_U256Ptr, - ); -} - -@sealed -class U64Impl extends RustOpaque implements U64 { - // Not to be used by end users - U64Impl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - U64Impl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - YttriumDart.instance.api.rust_arc_increment_strong_count_U64, - rustArcDecrementStrongCount: - YttriumDart.instance.api.rust_arc_decrement_strong_count_U64, - rustArcDecrementStrongCountPtr: - YttriumDart.instance.api.rust_arc_decrement_strong_count_U64Ptr, - ); -} diff --git a/crates/yttrium_dart/lib/generated/frb_generated.io.dart b/crates/yttrium_dart/lib/generated/frb_generated.io.dart index 13963b81..a44c8f8d 100644 --- a/crates/yttrium_dart/lib/generated/frb_generated.io.dart +++ b/crates/yttrium_dart/lib/generated/frb_generated.io.dart @@ -26,12 +26,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { get rust_arc_decrement_strong_count_AccountClientConfigPtr => wire ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClientConfigPtr; - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_AddressPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddressPtr; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_BytesPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytesPtr; - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_ChainAbstractionClientPtr => wire ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClientPtr; @@ -40,8 +34,8 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerConfigPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_InitTransactionPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransactionPtr; + get rust_arc_decrement_strong_count_InitialTransactionPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransactionPtr; CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_RouteResponsePtr => wire @@ -55,12 +49,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { get rust_arc_decrement_strong_count_StatusResponseCompletedPtr => wire ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponseCompletedPtr; - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_U256Ptr => wire - ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256Ptr; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_U64Ptr => wire - ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64Ptr; - @protected AccountClient dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -71,16 +59,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClientConfig( dynamic raw); - @protected - Address - dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - dynamic raw); - - @protected - Bytes - dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - dynamic raw); - @protected ChainAbstractionClient dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( @@ -92,8 +70,8 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { dynamic raw); @protected - InitTransaction - dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + InitialTransaction + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( dynamic raw); @protected @@ -111,15 +89,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponseCompleted( dynamic raw); - @protected - U256 - dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - dynamic raw); - - @protected - U64 dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - dynamic raw); - @protected AccountClient dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -135,11 +104,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( dynamic raw); - @protected - InitTransaction - dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - dynamic raw); - @protected AccountClient dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -155,11 +119,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( dynamic raw); - @protected - InitTransaction - dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - dynamic raw); - @protected AccountClient dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -170,16 +129,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClientConfig( dynamic raw); - @protected - Address - dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - dynamic raw); - - @protected - Bytes - dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - dynamic raw); - @protected ChainAbstractionClient dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( @@ -191,8 +140,8 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { dynamic raw); @protected - InitTransaction - dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + InitialTransaction + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( dynamic raw); @protected @@ -210,15 +159,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponseCompleted( dynamic raw); - @protected - U256 - dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - dynamic raw); - - @protected - U64 dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - dynamic raw); - @protected String dco_decode_String(dynamic raw); @@ -271,16 +211,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClientConfig( SseDeserializer deserializer); - @protected - Address - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - SseDeserializer deserializer); - - @protected - Bytes - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - SseDeserializer deserializer); - @protected ChainAbstractionClient sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( @@ -292,8 +222,8 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { SseDeserializer deserializer); @protected - InitTransaction - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + InitialTransaction + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( SseDeserializer deserializer); @protected @@ -311,15 +241,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponseCompleted( SseDeserializer deserializer); - @protected - U256 - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - SseDeserializer deserializer); - - @protected - U64 sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - SseDeserializer deserializer); - @protected AccountClient sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -335,11 +256,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( SseDeserializer deserializer); - @protected - InitTransaction - sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - SseDeserializer deserializer); - @protected AccountClient sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -355,11 +271,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( SseDeserializer deserializer); - @protected - InitTransaction - sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - SseDeserializer deserializer); - @protected AccountClient sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -370,16 +281,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClientConfig( SseDeserializer deserializer); - @protected - Address - sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - SseDeserializer deserializer); - - @protected - Bytes - sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - SseDeserializer deserializer); - @protected ChainAbstractionClient sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( @@ -391,8 +292,8 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { SseDeserializer deserializer); @protected - InitTransaction - sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + InitialTransaction + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( SseDeserializer deserializer); @protected @@ -410,15 +311,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponseCompleted( SseDeserializer deserializer); - @protected - U256 - sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - SseDeserializer deserializer); - - @protected - U64 sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - SseDeserializer deserializer); - @protected String sse_decode_String(SseDeserializer deserializer); @@ -477,16 +369,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClientConfig( AccountClientConfig self, SseSerializer serializer); - @protected - void - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - Address self, SseSerializer serializer); - - @protected - void - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - Bytes self, SseSerializer serializer); - @protected void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( @@ -499,8 +381,8 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { @protected void - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - InitTransaction self, SseSerializer serializer); + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( + InitialTransaction self, SseSerializer serializer); @protected void @@ -517,16 +399,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponseCompleted( StatusResponseCompleted self, SseSerializer serializer); - @protected - void - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - U256 self, SseSerializer serializer); - - @protected - void - sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - U64 self, SseSerializer serializer); - @protected void sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -542,11 +414,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( ChainAbstractionClient self, SseSerializer serializer); - @protected - void - sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - InitTransaction self, SseSerializer serializer); - @protected void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -562,11 +429,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( ChainAbstractionClient self, SseSerializer serializer); - @protected - void - sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - InitTransaction self, SseSerializer serializer); - @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClient( @@ -577,16 +439,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClientConfig( AccountClientConfig self, SseSerializer serializer); - @protected - void - sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - Address self, SseSerializer serializer); - - @protected - void - sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - Bytes self, SseSerializer serializer); - @protected void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( @@ -599,8 +451,8 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { @protected void - sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( - InitTransaction self, SseSerializer serializer); + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( + InitialTransaction self, SseSerializer serializer); @protected void @@ -617,16 +469,6 @@ abstract class YttriumDartApiImplPlatform extends BaseApiImpl { sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponseCompleted( StatusResponseCompleted self, SseSerializer serializer); - @protected - void - sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - U256 self, SseSerializer serializer); - - @protected - void - sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - U64 self, SseSerializer serializer); - @protected void sse_encode_String(String self, SseSerializer serializer); @@ -757,70 +599,6 @@ class YttriumDartWire implements BaseWire { _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAccountClientConfigPtr .asFunction)>(); - void - rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddressPtr = - _lookup)>>( - 'frbgen_yttrium_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress'); - late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress = - _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddressPtr - .asFunction)>(); - - void - rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddressPtr = - _lookup)>>( - 'frbgen_yttrium_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress'); - late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress = - _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddressPtr - .asFunction)>(); - - void - rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytesPtr = - _lookup)>>( - 'frbgen_yttrium_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes'); - late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes = - _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytesPtr - .asFunction)>(); - - void - rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytesPtr = - _lookup)>>( - 'frbgen_yttrium_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes'); - late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes = - _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytesPtr - .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( ffi.Pointer ptr, @@ -886,35 +664,35 @@ class YttriumDartWire implements BaseWire { .asFunction)>(); void - rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransactionPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransactionPtr = _lookup)>>( - 'frbgen_yttrium_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction'); - late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction = - _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransactionPtr + 'frbgen_yttrium_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction'); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransactionPtr .asFunction)>(); void - rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransactionPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransactionPtr = _lookup)>>( - 'frbgen_yttrium_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction'); - late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction = - _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransactionPtr + 'frbgen_yttrium_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction'); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransactionPtr .asFunction)>(); void @@ -1012,68 +790,4 @@ class YttriumDartWire implements BaseWire { late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponseCompleted = _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStatusResponseCompletedPtr .asFunction)>(); - - void - rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256Ptr = - _lookup)>>( - 'frbgen_yttrium_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256'); - late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256 = - _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256Ptr - .asFunction)>(); - - void - rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256Ptr = - _lookup)>>( - 'frbgen_yttrium_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256'); - late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256 = - _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256Ptr - .asFunction)>(); - - void - rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64Ptr = - _lookup)>>( - 'frbgen_yttrium_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64'); - late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64 = - _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64Ptr - .asFunction)>(); - - void - rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64Ptr = - _lookup)>>( - 'frbgen_yttrium_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64'); - late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64 = - _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64Ptr - .asFunction)>(); } diff --git a/crates/yttrium_dart/lib/generated/lib.dart b/crates/yttrium_dart/lib/generated/lib.dart index 038b8096..696aa46a 100644 --- a/crates/yttrium_dart/lib/generated/lib.dart +++ b/crates/yttrium_dart/lib/generated/lib.dart @@ -8,8 +8,8 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'lib.freezed.dart'; -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `clone`, `clone`, `clone`, `clone`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt` -// These functions are ignored (category: IgnoreBecauseNotAllowedOwner): `from`, `from` +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `clone`, `clone`, `clone`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt` +// These functions are ignored (category: IgnoreBecauseNotAllowedOwner): `from` // Rust type: RustOpaqueMoi> abstract class AccountClient implements RustOpaqueInterface { @@ -73,12 +73,6 @@ abstract class AccountClientConfig implements RustOpaqueInterface { set signerType(String signerType); } -// Rust type: RustOpaqueMoi> -abstract class Address implements RustOpaqueInterface {} - -// Rust type: RustOpaqueMoi> -abstract class Bytes implements RustOpaqueInterface {} - // Rust type: RustOpaqueMoi> abstract class ChainAbstractionClient implements RustOpaqueInterface { String get projectId; @@ -93,7 +87,7 @@ abstract class ChainAbstractionClient implements RustOpaqueInterface { YttriumDart.instance.api .crateChainAbstractionClientNew(projectId: projectId); - Future route({required InitTransaction transaction}); + Future route({required InitialTransaction initialTransaction}); Future status({required String orchestrationId}); @@ -106,48 +100,8 @@ abstract class ChainAbstractionClient implements RustOpaqueInterface { // Rust type: RustOpaqueMoi> abstract class Config implements RustOpaqueInterface {} -// Rust type: RustOpaqueMoi> -abstract class InitTransaction implements RustOpaqueInterface { - String get chainId; - - Bytes get data; - - Address get from; - - U64 get gas; - - U256 get gasPrice; - - U256 get maxFeePerGas; - - U256 get maxPriorityFeePerGas; - - U64 get nonce; - - Address get to; - - U256 get value; - - set chainId(String chainId); - - set data(Bytes data); - - set from(Address from); - - set gas(U64 gas); - - set gasPrice(U256 gasPrice); - - set maxFeePerGas(U256 maxFeePerGas); - - set maxPriorityFeePerGas(U256 maxPriorityFeePerGas); - - set nonce(U64 nonce); - - set to(Address to); - - set value(U256 value); -} +// Rust type: RustOpaqueMoi> +abstract class InitialTransaction implements RustOpaqueInterface {} // Rust type: RustOpaqueMoi> abstract class RouteResponse implements RustOpaqueInterface {} @@ -158,12 +112,6 @@ abstract class StatusResponse implements RustOpaqueInterface {} // Rust type: RustOpaqueMoi> abstract class StatusResponseCompleted implements RustOpaqueInterface {} -// Rust type: RustOpaqueMoi> -abstract class U256 implements RustOpaqueInterface {} - -// Rust type: RustOpaqueMoi> -abstract class U64 implements RustOpaqueInterface {} - class Eip1559Estimation { final String maxFeePerGas; final String maxPriorityFeePerGas; diff --git a/crates/yttrium_dart/lib/yttrium_dart.dart b/crates/yttrium_dart/lib/yttrium_dart.dart index 7d38188c..f371147c 100644 --- a/crates/yttrium_dart/lib/yttrium_dart.dart +++ b/crates/yttrium_dart/lib/yttrium_dart.dart @@ -69,12 +69,14 @@ class YttriumDart implements ChainAbstractionClient { } @override - Future route({required InitTransaction transaction}) async { + Future route({ + required InitialTransaction initialTransaction, + }) async { if (_chainAbstractionClient == null) { throw 'ChainAbstractionClient is not initialized'; } return await _chainAbstractionClient!.route( - transaction: transaction, + initialTransaction: initialTransaction, ); } diff --git a/crates/yttrium_dart/pubspec.yaml b/crates/yttrium_dart/pubspec.yaml index 7752b875..ec762721 100644 --- a/crates/yttrium_dart/pubspec.yaml +++ b/crates/yttrium_dart/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/reown-com/yttrium/tree/main/crates/yttrium_dart repository: https://github.com/reown-com/yttrium/tree/main/crates/yttrium_dart environment: - sdk: ">=2.19.0 <4.0.0" + sdk: ">=3.0.0 <4.0.0" dependencies: flutter: diff --git a/crates/yttrium_dart/rust/src/frb_generated.rs b/crates/yttrium_dart/rust/src/frb_generated.rs index e87415c0..538b7a30 100644 --- a/crates/yttrium_dart/rust/src/frb_generated.rs +++ b/crates/yttrium_dart/rust/src/frb_generated.rs @@ -42,7 +42,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_auto_opaque = RustAutoOpaqueMoi, ); pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.7.0"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1789961500; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1083921087; // Section: executor @@ -695,7 +695,7 @@ fn wire__crate__ChainAbstractionClient_route_impl( let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); let api_that = >>::sse_decode(&mut deserializer); -let api_transaction = ::sse_decode(&mut deserializer);deserializer.end(); move |context| async move { +let api_initial_transaction = ::sse_decode(&mut deserializer);deserializer.end(); move |context| async move { transform_result_sse::<_, crate::Error>((move || async move { let mut api_that_guard = None; let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, false)]); @@ -706,7 +706,7 @@ let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decod } } let api_that_guard = api_that_guard.unwrap(); - let output_ok = crate::ChainAbstractionClient::route(&*api_that_guard, api_transaction).await?; Ok(output_ok) + let output_ok = crate::ChainAbstractionClient::route(&*api_that_guard, api_initial_transaction).await?; Ok(output_ok) })().await) } }) } @@ -762,456 +762,6 @@ let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decod })().await) } }) } -fn wire__crate__InitTransaction_auto_accessor_get_chain_id_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_get_chain_id", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, false)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), - _ => unreachable!(), - } - } - let api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok(api_that_guard.chain_id.clone())?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_get_data_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_get_data", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, false)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), - _ => unreachable!(), - } - } - let api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok(api_that_guard.data.clone())?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_get_from_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_get_from", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, false)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), - _ => unreachable!(), - } - } - let api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok(api_that_guard.from.clone())?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_get_gas_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_get_gas", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, false)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), - _ => unreachable!(), - } - } - let api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok(api_that_guard.gas.clone())?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_get_gas_price_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_get_gas_price", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, false)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), - _ => unreachable!(), - } - } - let api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok(api_that_guard.gas_price.clone())?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_get_max_fee_per_gas_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_get_max_fee_per_gas", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, false)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), - _ => unreachable!(), - } - } - let api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok(api_that_guard.max_fee_per_gas.clone())?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_get_max_priority_fee_per_gas_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_get_max_priority_fee_per_gas", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, false)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), - _ => unreachable!(), - } - } - let api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok(api_that_guard.max_priority_fee_per_gas.clone())?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_get_nonce_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_get_nonce", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, false)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), - _ => unreachable!(), - } - } - let api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok(api_that_guard.nonce.clone())?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_get_to_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_get_to", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, false)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), - _ => unreachable!(), - } - } - let api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok(api_that_guard.to.clone())?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_get_value_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_get_value", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, false)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()), - _ => unreachable!(), - } - } - let api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok(api_that_guard.value.clone())?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_set_chain_id_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_set_chain_id", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer); -let api_chain_id = ::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, true)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref_mut()), - _ => unreachable!(), - } - } - let mut api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok({ { api_that_guard.chain_id = api_chain_id; }; })?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_set_data_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_set_data", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer); -let api_data = ::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, true)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref_mut()), - _ => unreachable!(), - } - } - let mut api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok({ { api_that_guard.data = api_data; }; })?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_set_from_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_set_from", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer); -let api_from =
::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, true)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref_mut()), - _ => unreachable!(), - } - } - let mut api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok({ { api_that_guard.from = api_from; }; })?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_set_gas_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_set_gas", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer); -let api_gas = ::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, true)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref_mut()), - _ => unreachable!(), - } - } - let mut api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok({ { api_that_guard.gas = api_gas; }; })?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_set_gas_price_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_set_gas_price", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer); -let api_gas_price = ::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, true)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref_mut()), - _ => unreachable!(), - } - } - let mut api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok({ { api_that_guard.gas_price = api_gas_price; }; })?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_set_max_fee_per_gas_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_set_max_fee_per_gas", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer); -let api_max_fee_per_gas = ::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, true)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref_mut()), - _ => unreachable!(), - } - } - let mut api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok({ { api_that_guard.max_fee_per_gas = api_max_fee_per_gas; }; })?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_set_max_priority_fee_per_gas_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_set_max_priority_fee_per_gas", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer); -let api_max_priority_fee_per_gas = ::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, true)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref_mut()), - _ => unreachable!(), - } - } - let mut api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok({ { api_that_guard.max_priority_fee_per_gas = api_max_priority_fee_per_gas; }; })?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_set_nonce_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_set_nonce", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer); -let api_nonce = ::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, true)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref_mut()), - _ => unreachable!(), - } - } - let mut api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok({ { api_that_guard.nonce = api_nonce; }; })?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_set_to_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_set_to", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer); -let api_to =
::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, true)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref_mut()), - _ => unreachable!(), - } - } - let mut api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok({ { api_that_guard.to = api_to; }; })?; Ok(output_ok) - })()) }) -} -fn wire__crate__InitTransaction_auto_accessor_set_value_impl( - ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr, - rust_vec_len_: i32, - data_len_: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "InitTransaction_auto_accessor_set_value", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync }, move || { - let message = unsafe { flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_, rust_vec_len_, data_len_) }; - let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); - let api_that = >>::sse_decode(&mut deserializer); -let api_value = ::sse_decode(&mut deserializer);deserializer.end(); - transform_result_sse::<_, ()>((move || { - let mut api_that_guard = None; -let decode_indices_ = flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(&api_that, 0, true)]); - for i in decode_indices_ { - match i { - 0 => api_that_guard = Some(api_that.lockable_decode_sync_ref_mut()), - _ => unreachable!(), - } - } - let mut api_that_guard = api_that_guard.unwrap(); - let output_ok = Result::<_,()>::Ok({ { api_that_guard.value = api_value; }; })?; Ok(output_ok) - })()) }) -} // Section: related_funcs @@ -1223,12 +773,6 @@ flutter_rust_bridge::frb_generated_moi_arc_impl_value!( AccountClientConfig, > ); -flutter_rust_bridge::frb_generated_moi_arc_impl_value!( - flutter_rust_bridge::for_generated::RustAutoOpaqueInner
-); -flutter_rust_bridge::frb_generated_moi_arc_impl_value!( - flutter_rust_bridge::for_generated::RustAutoOpaqueInner -); flutter_rust_bridge::frb_generated_moi_arc_impl_value!( flutter_rust_bridge::for_generated::RustAutoOpaqueInner< ChainAbstractionClient, @@ -1238,7 +782,7 @@ flutter_rust_bridge::frb_generated_moi_arc_impl_value!( flutter_rust_bridge::for_generated::RustAutoOpaqueInner ); flutter_rust_bridge::frb_generated_moi_arc_impl_value!( - flutter_rust_bridge::for_generated::RustAutoOpaqueInner + flutter_rust_bridge::for_generated::RustAutoOpaqueInner ); flutter_rust_bridge::frb_generated_moi_arc_impl_value!( flutter_rust_bridge::for_generated::RustAutoOpaqueInner @@ -1251,12 +795,6 @@ flutter_rust_bridge::frb_generated_moi_arc_impl_value!( StatusResponseCompleted, > ); -flutter_rust_bridge::frb_generated_moi_arc_impl_value!( - flutter_rust_bridge::for_generated::RustAutoOpaqueInner -); -flutter_rust_bridge::frb_generated_moi_arc_impl_value!( - flutter_rust_bridge::for_generated::RustAutoOpaqueInner -); // Section: dart2rust @@ -1288,30 +826,6 @@ impl SseDecode for AccountClientConfig { } } -impl SseDecode for Address { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode( - deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer, - ) -> Self { - let mut inner = , - >>::sse_decode(deserializer); - return flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(inner); - } -} - -impl SseDecode for Bytes { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode( - deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer, - ) -> Self { - let mut inner = , - >>::sse_decode(deserializer); - return flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(inner); - } -} - impl SseDecode for ChainAbstractionClient { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode( @@ -1338,14 +852,14 @@ impl SseDecode for Config { } } -impl SseDecode for InitTransaction { +impl SseDecode for InitialTransaction { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode( deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer, ) -> Self { let mut inner = , >>::sse_decode(deserializer); return flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(inner); @@ -1394,93 +908,9 @@ impl SseDecode for StatusResponseCompleted { } } -impl SseDecode for U256 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode( - deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer, - ) -> Self { - let mut inner = , - >>::sse_decode(deserializer); - return flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(inner); - } -} - -impl SseDecode for U64 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode( - deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer, - ) -> Self { - let mut inner = , - >>::sse_decode(deserializer); - return flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(inner); - } -} - impl SseDecode - for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner, - > -{ - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode( - deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer, - ) -> Self { - let mut inner = ::sse_decode(deserializer); - return decode_rust_opaque_moi(inner); - } -} - -impl SseDecode - for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner< - AccountClientConfig, - >, - > -{ - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode( - deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer, - ) -> Self { - let mut inner = ::sse_decode(deserializer); - return decode_rust_opaque_moi(inner); - } -} - -impl SseDecode - for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner
, - > -{ - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode( - deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer, - ) -> Self { - let mut inner = ::sse_decode(deserializer); - return decode_rust_opaque_moi(inner); - } -} - -impl SseDecode - for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner, - > -{ - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode( - deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer, - ) -> Self { - let mut inner = ::sse_decode(deserializer); - return decode_rust_opaque_moi(inner); - } -} - -impl SseDecode - for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner< - ChainAbstractionClient, - >, + for RustOpaqueMoi< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, > { // Codec=Sse (Serialization based), see doc to use other codecs @@ -1494,7 +924,9 @@ impl SseDecode impl SseDecode for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + flutter_rust_bridge::for_generated::RustAutoOpaqueInner< + AccountClientConfig, + >, > { // Codec=Sse (Serialization based), see doc to use other codecs @@ -1509,7 +941,7 @@ impl SseDecode impl SseDecode for RustOpaqueMoi< flutter_rust_bridge::for_generated::RustAutoOpaqueInner< - InitTransaction, + ChainAbstractionClient, >, > { @@ -1524,7 +956,7 @@ impl SseDecode impl SseDecode for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, > { // Codec=Sse (Serialization based), see doc to use other codecs @@ -1538,7 +970,9 @@ impl SseDecode impl SseDecode for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + flutter_rust_bridge::for_generated::RustAutoOpaqueInner< + InitialTransaction, + >, > { // Codec=Sse (Serialization based), see doc to use other codecs @@ -1552,9 +986,7 @@ impl SseDecode impl SseDecode for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner< - StatusResponseCompleted, - >, + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, > { // Codec=Sse (Serialization based), see doc to use other codecs @@ -1568,7 +1000,7 @@ impl SseDecode impl SseDecode for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, > { // Codec=Sse (Serialization based), see doc to use other codecs @@ -1582,7 +1014,9 @@ impl SseDecode impl SseDecode for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + flutter_rust_bridge::for_generated::RustAutoOpaqueInner< + StatusResponseCompleted, + >, > { // Codec=Sse (Serialization based), see doc to use other codecs @@ -1828,26 +1262,6 @@ fn pde_ffi_dispatcher_sync_impl( 16 => wire__crate__AccountClient_auto_accessor_set_owner_address_impl(ptr, rust_vec_len, data_len), 25 => wire__crate__ChainAbstractionClient_auto_accessor_get_project_id_impl(ptr, rust_vec_len, data_len), 26 => wire__crate__ChainAbstractionClient_auto_accessor_set_project_id_impl(ptr, rust_vec_len, data_len), -32 => wire__crate__InitTransaction_auto_accessor_get_chain_id_impl(ptr, rust_vec_len, data_len), -33 => wire__crate__InitTransaction_auto_accessor_get_data_impl(ptr, rust_vec_len, data_len), -34 => wire__crate__InitTransaction_auto_accessor_get_from_impl(ptr, rust_vec_len, data_len), -35 => wire__crate__InitTransaction_auto_accessor_get_gas_impl(ptr, rust_vec_len, data_len), -36 => wire__crate__InitTransaction_auto_accessor_get_gas_price_impl(ptr, rust_vec_len, data_len), -37 => wire__crate__InitTransaction_auto_accessor_get_max_fee_per_gas_impl(ptr, rust_vec_len, data_len), -38 => wire__crate__InitTransaction_auto_accessor_get_max_priority_fee_per_gas_impl(ptr, rust_vec_len, data_len), -39 => wire__crate__InitTransaction_auto_accessor_get_nonce_impl(ptr, rust_vec_len, data_len), -40 => wire__crate__InitTransaction_auto_accessor_get_to_impl(ptr, rust_vec_len, data_len), -41 => wire__crate__InitTransaction_auto_accessor_get_value_impl(ptr, rust_vec_len, data_len), -42 => wire__crate__InitTransaction_auto_accessor_set_chain_id_impl(ptr, rust_vec_len, data_len), -43 => wire__crate__InitTransaction_auto_accessor_set_data_impl(ptr, rust_vec_len, data_len), -44 => wire__crate__InitTransaction_auto_accessor_set_from_impl(ptr, rust_vec_len, data_len), -45 => wire__crate__InitTransaction_auto_accessor_set_gas_impl(ptr, rust_vec_len, data_len), -46 => wire__crate__InitTransaction_auto_accessor_set_gas_price_impl(ptr, rust_vec_len, data_len), -47 => wire__crate__InitTransaction_auto_accessor_set_max_fee_per_gas_impl(ptr, rust_vec_len, data_len), -48 => wire__crate__InitTransaction_auto_accessor_set_max_priority_fee_per_gas_impl(ptr, rust_vec_len, data_len), -49 => wire__crate__InitTransaction_auto_accessor_set_nonce_impl(ptr, rust_vec_len, data_len), -50 => wire__crate__InitTransaction_auto_accessor_set_to_impl(ptr, rust_vec_len, data_len), -51 => wire__crate__InitTransaction_auto_accessor_set_value_impl(ptr, rust_vec_len, data_len), _ => unreachable!(), } } @@ -1900,48 +1314,6 @@ impl flutter_rust_bridge::IntoIntoDart> } } -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for FrbWrapper
{ - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - flutter_rust_bridge::for_generated::rust_auto_opaque_encode::< - _, - MoiArc<_>, - >(self.0) - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for FrbWrapper
-{ -} - -impl flutter_rust_bridge::IntoIntoDart> for Address { - fn into_into_dart(self) -> FrbWrapper
{ - self.into() - } -} - -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for FrbWrapper { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - flutter_rust_bridge::for_generated::rust_auto_opaque_encode::< - _, - MoiArc<_>, - >(self.0) - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for FrbWrapper -{ -} - -impl flutter_rust_bridge::IntoIntoDart> for Bytes { - fn into_into_dart(self) -> FrbWrapper { - self.into() - } -} - // Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { @@ -1987,7 +1359,7 @@ impl flutter_rust_bridge::IntoIntoDart> for Config { } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for FrbWrapper { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { flutter_rust_bridge::for_generated::rust_auto_opaque_encode::< _, @@ -1997,14 +1369,14 @@ impl flutter_rust_bridge::IntoDart for FrbWrapper { } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for FrbWrapper + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart> - for InitTransaction +impl flutter_rust_bridge::IntoIntoDart> + for InitialTransaction { - fn into_into_dart(self) -> FrbWrapper { + fn into_into_dart(self) -> FrbWrapper { self.into() } } @@ -2078,48 +1450,6 @@ impl flutter_rust_bridge::IntoIntoDart> } } -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for FrbWrapper { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - flutter_rust_bridge::for_generated::rust_auto_opaque_encode::< - _, - MoiArc<_>, - >(self.0) - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for FrbWrapper -{ -} - -impl flutter_rust_bridge::IntoIntoDart> for U256 { - fn into_into_dart(self) -> FrbWrapper { - self.into() - } -} - -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for FrbWrapper { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - flutter_rust_bridge::for_generated::rust_auto_opaque_encode::< - _, - MoiArc<_>, - >(self.0) - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for FrbWrapper -{ -} - -impl flutter_rust_bridge::IntoIntoDart> for U64 { - fn into_into_dart(self) -> FrbWrapper { - self.into() - } -} - // Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::Eip1559Estimation { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { @@ -2268,42 +1598,6 @@ impl SseEncode for AccountClientConfig { } } -impl SseEncode for Address { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode( - self, - serializer: &mut flutter_rust_bridge::for_generated::SseSerializer, - ) { - , - >>::sse_encode( - flutter_rust_bridge::for_generated::rust_auto_opaque_encode::< - _, - MoiArc<_>, - >(self), - serializer, - ); - } -} - -impl SseEncode for Bytes { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode( - self, - serializer: &mut flutter_rust_bridge::for_generated::SseSerializer, - ) { - , - >>::sse_encode( - flutter_rust_bridge::for_generated::rust_auto_opaque_encode::< - _, - MoiArc<_>, - >(self), - serializer, - ); - } -} - impl SseEncode for ChainAbstractionClient { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode( @@ -2342,7 +1636,7 @@ impl SseEncode for Config { } } -impl SseEncode for InitTransaction { +impl SseEncode for InitialTransaction { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode( self, @@ -2350,7 +1644,7 @@ impl SseEncode for InitTransaction { ) { , >>::sse_encode( flutter_rust_bridge::for_generated::rust_auto_opaque_encode::< @@ -2422,42 +1716,6 @@ impl SseEncode for StatusResponseCompleted { } } -impl SseEncode for U256 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode( - self, - serializer: &mut flutter_rust_bridge::for_generated::SseSerializer, - ) { - , - >>::sse_encode( - flutter_rust_bridge::for_generated::rust_auto_opaque_encode::< - _, - MoiArc<_>, - >(self), - serializer, - ); - } -} - -impl SseEncode for U64 { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode( - self, - serializer: &mut flutter_rust_bridge::for_generated::SseSerializer, - ) { - , - >>::sse_encode( - flutter_rust_bridge::for_generated::rust_auto_opaque_encode::< - _, - MoiArc<_>, - >(self), - serializer, - ); - } -} - impl SseEncode for RustOpaqueMoi< flutter_rust_bridge::for_generated::RustAutoOpaqueInner, @@ -2492,38 +1750,6 @@ impl SseEncode } } -impl SseEncode - for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner
, - > -{ - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode( - self, - serializer: &mut flutter_rust_bridge::for_generated::SseSerializer, - ) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - -impl SseEncode - for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner, - > -{ - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode( - self, - serializer: &mut flutter_rust_bridge::for_generated::SseSerializer, - ) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - impl SseEncode for RustOpaqueMoi< flutter_rust_bridge::for_generated::RustAutoOpaqueInner< @@ -2561,7 +1787,7 @@ impl SseEncode impl SseEncode for RustOpaqueMoi< flutter_rust_bridge::for_generated::RustAutoOpaqueInner< - InitTransaction, + InitialTransaction, >, > { @@ -2626,38 +1852,6 @@ impl SseEncode } } -impl SseEncode - for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner, - > -{ - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode( - self, - serializer: &mut flutter_rust_bridge::for_generated::SseSerializer, - ) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - -impl SseEncode - for RustOpaqueMoi< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner, - > -{ - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode( - self, - serializer: &mut flutter_rust_bridge::for_generated::SseSerializer, - ) { - let (ptr, size) = self.sse_encode_raw(); - ::sse_encode(ptr, serializer); - ::sse_encode(size, serializer); - } -} - impl SseEncode for String { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode( @@ -2894,38 +2088,6 @@ mod io { >::decrement_strong_count(ptr as _); } - #[no_mangle] - pub extern "C" fn frbgen_yttrium_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - ptr: *const std::ffi::c_void, - ) { - MoiArc::< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner
, - >::increment_strong_count(ptr as _); - } - - #[no_mangle] - pub extern "C" fn frbgen_yttrium_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerAddress( - ptr: *const std::ffi::c_void, - ) { - MoiArc::< - flutter_rust_bridge::for_generated::RustAutoOpaqueInner
, - >::decrement_strong_count(ptr as _); - } - - #[no_mangle] - pub extern "C" fn frbgen_yttrium_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - ptr: *const std::ffi::c_void, - ) { - MoiArc::>::increment_strong_count(ptr as _); - } - - #[no_mangle] - pub extern "C" fn frbgen_yttrium_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBytes( - ptr: *const std::ffi::c_void, - ) { - MoiArc::>::decrement_strong_count(ptr as _); - } - #[no_mangle] pub extern "C" fn frbgen_yttrium_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerChainAbstractionClient( ptr: *const std::ffi::c_void, @@ -2963,23 +2125,23 @@ mod io { } #[no_mangle] - pub extern "C" fn frbgen_yttrium_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + pub extern "C" fn frbgen_yttrium_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( ptr: *const std::ffi::c_void, ) { MoiArc::< flutter_rust_bridge::for_generated::RustAutoOpaqueInner< - InitTransaction, + InitialTransaction, >, >::increment_strong_count(ptr as _); } #[no_mangle] - pub extern "C" fn frbgen_yttrium_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitTransaction( + pub extern "C" fn frbgen_yttrium_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerInitialTransaction( ptr: *const std::ffi::c_void, ) { MoiArc::< flutter_rust_bridge::for_generated::RustAutoOpaqueInner< - InitTransaction, + InitialTransaction, >, >::decrement_strong_count(ptr as _); } @@ -3049,34 +2211,6 @@ mod io { >, >::decrement_strong_count(ptr as _); } - - #[no_mangle] - pub extern "C" fn frbgen_yttrium_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - ptr: *const std::ffi::c_void, - ) { - MoiArc::>::increment_strong_count(ptr as _); - } - - #[no_mangle] - pub extern "C" fn frbgen_yttrium_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU256( - ptr: *const std::ffi::c_void, - ) { - MoiArc::>::decrement_strong_count(ptr as _); - } - - #[no_mangle] - pub extern "C" fn frbgen_yttrium_dart_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - ptr: *const std::ffi::c_void, - ) { - MoiArc::>::increment_strong_count(ptr as _); - } - - #[no_mangle] - pub extern "C" fn frbgen_yttrium_dart_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerU64( - ptr: *const std::ffi::c_void, - ) { - MoiArc::>::decrement_strong_count(ptr as _); - } } #[cfg(not(target_family = "wasm"))] pub use io::*; diff --git a/crates/yttrium_dart/rust/src/lib.rs b/crates/yttrium_dart/rust/src/lib.rs index 1c340e59..58c17fa4 100644 --- a/crates/yttrium_dart/rust/src/lib.rs +++ b/crates/yttrium_dart/rust/src/lib.rs @@ -2,7 +2,6 @@ mod frb_generated; /* AUTO INJECTED BY flutter_rust_bridge. This line may not be use { alloy::{ network::Ethereum, - primitives::{Bytes, U256, U64}, providers::{Provider, ReqwestProvider}, }, flutter_rust_bridge::frb, @@ -15,7 +14,7 @@ use { api::{ route::RouteResponse, status::{StatusResponse, StatusResponseCompleted}, - Transaction as CATransaction, + InitialTransaction, }, client::Client, }, @@ -39,21 +38,6 @@ pub struct Transaction { pub data: String, } -#[frb] -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct InitTransaction { - pub from: Address, - pub to: Address, - pub value: U256, - pub gas: U64, - pub gas_price: U256, - pub data: Bytes, - pub nonce: U64, - pub max_fee_per_gas: U256, - pub max_priority_fee_per_gas: U256, - pub chain_id: String, -} - #[derive(Clone, Debug, Serialize, Deserialize)] pub struct PreparedSendTransaction { pub hash: String, @@ -96,11 +80,10 @@ impl ChainAbstractionClient { #[frb] pub async fn route( &self, - transaction: InitTransaction, + initial_transaction: InitialTransaction, ) -> Result { - let ca_transaction = CATransaction::from(transaction); self.client - .route(ca_transaction) + .route(initial_transaction) .await .map_err(|e| Error::General(e.to_string())) } @@ -334,24 +317,6 @@ impl From for YTransaction { } } -#[frb] -impl From for CATransaction { - fn from(source: InitTransaction) -> Self { - CATransaction { - from: source.from, - to: source.to, - value: source.value, - gas: source.gas, - gas_price: source.gas_price, - data: source.data, - nonce: source.nonce, - max_fee_per_gas: source.max_fee_per_gas, - max_priority_fee_per_gas: source.max_priority_fee_per_gas, - chain_id: source.chain_id, - } - } -} - #[cfg(test)] mod tests { use alloy::{