We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e185b51 commit 52399beCopy full SHA for 52399be
language/documentation/examples/experimental/basic-coin/sources/BasicCoin.move
@@ -1,6 +1,6 @@
1
/// This module defines a minimal and generic Coin and Balance.
2
module BasicCoin::BasicCoin {
3
- use std::errors;
+ use std::error;
4
use std::signer;
5
6
/// Error codes
@@ -20,7 +20,7 @@ module BasicCoin::BasicCoin {
20
21
public fun publish_balance<CoinType>(account: &signer) {
22
let empty_coin = Coin<CoinType> { value: 0 };
23
- assert!(!exists<Balance<CoinType>>(signer::address_of(account)), errors::already_published(EALREADY_HAS_BALANCE));
+ assert!(!exists<Balance<CoinType>>(signer::address_of(account)), error::already_exists(EALREADY_HAS_BALANCE));
24
move_to(account, Balance<CoinType> { coin: empty_coin });
25
}
26
0 commit comments