Commit 7ef11c9 1 parent 613a227 commit 7ef11c9 Copy full SHA for 7ef11c9
File tree 2 files changed +37
-0
lines changed
aptos-move/framework/aptos-token
2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ Checkout our developer doc on our token standard https://aptos.dev/concepts/coin
68
68
- [ Function ` get_token_supply ` ] ( #0x3_token_get_token_supply )
69
69
- [ Function ` get_tokendata_largest_property_version ` ] ( #0x3_token_get_tokendata_largest_property_version )
70
70
- [ Function ` get_token_id ` ] ( #0x3_token_get_token_id )
71
+ - [ Function ` get_direct_transfer ` ] ( #0x3_token_get_direct_transfer )
71
72
- [ Function ` create_token_mutability_config ` ] ( #0x3_token_create_token_mutability_config )
72
73
- [ Function ` create_collection_mutability_config ` ] ( #0x3_token_create_collection_mutability_config )
73
74
- [ Function ` mint_token ` ] ( #0x3_token_mint_token )
@@ -3193,6 +3194,34 @@ return the TokenId for a given Token
3193
3194
3194
3195
3195
3196
3197
+ </details >
3198
+
3199
+ <a name =" 0x3_token_get_direct_transfer " ></a >
3200
+
3201
+ ## Function ` get_direct_transfer `
3202
+
3203
+
3204
+
3205
+ <pre ><code ><b >public</b > <b >fun</b > <a href =" token.md#0x3_token_get_direct_transfer " >get_direct_transfer</a >(receiver: <b >address</b >): bool
3206
+ </code ></pre >
3207
+
3208
+
3209
+
3210
+ <details >
3211
+ <summary >Implementation</summary >
3212
+
3213
+
3214
+ <pre ><code ><b >public</b > <b >fun</b > <a href =" token.md#0x3_token_get_direct_transfer " >get_direct_transfer</a >(receiver: <b >address</b >): bool <b >acquires</b > <a href =" token.md#0x3_token_TokenStore " >TokenStore</a > {
3215
+ <b >if</b > (!<b >exists</b >< ; <a href =" token.md#0x3_token_TokenStore " >TokenStore</a >> ; (receiver)) {
3216
+ <b >return</b > <b >false</b >
3217
+ };
3218
+
3219
+ <b >borrow_global</b >< ; <a href =" token.md#0x3_token_TokenStore " >TokenStore</a >> ; (receiver).direct_transfer
3220
+ }
3221
+ </code ></pre >
3222
+
3223
+
3224
+
3196
3225
</details >
3197
3226
3198
3227
<a name =" 0x3_token_create_token_mutability_config " ></a >
Original file line number Diff line number Diff line change @@ -1232,6 +1232,14 @@ module aptos_token::token {
1232
1232
token.id
1233
1233
}
1234
1234
1235
+ public fun get_direct_transfer (receiver: address ): bool acquires TokenStore {
1236
+ if (!exists <TokenStore >(receiver)) {
1237
+ return false
1238
+ };
1239
+
1240
+ borrow_global <TokenStore >(receiver).direct_transfer
1241
+ }
1242
+
1235
1243
public fun create_token_mutability_config (mutate_setting: &vector <bool >): TokenMutabilityConfig {
1236
1244
TokenMutabilityConfig {
1237
1245
maximum: *vector ::borrow (mutate_setting, TOKEN_MAX_MUTABLE_IND ),
You can’t perform that action at this time.
0 commit comments