I want to call transfer function using near cli.
But this command does not work:
near call $ID transfer '{"new_owner_id":"amiyarust.testnet", "amount":50}' --accountId amiyatulu.testnet "transfer" is a payable method requires an attached deposit.
#[payable] pub fn transfer(&mut self, new_owner_id: AccountId, amount: U128) { // NOTE: New owner's Account ID checked in transfer_from. // Storage fees are also refunded in transfer_from. self.transfer_from(env::predecessor_account_id(), new_owner_id, amount); } The near call command gives following error:
panic_msg: "panicked at 'The required attached deposit is 38600000000000000000000, but the given attached deposit is is 0', src/avrit.rs:1026:13" I already questioned a similar problem here, but unable to find a working solution or code.
https://stackoverflow.com/questions/65759622/attach-deposit-in-near-cli January 17, 2021 at 06:39PM
没有评论:
发表评论