Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "deer-cli"
version = "0.3.0"
version = "0.4.0"
authors = ["Deer Network"]
description = "Official Rust implementation of the Deer protocol"
build = "build.rs"
Expand Down
2 changes: 1 addition & 1 deletion node/runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "deer-runtime"
version = "0.3.0"
version = "0.4.0"
edition = "2018"
build = "build.rs"
license = "Apache 2.0"
Expand Down
2 changes: 1 addition & 1 deletion pallets/nft-auction/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-nft-auction"
version = "0.3.0"
version = "0.4.0"
edition = "2018"
license = "Apache 2.0"

Expand Down
8 changes: 4 additions & 4 deletions pallets/nft-auction/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ fn create_nft<T: Config<I>, I: 'static>(
let permission = ClassPermission(
Permission::Burnable | Permission::Transferable | Permission::DelegateMintable,
);
let class_id = NextClassId::<T, I>::get();
assert_ok!(NFT::<T, I>::create_class(
SystemOrigin::Signed(owner.clone()).into(),
vec![0, 0, 0],
rate(10),
permission,
));
let class_id = NextClassId::<T, I>::get().saturating_sub(One::one());
let to: <T::Lookup as StaticLookup>::Source = T::Lookup::unlookup(owner.clone());
let token_id = NextTokenId::<T, I>::get(&class_id);
assert_ok!(NFT::<T, I>::mint(
SystemOrigin::Signed(owner.clone()).into(),
to,
Expand All @@ -45,7 +46,6 @@ fn create_nft<T: Config<I>, I: 'static>(
None,
None
));
let token_id = NextTokenId::<T, I>::get(&class_id).saturating_sub(One::one());
(class_id, token_id, quantity)
}

Expand Down Expand Up @@ -136,7 +136,7 @@ benchmarks_instance_pallet! {
System::<T>::set_block_number(T::MinDeadline::get().saturating_add(1u32.into()));

let caller = owner.clone();
}: _(SystemOrigin::Signed(caller.clone()), auction_owner, auction_id)
}: _(SystemOrigin::Signed(caller.clone()), auction_id)
verify {
assert_last_event::<T, I>(Event::<T, I>::CanceledDutchAuction(caller, auction_id).into());
}
Expand Down Expand Up @@ -216,7 +216,7 @@ benchmarks_instance_pallet! {
System::<T>::set_block_number(T::MinDeadline::get().saturating_add(1u32.into()));

let caller = owner.clone();
}: _(SystemOrigin::Signed(caller.clone()), auction_owner, auction_id)
}: _(SystemOrigin::Signed(caller.clone()), auction_id)
verify {
assert_last_event::<T, I>(Event::<T, I>::CanceledEnglishAuction(caller, auction_id).into());
}
Expand Down
126 changes: 61 additions & 65 deletions pallets/nft-auction/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! Autogenerated weights for pallet_nft_auction
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2021-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2021-12-13, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128

