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 2.7k
Features needed for reserve-backed stablecoins #7152
Merged
Merged
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
944c129
Features needed for reserve-backed stablecoins
gavofyork 911795a
Builds & tests.
gavofyork ddf83eb
Double map for an efficient destroy.
gavofyork 9c79b6d
Update frame/assets/src/lib.rs
gavofyork b8ef2fb
ED/zombie-count/refs
gavofyork 1888155
Merge remote-tracking branch 'origin/gav-assets-extra' into gav-asset…
gavofyork 8bae97f
Merge remote-tracking branch 'origin/master' into gav-assets-extra
gavofyork 4df1054
Update frame/assets/src/lib.rs
gavofyork aef1d0c
Update frame/assets/Cargo.toml
gavofyork e302a0e
Merge remote-tracking branch 'origin/master' into gav-assets-extra
gavofyork b173c37
Docs
gavofyork 6263beb
Merge remote-tracking branch 'origin/master' into gav-assets-extra
gavofyork fd75591
Some tests
gavofyork 3d03358
More tests
gavofyork 8aa7cc5
Allow for max_zombies to be adjusted
gavofyork 347f2db
Test for set_max_zombies
gavofyork 2d5f752
Tests and a couple of fixes
gavofyork 760ba44
First few benchmarks
gavofyork b630906
Benchmarks.
gavofyork 39a54ea
Merge remote-tracking branch 'origin/master' into gav-assets-extra
4d173bc
Merge branch 'gav-assets-extra' of github.com:paritytech/substrate in…
gavofyork 4664812
Fix error message in test
gavofyork 8954764
Fixes
gavofyork 87f311e
Fixes
gavofyork d12fe90
Fixes
gavofyork e29b3fa
cargo run --release --features runtime-benchmarks --manifest-path bin…
85443d2
Update frame/assets/src/lib.rs
gavofyork b53c1ba
Fixes
gavofyork 6de272f
Merge branch 'gav-assets-extra' of github.com:paritytech/substrate in…
gavofyork 27353a7
Fixes
gavofyork bbdce2e
Merge remote-tracking branch 'origin/master' into gav-assets-extra
0b5fa74
Fixes
gavofyork 89cbf7e
Merge branch 'gav-assets-extra' of gthub.com:paritytech/substrate int…
gavofyork 1eff995
cargo run --release --features runtime-benchmarks --manifest-path bin…
1fe69b1
Fixes
gavofyork 76f2e40
Merge branch 'gav-assets-extra' of github.com:paritytech/substrate in…
gavofyork a452393
Update default weight
shawntabrizi 402835d
Merge branch 'master' into gav-assets-extra
shawntabrizi 373f4d7
Add proper verification to benchmarks
shawntabrizi d8b840a
minor improvements to tests
shawntabrizi 13a0cc0
Merge branch 'gav-assets-extra' of github.com:paritytech/substrate in…
gavofyork e65a75c
Merge remote-tracking branch 'origin/master' into gav-assets-extra
gavofyork dc0839d
Update frame/assets/src/benchmarking.rs
gavofyork d0f1829
Fix
gavofyork 45f3c04
Merge branch 'gav-assets-extra' of github.com:paritytech/substrate in…
gavofyork 0286497
Merge remote-tracking branch 'origin/master' into gav-assets-extra
gavofyork 927bcc6
New weights system
gavofyork a1c43f9
fix compile
shawntabrizi 82bbd66
cargo run --release --features=runtime-benchmarks --manifest-path=bin…
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
New weights system
- Loading branch information
commit 927bcc6d44f86c4758750661cdb75b49d974d8fc
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 |
|---|---|---|
|
|
@@ -897,15 +897,15 @@ parameter_types! { | |
| pub const AssetDepositPerZombie: Balance = 1 * DOLLARS; | ||
| } | ||
|
|
||
| impl pallet_assets::Trait for Runtime { | ||
| impl pallet_assets::Config for Runtime { | ||
| type Event = Event; | ||
| type Balance = u64; | ||
| type AssetId = u32; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nitpick: this should probably be a publicly defined type
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One extra line for near zero gain. Sounds less like a nit-pick and more like a bikeshed.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤷 |
||
| type Currency = Balances; | ||
| type ForceOrigin = EnsureRoot<AccountId>; | ||
| type AssetDepositBase = AssetDepositBase; | ||
| type AssetDepositPerZombie = AssetDepositPerZombie; | ||
| type WeightInfo = weights::pallet_assets::WeightInfo<Runtime>; | ||
| type WeightInfo = pallet_assets::weights::SubstrateWeight<Runtime>; | ||
| } | ||
|
|
||
| construct_runtime!( | ||
|
|
||
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.
This is incompatible with the standard
type Balance = u128defined in the standard Substrate node and node-template. This should use theBalancetype to be compatible.Uh oh!
There was an error while loading. Please reload this page.
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.
u128is not a "standard" and there is no reason to think that fungible asset pallet balances should necessarily be the same type as a balance elsewhere in the chain.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.
mmh, I guess I would expect a runtime to follow the convention of only having one type named
Balanceto avoid confusion. I see your point that they can be different in principle, though.maybe standard was the wrong word, I meant standard as in "default" or "configured" or "example"
Uh oh!
There was an error while loading. Please reload this page.
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.
@JesseAbram and I tried setting a Substrate chain up with
u64as the assetsBalancetype, but polkadot-js assumes thatT::BalanceequalsBalance(the globally defined type), so in practice we are not able to interact with the chain. (This is a similar issue to the other issue you already addressed.)We'll get in touch with Jaco about improving polkadot-js on this, but until then we need to configure it to be the same concrete type or change the name.
Edit: never mind, we found the
typesAliasstuff.