【发布时间】:2021-11-04 19:21:32
【问题描述】:
我正在使用在依赖特征 NonFungibleTokenCore 上调用的函数,我想使用 ext_contract 的便利包装器来简化跨合约调用。
这是我添加它的尝试:
#[ext_contract(ext_non_fungible_token)]
trait NFTCore: NonFungibleTokenCore {}
我使用rust-analyzer 的代码完成不提供任何完成。当我构建它时,我得到了这个错误:
error[E0425]: cannot find function `nft_transfer` in module `ext_non_fungible_token`
--> sputnik-nft-staking/src/lib.rs:151:33
|
151 | ext_non_fungible_token::nft_transfer(sender_id.clone(), token_id.clone(), 0, None,
| ^^^^^^^^^^^^ not found in `ext_non_fungible_token`
您对如何正确使用宏有任何想法吗?
【问题讨论】:
标签: rust rust-cargo cryptocurrency near-sdk-rs