This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 373
Companion for #13352 #2180
Merged
Merged
Companion for #13352 #2180
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
fc48530
Assets balances
a564871
Update docs
8afb7ee
Merge branch 'master' into js/assets-balances
d744cac
AssetsApi with MultiLocation as preparation for multi pallet_assets i…
bkontur 139da1a
typo for check-docs job
bkontur 2287f4f
Merge remote-tracking branch 'origin/master' into js/assets-balances
a409db4
WIP: AssetsApi return MultiAsset instead of (MultiLocation, Balance)
bkontur d865e3a
Merge remote-tracking branch 'origin/master' into js/assets-balances
9d2390a
WIP: assets_api + conversion refactor
bkontur a9f5fdd
WIP: assets_api + conversion refactor
bkontur 33218cf
Finished asset runtimes
bkontur 958b978
Refactor AssetsApi to FungiblesApi
bkontur 170d869
Refactor
bkontur 32bdfcf
Fix check-rust-docs
bkontur 9d52fa6
Removed todo
bkontur 17193eb
Fix check-rust-doc
bkontur 0f5f909
Merge remote-tracking branch 'origin/master' into js/assets-balances
bkontur 2ead68e
Update parachains/runtimes/assets/common/Cargo.toml
jsidorenko 79b2a9d
Merge remote-tracking branch 'origin/master' into js/assets-balances
bkontur 572ae0f
update lockfile for {"substrate", "polkadot"}
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // This file is part of Substrate. | ||
|
|
||
| // Copyright (C) 2018-2022 Parity Technologies (UK) Ltd. | ||
| // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 | ||
|
|
||
| // This program is free software: you can redistribute it and/or modify | ||
| // it under the terms of the GNU General Public License as published by | ||
| // the Free Software Foundation, either version 3 of the License, or | ||
| // (at your option) any later version. | ||
|
|
||
| // This program is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| // GNU General Public License for more details. | ||
|
|
||
| // You should have received a copy of the GNU General Public License | ||
| // along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
|
||
| //! Runtime API definition for assets. | ||
|
|
||
| use codec::Codec; | ||
| use sp_std::vec::Vec; | ||
|
|
||
| sp_api::decl_runtime_apis! { | ||
| pub trait AssetsApi<AccountId, AssetBalance, AssetId> | ||
| where | ||
| AccountId: Codec, | ||
| AssetBalance: Codec, | ||
| AssetId: Codec, | ||
| { | ||
| /// Returns the list of `AssetId`s and corresponding balance that an `AccountId` has. | ||
| fn account_balances(account: AccountId) -> Vec<(AssetId, AssetBalance)>; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // This file is part of Substrate. | ||
|
|
||
| // Copyright (C) 2018-2022 Parity Technologies (UK) Ltd. | ||
| // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 | ||
|
|
||
| // This program is free software: you can redistribute it and/or modify | ||
| // it under the terms of the GNU General Public License as published by | ||
| // the Free Software Foundation, either version 3 of the License, or | ||
| // (at your option) any later version. | ||
|
|
||
| // This program is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| // GNU General Public License for more details. | ||
|
|
||
| // You should have received a copy of the GNU General Public License | ||
| // along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
|
||
| //! Runtime API definition for assets. | ||
|
|
||
| use codec::Codec; | ||
| use sp_std::vec::Vec; | ||
|
|
||
| sp_api::decl_runtime_apis! { | ||
| pub trait AssetsApi<AccountId, AssetBalance, AssetId> | ||
bkontur marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| where | ||
| AccountId: Codec, | ||
| AssetBalance: Codec, | ||
| AssetId: Codec, | ||
| { | ||
| /// Returns the list of `AssetId`s and corresponding balance that an `AccountId` has. | ||
| fn account_balances(account: AccountId) -> Vec<(AssetId, AssetBalance)>; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // This file is part of Substrate. | ||
|
|
||
| // Copyright (C) 2018-2022 Parity Technologies (UK) Ltd. | ||
| // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 | ||
|
|
||
| // This program is free software: you can redistribute it and/or modify | ||
| // it under the terms of the GNU General Public License as published by | ||
| // the Free Software Foundation, either version 3 of the License, or | ||
| // (at your option) any later version. | ||
|
|
||
| // This program is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| // GNU General Public License for more details. | ||
|
|
||
| // You should have received a copy of the GNU General Public License | ||
| // along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
|
||
| //! Runtime API definition for assets. | ||
|
|
||
| use codec::Codec; | ||
| use sp_std::vec::Vec; | ||
|
|
||
| sp_api::decl_runtime_apis! { | ||
| pub trait AssetsApi<AccountId, AssetBalance, AssetId> | ||
| where | ||
| AccountId: Codec, | ||
| AssetBalance: Codec, | ||
| AssetId: Codec, | ||
| { | ||
| /// Returns the list of `AssetId`s and corresponding balance that an `AccountId` has. | ||
| fn account_balances(account: AccountId) -> Vec<(AssetId, AssetBalance)>; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.