想象一下,您有一个smart contract方法,该方法需要将存款附加到方法调用上,类似于此rust方法:
#[payable]
pub fn spend(&mu self, age: u8){
assert!(env::attached_deposit() > 0,
"Insufficient deposit.");
.
.
.
}
现在你使用设置你的合同near-api-js并继续调用它。如何调用此方法并Near在客户端 js 中附加一些方法?
慕神8447489
哆啦的时光机
随时随地看视频慕课网APP
相关分类