From 63589197140d236b1ba539527ae3484f046ebece Mon Sep 17 00:00:00 2001 From: xinyouyuerlibuzu <146720603+xinyouyuerlibuzu@users.noreply.github.com> Date: Mon, 18 Mar 2024 12:34:43 +0800 Subject: [PATCH] Update main.move --- task1/sources/main.move | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/task1/sources/main.move b/task1/sources/main.move index 2507060..af01bd6 100644 --- a/task1/sources/main.move +++ b/task1/sources/main.move @@ -5,13 +5,15 @@ module 0x42::Task1 { // TODO // Define a struct called Wallet with a single field called balance of type u64. struct Wallet has drop { - // ... + balance:u64 } // TODO // Define a function called myWallet that returns a Wallet with a balance of 1000. fun myWallet(): Wallet { - // ... + Wallet{ + balance:1000 + } } #[test] @@ -19,4 +21,4 @@ module 0x42::Task1 { let wallet = myWallet(); assert!(wallet.balance == 1000, 0); } -} \ No newline at end of file +}