Peera.

Newest

Stay updated with the latest posts.

Posts

1828
  • kryptoschain.Peera.
    ForMoveApr 10, 2025
    Expert Q&A

    How to transfer an object owned by another object?

    I'm facing an issue with transferring an object A, which is owned by object B, and object B is owned by me. I'm getting an error saying the transaction was not signed by the correct sender. Does anyone know how to resolve this and properly receive object A?

    • Move CLI
    • Move
    0
    0
  • Michelle .Peera.
    ForSuiApr 10, 2025
    Expert Q&A

    Why does my trading bot's wallet lock until the next epoch?

    I've been having an issue where my trading wallet, which uses a bot, often receives an error saying 'Failed to sign transaction by a quorum of validators...' This results in the wallet being locked until the next epoch, sometimes for hours. It appears especially after an RPC timeout during a transaction. Why does this happen, and how can it be fixed to avoid such long locks?

    • Sui
    0
    0
  • McMMoKing.Peera.
    ForWalrusApr 10, 2025
    Expert Q&A

    How to upload large files to Walrus without speed issues?

    I'm trying to use Walrus for uploading files via API and I'm running into issues when trying to upload a 300MB file. While it works with the CLI, the upload speed is slow. Is there a file upload limit with Walrus, and how can I improve upload speeds for larger files?

    • Walrus
    • Typescript SDK
    0
    0
  • DuAn.Peera.
    ForWalrusApr 10, 2025
    Discussion

    How does Walrus compare to AO and others?

    I'm trying to understand the difference between Walrus and AO. From a functional perspective, how do they compare, especially considering their relationship with Sui and Arweave? Also, how does this comparison extend to Sui and Arweave specifically?

    • Walrus
    0
    0
  • AFL.Peera.
    AFL153
    ForPolygonApr 10, 2025
    Discussion

    How to integrate Polygon Portal bridge to transfer USDT?

    I'm currently working on a project where I need to integrate the Polygon Portal bridge into a wallet to facilitate the transfer of USDT. Are there any documentation or resources available that can help me understand how this bridge works?

    • Polygon PoS
    0
    1
  • Pluto Dev👽.Peera.
    ForMoveApr 10, 2025
    Expert Q&A

    Converting a Public Key to Sui Address in Sui Move

    I'm trying to convert a public key into a Sui address using Sui Move but can't find any built-in function. I understand it's quite important for my work. Could someone explain how exactly to do this conversion?

    • Move CLI
    0
    1
  • Xavier.eth.Peera.
    ForSuiApr 10, 2025
    Discussion

    How to transfer SUI from Standard wallet to Ledger wallet?

    I've connected my Ledger to a newly created SUI wallet, and that worked out fine. Now, I want to transfer my SUI from my 'Standard' SUI wallet to my 'Ledger' SUI wallet. Is there a shortcut, or do I have to send the SUI from one address to the other, like sending tokens to exchanges? I want to ensure this process is secure.

    • Transaction Processing
    0
    1
  • 1 Luca.Peera.
    ForMoveApr 10, 2025
    Discussion

    Does Sui support contract self-destruction?

    I was wondering if there's a way to destroy or self-destruct a smart contract within the Sui framework. I heard something about a 'selfdestruct' mechanism and wanted to know if it exists in Sui. Also, what would happen if a contract is terminated in this manner?

    • Move
    • Smart Contract
    0
    0
  • article banner.
    harry phan.Peera.
    ForSuiApr 10, 2025
    Article

    Building a Next-Gen NFT Lottery DApp with Sui Move & a Modern UI

    🧩 Building a Next-Gen NFT Lottery DApp with Sui Move & a Modern UI This is your ultimate guide to building a gamified, NFT-powered lottery DApp using Sui Move, with multi-round support, referral systems, DAO governance, and a design system Gen Z will love. From contract architecture to UI flow—let's go all in. 📦 Phase Breakdown Phase 1 – Core Lottery Multi-round gameplay NFT ticketing Referral reward system Basic DAO voting Phase 2 – Marketplace & Gamification NFT marketplace integration Boosters (increase win chance) Jackpot system Hidden airdrops Phase 3 – DAO & Multichain Cross-chain compatibility DAO with advanced proposals Dynamic pricing On-chain analytics 🧠 Smart Contract Deep Dive on Sui Move Contract Structure module nft_lottery_x::nft_lottery_x { use sui::object; use sui::balance::{Balance, zero}; use sui::coin::{Self, Coin}; use sui::clock::Clock; use sui::random::Random; use sui::event::emit; use sui::transfer; use sui::tx_context::TxContext; use std::option; use std::signer; const EGameNotStarted: u64 = 1000; const EGameAlreadyFinished: u64 = 1001; const EInvalidPayment: u64 = 1002; const ENoTickets: u64 = 1003; const EWinnerAlreadyChosen: u64 = 1004; const ENotWinner: u64 = 1005; public struct Game has key { id: UID, ticket_price: u64, start_time: u64, end_time: u64, total_tickets: u32, round: u32, winner: Option, balance: Balance, referral_bonus: u64, } public struct Ticket has key { id: UID, game_id: ID, ticket_number: u32, buyer: address, referrer: Option, } public struct GameCreated has copy, drop { game_id: ID, start_time: u64, end_time: u64, ticket_price: u64, } public struct TicketBought has copy, drop { game_id: ID, ticket_number: u32, buyer: address, referrer: Option, } public struct WinnerAnnounced has copy, drop { game_id: ID, winner_ticket: u32, round: u32, } public struct RewardClaimed has copy, drop { game_id: ID, ticket_number: u32, amount: u64, } public fun create_game( start_time: u64, end_time: u64, ticket_price: u64, referral_bonus: u64, ctx: &mut TxContext ) { let game = Game { id: object::new(ctx), ticket_price, start_time, end_time, total_tickets: 0, round: 1, winner: option::none(), balance: zero(), referral_bonus, }; emit(GameCreated { game_id: object::id(&game), start_time, end_time, ticket_price, }); transfer::share_object(game); } public fun buy_ticket( game: &mut Game, coin: Coin, clock: &Clock, referrer: Option, ctx: &mut TxContext ): Ticket { assert!(clock.timestamp_ms() >= game.start_time, EGameNotStarted); assert!(clock.timestamp_ms() (TicketBought { game_id: object::id(game), ticket_number: ticket.ticket_number, buyer: ticket.buyer, referrer: ticket.referrer, }); ticket } public entry fun determine_winner( game: &mut Game, rand: &Random, clock: &Clock, ctx: &mut TxContext ) { assert!(clock.timestamp_ms() >= game.end_time, EGameNotStarted); assert!(game.winner.is_none(), EWinnerAlreadyChosen); assert!(game.total_tickets > 0, ENoTickets); let mut generator = rand.new_generator(ctx); let winning_ticket = generator.generate_u32_in_range(1, game.total_tickets); game.winner = option::some(winning_ticket); emit(WinnerAnnounced { game_id: object::id(game), winner_ticket: winning_ticket, round: game.round, }); } public fun claim_reward( ticket: Ticket, game: Game, ctx: &mut TxContext ): Coin { assert!(object::id(&game) == ticket.game_id, EInvalidPayment); let ticket_num = ticket.ticket_number; assert!(game.winner.contains(&ticket_num), ENotWinner); let amount = game.balance.value(); let reward = game.balance.into_coin(ctx); emit(RewardClaimed { game_id: object::id(&game), ticket_number: ticket.ticket_number, amount, }); object::delete(object::id(&game)); reward } } Key Takeaways: ✅ Balance ensures type-safety and proper coin handling ✅ Option clearly signals if a winner has been chosen ✅ Events offer traceability for frontends and explorers 🛠 Sui CLI Commands sui client call --package --module nft_lottery_x --function create_game --args --gas-budget 10000000 To buy ticket, determine winner, or claim reward, follow similar CLI flows. 🔮 Future Additions Auto-reset logic for next round in claim_reward Emit more events like ReferralRewardDistributed Refactor jackpots and referrals into submodules Let me know if you want a part 2 to build UI and integrate on Sui testnet!

    • Sui
    0
  • Grizzly.Peera.
    ForSuiApr 10, 2025
    Discussion

    How to Send USDT from Sui Wallet: Best Network Option?

    I'm trying to send Tether USD from my Sui Wallet, but I'm confused about which network to use for this transaction to ensure everything goes smoothly. Can someone clarify this for me?

    • Sui
    0
    1
We use cookies to ensure you get the best experience on our website.
More info