You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the contract interface to send an amount of some asset (in this case BASE_ASSET_ID) via the contract interface call does not seem to have the ability to inject or add an amount (to send in to a contract via call params) via the wallet.
i.e., The below function in Sway has the ability to accept within the call parameters a amount of BASE_ASSET_ID :
Using fuels-rs this is done with a simple example:
let contract_instance = MyContract::new(_contract_id.into(), wallet.clone());let tx_params = TxParameters::default().set_gas_price(1).set_gas_limit(1_000_000).set_maturity(0);let deposit_amount = 1_000_003;let call_params = CallParameters::default().set_amount(deposit_amount).set_asset_id(BASE_ASSET_ID);let res = contract_instance
.methods().receive_funds().tx_params(tx_params).call_params(call_params).unwrap().call().await;
However, when using sway-playground, there is no way for the user making the call to this function (receive_funds()) via the contract interface and add an "amount" to the transaction that is being signed.
The text was updated successfully, but these errors were encountered:
Problem Description:
Using the contract interface to send an amount of some asset (in this case BASE_ASSET_ID) via the contract interface call does not seem to have the ability to inject or add an amount (to send in to a contract via call params) via the wallet.
i.e., The below function in Sway has the ability to accept within the call parameters a amount of BASE_ASSET_ID :
Using
fuels-rs
this is done with a simple example:However, when using sway-playground, there is no way for the user making the call to this function (receive_funds()) via the contract interface and add an "amount" to the transaction that is being signed.
The text was updated successfully, but these errors were encountered: