Open evgeny-s opened 3 years ago
You have to construct the Call
directly in the offchain worker and sign it using the tools provided. You can see how it is done for a custom function here: https://substrate.dev/recipes/off-chain-workers/transactions.html#sending-signed-transactions.
Instead of the custom function, you would want to construct a call for the contracts runtime.
Yes, I am not familiar with Rust. From what I can see, how it is done for the usual transaction:
I was able to send usual transaction like this:
let results = signer.send_signed_transaction(
|_account| {
Call::submit_test_data("Hello World data".as_bytes().to_vec())
}
);
The big question - how to instantiate the Call instance to be able to send transactions to Smart Contract.
Hello. The question is in the title. I want to send signed transaction to the Smart Contract. How can I do this? Maybe some code snippets? Thanks