I am using the balance pallet in the runtime. I want to install ink contract-pallet so that others can develop smart contracts using runtime pallet functions. I also want to send funds to ink smart contract from the runtime pallet, so that funds can be handled by the ink contract. I am new to ink, can I have such features? How can I do that? Some code snippets will be helpful.
1 Answer
Chain Extensions are the main way to have contracts interact with the runtime (not the other way around).
However, for an interaction with the native token, ink_env::transfer
might be sufficient.
Also, check give_me
function in the contract-transfer example.
-
Thanks for the answer. But how to call give_me in runtime pallet? Jul 16, 2022 at 13:09