Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Executing a XCM call from an ink! contract. #60

Merged
merged 6 commits into from
Sep 19, 2022

Conversation

hbulgarini
Copy link
Contributor

Closes issue #56

This PR is a PoC of the xcm chain extension mvp that allow us to send (and receive) XCM messages from an ink! contract.

Also i have included a new folder which is the contracts folder where i believe this can be used as a common place to drop all the future contracts that we might develop.

The contract is very simple it self, it just build a simple Transact that can be sent to any parachain under the same parent (in XCM terms).

P.S: i have many issues with the versioning around the chain extension as where as the contract, so i think there is going to be a more stable version once the contracts team puts this MVP into a more productive release.

stiiifff
stiiifff previously approved these changes Sep 19, 2022
@stiiifff
Copy link
Contributor

Nice ! Looking forward to see it in action.

@hbulgarini hbulgarini merged commit 8725dba into master Sep 19, 2022
@hbulgarini hbulgarini deleted the hb-xcm-chain-extension branch September 19, 2022 15:46
arturgontijo added a commit that referenced this pull request Nov 9, 2022
* Executing a XCM call from an ink! contract. (#60)

* First try

* Contracts extension implemented and sample contract poc added

* fmt

* Fixing license

* Change to Vec

* Removing unnecesary to_vec()

* [XCMv3] master + pallet-contracts-xcm with v0931

Co-authored-by: Hector Bulgarini <hbulgarini@gmail.com>
arturgontijo added a commit that referenced this pull request Nov 11, 2022
* Executing a XCM call from an ink! contract. (#60)

* First try

* Contracts extension implemented and sample contract poc added

* fmt

* Fixing license

* Change to Vec

* Removing unnecesary to_vec()

* Asset Registry (#63)

* bootstrap pallet_asset_registry

* rm change_foreign_asset fn

* fix AsAssetMultiLocation implementation

* avoid creating/destroying assets for registry

* use loose coupling with Assets pallet

* split unit tests

* bootstrap xcm-simulator unit tests

* rustfmt

* rm change_foreign_asset extrinsic

* rename Foreign Asset -> Reserve Asset

* rm xcm-simulator from unit tests

* rename ForeignFungiblesTransactor->ReservedFungiblesTransactor

* add comments to asset-registry pallet errors

* bootstrap integration-tests

* asset-registry pallet README

* zombienet with 2 collators per para

* bootstrap benchmarks

* upgrade zombienet config camel_case

* update weights with GCP c2d-highcpu-8

* integration test: rm XcmV1MultiLocation attribute from ReserveAssetRegistered event

* rm unused StatemineAssetIdInfoB

* add WeightInfo to asset-registry mock

* Run cargo fmt & clippy

* More clippy smartness

* lint pallets/asset-registry/README.md

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* lint pallets/asset-registry/README.md

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* lint pallets/asset-registry/README.md

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* lint pallets/asset-registry/README.md

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* lint pallets/asset-registry/src/benchmarking.rs

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* lint pallets/asset-registry/src/tests.rs

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* lint pallets/asset-registry/src/tests.rs

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* lint primitives/xcm/Cargo.toml

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* lint primitives/xcm/src/lib.rs

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* lint primitives/xcm/src/lib.rs

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* lint pallets/asset-registry/src/benchmarking.rs

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* lint pallets/asset-registry/src/lib.rs

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* lint pallets/asset-registry/src/lib.rs

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* lint pallets/asset-registry/src/tests.rs

Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* fix ReserveAssetRegistered field

* add comment explaining fn asset_exists

* fix asset-registry pallet README

* set LOCAL_ASSET_ID to 10

* change &trappist_asset_id on integration test

Co-authored-by: Steve Degosserie <steve@parity.io>
Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>

* Revamp README to explain the purpose of the Trappist project (#64)

* Revamp README to explain the purpose of the Trappist project; remove Docker-related stuff

* Add Contracts pallet & ink! to list of technologies

Co-authored-by: Hector Bulgarini <hbulgarini@gmail.com>

* Update README.md

Co-authored-by: Hector Bulgarini <hbulgarini@gmail.com>

Co-authored-by: Hector Bulgarini <hbulgarini@gmail.com>

* Fix formatting issue in README (#65)

* fix zombienet toml (#66)

* build(deps): update dependencies to polkadot v0.9.30 (#68)

* build(deps): update dependencies to polkadot v0.9.30
* ci: install protoc
* build(deps): update substrate-dex dependency

* test: update expected polkadotXcm.attempted event value (with threshold) (#70)

* docs: correct binary name (#67)

xcm-playground.toml refers to "./bin/polkadot-parachain" rather than `polkadot-collator`, and `cumulus' build results in `polkadot-parachain` binary.

* ci: use actions-rs (#69)

Allow local workflow runs using act.

* Minor cleanups (#73)

* cargo fmt

* cargo clippy

* ci: check formatting (#74)

* [XCMv3] master + pallet-asset-registry v0931

Co-authored-by: Hector Bulgarini <hbulgarini@gmail.com>
Co-authored-by: bernardo <bernardo@parity.io>
Co-authored-by: Steve Degosserie <steve@parity.io>
Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>
Co-authored-by: Frank Bell <60948618+evilrobot-01@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants