Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use new core and sdk, fix broken code #77

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

MitchTurner
Copy link
Member

Context:

InsufficientMaxFee { max_fee_from_policies: 314900, max_fee_from_gas_price: 314931 }" }"} error. We need to update SDK to latest

Bumped versions and fixed all the broken pieces.

@@ -150,7 +150,7 @@ async fn get_coins(
amount: u64,
) -> Result<Vec<Input>, DispenseError> {
wallet
.get_spendable_resources(*base_asset_id, amount)
.get_spendable_resources(*base_asset_id, amount, None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the last value here?

Copy link
Member Author

@MitchTurner MitchTurner Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's "excluded" coins:

    /// Get some spendable resources (coins and messages) of asset `asset_id` owned by the account
    /// that add up at least to amount `amount`. The returned coins (UTXOs) are actual coins that
    /// can be spent. The number of UXTOs is optimized to prevent dust accumulation.
    async fn get_spendable_resources(
        &self,
        asset_id: AssetId,
        amount: u64,
        excluded_coins: Option<Vec<CoinTypeId>>,
    ) -> Result<Vec<CoinType>> {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, not great docs on it, but if it passes the tests...

Copy link
Member

@rymnc rymnc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, i would suggest to fmt the code, and inspect why strum_macros has multiple versions in the Cargo.lock

xgreenx
xgreenx previously approved these changes Oct 14, 2024
@MitchTurner
Copy link
Member Author

MitchTurner commented Oct 14, 2024

inspect why strum_macros has multiple versions in the Cargo.lock

It looks like we just depend on multiple versions. fuel-core and fuel-asm depend on different version of strum at least.

@MitchTurner MitchTurner merged commit 32d9442 into master Oct 14, 2024
8 checks passed
@MitchTurner MitchTurner deleted the update-to-use-core-0.39.0 branch October 14, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants