While I was exploring near-sdk-as I did not find any function / APIs in sdk to send near tokens to caller of the smart contract. I am curious if there is any function to do what I have mentioned or am I missing something ?
1
While I was exploring near-sdk-as I did not find any function / APIs in sdk to send near tokens to caller of the smart contract. I am curious if there is any function to do what I have mentioned or am I missing something ?
I'm not an expert when it comes to assembly script but it looks like what you can do is create a
ContractPromiseBatch
and then invoke the.transfer
function as shown in this example here:https://github.com/near-examples/cross-contract-calls/blob/a589ab817835f837201f4afa48be5961d8ce5360/contracts/10.linkdrop/src/10/assembly/index.ts#L93