Skip to content

Commit 504fbbe

Browse files
authored
Merge pull request #20 from thrumdev/remame-pallet
Rename pallet name
2 parents 4a0684a + d3a0588 commit 504fbbe

File tree

9 files changed

+528
-495
lines changed

9 files changed

+528
-495
lines changed

sugondat-chain/Cargo.lock

Lines changed: 512 additions & 476 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sugondat-chain/pallets/template/Cargo.toml renamed to sugondat-chain/pallets/blobs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "pallet-sugondat-blob"
2+
name = "pallet-sugondat-blobs"
33
authors = ["Anonymous"]
44
description = "FRAME pallet for submitting blobs"
55
version = "0.1.0"
File renamed without changes.

sugondat-chain/pallets/template/src/benchmarking.rs renamed to sugondat-chain/pallets/blobs/src/benchmarking.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
//! Benchmarking setup for pallet-parachain-template
1+
//! Benchmarking setup for pallet-parachain-blobs
22
33
use super::*;
44

55
#[allow(unused)]
6-
use crate::Pallet as Template;
6+
use crate::Pallet as Blobs;
77
use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, whitelisted_caller};
88
use frame_system::RawOrigin;
99

@@ -17,4 +17,4 @@ benchmarks! {
1717
}
1818
}
1919

20-
impl_benchmark_test_suite!(Template, crate::mock::new_test_ext(), crate::mock::Test,);
20+
impl_benchmark_test_suite!(Blobs, crate::mock::new_test_ext(), crate::mock::Test,);

sugondat-chain/pallets/template/src/mock.rs renamed to sugondat-chain/pallets/blobs/src/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ frame_support::construct_runtime!(
1717
UncheckedExtrinsic = UncheckedExtrinsic,
1818
{
1919
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
20-
TemplateModule: crate::{Pallet, Call, Storage, Event<T>},
20+
Blobs: crate::{Pallet, Call, Storage, Event<T>},
2121
}
2222
);
2323

sugondat-chain/pallets/template/src/tests.rs renamed to sugondat-chain/pallets/blobs/src/tests.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,16 @@ use frame_support::{assert_noop, assert_ok};
55
fn it_works_for_default_value() {
66
new_test_ext().execute_with(|| {
77
// Dispatch a signed extrinsic.
8-
assert_ok!(TemplateModule::do_something(RuntimeOrigin::signed(1), 42));
8+
assert_ok!(Blobs::do_something(RuntimeOrigin::signed(1), 42));
99
// Read pallet storage and assert an expected result.
10-
assert_eq!(TemplateModule::something(), Some(42));
10+
assert_eq!(Blobs::something(), Some(42));
1111
});
1212
}
1313

1414
#[test]
1515
fn correct_error_for_none_value() {
1616
new_test_ext().execute_with(|| {
1717
// Ensure the expected error is thrown when no value is present.
18-
assert_noop!(
19-
TemplateModule::cause_error(RuntimeOrigin::signed(1)),
20-
Error::<Test>::NoneValue
21-
);
18+
assert_noop!(Blobs::cause_error(RuntimeOrigin::signed(1)), Error::<Test>::NoneValue);
2219
});
2320
}

sugondat-chain/runtime/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ scale-info = { version = "2.7.0", default-features = false, features = ["derive"
2222
smallvec = "1.10.0"
2323

2424
# Local
25-
pallet-sugondat-blob = { path = "../pallets/template", default-features = false }
25+
pallet-sugondat-blobs = { path = "../pallets/blobs", default-features = false }
2626

2727
# Substrate
2828
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, optional = true, branch = "release-polkadot-v1.2.0" }
@@ -101,7 +101,7 @@ std = [
101101
"pallet-collator-selection/std",
102102
"pallet-session/std",
103103
"pallet-sudo/std",
104-
"pallet-sugondat-blob/std",
104+
"pallet-sugondat-blobs/std",
105105
"pallet-timestamp/std",
106106
"pallet-transaction-payment-rpc-runtime-api/std",
107107
"pallet-transaction-payment/std",
@@ -134,7 +134,7 @@ runtime-benchmarks = [
134134
"frame-system/runtime-benchmarks",
135135
"pallet-balances/runtime-benchmarks",
136136
"pallet-collator-selection/runtime-benchmarks",
137-
"pallet-sugondat-blob/runtime-benchmarks",
137+
"pallet-sugondat-blobs/runtime-benchmarks",
138138
"pallet-timestamp/runtime-benchmarks",
139139
"pallet-xcm/runtime-benchmarks",
140140
"sp-runtime/runtime-benchmarks",
@@ -158,7 +158,7 @@ try-runtime = [
158158
"pallet-collator-selection/try-runtime",
159159
"pallet-session/try-runtime",
160160
"pallet-sudo/try-runtime",
161-
"pallet-sugondat-blob/try-runtime",
161+
"pallet-sugondat-blobs/try-runtime",
162162
"pallet-timestamp/try-runtime",
163163
"pallet-transaction-payment/try-runtime",
164164
"pallet-xcm/try-runtime",

sugondat-chain/runtime/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use frame_support::{
2929
construct_runtime,
3030
dispatch::DispatchClass,
3131
parameter_types,
32-
traits::{ConstU32, ConstU64, ConstU8, ConstBool, EitherOfDiverse, Everything},
32+
traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything},
3333
weights::{
3434
constants::WEIGHT_REF_TIME_PER_SECOND, ConstantMultiplier, Weight, WeightToFeeCoefficient,
3535
WeightToFeeCoefficients, WeightToFeePolynomial,
@@ -57,7 +57,7 @@ use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
5757
use staging_xcm::latest::prelude::BodyId;
5858
use staging_xcm_executor::XcmExecutor;
5959

60-
pub use pallet_sugondat_blob;
60+
pub use pallet_sugondat_blobs;
6161

6262
/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.
6363
pub type Signature = MultiSignature;
@@ -460,7 +460,7 @@ parameter_types! {
460460
pub const MaxTotalBlobSize: u32 = 2 * 1024 * 1024;
461461
}
462462

463-
impl pallet_sugondat_blob::Config for Runtime {
463+
impl pallet_sugondat_blobs::Config for Runtime {
464464
type RuntimeEvent = RuntimeEvent;
465465
type MaxBlobs = MaxBlobs;
466466
type MaxBlobSize = MaxBlobSize;
@@ -493,7 +493,7 @@ construct_runtime!(
493493
CumulusXcm: cumulus_pallet_xcm = 32,
494494
DmpQueue: cumulus_pallet_dmp_queue = 33,
495495

496-
Blob: pallet_sugondat_blob = 40,
496+
Blobs: pallet_sugondat_blobs = 40,
497497
}
498498
);
499499

0 commit comments

Comments
 (0)