Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-chain transfer rework #432

Merged
merged 16 commits into from
Apr 6, 2021
Merged

Cross-chain transfer rework #432

merged 16 commits into from
Apr 6, 2021

Conversation

shaunxw
Copy link
Member

@shaunxw shaunxw commented Apr 1, 2021

A more concise and flexible implementation.

TODO:

  • Integrate xcm-simulator and add unit tests.

Closes #384

@shaunxw shaunxw requested a review from xlc April 1, 2021 04:26
@shaunxw shaunxw merged commit 3a77e1a into master Apr 6, 2021
@shaunxw shaunxw deleted the sw/xtokens-transfer branch April 6, 2021 00:03
brettkolodny added a commit that referenced this pull request Apr 15, 2021
* Use MultiLocation as xtokens transfer dest type. (#396)

* Use MultiLocation as xtokens transfer dest type.

* Make clippy happy.

* Use xcm-handler to execute XCM locally (#401)

* Use cumulus xcm-handler to execute XCM locally.

* Add docstring for xtokens config.

* Replace XcmError::Undefined usage. (#402)

* Replace XcmError::Undefined usage.

* make clippy happy

* Bump and unify serde versions. (#403)

* xtokens and xcm-support documentations (#404)

* Add xtokens module docstring.

* Add xtokens readme.

* Add documentations for xcm-support.

* Add xtokens and xcm-support entries in main readme.

* Add unit tests for xcm-support. (#405)

* Added Minterest to the list of users. (#406)

* update step guide link

* Handle unknown assets in TransactAsset impl (#409)

* Handle unknown assets in TransactAsset impl.

* More documentations.

* Clean code.

* Renaming.

* Should try to deposit known asset first.

* Return error if no UnknownAsset impl.

* Make clippy happy.

* Fix description and repo link. (#410)

* Unknown tokens pallet (#411)

* Impl unknown tokens pallet.

* Fix workspace pallet path.

* Make clippy happy.

* Clippy, be happy.

* Unit tests.

* Remove nonces from oracle pallet. (#413)

* refactor rewards (#412)

* Bump rococo v1 dependencies (#418)

* Fix mocks.

* Replace deprecated.

* Update orml-unknown-tokens unit tests. (#421)

* add build-script-utils from Substrate (#422)

* Update README.md (#420)

* Update README.md

* Update README.md

* Bump impl-trait-for-tuples to 0.2.1 (#424)

* update Cargo.toml (#429)

* add Handler (#431)

* remove disable-tokens-by-owner (#434)

* Cross-chain transfer rework (#432)

* Reserve chain trait.

* Rework cross-chain transfer.

* Remove relay chain balance convert.

* Add 'Parse' trait.

* Change transfer_multiasset fn signature.

* Add transfer dispatchable call.

* Update doc.

* Use xcm-simulator to mock network.

* Send relay chain asset to sibling unit test.

* Move location traits into orml-traits.

* Add MultiNativeAsset filter for is reserve check.

* More unit tests.

* Failing edge case unit tests.

* Handle zero amount asset case.

* Fix mocks.

* Renaming.

* Update currency adapter to work with new xtokens impl (#436)

* Xcm support implementations rework.

* Update xtokens mock.

* Use CurrencyId convert. (#437)

* Use CurrencyId convert.

* Apply review suggestions.

* Update xtokens docs. (#438)

* Update xtokens docs.

* Fix typo.

* Update imbalances impl.

* Don't deposit failure event in orml-unknown-tokens. (#440)

* Don't deposit failure event in orml-unknown-tokens.

* Patch substrate/polkadot/cumulus.

* Fix patch.

* Update README.md (#441)

Include Zeitgeist into "Projects using ORML" section

* Add PoV size in benchmarking. (#442)

* Bump cumulus ref in cargo patch. (#443)

* fix missing features (#444)

* fix missing features

* test with benchmarks

* update auction weight (#445)

* Bump dependencies. (#448)

* Updated Cargo.dev.toml

Co-authored-by: Shaun Wang <spxwang@gmail.com>
Co-authored-by: dzianis.ramanouski <DenisRomanovsky@users.noreply.github.com>
Co-authored-by: Bette <42193328+bette7@users.noreply.github.com>
Co-authored-by: wangjj9219 <183318287@qq.com>
Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
Co-authored-by: transxask <68648225+transxask@users.noreply.github.com>
Co-authored-by: Aaro Perämaa <aaro.peramaa@gmail.com>
Co-authored-by: Harald Heckmann <harald.heckmann93@web.de>
brettkolodny added a commit that referenced this pull request Apr 15, 2021
* add Handler (#431)

* remove disable-tokens-by-owner (#434)

* Cross-chain transfer rework (#432)

* Reserve chain trait.

* Rework cross-chain transfer.

* Remove relay chain balance convert.

* Add 'Parse' trait.

* Change transfer_multiasset fn signature.

* Add transfer dispatchable call.

* Update doc.

* Use xcm-simulator to mock network.

* Send relay chain asset to sibling unit test.

* Move location traits into orml-traits.

* Add MultiNativeAsset filter for is reserve check.

* More unit tests.

* Failing edge case unit tests.

* Handle zero amount asset case.

* Fix mocks.

* Renaming.

* Update currency adapter to work with new xtokens impl (#436)

* Xcm support implementations rework.

* Update xtokens mock.

* Use CurrencyId convert. (#437)

* Use CurrencyId convert.

* Apply review suggestions.

* Update xtokens docs. (#438)

* Update xtokens docs.

* Fix typo.

* Update imbalances impl.

* Don't deposit failure event in orml-unknown-tokens. (#440)

* Don't deposit failure event in orml-unknown-tokens.

* Patch substrate/polkadot/cumulus.

* Fix patch.

* Update README.md (#441)

Include Zeitgeist into "Projects using ORML" section

* Add PoV size in benchmarking. (#442)

* Bump cumulus ref in cargo patch. (#443)

* fix missing features (#444)

* fix missing features

* test with benchmarks

* update auction weight (#445)

* Bump dependencies. (#448)

* Replaced unwraps with expects

Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
Co-authored-by: Shaun Wang <spxwang@gmail.com>
Co-authored-by: Harald Heckmann <harald.heckmann93@web.de>
Co-authored-by: wangjj9219 <183318287@qq.com>
brettkolodny added a commit that referenced this pull request Apr 15, 2021
* Use MultiLocation as xtokens transfer dest type. (#396)

* Use MultiLocation as xtokens transfer dest type.

* Make clippy happy.

* Use xcm-handler to execute XCM locally (#401)

* Use cumulus xcm-handler to execute XCM locally.

* Add docstring for xtokens config.

* Replace XcmError::Undefined usage. (#402)

* Replace XcmError::Undefined usage.

* make clippy happy

* Bump and unify serde versions. (#403)

* xtokens and xcm-support documentations (#404)

* Add xtokens module docstring.

* Add xtokens readme.

* Add documentations for xcm-support.

* Add xtokens and xcm-support entries in main readme.

* Add unit tests for xcm-support. (#405)

* Added Minterest to the list of users. (#406)

* update step guide link

* Handle unknown assets in TransactAsset impl (#409)

* Handle unknown assets in TransactAsset impl.

* More documentations.

* Clean code.

* Renaming.

* Should try to deposit known asset first.

* Return error if no UnknownAsset impl.

* Make clippy happy.

* Fix description and repo link. (#410)

* Unknown tokens pallet (#411)

* Impl unknown tokens pallet.

* Fix workspace pallet path.

* Make clippy happy.

* Clippy, be happy.

* Unit tests.

* Remove nonces from oracle pallet. (#413)

* refactor rewards (#412)

* Bump rococo v1 dependencies (#418)

* Fix mocks.

* Replace deprecated.

* Update orml-unknown-tokens unit tests. (#421)

* add build-script-utils from Substrate (#422)

* Update README.md (#420)

* Update README.md

* Update README.md

* Bump impl-trait-for-tuples to 0.2.1 (#424)

* update Cargo.toml (#429)

* bencher init commit

* split into files

* clean deps

* add docs

* use frame_benchmarking apis

* add macro bencher_use to export stuff for bench_runner

* * generate weights file
* refactor

* improvements

* CLI Options (#446)

* Added command line options for output, headers, and templates

* Fixed options to conform to standard cli

* Added weight-gen cli

* fixed dependencies

* Replaced unwraps with expects (#449)

* Orml bencher (#451)

* add Handler (#431)

* remove disable-tokens-by-owner (#434)

* Cross-chain transfer rework (#432)

* Reserve chain trait.

* Rework cross-chain transfer.

* Remove relay chain balance convert.

* Add 'Parse' trait.

* Change transfer_multiasset fn signature.

* Add transfer dispatchable call.

* Update doc.

* Use xcm-simulator to mock network.

* Send relay chain asset to sibling unit test.

* Move location traits into orml-traits.

* Add MultiNativeAsset filter for is reserve check.

* More unit tests.

* Failing edge case unit tests.

* Handle zero amount asset case.

* Fix mocks.

* Renaming.

* Update currency adapter to work with new xtokens impl (#436)

* Xcm support implementations rework.

* Update xtokens mock.

* Use CurrencyId convert. (#437)

* Use CurrencyId convert.

* Apply review suggestions.

* Update xtokens docs. (#438)

* Update xtokens docs.

* Fix typo.

* Update imbalances impl.

* Don't deposit failure event in orml-unknown-tokens. (#440)

* Don't deposit failure event in orml-unknown-tokens.

* Patch substrate/polkadot/cumulus.

* Fix patch.

* Update README.md (#441)

Include Zeitgeist into "Projects using ORML" section

* Add PoV size in benchmarking. (#442)

* Bump cumulus ref in cargo patch. (#443)

* fix missing features (#444)

* fix missing features

* test with benchmarks

* update auction weight (#445)

* Bump dependencies. (#448)

* Replaced unwraps with expects

Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
Co-authored-by: Shaun Wang <spxwang@gmail.com>
Co-authored-by: Harald Heckmann <harald.heckmann93@web.de>
Co-authored-by: wangjj9219 <183318287@qq.com>

Co-authored-by: Shaun Wang <spxwang@gmail.com>
Co-authored-by: dzianis.ramanouski <DenisRomanovsky@users.noreply.github.com>
Co-authored-by: Bette <42193328+bette7@users.noreply.github.com>
Co-authored-by: wangjj9219 <183318287@qq.com>
Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
Co-authored-by: transxask <68648225+transxask@users.noreply.github.com>
Co-authored-by: Aaro Perämaa <aaro.peramaa@gmail.com>
Co-authored-by: Ermal Kaleci <ermalkaleci@gmail.com>
Co-authored-by: Harald Heckmann <harald.heckmann93@web.de>
ermalkaleci added a commit that referenced this pull request May 5, 2021
* Use MultiLocation as xtokens transfer dest type. (#396)

* Use MultiLocation as xtokens transfer dest type.

* Make clippy happy.

* Use xcm-handler to execute XCM locally (#401)

* Use cumulus xcm-handler to execute XCM locally.

* Add docstring for xtokens config.

* Replace XcmError::Undefined usage. (#402)

* Replace XcmError::Undefined usage.

* make clippy happy

* Bump and unify serde versions. (#403)

* xtokens and xcm-support documentations (#404)

* Add xtokens module docstring.

* Add xtokens readme.

* Add documentations for xcm-support.

* Add xtokens and xcm-support entries in main readme.

* Add unit tests for xcm-support. (#405)

* Added Minterest to the list of users. (#406)

* update step guide link

* Handle unknown assets in TransactAsset impl (#409)

* Handle unknown assets in TransactAsset impl.

* More documentations.

* Clean code.

* Renaming.

* Should try to deposit known asset first.

* Return error if no UnknownAsset impl.

* Make clippy happy.

* Fix description and repo link. (#410)

* Unknown tokens pallet (#411)

* Impl unknown tokens pallet.

* Fix workspace pallet path.

* Make clippy happy.

* Clippy, be happy.

* Unit tests.

* Remove nonces from oracle pallet. (#413)

* refactor rewards (#412)

* Bump rococo v1 dependencies (#418)

* Fix mocks.

* Replace deprecated.

* Update orml-unknown-tokens unit tests. (#421)

* add build-script-utils from Substrate (#422)

* Update README.md (#420)

* Update README.md

* Update README.md

* Bump impl-trait-for-tuples to 0.2.1 (#424)

* update Cargo.toml (#429)

* bencher init commit

* split into files

* clean deps

* add docs

* use frame_benchmarking apis

* add macro bencher_use to export stuff for bench_runner

* * generate weights file
* refactor

* improvements

* CLI Options (#446)

* Added command line options for output, headers, and templates

* Fixed options to conform to standard cli

* Added weight-gen cli

* fixed dependencies

* Replaced unwraps with expects (#449)

* Orml bencher (#451)

* add Handler (#431)

* remove disable-tokens-by-owner (#434)

* Cross-chain transfer rework (#432)

* Reserve chain trait.

* Rework cross-chain transfer.

* Remove relay chain balance convert.

* Add 'Parse' trait.

* Change transfer_multiasset fn signature.

* Add transfer dispatchable call.

* Update doc.

* Use xcm-simulator to mock network.

* Send relay chain asset to sibling unit test.

* Move location traits into orml-traits.

* Add MultiNativeAsset filter for is reserve check.

* More unit tests.

* Failing edge case unit tests.

* Handle zero amount asset case.

* Fix mocks.

* Renaming.

* Update currency adapter to work with new xtokens impl (#436)

* Xcm support implementations rework.

* Update xtokens mock.

* Use CurrencyId convert. (#437)

* Use CurrencyId convert.

* Apply review suggestions.

* Update xtokens docs. (#438)

* Update xtokens docs.

* Fix typo.

* Update imbalances impl.

* Don't deposit failure event in orml-unknown-tokens. (#440)

* Don't deposit failure event in orml-unknown-tokens.

* Patch substrate/polkadot/cumulus.

* Fix patch.

* Update README.md (#441)

Include Zeitgeist into "Projects using ORML" section

* Add PoV size in benchmarking. (#442)

* Bump cumulus ref in cargo patch. (#443)

* fix missing features (#444)

* fix missing features

* test with benchmarks

* update auction weight (#445)

* Bump dependencies. (#448)

* Replaced unwraps with expects

Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
Co-authored-by: Shaun Wang <spxwang@gmail.com>
Co-authored-by: Harald Heckmann <harald.heckmann93@web.de>
Co-authored-by: wangjj9219 <183318287@qq.com>

Co-authored-by: Shaun Wang <spxwang@gmail.com>
Co-authored-by: dzianis.ramanouski <DenisRomanovsky@users.noreply.github.com>
Co-authored-by: Bette <42193328+bette7@users.noreply.github.com>
Co-authored-by: wangjj9219 <183318287@qq.com>
Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
Co-authored-by: transxask <68648225+transxask@users.noreply.github.com>
Co-authored-by: Aaro Perämaa <aaro.peramaa@gmail.com>
Co-authored-by: Ermal Kaleci <ermalkaleci@gmail.com>
Co-authored-by: Harald Heckmann <harald.heckmann93@web.de>
xlc added a commit that referenced this pull request May 17, 2021
* init weight_meter

* update meter static var

* update workspace

* fmt

* clippy allow unused imports

* default std

* update cargo

* remove std

* revert until fix no_std issue

* improvements

* fmt

* update argument extract

* package name with orml prefix

* update meter to be Mutex

* use mutex only in std

* update README

* update README

* update property name

* separate method injector

* docs

* fmt

* clippy

* Orml bencher (#452)

* Use MultiLocation as xtokens transfer dest type. (#396)

* Use MultiLocation as xtokens transfer dest type.

* Make clippy happy.

* Use xcm-handler to execute XCM locally (#401)

* Use cumulus xcm-handler to execute XCM locally.

* Add docstring for xtokens config.

* Replace XcmError::Undefined usage. (#402)

* Replace XcmError::Undefined usage.

* make clippy happy

* Bump and unify serde versions. (#403)

* xtokens and xcm-support documentations (#404)

* Add xtokens module docstring.

* Add xtokens readme.

* Add documentations for xcm-support.

* Add xtokens and xcm-support entries in main readme.

* Add unit tests for xcm-support. (#405)

* Added Minterest to the list of users. (#406)

* update step guide link

* Handle unknown assets in TransactAsset impl (#409)

* Handle unknown assets in TransactAsset impl.

* More documentations.

* Clean code.

* Renaming.

* Should try to deposit known asset first.

* Return error if no UnknownAsset impl.

* Make clippy happy.

* Fix description and repo link. (#410)

* Unknown tokens pallet (#411)

* Impl unknown tokens pallet.

* Fix workspace pallet path.

* Make clippy happy.

* Clippy, be happy.

* Unit tests.

* Remove nonces from oracle pallet. (#413)

* refactor rewards (#412)

* Bump rococo v1 dependencies (#418)

* Fix mocks.

* Replace deprecated.

* Update orml-unknown-tokens unit tests. (#421)

* add build-script-utils from Substrate (#422)

* Update README.md (#420)

* Update README.md

* Update README.md

* Bump impl-trait-for-tuples to 0.2.1 (#424)

* update Cargo.toml (#429)

* bencher init commit

* split into files

* clean deps

* add docs

* use frame_benchmarking apis

* add macro bencher_use to export stuff for bench_runner

* * generate weights file
* refactor

* improvements

* CLI Options (#446)

* Added command line options for output, headers, and templates

* Fixed options to conform to standard cli

* Added weight-gen cli

* fixed dependencies

* Replaced unwraps with expects (#449)

* Orml bencher (#451)

* add Handler (#431)

* remove disable-tokens-by-owner (#434)

* Cross-chain transfer rework (#432)

* Reserve chain trait.

* Rework cross-chain transfer.

* Remove relay chain balance convert.

* Add 'Parse' trait.

* Change transfer_multiasset fn signature.

* Add transfer dispatchable call.

* Update doc.

* Use xcm-simulator to mock network.

* Send relay chain asset to sibling unit test.

* Move location traits into orml-traits.

* Add MultiNativeAsset filter for is reserve check.

* More unit tests.

* Failing edge case unit tests.

* Handle zero amount asset case.

* Fix mocks.

* Renaming.

* Update currency adapter to work with new xtokens impl (#436)

* Xcm support implementations rework.

* Update xtokens mock.

* Use CurrencyId convert. (#437)

* Use CurrencyId convert.

* Apply review suggestions.

* Update xtokens docs. (#438)

* Update xtokens docs.

* Fix typo.

* Update imbalances impl.

* Don't deposit failure event in orml-unknown-tokens. (#440)

* Don't deposit failure event in orml-unknown-tokens.

* Patch substrate/polkadot/cumulus.

* Fix patch.

* Update README.md (#441)

Include Zeitgeist into "Projects using ORML" section

* Add PoV size in benchmarking. (#442)

* Bump cumulus ref in cargo patch. (#443)

* fix missing features (#444)

* fix missing features

* test with benchmarks

* update auction weight (#445)

* Bump dependencies. (#448)

* Replaced unwraps with expects

Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
Co-authored-by: Shaun Wang <spxwang@gmail.com>
Co-authored-by: Harald Heckmann <harald.heckmann93@web.de>
Co-authored-by: wangjj9219 <183318287@qq.com>

Co-authored-by: Shaun Wang <spxwang@gmail.com>
Co-authored-by: dzianis.ramanouski <DenisRomanovsky@users.noreply.github.com>
Co-authored-by: Bette <42193328+bette7@users.noreply.github.com>
Co-authored-by: wangjj9219 <183318287@qq.com>
Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
Co-authored-by: transxask <68648225+transxask@users.noreply.github.com>
Co-authored-by: Aaro Perämaa <aaro.peramaa@gmail.com>
Co-authored-by: Ermal Kaleci <ermalkaleci@gmail.com>
Co-authored-by: Harald Heckmann <harald.heckmann93@web.de>

* fix bencher dependencies

* Weight meter (#459)

* Added argument to BenchmarkingState

* fix

* Updated frame-support version (#461)

* clippy

* fmt

* fix

* switched to thread_local

* Added checked add

* corrected versions

* weight_meter tests

* Removed starting weight

* Removed method_benchmark/updated inner docs

* clippy and fmt

* changed start_with to start

* Changed start_with to start in macro

* cleanup

* refactor

* fix clippy

Co-authored-by: brettkolodny <brettkolodny@gmail.com>
Co-authored-by: Shaun Wang <spxwang@gmail.com>
Co-authored-by: dzianis.ramanouski <DenisRomanovsky@users.noreply.github.com>
Co-authored-by: Bette <42193328+bette7@users.noreply.github.com>
Co-authored-by: wangjj9219 <183318287@qq.com>
Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
Co-authored-by: transxask <68648225+transxask@users.noreply.github.com>
Co-authored-by: Aaro Perämaa <aaro.peramaa@gmail.com>
Co-authored-by: Harald Heckmann <harald.heckmann93@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XCM Fungible Asset Implementation Design
2 participants