AstarNetwork / astar-frame

Core frame modules for Astar & Shiden network.
Other
58 stars 38 forks source link

dApps-Staking chain-extension - Reworked Errors #84

Closed PierreOssun closed 1 year ago

PierreOssun commented 1 year ago

Before the chain extension returned Result<() DispatchError> but it was not possible to decode it on contract side (in a handy way). The appropriate way is to write to buffer when a value needs to be returned. When a Result should be returned it should be wrapped in a RetVal and decoded on the contract side. This way no scale decoding error can happen.

Check list

github-actions[bot] commented 1 year ago

Code Coverage

Package Line Rate Branch Rate Health
chain-extensions/trait/src 0% 0%
chain-extensions/types/dapps-staking/src 0% 0%
frame/block-reward/src 96% 0%
frame/pallet-xcm/src 80% 0%
precompiles/utils/macro/tests 100% 0%
chain-extensions/impls/dapps-staking/src 0% 0%
precompiles/substrate-ecdsa/src 78% 0%
precompiles/xcm/src 80% 0%
frame/dapps-staking/src/pallet 90% 0%
precompiles/assets-erc20/src 91% 0%
primitives/xcm/src 88% 0%
frame/collator-selection/src 89% 0%
frame/vesting/src 87% 0%
precompiles/sr25519/src 78% 0%
frame/xc-asset-config/src 88% 0%
precompiles/utils/macro/src 0% 0%
frame/dapps-staking/src 94% 0%
precompiles/utils/src 83% 0%
precompiles/dapps-staking/src 95% 0%
frame/custom-signatures/src 80% 0%
precompiles/utils/src/data 72% 0%
Summary 86% (8375 / 9766) 0% (0 / 0)

Minimum allowed line rate is 60%