Polymesh icon indicating copy to clipboard operation
Polymesh copied to clipboard

[WIP] Mesh 1868 chain extension

Open Neopallium opened this issue 3 years ago • 2 comments

changelog

new features

  • Add support for Smart contracts to call into the runtime and read from storage.

modified API

  • Add CallRuntime, ReadStorage, GetSpecVersion, GetTransactionVersion chain extensions.

Neopallium avatar Oct 12 '22 17:10 Neopallium

Codecov Report

Merging #1337 (4d68565) into develop (1d4fb5a) will increase coverage by 0.09%. The diff coverage is n/a.

:exclamation: Current head 4d68565 differs from pull request most recent head 3582ade. Consider uploading reports for the commit 3582ade to get more accurate results

@@             Coverage Diff             @@
##           develop    #1337      +/-   ##
===========================================
+ Coverage    43.90%   43.99%   +0.09%     
===========================================
  Files          140      140              
  Lines        30049    30049              
===========================================
+ Hits         13193    13221      +28     
+ Misses       16856    16828      -28     
Impacted Files Coverage Δ
pallets/multisig/src/lib.rs 38.92% <0.00%> (+0.22%) :arrow_up:
pallets/identity/src/lib.rs 16.54% <0.00%> (+0.58%) :arrow_up:
pallets/settlement/src/lib.rs 48.17% <0.00%> (+1.71%) :arrow_up:

codecov[bot] avatar Oct 12 '22 17:10 codecov[bot]

TODOS:

  • [x] Add benchmarks for new chain extension interfaces (ReadStorage, GetSpecVersion, GetTransactionVersion, etc...)
  • [x] Add call filter and storage + extrinsics for managing the list of allowed runtime calls.
  • [x] Add helper functions to chain extension: GetKeyDid(AccountId), TwoX hasher.
  • [ ] Optional - Add unit tests for chain extension weights.

Neopallium avatar Oct 14 '22 14:10 Neopallium