Skip to content

Commit

Permalink
Update storage-functions.md (#72)
Browse files Browse the repository at this point in the history
fix the object define of `Gift`
  • Loading branch information
yjshi2015 authored Jun 20, 2024
1 parent d261232 commit 9bc8694
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion book/src/storage/storage-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public struct Gift has key { id: UID }
public fun mint_and_transfer(
_: &AdminCap, recipient: address, ctx: &mut TxContext
) {
let gift = object::new(ctx);
let gift = Gift { id: object::new(ctx) };
transfer::transfer(gift, recipient);
}
```
Expand Down

0 comments on commit 9bc8694

Please sign in to comment.