Sui.

Home

Welcome to Sui Community Forum

New Articles

  • article banner.
    harry phan.
    Apr 09, 2025
    Article
    Guide to Sui Transactions: From Setup to Execution and Verification

    Guide to Sui Transactions: From Setup to Execution and Verification If you’re curious about the nuts and bolts of executing transactions on the Sui blockchain and want an in-depth, practical guide that walks you through every step. In this article, we’ll explore the entire journey—from setting up your client environment, checking your wallet objects, calculating gas fees, to signing and executing a transaction, and finally verifying its details. Let’s break it down step by step: What Makes Sui So Special? 🔥 Sui offers a highly optimized platform for decentralized applications (dApps) and smart contracts. Its elegant design in managing gas fees and transaction logic makes it an exciting playground for developers looking to push the boundaries of Web3 technology. 2. Getting Started: Environment Setup and Wallet Configuration ⚙️ 2.1. Configuring Your Sui Client Environment Before diving into transactions, ensure your Sui client is properly set up. Sui supports multiple networks (devnet, mainnet, testnet), and you can check which one is active with the command below: ➜ sui client envs ╭─────────┬─────────────────────────────────────┬────────╮ │ alias │ url │ active │ ├─────────┼─────────────────────────────────────┼────────┤ │ devnet │ https://fullnode.devnet.sui.io:443 │ │ │ mainnet │ https://fullnode.mainnet.sui.io:443 │ │ │ testnet │ https://fullnode.testnet.sui.io:443 │ * │ ╰─────────┴─────────────────────────────────────┴────────╯ This confirms that you’re connected to the testnet. Being on the right network is the first step toward a successful transaction. 2.2. Checking Your Active Wallet Next, verify your active wallet address. This is crucial because every transaction is tied to your wallet identity: ➜ sui client active-address 0x35370841d2e69b495b1e2f944a3087e4242f314e503691a00b054e0ee2a45a73 2.3. Querying Owned Objects Using the suix_getOwnedObjects API, you can fetch details about the objects (like coins) you own on the blockchain. This command helps you check your account balance and the assets available for transactions: { "jsonrpc": "2.0", "id": 1, "method": "suix_getOwnedObjects", "params": [ "0x35370841d2e69b495b1e2f944a3087e4242f314e503691a00b054e0ee2a45a73", { "filter": { "MatchAll": [ { "StructType": "0x2::coin::Coin" } ] }, "options": { "showType": true, "showOwner": true, "showPreviousTransaction": true } } ] } This step is vital for verifying that your wallet has the necessary coins (in this case, SUI coins) before you attempt any transactions. 3. Gas Calculation: Budgeting for Transaction Costs 💸 Gas is the fuel that powers blockchain transactions. It’s essential to understand both the gas price and gas budget to avoid transaction failures. 3.1. Fetching the Gas Price The current gas price can be retrieved using the suix_getReferenceGasPrice API call: { "jsonrpc": "2.0", "id": 1, "method": "suix_getReferenceGasPrice", "params": [] } If the API returns "1000", it means that each unit of gas costs 1000 MIST. Remember, 1 SUI equals 10^9 MIST, so even small numbers in MIST can add up when budgeting. 3.2. Setting the Gas Budget Your gas budget is the maximum amount of gas (in MIST) you’re willing to spend. For our example, let’s say your gas budget is 4964000 MIST. The total cost of a transaction is typically computed as: Total Cost = Computation Cost + Storage Cost – Storage Rebate For instance: • Computation Cost: 1,000,000 MIST • Storage Cost: 2,964,000 MIST • Storage Rebate: 978,120 MIST So, the net cost becomes 1,000,000 + 2,964,000 − 978,120 = 2,985,880 MIST. Accurately setting your gas budget ensures your transaction has sufficient funds to be executed successfully. 4. Crafting the Transaction: A Dry Run for Confidence 🔧 Before sending a live transaction, it’s best to run a “dry run” to catch any potential issues. This allows you to validate the transaction logic without spending any gas. 4.1. Building a Dry-Run Transaction Here’s a sample TypeScript function that demonstrates how to prepare and execute a dry-run transaction. This code outlines how to split coins and prepare transfer operations: export const signSuiDryRunTransaction = async (requestParams: SignDryRequestParams): Promise => { const { gasPrice, privateKey, coinRefs, network, recipients } = requestParams; const keypair = Ed25519Keypair.fromSecretKey(privateKey); const tx = newTransaction(); // Configure gas payment, price, and sender tx.setGasPayment(coinRefs); tx.setGasPrice(gasPrice); tx.setSender(keypair.toSuiAddress()); // Split coins based on each recipient's amount const coins = tx.splitCoins(tx.gas, recipients.map((transfer) => transfer.amount)); recipients.forEach((transfer, index) => { tx.transferObjects([coins[index]], transfer.to); }); // Build and sign the transaction with the client const client = newSuiClient({ url: getFullnodeUrl(network) }); const bytes = await tx.build({ client }); const { signature } = await keypair.signTransaction(bytes); await verifyTransactionSignature(bytes, signature, { address: keypair.getPublicKey().toSuiAddress() }); return JSON.stringify([toBase64(bytes), signature]); }; This dry-run step is crucial to ensure that every detail is correct before you commit real funds. 5. Signing & Executing the Transaction: Putting It All Together ✍️ After a successful dry run, the next step is to sign and send your transaction on the blockchain. 5.1. Signing the Transaction Below is a refined example function that signs the transaction with the specified gas budget: const signSuiTransaction = async (requestParams: SignRequestParams): Promise => { const { gasBudget, gasPrice, privateKey, coinRefs, network, recipients } = requestParams; const keypair = Ed25519Keypair.fromSecretKey(privateKey); const tx = newTransaction(); // Set up gas parameters, including the gas budget tx.setGasPayment(coinRefs); tx.setGasPrice(gasPrice); tx.setGasBudget(gasBudget); tx.setSender(keypair.toSuiAddress()); // Split coins for each recipient const coins = tx.splitCoins(tx.gas, recipients.map((transfer) => transfer.amount)); recipients.forEach((transfer, index) => { tx.transferObjects([coins[index]], transfer.to); }); // Build the transaction and sign it const client = newSuiClient({ url: getFullnodeUrl(network) }); const bytes = await tx.build({ client }); const { signature } = await keypair.signTransaction(bytes); await verifyTransactionSignature(bytes, signature, { address: keypair.getPublicKey().toSuiAddress() }); return JSON.stringify([toBase64(bytes), signature]); }; This function integrates all necessary parameters—including gas details and recipients—ensuring that your transaction is securely signed and ready for execution. 5.2. Executing the Transaction Once signed, the transaction is sent to the blockchain using the sui_executeTransactionBlock API endpoint: curl --location 'https://fullnode.testnet.sui.io:443' \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc": "2.0", "id": 1, "method": "sui_executeTransactionBlock", "params": [ "", [""], { "showInput": true, "showRawInput": true, "showEffects": true, "showEvents": true, "showObjectChanges": true, "showBalanceChanges": true }, "WaitForLocalExecution" ] }' This call returns a detailed JSON response with information such as the transaction digest, gas consumption, object modifications, and balance updates. 6. Verifying Your Transaction: Cross-Check Everything 🔍 After executing the transaction, it’s essential to verify that everything executed as expected. 6.1. Browser Verification You can check your transaction on a blockchain explorer like Suivision Testnet Explorer. The explorer displays all transaction details in an intuitive visual format, making it easier to spot any issues. 6.2. Command Line Verification For a more detailed audit, use the command line: sui client tx-block -- 3FopuDy5qzKm1kLRFZCdi8Lynadym9j15NaVxzUH6nYD This command provides a comprehensive breakdown of the transaction, including sender details, gas payment, object changes, and execution status. 7. Analyzing the JSON Response: Understanding the Layers of a Transaction Let’s unpack the JSON response you receive after executing your transaction: 7.1. Transaction Overview jsonrpc & id: Standard fields for the JSON-RPC protocol. digest: The unique transaction hash (e.g., "3FopuDy5qzKm1kLRFZCdi8Lynadym9j15NaVxzUH6nYD"), which is used for tracking. timestampMs & checkpoint: Provide context on when the transaction was executed and the blockchain checkpoint at that moment. 7.2. Transaction Content Sender & Gas Data: Includes the sender’s address and all gas-related configurations (payment, price, budget). Operations (Transactions): The transaction logic includes operations such as: SplitCoins: Breaking a gas coin into smaller parts. TransferObjects: Moving coin segments to the specified recipient addresses. Signatures: Cryptographic signatures (Base64 encoded) ensure the transaction’s authenticity. 7.3. Execution Effects Status: A “success” status confirms that the transaction was processed without errors. Gas Usage: Details the computational and storage costs along with any applicable rebates. Object Changes: Outlines which objects were modified, created, or updated as a result of the transaction. Dependencies: Lists related transaction hashes that this transaction depends on. This granular breakdown is essential for debugging and improving your dApp’s performance. ⸻ 8. Practical Developer Insights: Tips and Takeaways Understanding each step of this process equips you with the skills to build secure, efficient Web3 applications on Sui. These insights not only help you troubleshoot issues but also empower you to innovate confidently within the Sui ecosystem. ⸻

    1
  • article banner.
    0xduckmove.
    Apr 08, 2025
    Article
    👀 SEAL- I Think Web3 Data Privacy Is About to Change

    👀SEAL is Live on Sui Testnet – I Think Web3 Data Privacy Is About to Change In the Web3, it’s common to hear phrases like “users own their data” or “decentralized by design”. But when you look closely, many applications still rely on centralized infrastructures to handle sensitive data — using services like AWS or Google Cloud for key management. This introduces a contradiction: decentralization on the surface, centralization underneath. But what if there was a way to manage secrets securely, without giving up decentralization?Introducing SEAL – Decentralized Secrets Management (DSM), now live on the Sui Testnet. SEAL aims to fix one of Web3’s biggest hypocrisies: shouting decentralization while secretly using AWS You maybe ask me: What is SEAL? SEAL is a protocol that lets you manage sensitive data securely and decentrally – built specifically for the Web3 world. Think of it as a privacy-first access control layer that plugs into your dApp. You can think of SEAL as a kind of programmable lock for your data. You don’t just lock and unlock things manually — you write policies directly into your smart contracts, using Move on Sui. Let’s say you’re building a dApp where: Only NFT holders can unlock a premium tutorial Or maybe a DAO has to vote before sensitive files are revealed Or you want metadata to be time-locked and only accessible after a specific date SEAL makes all of that possible. The access control lives onchain, fully automated, no need for an admin to manage it. Just logic, baked right into the blockchain. SEAL makes all of that possible. The access control lives onchain, fully automated, no need for an admin to manage it. Just logic, baked right into the blockchain. Another interesting piece is how SEAL handles encryption. It uses something called threshold encryption, which means: no single node can decrypt the data. It takes a group of servers to work together — kinda like multi-sig, but for unlocking secrets. This distributes trust and avoids the usual single-point-of-failure problem. And to keep things truly private, SEAL encrypts and decrypts everything on the client side. Your data is never visible to any backend. It stays in your hands — literally — on your device. and SEAL doesn’t care where you store your data. Whether it’s IPFS, Arweave, Walrus, or some other platform, SEAL doesn’t try to control that part. It just focuses on who’s allowed to see what, not where things are stored. So yeah, it’s not just a library or API — it’s an onchain-first, access-controlled, privacy-by-default layer for your dApp. SEAL fills a pretty critical gap. Let’s break that down a bit more. If you’re building a dApp that deals with any form of sensitive data — gated content, user documents, encrypted messages, even time-locked NFT metadata — you’ll run into the same problem: ➡️ How do you manage access securely, without relying on a centralized service? Without something like SEAL, most teams either: Use centralized tools like AWS KMS or Firebase, which clearly goes against decentralization Or try to patch together half-baked encryption logic themselves, which usually ends up brittle and hard to audit https://x.com/EmanAbio/status/1908240279720841425?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E1908240279720841425%7Ctwgr%5E697f93dc65359d0c8c7d64ddede66c0c4adeadf1%7Ctwcon%5Es1_&ref_url=https%3A%2F%2Fwww.notion.so%2Fharryph%2FSEAL-Launches-on-Sui-Testnet-1cc4f8e09bb380969c0dcc627b96cc22 Neither of those scales well. Especially not when you’re trying to build trustless apps across multiple chains or communities. SEAL makes that entire process modular and programmable. You define your access rules in Move smart contracts, and SEAL handles the rest — key generation, decryption approvals, and access enforcement — all without anyone manually issuing keys or running backend checks. Even better, those rules are auditable and immutable — once they’re onchain, they follow the contract, not a human admin. So instead of asking “who should manage access to this data?” you just ask: “What logic should define access?” …and let the chain handle it. Clean and scalable. That’s what makes SEAL relevant for more than just “security tools” — it’s a base layer for any dApp that cares about privacy, compliance, or dynamic access logic. It’s a small shift — but it changes a lot about how we think of data in Web3. Instead of encrypting after deployment, or relying on external services, you start with privacy built-in — and access handled entirely by smart contract logic. And that’s exactly what Web3 needs right now. How Does SEAL Actually Work? We’ve covered what SEAL is and why Web3 needs it, let’s take a look at how it’s actually built under the hood. This part is where things get more technical — but in a good way. The architecture is elegant once you see how all the pieces fit together. At a high level, SEAL works by combining onchain access logic with offchain key management, using a technique called Identity-Based Encryption (IBE). This allows devs to encrypt data to an identity, and then rely on smart contracts to define who is allowed to decrypt it. Step 1: Access Rules in Smart Contracts (on Sui) Everything starts with the smart contract. When you’re using SEAL, you define a function called seal_approve in your Move contract — this is where you write your conditions for decryption. For example, here’s a simple time-lock rule written in Move: entry fun seal_approve(id: vector, c: &clock::Clock) { let mut prepared: BCS = bcs::new(id); let t = prepared.peel_u64(); let leftovers = prepared.into_remainder_bytes(); assert!((leftovers.length() == 0) && (c.timestamp_ms() >= t), ENoAccess); } Once deployed, this contract acts as the gatekeeper. Whenever someone wants to decrypt data, their request will get checked against this logic. If it passes, the key gets released. If not, they’re blocked. No one has to intervene. Step 2: Identity-Based Encryption (IBE) Here’s where the magic happens. Instead of encrypting data for a specific wallet address (like with PGP or RSA), SEAL uses identity strings — meaning you encrypt to something like: 0xwalletaddress dao_voted:proposal_xyz PkgId_2025_05_01 (a timestamp-based rule) or even game_user_nft_holder When the data is encrypted, it looks like this: Encrypt(mpk, identity, message) mpk = master public key (known to everyone) identity = the logic-defined recipient message = the actual data Later, if someone wants to decrypt, the key server checks if they match the policy (via the seal_approve call onchain). If it’s approved, it returns a derived private key for that identity. Derive(msk, identity) → sk Decrypt(sk, encrypted_data) The user can then decrypt the content locally. So encryption is done without needing to know who will decrypt ahead of time. You just define the conditions, and SEAL figures out the rest later. It’s dynamic. Step 3: The Key Server – Offchain, But Not Centralized You might wonder: who’s holding these master keys? This is where SEAL’s Key Server comes in. Think of it as a backend that: Holds the master secret key (msk) Watches onchain contracts (like your seal_approve logic) Only issues derived keys if the conditions are satisfied But — and this is key — SEAL doesn’t rely on just one key server. You can run it in threshold mode, where multiple independent servers need to agree before a decryption key is issued. For example: 3-of-5 key servers must approve the request. This avoids central points of failure and allows decentralization at the key management layer too. Even better, in the future SEAL will support MPC (multi-party computation) and enclave-based setups (like TEE) — so you can get even stronger guarantees without compromising usability. Step 4: Client-Side Decryption Once the key is returned to the user, the actual decryption happens on their device. This means: The server never sees your data The backend never stores decrypted content Only the user can access the final message It’s a solid privacy model. Even if someone compromises the storage layer (IPFS, Arweave, etc.), they still can’t read the data without passing the access logic. Here’s the quick mental model: This structure makes it easy to build dApps where access rules aren’t hardcoded — they’re dynamic, auditable, and fully integrated into your chain logic. The Team Behind SEAL SEAL is led by Samczsun, a well-known figure in the blockchain security community. Formerly a Research Partner at Paradigm, he has audited and saved multiple ecosystems from major exploits. Now, he’s focused full-time on building SEAL into a core piece of Web3’s privacy infrastructure. With his background and credibility, SEAL is not just another experimental tool — it’s a serious attempt at making decentralized data privacy both practical and scalable. As SEAL goes live on the Sui Testnet, it brings a new standard for how Web3 applications can manage secrets. By combining onchain access control, threshold encryption, and client-side privacy, SEAL offers a more trustworthy foundation for decentralized data handling. Whether you’re building dApps, DAOs, or decentralized games — SEAL provides a powerful toolkit to enforce access control and protect user data without compromising on decentralization. If Web3 is going to move forward, secure infrastructure like SEAL is not optional — it’s essential

    1
  • article banner.
    Lokie.
    Mar 16, 2025
    Article
    Step by step guide to create a Suiet wallet

    Step by step guide to create a Suiet wallet: Download suiet extension: https://suiet.app/ After successful installation, click on the Suiet icon in your browser and select "Create New". Set a strong password to protect your wallet. Write down and save your recovery phrase in a safe place. This phrase is needed to recover your wallet if needed Done

    1
  • article banner.
    Bahador.
    Mar 15, 2025
    Article
    Journey as a SUI Move smart contract developer

    In today's article, I wanna dive into a roadmap suggestion for those who like to enter into the SUI move development way. 1. Understand Blockchain Fundamentals Core Concepts:* Familiarize yourself with key blockchain concepts such as decentralization, consensus mechanisms, cryptographic primitives, and smart contracts. SUI Blockchain Overview:* Learn about what makes SUI unique—its object-centric data model, performance goals, and how it handles state management. 2. Learn the Move Language Language Basics:* Start with the fundamentals of the Move programming language. Focus on: Resource Types:* How resources work to ensure safety and ownership. Modules and Structs:* How to define modules and data structures. Entry Functions:* How transactions are executed through designated entry points. Recommended Resources: Utilize official Move language tutorials, documentation, and sample code repositories. 3. Set Up Your Development Environment Tools and CLI:* Install the SUI CLI and set up the Move toolchain on your local machine. Local Test Environment:* Configure a local SUI development network or use available testnets. This helps you experiment with smart contract deployment and testing before going live. IDE & Debugging:* Choose an Integrated Development Environment (IDE) that supports Move (for example, VSCode with Move extensions) and get familiar with debugging and testing your contracts. 4. Build Your First Simple Contract Hands-on Tutorials:* Start with a simple project such as a token contract. This will allow you to apply the basic Move constructs. Explore SUI-Specific Patterns:* Work with SUI’s object model and learn how transactions are processed within the SUI ecosystem. Documentation & Examples:* Leverage SUI’s developer documentation and sample projects to understand best practices. 5. Deep Dive into SUI-Specific Features Object-Centric Model:* Understand how SUI treats objects differently from account-based blockchains like Ethereum. Gas & Transaction Model:* Study how gas fees are calculated and how transaction execution is managed in SUI. State Management:* Learn about SUI’s approach to state storage, modular updates, and object lifecycle management. 6. Testing, Debugging, and Deployment Unit and Integration Testing:* Write tests to verify the logic and safety of your smart contracts. Make sure you cover edge cases and potential vulnerabilities. Local and Testnet Deployment:* Deploy your contracts in a controlled environment to see how they perform in real conditions. Tooling:* Utilize SUI’s debugging tools and logging features to iterate and improve your code. 7. Security Best Practices and Code Audits Understand Common Pitfalls:* Study common security vulnerabilities in smart contracts (e.g., reentrancy, improper access controls) and how Move’s design mitigates them. Code Reviews:* Get involved in community code reviews or collaborate with peers to audit and improve your code. Formal Verification:* Explore any available formal verification tools for Move to mathematically prove the correctness of your contracts. 8. Join the SUI Developer Community Community Channels:* Engage with other developers via forums, Discord channels, or community calls. Sharing experiences and challenges is invaluable. Open Source Contributions:* Contribute to open source projects or developer repositories related to SUI and Move. Stay Updated:* Follow SUI and Move blogs, GitHub repositories, and social media channels to keep track of new developments, updates, and best practices. 9. Explore Advanced Topics Complex Applications:* As you become more comfortable, experiment with more advanced smart contract designs such as decentralized finance (DeFi) protocols, NFTs, or multi-signature wallets. Interoperability and Integration:* Learn how to interact with other smart contracts and integrate SUI Move modules with off-chain systems. Performance and Scalability:* Explore techniques to optimize your contracts for speed and cost-efficiency on the SUI blockchain. 10. Build a Portfolio and Keep Practicing Showcase Projects:* Develop and document a series of projects that demonstrate your understanding and expertise. Continuous Learning:* Blockchain and Move are evolving rapidly—make continuous learning a habit by revisiting documentation, attending workshops, and participating in hackathons. Feedback Loop:* Use community feedback to refine your skills and stay ahead of the curve in smart contract development. Although the above Items are suggestions and are not the only way to turn into an SUI developer, I hope it is helpful for you guys. Happy coding. Happy SUIng!

    2
  • article banner.
    0xduckmove.
    Mar 12, 2025
    Article
    Setting Up a Project to Test the SUI Name Service (SuiNS)

    The SUI Name Service (SuiNS) is a decentralized naming system on the SUI blockchain that allows users to map human-readable names (e.g., "0xduck.sui") to blockchain addresses or other data, enhancing usability and accessibility. For developers, testing the SuiNS SDK is an essential step to ensure applications can resolve these names correctly. In this article, we’ll walk you through the process of setting up a project to test the SuiNS SDK, from preparing your development environment to querying a name record like "0xduck.sui" and understanding the results. Introduction to SUI Name Service The SUI Name Service (SuiNS) simplifies blockchain interactions by allowing users to register memorable names instead of using complex cryptographic addresses. For example, instead of sending tokens to "0x1234...abcd", you could send them to "0xduck.sui". Testing the SuiNS SDK ensures that your application can correctly interact with this system, retrieving and interpreting name records as needed. In this project, we’ll set up a Node.js environment, connect to the SUI mainnet, and write a script to query the name record for "0xduck.sui". By the end, you’ll have a working setup to explore SuiNS further. Prerequisites Before starting, ensure you have the following: Node.js (version 14 or higher) and npm (version 6 or higher) installed. Download them from nodejs.org if needed. Basic understanding of JavaScript, particularly asynchronous programming (e.g., async/await). A code editor like Visual Studio Code (VS Code) for writing and running scripts. An internet connection to install packages and connect to the SUI. Setting Up the Development Environment Let’s create a new project directory and initialize it as a Node.js project. This will provide a clean workspace for our test. Step-by-Step Instructions: Open your terminal (e.g., Command Prompt, PowerShell, or a Unix shell). Create a new directory: mkdir suins-test-project cd suins-test-project Initialize a Node.js project: Run this command to create a package.json file with default settings: npm init -y Your project is now set up with a basic structure. Installing Dependencies Run the following in your terminal: npm install @mysten/suins @mysten/sui Verify the Installation: Check that the packages are added to package.json under dependencies. You can also confirm the installed versions by running: npm list @mysten/suins @mysten/sui This should output something like: suins-test-project@1.0.0 ├── @mysten/sui@x.x.x └── @mysten/suins@y.y.y Configuring the SUI Client The SUI client connects your project to the SUI blockchain. For testing, we’ll use the mainnet. Create a Script File: In your project directory, create a file named test-suins.js: touch test-suins.js # On Unix/macOS echo. > test-suins.js # On Windows Open test-suins.js in your editor and add the following: import { getFullnodeUrl, SuiClient } from '@mysten/sui/client'; // Create a SUI client connected to the testnet const suiClient = new SuiClient({ url: getFullnodeUrl('testnet') }); Note: If you encounter an error about ES modules (e.g., "Cannot use import statement outside a module"), add "type": "module" to your package.json: { "name": "suins-test-project", "version": "1.0.0", "type": "module", ... } Testing the Name Service Now, let’s write a script to query the name record for "0xduck.sui" and log the result. import { getFullnodeUrl, SuiClient } from '@mysten/sui/client'; import { SuinsClient } from '@mysten/suins'; // Create a SUI client connected to the testnet // const suiClient = new SuiClient({ url: getFullnodeUrl('mainnet') }); const client = new SuiClient({ url: getFullnodeUrl('mainnet') }); // Create a SuiNS client using the SUI client const suinsClient = new SuinsClient({ client, network: 'mainnet', }); // Function to test the name service async function testNameService() { try { // Query the name record for 'demo.sui' const nameRecord = await suinsClient.getNameRecord('0xduck.sui'); // Log the result console.log('Name Record for "0xduck.sui":', nameRecord); } catch (error) { console.error('Error fetching name record:', error.message); } } testNameService(); In your terminal, execute: node test-suins.js

    3
  • article banner.
    Bahador.
    Mar 11, 2025
    Article
    Suibase, a great tool to experience the SUI

    As I was checking some resources for the SUI development, I faced a tool named, suibase. In my exploration on that, I found it very helpful, especially when using localnet which a local explorer will be set up on our local system. I loved it so much. as there is stated in the official website of Suibase: Suibase makes it easy to create "workdirs", each defining a distinct development environment targeting a network. It seems like virtual env in python programming. As far as I found this tool, there are many usefull functionalities which we can take benefit of: Key functionalities of Suibase include: Workdir Management: Suibase enables the creation of isolated workdirs for each network, ensuring that configurations and dependencies are maintained separately. This isolation facilitates organized and efficient development workflows. ​ Suibase Simplified Command-Line Interface:* The tool provides scripts such as lsui, dsui, tsui, and msui, which serve as frontends to the Mysten Labs sui binaries for localnet, devnet, testnet, and mainnet, respectively. These scripts eliminate the need to manually switch environments, as they automatically execute the appropriate sui client and keystore for the targeted network. ​ Localnet Operations:* Suibase offers commands like localnet start, localnet stop, and localnet status to manage the local network. Additionally, the localnet regen command allows developers to reset the network to its initial state, complete with predefined addresses and aliases, which is particularly useful for testing purposes. ​ Faucet Functionality:* The localnet faucet command enables the distribution of Sui coins to specified addresses or all addresses within the localnet, facilitating testing and development activities. ​ Independent Installation:* Suibase operates independently of other Mysten Labs installations and keystores, ensuring that it does not interfere with existing setups. This design allows Suibase to coexist safely with standard installations on the same system. ​ By providing these features, Suibase enhances the development experience on the Sui network, offering a structured and efficient environment for building and testing applications.​ I recommend testing it!

    3
  • article banner.
    Bahador.
    Mar 11, 2025
    Article
    How to fix the SUI installation error?

    When I try to install and build the SUI binary on my local system with this command: cargo install --git https://github.com/MystenLabs/sui.git --bin sui --branch devnet I face this error: Please specify a package, e.g. cargo install --git https://github.com/MystenLabs/sui.git anemo-benchmark. After some digging, I found the solution and was able to install and build it error-free and completely using some modification in the above command: For Devnet: cargo install --locked --git https://github.com/MystenLabs/sui.git sui --branch devnet For Testnet: cargo install --locked --git https://github.com/MystenLabs/sui.git sui --branch devnet This way, you can install and build SUI on your local machine and start on your way! Best of luck.

    3
  • article banner.
    Bahador.
    Mar 10, 2025
    Article
    How Transactions Work in Sui

    One of the cool things that attracted me to the SUI chain is the working manner of transactions, so in this article, we are going to get some knowledge about how transactions work in the SUI blockchain. Every transaction in Sui explicitly lists which objects it will read or modify. Because each object is independent, the Sui validators can easily check the list of objects for each incoming transaction​. This helps the system decide which transactions can run simultaneously: Independent transactions (no overlapping objects): If two transactions involve completely different objects, they do not conflict with each other. Sui knows these won’t interfere, so it can execute them at the same time in parallel​. For example, one transaction might update Alice’s coin object while another might transfer Bob’s NFT object – since these are separate objects, there’s no need to wait for one before doing the other. Conflicting transactions (shared objects): If two transactions try to use the same object, they conflict and cannot be executed at the exact same moment. Sui will handle this by ordering and executing those particular transactions one after the other to avoid any confusion or double-spending​. In this case, the network’s consensus mechanism comes into play to decide a fair order for the transactions that touch the same data. Only the transactions that conflict are ordered; all other independent transactions can proceed in parallel without waiting. In essence, Sui’s transaction model separates “simple” transactions from “dependent” ones. Simple transactions that affect only a single owner’s objects can often be processed very quickly without involving the whole network in heavy coordination​. More complex transactions (for example, ones interacting with a shared smart contract object that many users might use) go through a traditional ordering process (consensus) to ensure they don’t conflict with each other​. This way, Sui only uses global consensus when it’s truly needed, and it can let most transactions fly through concurrently when there are no overlaps in the data they touch. Parallel Execution in Sui vs. Traditional Blockchains On traditional blockchains like Bitcoin or Ethereum, transactions are processed sequentially (one after the other). Even if two transactions have nothing to do with each other, a sequential system will still put one in line behind the other, creating unnecessary waiting​. This is like having a single checkout register at a store – even customers buying different items must stand in the same queue. It causes congestion and slows things down during busy periods​. Sui takes a different approach by allowing the parallel execution of transactions. This is analogous to having many checkout counters open: multiple transactions can be handled at the same time as long as they are independent, which vastly improves throughput and efficiency​. Because of Sui’s object-centric design, operations on one object do not impact or delay operations on another object​ . Validators in the Sui network can leverage multiple CPU cores and threads to execute several transactions simultaneously, much like processing multiple tasks in parallel on a computer. The result is a significant boost in scalability – Sui can handle a large number of transactions per second without breaking a sweat​. Tests have demonstrated that Sui’s approach can support massive throughput (on the order of hundreds of thousands of transactions per second) thanks to this parallelism​. Equally important, parallel execution reduces latency for individual transactions, meaning users see their transactions confirmed faster because they aren’t stuck waiting behind unrelated transactions​. Overall, Sui’s parallel execution model eliminates the bottlenecks that plague single-threaded (sequential) blockchains, enabling the network to scale up and handle workloads that would overwhelm traditional designs​. Finality and Confirmation Speed Finality refers to how quickly a transaction is irreversibly confirmed (i.e. once confirmed, it won’t be reverted). Sui is designed for quick finality, often reaching confirmation in a fraction of a second​. In practice, a typical Sui transaction can be confirmed in around 300–500 milliseconds (well under one second) once it’s processed – essentially near-instant for the user. This is much faster than many older blockchains. For comparison, Ethereum’s network usually needs on the order of several seconds to minutes to truly finalize a transaction (Ethereum blocks are around ~12 seconds apart, and it may take a couple of blocks or more for high confidence), while Bitcoin might require dozens of minutes (due to 10-minute block times and multiple confirmations) for a transaction to be considered final. Sui’s modern consensus and parallel execution give it a major speed advantage: transactions on Sui are confirmed almost immediately after you send them​. There’s no long wait for a new block to include the transaction or for multiple confirmations. In short, Sui provides sub-second finality, which means users can send a transaction and see it permanently settled right away. This fast confirmation is especially beneficial for applications like gaming, real-time finance, or retail payments, where waiting even tens of seconds could be too slow. Sui delivers confidence to the user quickly, making the blockchain feel much more responsive compared to traditional chains.

    3
  • article banner.
    Bahador.
    Mar 10, 2025
    Article
    Comparing Sui vs Ethereum

    In this article, we are going to find out some of the differences between Sui and Ethereum and be able to choose from them based on our project requirements. Sui utilizes novel design choices, including a unique object-centric data model and the Move programming language (originating from Facebook’s Diem project), to enable high throughput and secure smart contract execution. Both platforms enable developers to create smart contracts and decentralized applications, but they differ fundamentally in architecture and approach. This article provides a detailed comparison of Ethereum and Sui, highlighting key differences in their programming paradigms, features, architecture, consensus mechanisms, scalability, developer experience, and ecosystem maturity. Let's compare these two chains: Consensus Mechanism: Sui Delegated Proof-of-Stake with Byzantine consensus (Narwhal & Bullshark). Validators (chosen each epoch) use a DAG-based mempool (Narwhal) and BFT consensus (Bullshark) for fast ordering​. Near-instant finality (sub-second in ideal conditions) is achieved with this optimized consensus​. Ethereum Proof-of-Stake .Validators stake ETH to propose and validate blocks; finality achieved via epochs and attestations​(approx~ 13 minutes or 2 epochs) Smart Contract Language Sui Move. Uses an adapted Move language that treats assets as objects with strict ownership rules. Move’s design prevents asset duplication or loss by default and enforces safety at the language level​. This leads to more secure contracts out-of-the-box, with a slightly stricter programming model. Ethereum Solidity (also Vyper for pythonists, Yul, and Huff). Contracts compiled to EVM bytecode. Solidity is flexible but prone to developer errors if not carefully written; extensive audits and best practices are needed for security. Execution Model Sui Parallel execution via object-centric design. Transactions in Sui specify the objects they read/write. If transactions affect independent objects (especially “owned” objects with separate owners), they can be executed concurrently by validators​. Only conflicts (e.g. two txns touching the same “shared” object) require ordering through consensus​. This enables multiple transactions to be processed simultaneously, dramatically improving throughput., Ethereum Sequential execution on the EVM. Transactions are ordered in each block and executed one by one on every node, which means each transaction must run to completion (updating global state) before the next begins​. This simplifies state management but creates a bottleneck – even independent transactions cannot be processed in parallel. Transaction Processing Sui Sub-second block finality in optimal conditions​; theoretical throughput in the tens of thousands TPS. Sui’s design (parallel execution and efficient consensus) has demonstrated >120,000 TPS in test settings​. In practice, Sui’s mainnet is expected to handle high loads without sharding. Transaction fees are designed to remain stable, with gas price governance per epoch​, keeping costs low even as demand grows. Ethereum 12 second block time; throughput historically 15–30 TPS on mainnet (scaling achieved via Layer-2 solutions). Finality is probabilistic per block, with economic finality after 2 epochs (6-13 minutes) in PoS​. Gas fees can spike under load, and users often rely on rollups or sidechains for higher performance. Scalability Sui Horizontal scalability by design. Sui can utilize more validator resources to increase throughput – analogous to adding more “lanes” for transactions​. The network does not have a fixed TPS limit; if more hardware is added and transactions are independent, throughput scales up. This makes Sui capable of scaling on the base layer for high-demand use cases (e.g., gaming, social networks) without immediately needing layer-2s or sharding. Ethereum Relies on Layer-2 scaling (Rollups like Optimistic or ZK-Rollups) and future sharding upgrades. Ethereum’s roadmap (Danksharding, etc.) aims to increase base layer throughput, but currently, the strategy is to offload activity to L2 networks and use Ethereum for settlement. This approach maintains decentralization but pushes true scale to auxiliary networks. Developer Experience Sui Growing and security-focused. Sui provides a new toolkit (Sui CLI, SDKs, Move compiler, etc.) and detailed documentation. Developers may need to learn the Move language and adapt to thinking in terms of objects and resources. This learning curve can be offset by Sui’s emphasis on correctness – by following Sui’s model, developers naturally avoid many pitfalls. The ecosystem is actively building tools (for example, Move package managers and testing frameworks), and Mysten Labs has invested in developer outreach (hackathons, tutorials). While not as extensive as Ethereum’s, Sui’s developer community is enthusiastic, and early adopters benefit from direct support channels as the ecosystem matures. Ethereum Ethereum has numerous developer tools: IDEs (Remix online IDE), frameworks (Foundry, Hardhat, Brownie), libraries (Web3.js, Ethers.js, Viem.js, etc.), and test networks. The community support is unparalleled – countless tutorials, forums, and established patterns exist. However, mastering Ethereum development requires understanding gas mechanics, security patterns, and the EVM’s constraints, which can be challenging for newcomers​. My above explanations can be summarized into this line: In summary, Ethereum stands as the established general-purpose blockchain with broad adoption and a rich ecosystem, whereas Sui is an emerging high-performance blockchain incorporating new paradigms for scalability and safety. As blockchain technology evolves, both platforms could coexist, each inspiring improvements in the other. Ethereum might adopt some parallelization techniques (research is ongoing into parallel EVM execution​, and Sui will certainly learn from Ethereum’s experiences in governance and community building. For developers and businesses, the choice will come down to the demands of their project: the comfort of the tried-and-true versus the allure of the new and fast. By understanding the key differences outlined above – from programming models to consensus – one can make an informed decision or strategy that harnesses the best of both worlds, potentially leveraging Ethereum’s solidity and Sui’s agility to build the next generation of decentralized applications

    3
  • article banner.
    0xduckmove.
    Mar 08, 2025
    Article
    This article aims to learn and understand the #UTXO model from $BTC to $SUI

    This article aims to learn and understand the UTXO model. It uses an easy-to-understand way to simply sort out the UTXO models and implementation methods from $BTC to $SUI. I will provides a comprehensive overview, which we expand here for clarity and depth, ensuring a professional and thorough analysis. As one of the core design principles of Bitcoin, the UTXO model has become an important technical paradigm in the blockchain field since its birth. It plays an important role in ensuring transaction security and traceability, and provides another path besides the traditional account balance model. As blockchain technology has been continuously updated and iterated in recent years, the UTXO model itself has also been constantly evolving and expanding. Introduction to UTXO and Its Origins The UTXO model, or Unspent Transaction Output, is a fundamental concept in Bitcoin, where each transaction output that hasn’t been spent is tracked as a UTXO. This model treats transactions like cash, where spending involves selecting specific UTXOs to cover the amount, as opposed to modifying a single balance. The example: Alice and Bob each start with 5 dollars. In the account model, if Bob robs Alice of 2 dollars, Alice’s balance becomes 3, and Bob’s becomes 7. In the UTXO model, Alice’s 5-dollar UTXO is spent to create two new UTXOs: 2 dollars to Bob and 3 dollars back to Alice, with Bob now holding his original 5-dollar UTXO and the new 2-dollar one, totaling 7 dollars. This approach, as detailed in Understanding UTXO: A Comprehensive Guide, ensures transparency and prevents double-spending, with each UTXO publicly tracked on-chain while preserving privacy through anonymous addresses. It is not difficult to see that Alice is left with 3 dollars and Bob is left with 7 dollars. This accounting method, which is similar to elementary school addition and subtraction, frequently appears in the banking system and is called the account/balance model. In it, the balance of an account exists as a single value. If a different approach from the account model is used, such as UTXO to represent the wealth transfer between Alice and Bob, the diagram will look different: Comparison with Account/Balance Model The account/balance model, common in banking, maintains a single balance per account, updated with each transaction Its simplicity but notes state contention issues when multiple transactions modify the same account, often requiring locks and causing performance bottlenecks, especially under high transaction volumes. In contrast, the UTXO model, as explained in Exploring the UTXO Model: What Sets It Apart in the Blockchain World?, avoids this by processing transactions on independent UTXOs, enabling parallel execution without locks, thus improving throughput and concurrency. Privacy is another advantage, with crypto wallets generating new addresses per transaction, making it harder to link to individuals, unlike the account model’s fixed addresses, which are more susceptible to correlation analysis. However, the UTXO’s limitations in handling complex business logic, such as multi-stage contracts, which led to Ethereum’s account-based model, as mentioned in What is a UTXO? Unspent Transaction Output Explained . SUI’s Object Model: Bridging UTXO and Account Models SUI, as detailed in the X post and supported by Object Model | Sui Documentation, centers storage around objects, not accounts, with two key types: OwnedObject (address-owned) and SharedObject. The OwnedObject enhanced UTXO, where only the owner can operate, and each version is spent once, aligning with UTXO’s principles. For instance, an address-owned object can only be modified by its owner, similar to spending a UTXO. SharedObject, conversely, is accessible to everyone, akin to the account model, but requires consensus to order reads and writes, addressing state contention, as noted in Sui Components | Sui Documentation. This is managed through special processing like local sorting. The Sui's Object-Oriented Approach highlights how SUI’s model impacts scalability, security, and user experience. Ownership Types in SUI | Ownership type | Description | Accessibility |--------|--------|-------- | Address-owned | Owned by a specific 32-byte address (account address or object ID) | Only accessible to its owner | Immutable | Can't be mutated, transferred, or deleted; no owner | Accessible to anyone | Shared | Shared using 0x2::transfer::share_object function | Accessible to everyone | Wrapped | Organizes data structures by putting a field of struct type in another | Not specified Owned objects include address-owned, aligning with UTXO, while shared objects are explicitly accessible to all, fitting the account model’s broader access. My conclusion and Future Considerations The transition from Bitcoin’s UTXO to SUI’s object model represents a significant evolution, offering flexibility and addressing UTXO’s limitations in complex logic through SharedObject, while retaining UTXO’s concurrency benefits via OwnedObject. This dual approach, as explored in Exploring Sui’s Object-Centric Model and the Move Programming Language, positions SUI as a versatile platform, potentially setting a new standard for blockchain data models.

    3

