Open hackfisher opened 1 year ago
There is existing solution(thanks to @hujw77 ) using remix with the following contract's support:
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract Dispatch {
fallback (bytes calldata _input) external payable returns (bytes memory _output) {}
}
[
{
"stateMutability": "payable",
"type": "fallback"
}
]
Compile this contract using remix first, then connect to you account using Inject Provider, copy dispatch precompile address and the encoded runtime call data from polkadot js:
Refer following interfaces:
https://docs.darwinia.network/builtin-precompiles-38faea0d12a648e9a061cf013e1cfdd6
https://jsfiddle.net/wuminzhe/5qx0pcej/1/
In vscode, there will be auto-completions.
This can be easily constructed by the runtime calls component and dispatch js SDK