The sample contractupdate has some nice utilities for resolving the on-chain schema of a smart contract. It handles the greasy details of what wasm sections to check (in which order) for the different module versions. This is error prone and not something a dApp developer would want to mess with themselves.
This PR moves moves these utils into a hook useModuleSchemaRpc as part of react-components. As we don't use Result in that package, the functions have been rewritten to use exceptions instead.
The sample
contractupdate
has some nice utilities for resolving the on-chain schema of a smart contract. It handles the greasy details of what wasm sections to check (in which order) for the different module versions. This is error prone and not something a dApp developer would want to mess with themselves.This PR moves moves these utils into a hook
useModuleSchemaRpc
as part ofreact-components
. As we don't useResult
in that package, the functions have been rewritten to use exceptions instead.