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

Upgrade to polkadot v0.9.36 #864

Merged
merged 5 commits into from
Jan 5, 2023

Conversation

CertainLach
Copy link
Contributor

@CertainLach CertainLach commented Dec 20, 2022

No description provided.

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
@CertainLach CertainLach marked this pull request as ready for review December 21, 2022 18:03
@codecov-commenter
Copy link

Codecov Report

Merging #864 (4edb69f) into master (dc39cfd) will increase coverage by 0.03%.
The diff coverage is 76.47%.

@@            Coverage Diff             @@
##           master     #864      +/-   ##
==========================================
+ Coverage   78.84%   78.87%   +0.03%     
==========================================
  Files         102      102              
  Lines       10546    10543       -3     
==========================================
+ Hits         8315     8316       +1     
+ Misses       2231     2227       -4     
Impacted Files Coverage Δ
asset-registry/src/lib.rs 91.86% <ø> (ø)
asset-registry/src/mock/para.rs 72.97% <ø> (+3.74%) ⬆️
auction/src/lib.rs 90.32% <ø> (ø)
authority/src/lib.rs 82.35% <ø> (ø)
authority/src/mock.rs 81.25% <ø> (ø)
bencher/test/src/lib.rs 0.00% <ø> (ø)
benchmarking/src/tests.rs 96.77% <ø> (ø)
currencies/src/lib.rs 48.98% <ø> (ø)
gradually-update/src/lib.rs 88.75% <ø> (ø)
oracle/src/lib.rs 76.36% <ø> (ø)
... and 12 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@CertainLach
Copy link
Contributor Author

Closes #861 #862

@@ -67,6 +67,10 @@ where
B::can_withdraw(asset, who, amount)
}
}

