Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Token] make transfer function public entry #4930

Merged
merged 1 commit into from
Oct 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions aptos-move/framework/aptos-token/sources/token.move
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,21 @@ module aptos_token::token {
*opt_in_flag = opt_in;
}

/// Transfers `amount` of tokens from `from` to `to`.
/// The receiver `to` has to opt-in direct transfer first
public entry fun transfer_with_opt_in(
from: &signer,
creator: address,
collection_name: String,
token_name: String,
token_property_version: u64,
to: address,
amount: u64,
) acquires TokenStore {
let token_id = create_token_id_raw(creator, collection_name, token_name, token_property_version);
transfer(from, token_id, to, amount);
}

/// Burn a token by creator when the token's BURNABLE_BY_CREATOR is true
/// The token is owned at address owner
public entry fun burn_by_creator(
Expand Down