1
- use near_api:: prelude :: * ;
1
+ use near_api:: * ;
2
2
3
3
use serde_json:: json;
4
4
@@ -29,7 +29,7 @@ async fn main() {
29
29
. unwrap ( ) ;
30
30
31
31
// Verifying that user has 1000 tokens
32
- let tokens = Tokens :: of ( token. id ( ) . clone ( ) )
32
+ let tokens = Tokens :: account ( token. id ( ) . clone ( ) )
33
33
. ft_balance ( token. id ( ) . clone ( ) )
34
34
. unwrap ( )
35
35
. fetch_from ( & network)
@@ -40,7 +40,7 @@ async fn main() {
40
40
41
41
// Transfer 100 tokens to the account
42
42
// We handle internally the storage deposit for the receiver account
43
- Tokens :: of ( token. id ( ) . clone ( ) )
43
+ Tokens :: account ( token. id ( ) . clone ( ) )
44
44
. send_to ( account. id ( ) . clone ( ) )
45
45
. ft (
46
46
token. id ( ) . clone ( ) ,
@@ -54,7 +54,7 @@ async fn main() {
54
54
. unwrap ( )
55
55
. assert_success ( ) ;
56
56
57
- let tokens = Tokens :: of ( account. id ( ) . clone ( ) )
57
+ let tokens = Tokens :: account ( account. id ( ) . clone ( ) )
58
58
. ft_balance ( token. id ( ) . clone ( ) )
59
59
. unwrap ( )
60
60
. fetch_from ( & network)
@@ -63,7 +63,7 @@ async fn main() {
63
63
64
64
println ! ( "Account has {}" , tokens) ;
65
65
66
- let tokens = Tokens :: of ( token. id ( ) . clone ( ) )
66
+ let tokens = Tokens :: account ( token. id ( ) . clone ( ) )
67
67
. ft_balance ( token. id ( ) . clone ( ) )
68
68
. unwrap ( )
69
69
. fetch_from ( & network)
@@ -73,7 +73,7 @@ async fn main() {
73
73
println ! ( "Owner has {}" , tokens) ;
74
74
75
75
// We validate decimals at the network level so this should fail with a validation error
76
- let token = Tokens :: of ( token. id ( ) . clone ( ) )
76
+ let token = Tokens :: account ( token. id ( ) . clone ( ) )
77
77
. send_to ( account. id ( ) . clone ( ) )
78
78
. ft (
79
79
token. id ( ) . clone ( ) ,
0 commit comments