Posts

192
  • article banner.
    harry phan.
    Apr 09, 2025
    Article

    Guide to Sui Transactions: From Setup to Execution and Verification

    Guide to Sui Transactions: From Setup to Execution and Verification If you’re curious about the nuts and bolts of executing transactions on the Sui blockchain and want an in-depth, practical guide that walks you through every step. In this article, we’ll explore the entire journey—from setting up your client environment, checking your wallet objects, calculating gas fees, to signing and executing a transaction, and finally verifying its details. Let’s break it down step by step: What Makes Sui So Special? 🔥 Sui offers a highly optimized platform for decentralized applications (dApps) and smart contracts. Its elegant design in managing gas fees and transaction logic makes it an exciting playground for developers looking to push the boundaries of Web3 technology. 2. Getting Started: Environment Setup and Wallet Configuration ⚙️ 2.1. Configuring Your Sui Client Environment Before diving into transactions, ensure your Sui client is properly set up. Sui supports multiple networks (devnet, mainnet, testnet), and you can check which one is active with the command below: ➜ sui client envs ╭─────────┬─────────────────────────────────────┬────────╮ │ alias │ url │ active │ ├─────────┼─────────────────────────────────────┼────────┤ │ devnet │ https://fullnode.devnet.sui.io:443 │ │ │ mainnet │ https://fullnode.mainnet.sui.io:443 │ │ │ testnet │ https://fullnode.testnet.sui.io:443 │ * │ ╰─────────┴─────────────────────────────────────┴────────╯ This confirms that you’re connected to the testnet. Being on the right network is the first step toward a successful transaction. 2.2. Checking Your Active Wallet Next, verify your active wallet address. This is crucial because every transaction is tied to your wallet identity: ➜ sui client active-address 0x35370841d2e69b495b1e2f944a3087e4242f314e503691a00b054e0ee2a45a73 2.3. Querying Owned Objects Using the suix_getOwnedObjects API, you can fetch details about the objects (like coins) you own on the blockchain. This command helps you check your account balance and the assets available for transactions: { "jsonrpc": "2.0", "id": 1, "method": "suix_getOwnedObjects", "params": [ "0x35370841d2e69b495b1e2f944a3087e4242f314e503691a00b054e0ee2a45a73", { "filter": { "MatchAll": [ { "StructType": "0x2::coin::Coin" } ] }, "options": { "showType": true, "showOwner": true, "showPreviousTransaction": true } } ] } This step is vital for verifying that your wallet has the necessary coins (in this case, SUI coins) before you attempt any transactions. 3. Gas Calculation: Budgeting for Transaction Costs 💸 Gas is the fuel that powers blockchain transactions. It’s essential to understand both the gas price and gas budget to avoid transaction failures. 3.1. Fetching the Gas Price The current gas price can be retrieved using the suix_getReferenceGasPrice API call: { "jsonrpc": "2.0", "id": 1, "method": "suix_getReferenceGasPrice", "params": [] } If the API returns "1000", it means that each unit of gas costs 1000 MIST. Remember, 1 SUI equals 10^9 MIST, so even small numbers in MIST can add up when budgeting. 3.2. Setting the Gas Budget Your gas budget is the maximum amount of gas (in MIST) you’re willing to spend. For our example, let’s say your gas budget is 4964000 MIST. The total cost of a transaction is typically computed as: Total Cost = Computation Cost + Storage Cost – Storage Rebate For instance: • Computation Cost: 1,000,000 MIST • Storage Cost: 2,964,000 MIST • Storage Rebate: 978,120 MIST So, the net cost becomes 1,000,000 + 2,964,000 − 978,120 = 2,985,880 MIST. Accurately setting your gas budget ensures your transaction has sufficient funds to be executed successfully. 4. Crafting the Transaction: A Dry Run for Confidence 🔧 Before sending a live transaction, it’s best to run a “dry run” to catch any potential issues. This allows you to validate the transaction logic without spending any gas. 4.1. Building a Dry-Run Transaction Here’s a sample TypeScript function that demonstrates how to prepare and execute a dry-run transaction. This code outlines how to split coins and prepare transfer operations: export const signSuiDryRunTransaction = async (requestParams: SignDryRequestParams): Promise => { const { gasPrice, privateKey, coinRefs, network, recipients } = requestParams; const keypair = Ed25519Keypair.fromSecretKey(privateKey); const tx = newTransaction(); // Configure gas payment, price, and sender tx.setGasPayment(coinRefs); tx.setGasPrice(gasPrice); tx.setSender(keypair.toSuiAddress()); // Split coins based on each recipient's amount const coins = tx.splitCoins(tx.gas, recipients.map((transfer) => transfer.amount)); recipients.forEach((transfer, index) => { tx.transferObjects([coins[index]], transfer.to); }); // Build and sign the transaction with the client const client = newSuiClient({ url: getFullnodeUrl(network) }); const bytes = await tx.build({ client }); const { signature } = await keypair.signTransaction(bytes); await verifyTransactionSignature(bytes, signature, { address: keypair.getPublicKey().toSuiAddress() }); return JSON.stringify([toBase64(bytes), signature]); }; This dry-run step is crucial to ensure that every detail is correct before you commit real funds. 5. Signing & Executing the Transaction: Putting It All Together ✍️ After a successful dry run, the next step is to sign and send your transaction on the blockchain. 5.1. Signing the Transaction Below is a refined example function that signs the transaction with the specified gas budget: const signSuiTransaction = async (requestParams: SignRequestParams): Promise => { const { gasBudget, gasPrice, privateKey, coinRefs, network, recipients } = requestParams; const keypair = Ed25519Keypair.fromSecretKey(privateKey); const tx = newTransaction(); // Set up gas parameters, including the gas budget tx.setGasPayment(coinRefs); tx.setGasPrice(gasPrice); tx.setGasBudget(gasBudget); tx.setSender(keypair.toSuiAddress()); // Split coins for each recipient const coins = tx.splitCoins(tx.gas, recipients.map((transfer) => transfer.amount)); recipients.forEach((transfer, index) => { tx.transferObjects([coins[index]], transfer.to); }); // Build the transaction and sign it const client = newSuiClient({ url: getFullnodeUrl(network) }); const bytes = await tx.build({ client }); const { signature } = await keypair.signTransaction(bytes); await verifyTransactionSignature(bytes, signature, { address: keypair.getPublicKey().toSuiAddress() }); return JSON.stringify([toBase64(bytes), signature]); }; This function integrates all necessary parameters—including gas details and recipients—ensuring that your transaction is securely signed and ready for execution. 5.2. Executing the Transaction Once signed, the transaction is sent to the blockchain using the sui_executeTransactionBlock API endpoint: curl --location 'https://fullnode.testnet.sui.io:443' \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc": "2.0", "id": 1, "method": "sui_executeTransactionBlock", "params": [ "", [""], { "showInput": true, "showRawInput": true, "showEffects": true, "showEvents": true, "showObjectChanges": true, "showBalanceChanges": true }, "WaitForLocalExecution" ] }' This call returns a detailed JSON response with information such as the transaction digest, gas consumption, object modifications, and balance updates. 6. Verifying Your Transaction: Cross-Check Everything 🔍 After executing the transaction, it’s essential to verify that everything executed as expected. 6.1. Browser Verification You can check your transaction on a blockchain explorer like Suivision Testnet Explorer. The explorer displays all transaction details in an intuitive visual format, making it easier to spot any issues. 6.2. Command Line Verification For a more detailed audit, use the command line: sui client tx-block -- 3FopuDy5qzKm1kLRFZCdi8Lynadym9j15NaVxzUH6nYD This command provides a comprehensive breakdown of the transaction, including sender details, gas payment, object changes, and execution status. 7. Analyzing the JSON Response: Understanding the Layers of a Transaction Let’s unpack the JSON response you receive after executing your transaction: 7.1. Transaction Overview jsonrpc & id: Standard fields for the JSON-RPC protocol. digest: The unique transaction hash (e.g., "3FopuDy5qzKm1kLRFZCdi8Lynadym9j15NaVxzUH6nYD"), which is used for tracking. timestampMs & checkpoint: Provide context on when the transaction was executed and the blockchain checkpoint at that moment. 7.2. Transaction Content Sender & Gas Data: Includes the sender’s address and all gas-related configurations (payment, price, budget). Operations (Transactions): The transaction logic includes operations such as: SplitCoins: Breaking a gas coin into smaller parts. TransferObjects: Moving coin segments to the specified recipient addresses. Signatures: Cryptographic signatures (Base64 encoded) ensure the transaction’s authenticity. 7.3. Execution Effects Status: A “success” status confirms that the transaction was processed without errors. Gas Usage: Details the computational and storage costs along with any applicable rebates. Object Changes: Outlines which objects were modified, created, or updated as a result of the transaction. Dependencies: Lists related transaction hashes that this transaction depends on. This granular breakdown is essential for debugging and improving your dApp’s performance. ⸻ 8. Practical Developer Insights: Tips and Takeaways Understanding each step of this process equips you with the skills to build secure, efficient Web3 applications on Sui. These insights not only help you troubleshoot issues but also empower you to innovate confidently within the Sui ecosystem. ⸻

    • Sui
    • SDKs and Developer Tools
    • Transaction Processing
    1
  • tomek.
    Apr 09, 2025
    Discussion

    Staking in Sui Wallet: Can You Withdraw Anytime?

    I was wondering, if I stake in the Sui Wallet, can I take out my stake anytime, or is there an unlocking period?

    • Transaction Processing
    0
    1
  • 1 Luca.
    Apr 09, 2025
    Discussion

    What happens if I don't claim ETH via Sui bridge?

    I've been using the Sui bridge to transfer some ETH but haven't claimed it yet because the fees are quite high. What will happen if I leave it unclaimed?

    • Sui
    0
    2
  • 1 Luca.
    Apr 09, 2025
    Discussion

    What happens if I don't claim ETH via Sui bridge?

    I've been using the Sui bridge to transfer some ETH but haven't claimed it yet because the fees are quite high. What will happen if I leave it unclaimed?

    • Sui
    0
    0
  • article banner.
    0xduckmove.
    Apr 08, 2025
    Article

    👀 SEAL- I Think Web3 Data Privacy Is About to Change

    👀SEAL is Live on Sui Testnet – I Think Web3 Data Privacy Is About to Change In the Web3, it’s common to hear phrases like “users own their data” or “decentralized by design”. But when you look closely, many applications still rely on centralized infrastructures to handle sensitive data — using services like AWS or Google Cloud for key management. This introduces a contradiction: decentralization on the surface, centralization underneath. But what if there was a way to manage secrets securely, without giving up decentralization?Introducing SEAL – Decentralized Secrets Management (DSM), now live on the Sui Testnet. SEAL aims to fix one of Web3’s biggest hypocrisies: shouting decentralization while secretly using AWS You maybe ask me: What is SEAL? SEAL is a protocol that lets you manage sensitive data securely and decentrally – built specifically for the Web3 world. Think of it as a privacy-first access control layer that plugs into your dApp. You can think of SEAL as a kind of programmable lock for your data. You don’t just lock and unlock things manually — you write policies directly into your smart contracts, using Move on Sui. Let’s say you’re building a dApp where: Only NFT holders can unlock a premium tutorial Or maybe a DAO has to vote before sensitive files are revealed Or you want metadata to be time-locked and only accessible after a specific date SEAL makes all of that possible. The access control lives onchain, fully automated, no need for an admin to manage it. Just logic, baked right into the blockchain. SEAL makes all of that possible. The access control lives onchain, fully automated, no need for an admin to manage it. Just logic, baked right into the blockchain. Another interesting piece is how SEAL handles encryption. It uses something called threshold encryption, which means: no single node can decrypt the data. It takes a group of servers to work together — kinda like multi-sig, but for unlocking secrets. This distributes trust and avoids the usual single-point-of-failure problem. And to keep things truly private, SEAL encrypts and decrypts everything on the client side. Your data is never visible to any backend. It stays in your hands — literally — on your device. and SEAL doesn’t care where you store your data. Whether it’s IPFS, Arweave, Walrus, or some other platform, SEAL doesn’t try to control that part. It just focuses on who’s allowed to see what, not where things are stored. So yeah, it’s not just a library or API — it’s an onchain-first, access-controlled, privacy-by-default layer for your dApp. SEAL fills a pretty critical gap. Let’s break that down a bit more. If you’re building a dApp that deals with any form of sensitive data — gated content, user documents, encrypted messages, even time-locked NFT metadata — you’ll run into the same problem: ➡️ How do you manage access securely, without relying on a centralized service? Without something like SEAL, most teams either: Use centralized tools like AWS KMS or Firebase, which clearly goes against decentralization Or try to patch together half-baked encryption logic themselves, which usually ends up brittle and hard to audit https://x.com/EmanAbio/status/1908240279720841425?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E1908240279720841425%7Ctwgr%5E697f93dc65359d0c8c7d64ddede66c0c4adeadf1%7Ctwcon%5Es1_&ref_url=https%3A%2F%2Fwww.notion.so%2Fharryph%2FSEAL-Launches-on-Sui-Testnet-1cc4f8e09bb380969c0dcc627b96cc22 Neither of those scales well. Especially not when you’re trying to build trustless apps across multiple chains or communities. SEAL makes that entire process modular and programmable. You define your access rules in Move smart contracts, and SEAL handles the rest — key generation, decryption approvals, and access enforcement — all without anyone manually issuing keys or running backend checks. Even better, those rules are auditable and immutable — once they’re onchain, they follow the contract, not a human admin. So instead of asking “who should manage access to this data?” you just ask: “What logic should define access?” …and let the chain handle it. Clean and scalable. That’s what makes SEAL relevant for more than just “security tools” — it’s a base layer for any dApp that cares about privacy, compliance, or dynamic access logic. It’s a small shift — but it changes a lot about how we think of data in Web3. Instead of encrypting after deployment, or relying on external services, you start with privacy built-in — and access handled entirely by smart contract logic. And that’s exactly what Web3 needs right now. How Does SEAL Actually Work? We’ve covered what SEAL is and why Web3 needs it, let’s take a look at how it’s actually built under the hood. This part is where things get more technical — but in a good way. The architecture is elegant once you see how all the pieces fit together. At a high level, SEAL works by combining onchain access logic with offchain key management, using a technique called Identity-Based Encryption (IBE). This allows devs to encrypt data to an identity, and then rely on smart contracts to define who is allowed to decrypt it. Step 1: Access Rules in Smart Contracts (on Sui) Everything starts with the smart contract. When you’re using SEAL, you define a function called seal_approve in your Move contract — this is where you write your conditions for decryption. For example, here’s a simple time-lock rule written in Move: entry fun seal_approve(id: vector, c: &clock::Clock) { let mut prepared: BCS = bcs::new(id); let t = prepared.peel_u64(); let leftovers = prepared.into_remainder_bytes(); assert!((leftovers.length() == 0) && (c.timestamp_ms() >= t), ENoAccess); } Once deployed, this contract acts as the gatekeeper. Whenever someone wants to decrypt data, their request will get checked against this logic. If it passes, the key gets released. If not, they’re blocked. No one has to intervene. Step 2: Identity-Based Encryption (IBE) Here’s where the magic happens. Instead of encrypting data for a specific wallet address (like with PGP or RSA), SEAL uses identity strings — meaning you encrypt to something like: 0xwalletaddress dao_voted:proposal_xyz PkgId_2025_05_01 (a timestamp-based rule) or even game_user_nft_holder When the data is encrypted, it looks like this: Encrypt(mpk, identity, message) mpk = master public key (known to everyone) identity = the logic-defined recipient message = the actual data Later, if someone wants to decrypt, the key server checks if they match the policy (via the seal_approve call onchain). If it’s approved, it returns a derived private key for that identity. Derive(msk, identity) → sk Decrypt(sk, encrypted_data) The user can then decrypt the content locally. So encryption is done without needing to know who will decrypt ahead of time. You just define the conditions, and SEAL figures out the rest later. It’s dynamic. Step 3: The Key Server – Offchain, But Not Centralized You might wonder: who’s holding these master keys? This is where SEAL’s Key Server comes in. Think of it as a backend that: Holds the master secret key (msk) Watches onchain contracts (like your seal_approve logic) Only issues derived keys if the conditions are satisfied But — and this is key — SEAL doesn’t rely on just one key server. You can run it in threshold mode, where multiple independent servers need to agree before a decryption key is issued. For example: 3-of-5 key servers must approve the request. This avoids central points of failure and allows decentralization at the key management layer too. Even better, in the future SEAL will support MPC (multi-party computation) and enclave-based setups (like TEE) — so you can get even stronger guarantees without compromising usability. Step 4: Client-Side Decryption Once the key is returned to the user, the actual decryption happens on their device. This means: The server never sees your data The backend never stores decrypted content Only the user can access the final message It’s a solid privacy model. Even if someone compromises the storage layer (IPFS, Arweave, etc.), they still can’t read the data without passing the access logic. Here’s the quick mental model: This structure makes it easy to build dApps where access rules aren’t hardcoded — they’re dynamic, auditable, and fully integrated into your chain logic. The Team Behind SEAL SEAL is led by Samczsun, a well-known figure in the blockchain security community. Formerly a Research Partner at Paradigm, he has audited and saved multiple ecosystems from major exploits. Now, he’s focused full-time on building SEAL into a core piece of Web3’s privacy infrastructure. With his background and credibility, SEAL is not just another experimental tool — it’s a serious attempt at making decentralized data privacy both practical and scalable. As SEAL goes live on the Sui Testnet, it brings a new standard for how Web3 applications can manage secrets. By combining onchain access control, threshold encryption, and client-side privacy, SEAL offers a more trustworthy foundation for decentralized data handling. Whether you’re building dApps, DAOs, or decentralized games — SEAL provides a powerful toolkit to enforce access control and protect user data without compromising on decentralization. If Web3 is going to move forward, secure infrastructure like SEAL is not optional — it’s essential

    • Sui
    • Architecture
    • SDKs and Developer Tools
    1
  • Aliabee.
    Apr 07, 2025
    Discussion

    How to deposit SUI tokens from SUI network to Binance?

    I want to send my SUI tokens to my Binance account. I've been trying to use a portal bridge but it's confusing. I heard that to do this, I have to convert SUI tokens to SUI USDC before bridging. How do I do it correctly without using the portal bridge? Also, once on Binance, how can I convert SUI to USDC or USDT if it doesn't allow me directly?

    • Sui
    0
    2
  • skywinder.
    Apr 06, 2025
    Discussion

    Testnet vs Devnet: Which one should you use?

    I'm a bit confused. Are all interactions supposed to be in the testnet, or are there other options available for testing?

    • Sui
    0
    1
  • kryptoschain.
    Apr 06, 2025
    Expert Q&A

    How to access and transfer SuiPlay NFT if wallet access is lost?

    I lost access to the wallet used for ordering the SuiPlay console and I’m worried about losing my Preorder NFT and associated rewards. I can prove that the email used for the order is mine. Is there a way to transfer the NFT from the old wallet to a new one?

    • Sui
    0
    2
  • DRAMA.
    Apr 06, 2025
    Expert Q&A

    Converting Sui Wallet private key to bech32 format?

    I'm trying to convert the private key of my Sui wallet to the bech32 format. How should I go about it using CLI tools?

    • Sui
    0
    1
  • LargeCappWithTwo.
    Apr 06, 2025
    Discussion

    What is the unbonding time for Sui staking?

    I was wondering about the unbonding time for Sui staking. I've heard different things like it's 24 hours, depending on the epoch, or even instant. It's a bit confusing since I can't find it clearly explained. Can someone tell me how long it takes to unbond and if there are any delays?

    • Sui
    • Architecture
    0
    2

Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.

192Posts288Answers
Sui.X.Peera.

Earn Your Share of 1000 Sui

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

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