Closed athei closed 7 months ago
I removed the pre-instantiation WASM checks a while ago, but didn't have a RISC-V contract to test further. The error you encountered is not thrown by the UI but polkadot.js (see this line here) so for RISC-V contracts to work, we need to update the pjs api.
As contracts-ui
is built ontop of @polkadot/api-contract
we are a bit limited to what we can and cannot do. It is still checked but it now allows for these two different ELF headers.
I am currently working on supporting RISC-V contracts (as opposed to wasm). I can produce a contract bundle that contains RISC-V instead of wasm code and feed that into contracts UI. I am connected to a dev node that can run RISC-V contracts on pallet-contracts.
I get past the dry-run but when I submit the instantatiation the screen is white and there is an error on the console "Error: No WASM code provided".
Expected behaviour: The UI does not inspect, touch or care about the code. It just passes it along as data to the node.
Behaviour I am seeing: The UI errors out because it determines that the code is not wasm.