Sui.

Expert Q&A

Ask Sui community experts

Sui.X.Peera.

Earn Your Share of 1000 Sui

Gain Reputation Points & Get Rewards for Helping the Sui Community Grow.

Posts

152
  • Owen.
    May 31, 2025
    Expert Q&A

    Type checking error when using a custom struct as a type parameter in Sui Move's coin::Coin?

    Question: I'm encountering a type checking error in my Sui Move code that I don't understand. Here's a simplified version of my code: module my_module::mymodule { use sui::coin; use sui::wallets; struct MyCoin has drop {} public fun create_coin(): coin::Coin { coin::mint(1000) } } When I try to compile, I get the following error: Invalid type parameter instantiation. Expected type 'phantom type T' but found 'MyCoin' What am I doing wrong? Why can't I use MyCoin as a type parameter for coin::Coin, and how can I fix this type checking issue?

    • Sui
    • Architecture
    0
    2
  • Bounty+10

    Peera Admin.
    May 29, 2025
    Expert Q&A

    Why does BCS require exact field order for deserialization when Move structs have named fields?

    Why does BCS require exact field order for deserialization when Move structs have named fields? I've been diving deep into BCS encoding/decoding in Move, particularly for cross-chain communication and off-chain data processing. While working through the examples in the Sui Move documentation, I encountered some behavior that seems counterintuitive and I'm trying to understand the underlying design decisions. According to the BCS specification, "there are no structs in BCS (since there are no types); the struct simply defines the order in which fields are serialized." This means when deserializing, we must use peel_* functions in the exact same order as the struct field definition. My Specific Questions: Design Rationale: Why does BCS require exact field order matching when Move structs have named fields? Wouldn't it be more robust to serialize field names alongside values, similar to JSON or other self-describing formats? Generic Type Interaction: The docs mention that "types containing generic type fields can be parsed up to the first generic type field." Consider this structure: struct ComplexObject has drop, copy { id: ID, owner: address, metadata: Metadata, generic_data: T, more_metadata: String, another_generic: U } How exactly does partial deserialization work here? Can I deserialize up to more_metadata and ignore both generic fields, or does the first generic field (generic_data) completely block further deserialization? Cross-Language Consistency: When using the @mysten/bcs JavaScript library to serialize data that will be consumed by Move contracts, what happens if: I accidentally reorder fields in the JavaScript object? The Move struct definition changes field order in a contract upgrade? I have nested structs with their own generic parameters? Practical Implications: In production systems, how do teams handle BCS schema evolution? Do you version your BCS schemas, or is the expectation that struct field order is immutable once deployed?

    • Sui
    • Move
    5
    2
  • deriss.
    May 28, 2025
    Expert Q&A

    Will my transaction complete if limit is near?

    I received a notification saying 'Global transaction limit is approaching'. If I initiate a transaction now, will it still be processed within 24 hours?

    • Move
    0
    3
  • Dominikus .
    May 25, 2025
    Expert Q&A

    What is the SUI contract address on Sui platform?

    Hey everyone, I'm trying to find the SUI contract address for the Sui platform. Can anyone confirm this for me?

    • Sui
    0
    3
  • LargeCappWithTwo.
    May 22, 2025
    Expert Q&A

    Sui wallet updated, now can't login with password

    I updated my old Sui wallet to the latest version, but now when I enter my password, I get a warning to reload the app and the app freezes. What can I do to resolve this issue without losing access?

    • Sui
    0
    2
  • tomek.
    May 20, 2025
    Expert Q&A

    Is there a way to access Stashed on testnet?

    Hey folks, I'm trying to explore the features of Stashed but I'd like to test it on testnet first before proceeding further. I know there's often demand for testnet tokens for such trials. Can anyone shed some light on whether Stashed supports testnet, and how I might request this feature from the development team?

    • Sui
    • Architecture
    0
    2
  • farshad.
    May 20, 2025
    Expert Q&A

    How to access private keys in Sui wallet with Google account?

    Hey everyone, I've been trying to figure out how to get the private key from my Sui wallet that is linked to my Google account. My goal was to use it with Sui CLI, but I'm not sure if that's possible with this type of setup. Any insights or alternative approaches would be greatly appreciated!

    • Security Protocols
    0
    2
  • RogueRig.
    May 13, 2025
    Expert Q&A

    What is the best wallet on SUI?

    What is the best wallet on SUI Blockchain and what features do they offer?

    • Sui
    1
    1
    Best Answer
  • Elvin CLONE .
    May 13, 2025
    Expert Q&A

    How to resolve invalid private key error when importing wallet?

    I tried importing my private key into my wallet app, but I keep getting an 'Invalid Private Key, please use a Bech32 encoded 33-byte string.' error. I downloaded the wallet again, but the issue persists even when I try importing from passphrase, and end up seeing a wallet with zero balance. What should I do to fix this?

    • Sui
    • Architecture
    0
    4
  • BlueEyedCrypto.
    May 12, 2025
    Expert Q&A

    Problems transferring dogizen from Telegram to Sui wallet

    Hey everyone, I'm having some trouble with transferring my dogizen. I moved them from my Telegram wallet to Sui. While the transfer seemed successful initially, Sui then refused to recognize them. How can I resolve this issue to ensure my tokens show up in the Sui wallet?

    • Sui
    0
    2
Reward CampaignJune
Top tags
  • Sui
  • Architecture
  • SDKs and Developer Tools
  • Move
  • Security Protocols
  • NFT Ecosystem
  • Transaction Processing
We use cookies to ensure you get the best experience on our website.
More info