Skip to content

Commit

Permalink
Refactor and Docs
Browse files Browse the repository at this point in the history
- refactor to reinforce that implementation is a commodity (breaking change)
- docs updates and nitpicks
- bump codec
  • Loading branch information
danforbes committed Aug 14, 2020
1 parent 113e900 commit c6eb1ea
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 188 deletions.
17 changes: 9 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = '2018'
name = 'pallet-commodities'
version = '1.0.0-rc5'
version = '1.0.0-rc6'
authors = ['Dan Forbes <[email protected]>']
license = 'Unlicense'
description = 'A unique asset (NFT) interface and a Substrate FRAME implementation optimized for commodity assets.'
Expand All @@ -15,7 +15,7 @@ categories = ['cryptography::cryptocurrencies', 'data-structures', 'no-std']
default-features = false
features = ['derive']
package = 'parity-scale-codec'
version = '1.3.0'
version = '1.3.1'

[dependencies.frame-support]
default-features = false
Expand All @@ -28,27 +28,28 @@ default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc5'
version = '2.0.0-rc5'
[dev-dependencies.sp-core]

[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc5'
version = '2.0.0-rc5'

[dev-dependencies.sp-io]
default-features = false
[dependencies.sp-std]
git = 'https://github.com/paritytech/substrate.git'
default-features = false
tag = 'v2.0.0-rc5'
version = '2.0.0-rc5'

[dependencies.sp-runtime]
[dev-dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc5'
version = '2.0.0-rc5'

[dependencies.sp-std]
git = 'https://github.com/paritytech/substrate.git'
[dev-dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc5'
version = '2.0.0-rc5'

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public functions needed to manage a set of unique assets.
## Reference Implementation

The [reference implementation](src/lib.rs) defined in this project is referred to as a "commodity" - a unique asset that
is designed for frequent trading. In order to optimize for this use-case, _sorted_ lists of assets are stored per owner.
is designed for frequent trading. In order to optimize for this use case, _sorted_ lists of assets are stored per owner.
Although maintaining a sorted list is trivial with Rust vectors, which implement a binary search API that can be used
for sorted insertion, it introduces significant overhead when an asset is _created_ because the entire list must be
decoded from the backing trie in order to insert the new asset in the correct spot. Maintaining a sorted asset list is
Expand Down
Loading

0 comments on commit c6eb1ea

Please sign in to comment.