fn asset_exists(_asset: Self::AssetId) -> bool {
true
Copy link
Contributor

@zjb0807 zjb0807 Dec 21, 2022

Choose a reason for hiding this comment

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

Suggested change
true
unimplemented!()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Every asset that is not in TestKey (B), is delegated to A, I think that this implementation will be not consistent with other methods?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think unimplemented!() is better

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I propose returning false for now, just to be on the safe side, it would be bad if it caused a runtime panic.

@@ -1744,6 +1749,10 @@ impl<T: Config> fungibles::Inspect<T::AccountId> for Pallet<T> {
) -> WithdrawConsequence<Self::Balance> {
Self::withdraw_consequence(who, asset_id, amount, &Self::accounts(who, asset_id))
}

fn asset_exists(_asset: Self::AssetId) -> bool {
true
Copy link
Contributor

Choose a reason for hiding this comment

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

@xlc Do you want to return false here?
Prevent the substrate from using it later

Copy link
Contributor

Choose a reason for hiding this comment

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

paritytech/substrate#12782

unimplemented!() is fine.

@@ -1744,6 +1749,10 @@ impl<T: Config> fungibles::Inspect<T::AccountId> for Pallet<T> {
) -> WithdrawConsequence<Self::Balance> {
Self::withdraw_consequence(who, asset_id, amount, &Self::accounts(who, asset_id))
}

fn asset_exists(_asset: Self::AssetId) -> bool {
true
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
true
unimplemented!()

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
@@ -67,6 +67,10 @@ where
B::can_withdraw(asset, who, amount)
}
}

fn asset_exists(_asset: Self::AssetId) -> bool {
false
Copy link
Member

Choose a reason for hiding this comment

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

               if TestKey::contains(&asset) {
			true
		} else {
 			B::asset_exists(asset)
 		}

@@ -1744,6 +1749,10 @@ impl<T: Config> fungibles::Inspect<T::AccountId> for Pallet<T> {
) -> WithdrawConsequence<Self::Balance> {
Self::withdraw_consequence(who, asset_id, amount, &Self::accounts(who, asset_id))
}

fn asset_exists(_asset: Self::AssetId) -> bool {
false
Copy link
Member

Choose a reason for hiding this comment

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

asset exists if TotalIssuance exists

@xlc
Copy link
Member

xlc commented Jan 3, 2023

some tests for the new asset_exists implementation will be nice

@xlc xlc merged commit 0e23446 into open-web3-stack:master Jan 5, 2023
@xlc xlc mentioned this pull request Jan 5, 2023
devdanco added a commit to gasp-xyz/open-runtime-module-library that referenced this pull request Feb 14, 2023
* run CI for release branch

* Upgrade polkadot-v0.9.31 (open-web3-stack#830)

* Upgrade polkadot-v0.9.31

* Update authority/src/lib.rs

Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>

* fix tests

Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>

* add CODECOV_TOKEN (open-web3-stack#836)

* claim_rewards should not create empty records (open-web3-stack#835)

* Update Readme (open-web3-stack#837)

* Update Readme

Plasm Network rebranded last year to Astar Network
Source: https://medium.com/astar-network/plasm-rebrands-to-astar-network-in-pursuit-of-becoming-a-polkadot-native-dapp-hub-6db3121c4f13

* Update README.md

Change order

* Token hook refactoring; Posthooks for deposit and transfer (open-web3-stack#834)

* feat(tokens): Refactor hooks into single trait

* feat(tokens): Add post-hooks for Transfer and Deposit

* chore(tokens): improve mutation hook naming

* fix(tokens): PostDeposit hook (open-web3-stack#839)

* fix(tokens): PostDeposit hook

* test(tokens): posthook correctness

* fix(tokens): use `assert` instead of `ensure` in mock posthooks

* Add Centrifuge to users of orml (open-web3-stack#842)

* Add Crust to ORML (open-web3-stack#843)

* refactor: make weight argument in xtokens transfers optional (open-web3-stack#841)

* refactor: make weight argument in xtokens be of type WeightLimit

* refactor: rename dest_weight -> dest_weight_limit

* Update weight-gen template.hbs (open-web3-stack#844)

* prevent nested DelayedOrigin (open-web3-stack#845)

* prevent nested DelayedOrigin

* fix deps

* Update authority/src/tests.rs

Co-authored-by: zjb0807 <zjb0807@qq.com>

* allow nested DelayedOrigin

* update docstring

* typo fix

Co-authored-by: zjb0807 <zjb0807@qq.com>

* Add try-runtime feature for orml-payments (open-web3-stack#846)

* Add try-runtime feature for orml-payments

* Add features

* Update to Polkadot v0.9.32 (open-web3-stack#848)

* Add new for DelayedOrigin (open-web3-stack#849)

* Update README.md (open-web3-stack#851)

* Update README.md

Update modules description

* Update README.md

Further updates on description.

* #xcm polishing #xtokens  README.md (open-web3-stack#856)

* Update github actions (open-web3-stack#855)

* Update github actions

* trigger GitHub actions

* Changed `vested_transfer` extrinsic behavior. (open-web3-stack#857)

* Changed `vested_transfer` extrinsic behavior.
Fixed self-vesting case (`from` == `to`) when it was possible to self-freeze funds above the current account balance.

* added test for self-vesting case

* Upgrade polkadot-v0.9.33 (open-web3-stack#858)

* use explicit call index (open-web3-stack#865)

* Upgrade to polkadot v0.9.36 (open-web3-stack#864)

* build: upgrade to polkadot v0.9.36

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>

* style: fix formatting

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>

* fix: polkadot dependency references

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>

* build: use released cumulus

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>

* fix: make asset_exists return false

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>

* update asset_exists (open-web3-stack#866)

* fix test

* Update polkadot v0.9.36 (open-web3-stack#878)

* Fix payments on-idle (open-web3-stack#868)

* fix payments on-idle

* update comment

* Switch to Rust-1.66 (open-web3-stack#869)

* feat: derive MEL for Value enum (open-web3-stack#867)

* feat: impl MEL for Value enum

* fmt: fix

* feat:Make the XcmTransfer trait support transfer_multiasset_with_fee (open-web3-stack#870)

* update bencher deps (open-web3-stack#872)

* add BenchmarkError::Weightless (open-web3-stack#873)

* add BenchmarkError::Weightless

* Update benchmarking/src/lib.rs

Co-authored-by: zjb0807 <zjb0807@qq.com>

Co-authored-by: zjb0807 <zjb0807@qq.com>

* Update jsonrpsee 0.16.2 (open-web3-stack#876)

* Update jsonrpsee 0.16.2

* fix clippy

* fix clippy

Co-authored-by: William Freudenberger <w.freude@icloud.com>
Co-authored-by: NingBo Wang <2536935847@qq.com>
Co-authored-by: Ermal Kaleci <ermalkaleci@gmail.com>
Co-authored-by: Andrew Plaza <aplaza@liquidthink.net>

* update packages

* update reference

---------

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
Co-authored-by: Bryan Chen <xlchen1291@gmail.com>
Co-authored-by: zjb0807 <zjb0807@qq.com>
Co-authored-by: wangjj9219 <183318287@qq.com>
Co-authored-by: Maarten <36227274+fiexer@users.noreply.github.com>
Co-authored-by: Daniel Savu <savudani04@yahoo.ro>
Co-authored-by: Miguel Hervas <miguel.hervas.lazaro@gmail.com>
Co-authored-by: Myron <49134743+mmyyrroonn@users.noreply.github.com>
Co-authored-by: sander2 <sanderbosma@gmail.com>
Co-authored-by: Nuno Alexandre <hi@nunoalexandre.com>
Co-authored-by: Lawrence Law - Acala <97002769+Lawrence-Acala@users.noreply.github.com>
Co-authored-by: Dzmitry Lahoda <dzmitry@lahoda.pro>
Co-authored-by: Pavel Orlov <45266194+PraetorP@users.noreply.github.com>
Co-authored-by: Daniel Shiposha <dshiposha@usetech.com>
Co-authored-by: Yaroslav Bolyukin <iam@lach.pw>
Co-authored-by: William Freudenberger <w.freude@icloud.com>
Co-authored-by: NingBo Wang <2536935847@qq.com>
Co-authored-by: Ermal Kaleci <ermalkaleci@gmail.com>
Co-authored-by: Andrew Plaza <aplaza@liquidthink.net>
devdanco added a commit to gasp-xyz/open-runtime-module-library that referenced this pull request May 25, 2023
* run CI for release branch

* Upgrade polkadot-v0.9.31 (open-web3-stack#830)

* Upgrade polkadot-v0.9.31

* Update authority/src/lib.rs

Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>

* fix tests

Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>

* add CODECOV_TOKEN (open-web3-stack#836)

* claim_rewards should not create empty records (open-web3-stack#835)

* Update Readme (open-web3-stack#837)

* Update Readme

Plasm Network rebranded last year to Astar Network
Source: https://medium.com/astar-network/plasm-rebrands-to-astar-network-in-pursuit-of-becoming-a-polkadot-native-dapp-hub-6db3121c4f13

* Update README.md

Change order

* Token hook refactoring; Posthooks for deposit and transfer (open-web3-stack#834)

* feat(tokens): Refactor hooks into single trait

* feat(tokens): Add post-hooks for Transfer and Deposit

* chore(tokens): improve mutation hook naming

* fix(tokens): PostDeposit hook (open-web3-stack#839)

* fix(tokens): PostDeposit hook

* test(tokens): posthook correctness

* fix(tokens): use `assert` instead of `ensure` in mock posthooks

* Add Centrifuge to users of orml (open-web3-stack#842)

* Add Crust to ORML (open-web3-stack#843)

* refactor: make weight argument in xtokens transfers optional (open-web3-stack#841)

* refactor: make weight argument in xtokens be of type WeightLimit

* refactor: rename dest_weight -> dest_weight_limit

* Update weight-gen template.hbs (open-web3-stack#844)

* prevent nested DelayedOrigin (open-web3-stack#845)

* prevent nested DelayedOrigin

* fix deps

* Update authority/src/tests.rs

Co-authored-by: zjb0807 <zjb0807@qq.com>

* allow nested DelayedOrigin

* update docstring

* typo fix

Co-authored-by: zjb0807 <zjb0807@qq.com>

* Add try-runtime feature for orml-payments (open-web3-stack#846)

* Add try-runtime feature for orml-payments

* Add features

* Update to Polkadot v0.9.32 (open-web3-stack#848)

* Add new for DelayedOrigin (open-web3-stack#849)

* Update README.md (open-web3-stack#851)

* Update README.md

Update modules description

* Update README.md

Further updates on description.

* #xcm polishing #xtokens  README.md (open-web3-stack#856)

* Update github actions (open-web3-stack#855)

* Update github actions

* trigger GitHub actions

* Changed `vested_transfer` extrinsic behavior. (open-web3-stack#857)

* Changed `vested_transfer` extrinsic behavior.
Fixed self-vesting case (`from` == `to`) when it was possible to self-freeze funds above the current account balance.

* added test for self-vesting case

* Upgrade polkadot-v0.9.33 (open-web3-stack#858)

* use explicit call index (open-web3-stack#865)

* Upgrade to polkadot v0.9.36 (open-web3-stack#864)

* build: upgrade to polkadot v0.9.36

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>

* style: fix formatting

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>

* fix: polkadot dependency references

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>

* build: use released cumulus

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>

* fix: make asset_exists return false

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>

* update asset_exists (open-web3-stack#866)

* Fix payments on-idle (open-web3-stack#868)

* fix payments on-idle

* update comment

* Switch to Rust-1.66 (open-web3-stack#869)

* feat: derive MEL for Value enum (open-web3-stack#867)

* feat: impl MEL for Value enum

* fmt: fix

* feat:Make the XcmTransfer trait support transfer_multiasset_with_fee (open-web3-stack#870)

* update bencher deps (open-web3-stack#872)

* add BenchmarkError::Weightless (open-web3-stack#873)

* add BenchmarkError::Weightless

* Update benchmarking/src/lib.rs

Co-authored-by: zjb0807 <zjb0807@qq.com>

Co-authored-by: zjb0807 <zjb0807@qq.com>

* Update jsonrpsee 0.16.2 (open-web3-stack#876)

* Update jsonrpsee 0.16.2

* fix clippy

* fix clippy

* Update README.md (open-web3-stack#879)

Added Mangata and Parallel Finance

* Update README.md (open-web3-stack#880)

Added Moonbeam

* Upgrade polkadot-v0.9.37 (open-web3-stack#882)

* Add lock events to tokens pallet (open-web3-stack#883)

* Implement lock events in update_locks(...)

* Implement lock tests

* Replace depracted clippy rule name

* Move tests into correct test file

* Use correct Event type

* Update xtokens docs (open-web3-stack#885)

* added ajuna network (open-web3-stack#887)

using mainly the orml-vesting ...

* Upgrade polkadot-v0.9.38 (open-web3-stack#886)

* Upgrade polkadot-v0.9.38

* use `as_bounded_slice`

* `latest` instead explicit version

* use `AllCounted` for asset deposit

* Update `asset-registry` tests

* Update `benchmarking` tests

* Update `traits` tests

* Update `unknown-tokens` tests

* Update `xcm-support` tests

* Update `xtokens` tests

* Update `Cargo.dev.toml` pin

* clippy

* Specific version instead `latest`

* Add test `MultiLocation` encoding

* Remove `sp-authorship`

* Update `sp-weights` pin

* Fix runtime-benchmarks

* Add `asset-registry` migration

* clippy

* Assert `StorageVersion`

* Assert multiple migration calls

* AddImpl `OnRuntimeUpgrade`

* Add `unknown-tokens` migration

* Use xcm::v3 instead of latest (open-web3-stack#889)

* max weight fix (open-web3-stack#891)

* XcmTransfer Trait (open-web3-stack#892)

* Add more methods on XcmTransfer trait

* Add Transferred for XcmTransfer

* fix tests

* fix clippy

* fix migration and tests (open-web3-stack#893)

* build: upgrade polkadot to v0.9.39 (open-web3-stack#897)

* Add & clean deprecated (open-web3-stack#895)

* clean deprecated

* add dependencies on RPC

* add deprecated on RPC

* fix clippy

* remove tests

* Expose Xtokens pallet weight (open-web3-stack#898)

* fix unknown-tokens migration (open-web3-stack#899)

* fix unknown-tokens migration

* remove debug print

* Upgrade polkadot to v0.9.40 (open-web3-stack#902)

* Upgrade polkadot to v0.9.40

* add import for Hasher

* replace from_ref_time to from_parts

* fix CI

* remove unnecessary workspace word

* update branch ref

---------

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
Co-authored-by: Bryan Chen <xlchen1291@gmail.com>
Co-authored-by: zjb0807 <zjb0807@qq.com>
Co-authored-by: wangjj9219 <183318287@qq.com>
Co-authored-by: Maarten <36227274+fiexer@users.noreply.github.com>
Co-authored-by: Daniel Savu <savudani04@yahoo.ro>
Co-authored-by: Miguel Hervas <miguel.hervas.lazaro@gmail.com>
Co-authored-by: Myron <49134743+mmyyrroonn@users.noreply.github.com>
Co-authored-by: sander2 <sanderbosma@gmail.com>
Co-authored-by: Nuno Alexandre <hi@nunoalexandre.com>
Co-authored-by: Lawrence Law - Acala <97002769+Lawrence-Acala@users.noreply.github.com>
Co-authored-by: Dzmitry Lahoda <dzmitry@lahoda.pro>
Co-authored-by: Pavel Orlov <45266194+PraetorP@users.noreply.github.com>
Co-authored-by: Daniel Shiposha <dshiposha@usetech.com>
Co-authored-by: Yaroslav Bolyukin <iam@lach.pw>
Co-authored-by: William Freudenberger <w.freude@icloud.com>
Co-authored-by: NingBo Wang <2536935847@qq.com>
Co-authored-by: Ermal Kaleci <ermalkaleci@gmail.com>
Co-authored-by: Andrew Plaza <aplaza@liquidthink.net>
Co-authored-by: Joshua Cheong <jrc96@cantab.ac.uk>
Co-authored-by: Harald Heckmann <mail@haraldheckmann.de>
Co-authored-by: Cedric Decoster <darkfriend77@users.noreply.github.com>
Co-authored-by: tgmichel <telmo@purestake.com>
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.

4 participants