// Executed Command:
Expand Down Expand Up @@ -61,148 +61,144 @@ pub trait WeightInfo {
/// Weights for pallet_nft_auction using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: NFT Asset (r:1 w:1)
// Storage: NFTAuction CurrentAuctionId (r:1 w:1)
// Storage: NFT TokensByOwner (r:1 w:1)
// Storage: NFT Classes (r:1 w:0)
// Storage: NFTAuction NextAuctionId (r:1 w:1)
// Storage: NFTAuction DutchAuctions (r:0 w:1)
// Storage: NFTAuction Auctions (r:0 w:1)
fn create_dutch() -> Weight {
(60_632_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
(58_507_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
// Storage: NFTAuction DutchAuctions (r:1 w:0)
// Storage: NFTAuction DutchAuctionBids (r:1 w:1)
fn bid_dutch() -> Weight {
(53_844_000 as Weight)
(50_954_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: NFTAuction DutchAuctions (r:1 w:1)
// Storage: NFTAuction DutchAuctionBids (r:1 w:1)
// Storage: NFT Asset (r:1 w:1)
// Storage: NFT Account (r:0 w:2)
// Storage: NFTAuction Auctions (r:0 w:1)
// Storage: NFT Tokens (r:1 w:0)
// Storage: NFT TokensByOwner (r:2 w:2)
// Storage: NFT OwnersByToken (r:0 w:2)
fn redeem_dutch() -> Weight {
(206_110_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
(160_902_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
// Storage: NFTAuction DutchAuctions (r:1 w:1)
// Storage: NFTAuction DutchAuctionBids (r:1 w:1)
// Storage: NFT Asset (r:1 w:1)
// Storage: NFTAuction Auctions (r:0 w:1)
// Storage: NFT TokensByOwner (r:1 w:1)
fn cancel_dutch() -> Weight {
(63_424_000 as Weight)
(56_988_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
// Storage: NFT Asset (r:1 w:1)
// Storage: NFTAuction CurrentAuctionId (r:1 w:1)
// Storage: NFT TokensByOwner (r:1 w:1)
// Storage: NFT Classes (r:1 w:0)
// Storage: NFTAuction NextAuctionId (r:1 w:1)
// Storage: NFTAuction EnglishAuctions (r:0 w:1)
// Storage: NFTAuction Auctions (r:0 w:1)
fn create_english() -> Weight {
(60_430_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
(59_102_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
// Storage: NFTAuction EnglishAuctions (r:1 w:0)
// Storage: NFTAuction EnglishAuctionBids (r:1 w:1)
fn bid_english() -> Weight {
(53_847_000 as Weight)
(50_527_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: NFTAuction EnglishAuctions (r:1 w:1)
// Storage: NFTAuction EnglishAuctionBids (r:1 w:1)
// Storage: NFT Asset (r:1 w:1)
// Storage: NFT Account (r:0 w:2)
// Storage: NFTAuction Auctions (r:0 w:1)
// Storage: NFT Tokens (r:1 w:0)
// Storage: NFT TokensByOwner (r:2 w:2)
// Storage: NFT OwnersByToken (r:0 w:2)
fn redeem_english() -> Weight {
(206_315_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
(160_026_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
// Storage: NFTAuction EnglishAuctions (r:1 w:1)
// Storage: NFTAuction EnglishAuctionBids (r:1 w:1)
// Storage: NFT Asset (r:1 w:1)
// Storage: NFTAuction Auctions (r:0 w:1)
// Storage: NFT TokensByOwner (r:1 w:1)
fn cancel_english() -> Weight {
(63_073_000 as Weight)
(56_881_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
}

// For backwards compatibility and tests
impl WeightInfo for () {
// Storage: NFT Asset (r:1 w:1)
// Storage: NFTAuction CurrentAuctionId (r:1 w:1)
// Storage: NFT TokensByOwner (r:1 w:1)
// Storage: NFT Classes (r:1 w:0)
// Storage: NFTAuction NextAuctionId (r:1 w:1)
// Storage: NFTAuction DutchAuctions (r:0 w:1)
// Storage: NFTAuction Auctions (r:0 w:1)
fn create_dutch() -> Weight {
(60_632_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
(58_507_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: NFTAuction DutchAuctions (r:1 w:0)
// Storage: NFTAuction DutchAuctionBids (r:1 w:1)
fn bid_dutch() -> Weight {
(53_844_000 as Weight)
(50_954_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: NFTAuction DutchAuctions (r:1 w:1)
// Storage: NFTAuction DutchAuctionBids (r:1 w:1)
// Storage: NFT Asset (r:1 w:1)
// Storage: NFT Account (r:0 w:2)
// Storage: NFTAuction Auctions (r:0 w:1)
// Storage: NFT Tokens (r:1 w:0)
// Storage: NFT TokensByOwner (r:2 w:2)
// Storage: NFT OwnersByToken (r:0 w:2)
fn redeem_dutch() -> Weight {
(206_110_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
(160_902_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
}
// Storage: NFTAuction DutchAuctions (r:1 w:1)
// Storage: NFTAuction DutchAuctionBids (r:1 w:1)
// Storage: NFT Asset (r:1 w:1)
// Storage: NFTAuction Auctions (r:0 w:1)
// Storage: NFT TokensByOwner (r:1 w:1)
fn cancel_dutch() -> Weight {
(63_424_000 as Weight)
(56_988_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: NFT Asset (r:1 w:1)
// Storage: NFTAuction CurrentAuctionId (r:1 w:1)
// Storage: NFT TokensByOwner (r:1 w:1)
// Storage: NFT Classes (r:1 w:0)
// Storage: NFTAuction NextAuctionId (r:1 w:1)
// Storage: NFTAuction EnglishAuctions (r:0 w:1)
// Storage: NFTAuction Auctions (r:0 w:1)
fn create_english() -> Weight {
(60_430_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
(59_102_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: NFTAuction EnglishAuctions (r:1 w:0)
// Storage: NFTAuction EnglishAuctionBids (r:1 w:1)
fn bid_english() -> Weight {
(53_847_000 as Weight)
(50_527_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: NFTAuction EnglishAuctions (r:1 w:1)
// Storage: NFTAuction EnglishAuctionBids (r:1 w:1)
// Storage: NFT Asset (r:1 w:1)
// Storage: NFT Account (r:0 w:2)
// Storage: NFTAuction Auctions (r:0 w:1)
// Storage: NFT Tokens (r:1 w:0)
// Storage: NFT TokensByOwner (r:2 w:2)
// Storage: NFT OwnersByToken (r:0 w:2)
fn redeem_english() -> Weight {
(206_315_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
(160_026_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
}
// Storage: NFTAuction EnglishAuctions (r:1 w:1)
// Storage: NFTAuction EnglishAuctionBids (r:1 w:1)
// Storage: NFT Asset (r:1 w:1)
// Storage: NFTAuction Auctions (r:0 w:1)
// Storage: NFT TokensByOwner (r:1 w:1)
fn cancel_english() -> Weight {
(63_073_000 as Weight)
(56_881_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
}
2 changes: 1 addition & 1 deletion pallets/nft-order/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-nft-order"
version = "0.3.0"
version = "0.4.0"
edition = "2018"
license = "Apache 2.0"

Expand Down
Loading