Closed AuroraLantean closed 1 month ago
@aptos-labs/move-eng
Solved by adding this inline function:
/// Borrow the immutable reference of the refs of `metadata`.
/// This validates that the signer is the metadata object's owner.
inline fun authorized_borrow_refs(
owner: &signer,
asset: Object<Metadata>,
): &ManagedFungibleAsset acquires ManagedFungibleAsset {
assert!(object::is_owner(asset, signer::address_of(owner)), error::permission_denied(ENOT_OWNER));
borrow_global<ManagedFungibleAsset>(object::object_address(&asset))
}
Url
https://aptos.dev/en/build/guides/first-fungible-asset#step-433-managing-a-coin
Describe the content issue
authorized_borrow_refs
unbound variable during Aptos compilation How to import authorized_borrow_refs ?Section
move-and-smart-contracts