Skip to content

Commit 6b1ca7e

Browse files
authored
Update my_token.move
1 parent bfdeda4 commit 6b1ca7e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

mytoken/sources/my_token.move

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ module MyToken::coin {
55
+ use 0x1::signer;
66

77
/// Resource that represents a simple token
8-
struct Coin has key {
9-
value: u64,
10-
}
8+
struct Coin has store {
9+
value: u64,
10+
}
1111

1212
const EINSUFFICIENT_BALANCE: u64 = 1;
1313

@@ -23,7 +23,7 @@ module MyToken::coin {
2323

2424
/// Transfer tokens
2525
public fun transfer(from: &mut Coin, amount: u64): Coin {
26-
assert!(from.value >= amount, error::invalid_argument(EINSUFFICIENT_BALANCE));
26+
assert!(from.value >= amount, EINSUFFICIENT_BALANCE);
2727
from.value = from.value - amount;
2828
Coin { value: amount }
2929
}

0 commit comments

Comments
 (0)