Skip to content

Allow Transfer assets via Call Runtime#1004

Closed
PierreOssun wants to merge 4 commits into
masterfrom
feature/call-runtime-shibuya
Closed

Allow Transfer assets via Call Runtime#1004
PierreOssun wants to merge 4 commits into
masterfrom
feature/call-runtime-shibuya

Conversation

@PierreOssun
Copy link
Copy Markdown
Contributor

Pull Request Summary

Note: resubmitting PR as broke the rebase in #963

This PR removes chain extensions from the runtime.
Add assets_pallet transfer & transfer_approved in call filter to allow call_runtime in ink! contracts.

PS: No need for approve function as the Origin will be the contract.
In the case of a wrapper token pattern (check HERE ) users should approve the contract address via a pallet asset calls before calling deposit

Check list

  • Allow transfer & transfer_approved in local & shibuya
  • updated spec version
  • updated semver

@PierreOssun PierreOssun added the runtime This PR/Issue is related to the topic “runtime”. label Aug 15, 2023
@PierreOssun PierreOssun requested a review from Dinonard August 15, 2023 14:00
@github-actions
Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Health
chain-extensions/types/dapps-staking/src 0% 0%
pallets/block-reward/src 85% 0%
pallets/dapps-staking/src/pallet 85% 0%
precompiles/batch/src 80% 0%
precompiles/dapps-staking/src 93% 0%
precompiles/substrate-ecdsa/src 78% 0%
pallets/ethereum-checked/src 48% 0%
precompiles/assets-erc20/src 76% 0%
chain-extensions/dapps-staking/src 0% 0%
pallets/contracts-migration/src 0% 0%
precompiles/utils/macro/src 0% 0%
precompiles/utils/src/testing 62% 0%
primitives/src 68% 0%
primitives/src/xcm 71% 0%
pallets/collator-selection/src 69% 0%
precompiles/utils/src 68% 0%
pallets/xc-asset-config/src 53% 0%
precompiles/sr25519/src 79% 0%
precompiles/xvm/src 83% 0%
precompiles/xcm/src 84% 0%
pallets/pallet-xcm/src 53% 0%
chain-extensions/types/xvm/src 0% 0%
pallets/dapps-staking/src 81% 0%
chain-extensions/types/assets/src 0% 0%
chain-extensions/xvm/src 0% 0%
chain-extensions/pallet-assets/src 0% 0%
pallets/xvm/src 46% 0%
pallets/custom-signatures/src 51% 0%
Summary 57% (2552 / 4451) 0% (0 / 0)

Minimum allowed line rate is 50%

Copy link
Copy Markdown
Contributor

@ashutoshvarma ashutoshvarma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to check again, what are our plans if pallet_assets's transfer and transfer_approved disptach changes ?

@PierreOssun
Copy link
Copy Markdown
Contributor Author

We have a dependency on the Call struct. So we should ensure transfer and transfer_approved dispatch remains stable.
I think there is so many dep towards those 2 dispatch that is highly unlikely it changes (but 0 risk does not exist).
In case it happen:

  • upgrade pallet assets but contracts call will break
  • support an asset pallet fork with the unchanged dispatch

@PierreOssun
Copy link
Copy Markdown
Contributor Author

This feature is on hold. Waiting for XVM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

runtime This PR/Issue is related to the topic “runtime”.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants