Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions task1/sources/main.move
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ 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]
fun test_wallet() {
let wallet = myWallet();
assert!(wallet.balance == 1000, 0);
}
}
}