This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 379
[Enhancement] Use XCM V3 for initiate_teleport weight calc #2102
Merged
paritytech-processbot
merged 9 commits into
master
from
ru/enhancement/iinitinit-teleport
Feb 9, 2023
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
16cd773
[Enhancement] Use XCM V3 for initiate_teleport weight calc
ruseinov 202b067
deref
ruseinov 3fe90ae
replicate in all the runtimes
ruseinov 1f884d1
fmt
ruseinov 9201905
better handling for AllOf
ruseinov 904db9e
Merge remote-tracking branch 'origin/master' into ru/enhancement/iini…
e59c552
fmt
ruseinov 0cf2bac
small type fix
ruseinov bdd401e
replicate the fix for all runtimes
ruseinov 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 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 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 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 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 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.
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'm actually still uncertain about this -- comments on AllOfCounted says that each individual instance of an NFT is considered a different class of asset, and so wouldn't it make more sense to use the number of NFT instances as an upper bound here?
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.
Hmm, good question. Let me check it out and come back to you.
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.
Yeah, I think this makes sense. I'm not sure though where the NFT instance count should be coming from in this case.
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.
So this requires you to actually look inside the holding register and determine just how many
AssetInstance
s there are... We could match againstfun
inAllOf
and see if it's aNonFungible
, and if so, it would basically beweight * MaxAssetsIntoHolding::get()
, otherwise it's justweight
.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.
Thanks!
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.
@KiChjang One thing that disturbs me a bit is the comment below, should we then do something like
weight * MaxAssetsIntoHolding::get() * 2
to be safe?