-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit o nitpicking.
Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>
Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>
Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>
Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>
Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>
Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>
Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>
Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>
Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>
Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>
Co-authored-by: Adam Wierzbicki <adam.wierzbicki@parity.io>
|
||
impl<T: Config> Pallet<T> { | ||
fn asset_exists(asset_id: AssetIdOf<T>) -> bool { | ||
!T::Assets::minimum_balance(asset_id).is_zero() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this implementation is not trivial to understand, but i don't have any problem with keeping it.
Anyway, I wonder if it would make sense to push a PR for adding the function asset_exists(id: AssetId)
on the pallet_assets, with the impl we might inspect the storage . May be we can define it under the impl_fungibles.rs
file because it seems this basic functionality that is missing.
@bernardoaraujor : Overall this looks very very good. I love the way you have documented the pallet. |
@hbulgarini I created an issue to track the |
b31f5d2
to
f3179b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good to go IMHO.
@hbulgarini sorry I had to push another commit that reversed your approval after setting I could either dismiss the creation of the trappist asset on the integration test (relying on the assumption that it is created on genesis), or just switch I chose the later so that |
Looks great, thanks @bernardoaraujor ! Adding a last comment re. a potential later improvement: it could make sense to inject the multi-location validation logic via the Config trait. |
* 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>
pallet asset-registry
primitives/xcm
integration tests
asset-registry
based onparachains-integration-tests
xcm-playground.toml
zombienet
v1.2.67 or later - hrmp channels are now defined withcamel_case
, using older zombienet versions will not work (Make all keys snake_case in network config zombienet#390)parachains-integration-tests
)