From 150172a5d96b67e674514a467e51ffa1bf861297 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Andres <11448715+al3mart@users.noreply.github.com> Date: Wed, 10 Apr 2024 17:59:25 +0200 Subject: [PATCH 1/5] feat: pallet multisig (#69) * feat: pallet-multisig * feat: update pallet index --- Cargo.lock | 2 ++ Cargo.toml | 1 + runtime/devnet/Cargo.toml | 4 ++++ runtime/devnet/src/lib.rs | 21 +++++++++++++++++++++ runtime/testnet/Cargo.toml | 4 ++++ runtime/testnet/src/lib.rs | 21 +++++++++++++++++++++ 6 files changed, 53 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index ee2a2c84..dcd5dd66 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9710,6 +9710,7 @@ dependencies = [ "pallet-collator-selection", "pallet-contracts", "pallet-message-queue", + "pallet-multisig", "pallet-nft-fractionalization", "pallet-nfts", "pallet-nfts-runtime-api", @@ -9780,6 +9781,7 @@ dependencies = [ "pallet-collator-selection", "pallet-contracts", "pallet-message-queue", + "pallet-multisig", "pallet-nft-fractionalization", "pallet-nfts", "pallet-nfts-runtime-api", diff --git a/Cargo.toml b/Cargo.toml index be88c075..d0604d7f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,6 +87,7 @@ pallet-assets = { version = "30.0.0", default-features = false } pallet-balances = { version = "29.0.0", default-features = false } pallet-contracts = { version = "28.0.0", default-features = false } pallet-message-queue = { version = "32.0.0", default-features = false } +pallet-multisig = { version = "29.0.0", default-features = false } pallet-nft-fractionalization = { version = "11.0.0", default-features = false } pallet-nfts = { version = "23.0.0", default-features = false } pallet-nfts-runtime-api = { version = "15.0.0", default-features = false } diff --git a/runtime/devnet/Cargo.toml b/runtime/devnet/Cargo.toml index f3e05fee..1f0a82d6 100644 --- a/runtime/devnet/Cargo.toml +++ b/runtime/devnet/Cargo.toml @@ -39,6 +39,7 @@ pallet-assets.workspace = true pallet-balances.workspace = true pallet-contracts.workspace = true pallet-message-queue.workspace = true +pallet-multisig.workspace = true pallet-nft-fractionalization.workspace = true pallet-nfts.workspace = true pallet-nfts-runtime-api.workspace = true @@ -116,6 +117,7 @@ std = [ "pallet-collator-selection/std", "pallet-contracts/std", "pallet-message-queue/std", + "pallet-multisig/std", "pallet-nft-fractionalization/std", "pallet-nfts/std", "pallet-nfts-runtime-api/std", @@ -166,6 +168,7 @@ runtime-benchmarks = [ "pallet-collator-selection/runtime-benchmarks", "pallet-contracts/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", "pallet-nft-fractionalization/runtime-benchmarks", "pallet-nfts/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", @@ -197,6 +200,7 @@ try-runtime = [ "pallet-collator-selection/try-runtime", "pallet-contracts/try-runtime", "pallet-message-queue/try-runtime", + "pallet-multisig/try-runtime", "pallet-nft-fractionalization/try-runtime", "pallet-nfts/try-runtime", "pallet-scheduler/try-runtime", diff --git a/runtime/devnet/src/lib.rs b/runtime/devnet/src/lib.rs index d1b780cf..5d5ca108 100644 --- a/runtime/devnet/src/lib.rs +++ b/runtime/devnet/src/lib.rs @@ -559,6 +559,24 @@ impl pallet_preimage::Config for Runtime { >; } +parameter_types! { + // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. + pub const DepositBase: Balance = deposit(1, 88); + // Additional storage item size of 32 bytes. + pub const DepositFactor: Balance = deposit(0, 32); + pub const MaxSignatories: u32 = 100; +} + +impl pallet_multisig::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type DepositBase = DepositBase; + type DepositFactor = DepositFactor; + type MaxSignatories = MaxSignatories; + type WeightInfo = pallet_multisig::weights::SubstrateWeight; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime { @@ -597,6 +615,9 @@ construct_runtime!( // Contracts Contracts: pallet_contracts = 40, + // Multisig + Multisig: pallet_multisig = 42, + // Assets Nfts: pallet_nfts = 50, NftFractionalization: pallet_nft_fractionalization = 51, diff --git a/runtime/testnet/Cargo.toml b/runtime/testnet/Cargo.toml index 30b68ed4..10a9f2e3 100644 --- a/runtime/testnet/Cargo.toml +++ b/runtime/testnet/Cargo.toml @@ -39,6 +39,7 @@ pallet-assets.workspace = true pallet-balances.workspace = true pallet-contracts.workspace = true pallet-message-queue.workspace = true +pallet-multisig.workspace = true pallet-nft-fractionalization.workspace = true pallet-nfts.workspace = true pallet-nfts-runtime-api.workspace = true @@ -116,6 +117,7 @@ std = [ "pallet-collator-selection/std", "pallet-contracts/std", "pallet-message-queue/std", + "pallet-multisig/std", "pallet-nft-fractionalization/std", "pallet-nfts/std", "pallet-nfts-runtime-api/std", @@ -166,6 +168,7 @@ runtime-benchmarks = [ "pallet-collator-selection/runtime-benchmarks", "pallet-contracts/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", "pallet-nft-fractionalization/runtime-benchmarks", "pallet-nfts/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", @@ -197,6 +200,7 @@ try-runtime = [ "pallet-collator-selection/try-runtime", "pallet-contracts/try-runtime", "pallet-message-queue/try-runtime", + "pallet-multisig/try-runtime", "pallet-nft-fractionalization/try-runtime", "pallet-nfts/try-runtime", "pallet-scheduler/try-runtime", diff --git a/runtime/testnet/src/lib.rs b/runtime/testnet/src/lib.rs index d1b780cf..5d5ca108 100644 --- a/runtime/testnet/src/lib.rs +++ b/runtime/testnet/src/lib.rs @@ -559,6 +559,24 @@ impl pallet_preimage::Config for Runtime { >; } +parameter_types! { + // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. + pub const DepositBase: Balance = deposit(1, 88); + // Additional storage item size of 32 bytes. + pub const DepositFactor: Balance = deposit(0, 32); + pub const MaxSignatories: u32 = 100; +} + +impl pallet_multisig::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type DepositBase = DepositBase; + type DepositFactor = DepositFactor; + type MaxSignatories = MaxSignatories; + type WeightInfo = pallet_multisig::weights::SubstrateWeight; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime { @@ -597,6 +615,9 @@ construct_runtime!( // Contracts Contracts: pallet_contracts = 40, + // Multisig + Multisig: pallet_multisig = 42, + // Assets Nfts: pallet_nfts = 50, NftFractionalization: pallet_nft_fractionalization = 51, From 09c78bbfba7e3c8111afb3161c10df9b11defe2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:12:17 -0600 Subject: [PATCH 2/5] build(deps): bump h2 from 0.3.25 to 0.3.26 (#66) Bumps [h2](https://github.com/hyperium/h2) from 0.3.25 to 0.3.26. - [Release notes](https://github.com/hyperium/h2/releases) - [Changelog](https://github.com/hyperium/h2/blob/v0.3.26/CHANGELOG.md) - [Commits](https://github.com/hyperium/h2/compare/v0.3.25...v0.3.26) --- updated-dependencies: - dependency-name: h2 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dcd5dd66..1f8a9bee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4202,9 +4202,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -4448,7 +4448,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite 0.2.13", - "socket2 0.5.6", + "socket2 0.4.10", "tokio", "tower-service", "tracing", From bb68d8fb62ecf31a242bd354e3aca616c4a86529 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Andres <11448715+al3mart@users.noreply.github.com> Date: Wed, 10 Apr 2024 21:16:37 +0200 Subject: [PATCH 3/5] feat: pallet-utility (#68) --- Cargo.lock | 2 ++ Cargo.toml | 1 + runtime/devnet/Cargo.toml | 4 ++++ runtime/devnet/src/lib.rs | 9 +++++++++ runtime/testnet/Cargo.toml | 4 ++++ runtime/testnet/src/lib.rs | 9 +++++++++ 6 files changed, 29 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 1f8a9bee..de039f40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9721,6 +9721,7 @@ dependencies = [ "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", "pallet-xcm", "parachains-common", "parity-scale-codec", @@ -9792,6 +9793,7 @@ dependencies = [ "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", "pallet-xcm", "parachains-common", "parity-scale-codec", diff --git a/Cargo.toml b/Cargo.toml index d0604d7f..de929205 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,6 +99,7 @@ pallet-timestamp = { version = "28.0.0", default-features = false } pallet-transaction-payment = { version = "29.0.0", default-features = false } pallet-transaction-payment-rpc = "31.0.0" pallet-transaction-payment-rpc-runtime-api = { version = "29.0.0", default-features = false } +pallet-utility = { version = "29.0.0", default-features = false } sp-api = { version = "27.0.0", default-features = false } sp-authority-discovery = { version = "27.0.0", default-features = false } sp-block-builder = { version = "27.0.0", default-features = false } diff --git a/runtime/devnet/Cargo.toml b/runtime/devnet/Cargo.toml index 1f0a82d6..7976b1d0 100644 --- a/runtime/devnet/Cargo.toml +++ b/runtime/devnet/Cargo.toml @@ -50,6 +50,7 @@ pallet-preimage.workspace = true pallet-timestamp.workspace = true pallet-transaction-payment.workspace = true pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-utility.workspace = true sp-api.workspace = true sp-io.workspace = true sp-block-builder.workspace = true @@ -128,6 +129,7 @@ std = [ "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", + "pallet-utility/std", "pallet-xcm/std", "parachain-info/std", "parachains-common/std", @@ -175,6 +177,7 @@ runtime-benchmarks = [ "pallet-sudo/runtime-benchmarks", "pallet-preimage/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "parachains-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", @@ -209,6 +212,7 @@ try-runtime = [ "pallet-preimage/try-runtime", "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", + "pallet-utility/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", diff --git a/runtime/devnet/src/lib.rs b/runtime/devnet/src/lib.rs index 5d5ca108..ec21432c 100644 --- a/runtime/devnet/src/lib.rs +++ b/runtime/devnet/src/lib.rs @@ -577,6 +577,13 @@ impl pallet_multisig::Config for Runtime { type WeightInfo = pallet_multisig::weights::SubstrateWeight; } +impl pallet_utility::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type PalletsOrigin = OriginCaller; + type WeightInfo = pallet_utility::weights::SubstrateWeight; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime { @@ -617,6 +624,8 @@ construct_runtime!( // Multisig Multisig: pallet_multisig = 42, + // Utility + Utility: pallet_utility = 43, // Assets Nfts: pallet_nfts = 50, diff --git a/runtime/testnet/Cargo.toml b/runtime/testnet/Cargo.toml index 10a9f2e3..b215e67e 100644 --- a/runtime/testnet/Cargo.toml +++ b/runtime/testnet/Cargo.toml @@ -50,6 +50,7 @@ pallet-preimage.workspace = true pallet-timestamp.workspace = true pallet-transaction-payment.workspace = true pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-utility.workspace = true sp-api.workspace = true sp-io.workspace = true sp-block-builder.workspace = true @@ -128,6 +129,7 @@ std = [ "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", + "pallet-utility/std", "pallet-xcm/std", "parachain-info/std", "parachains-common/std", @@ -175,6 +177,7 @@ runtime-benchmarks = [ "pallet-sudo/runtime-benchmarks", "pallet-preimage/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "parachains-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", @@ -209,6 +212,7 @@ try-runtime = [ "pallet-preimage/try-runtime", "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", + "pallet-utility/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", diff --git a/runtime/testnet/src/lib.rs b/runtime/testnet/src/lib.rs index 5d5ca108..ec21432c 100644 --- a/runtime/testnet/src/lib.rs +++ b/runtime/testnet/src/lib.rs @@ -577,6 +577,13 @@ impl pallet_multisig::Config for Runtime { type WeightInfo = pallet_multisig::weights::SubstrateWeight; } +impl pallet_utility::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type PalletsOrigin = OriginCaller; + type WeightInfo = pallet_utility::weights::SubstrateWeight; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime { @@ -617,6 +624,8 @@ construct_runtime!( // Multisig Multisig: pallet_multisig = 42, + // Utility + Utility: pallet_utility = 43, // Assets Nfts: pallet_nfts = 50, From c0baf5e5cf250e265428d90874d50eb5b86f73fc Mon Sep 17 00:00:00 2001 From: Frank Bell <60948618+evilrobot-01@users.noreply.github.com> Date: Wed, 10 Apr 2024 21:26:19 +0100 Subject: [PATCH 4/5] chore: add codeowners (#72) --- .github/CODEOWNERS | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..625705f0 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,4 @@ +@al3mart +@Daanvdplas +@evilrobot-01 +@peterwht \ No newline at end of file From a3df47ff1c3082287402f6287f0ab1d9f1833436 Mon Sep 17 00:00:00 2001 From: Frank Bell <60948618+evilrobot-01@users.noreply.github.com> Date: Thu, 11 Apr 2024 13:45:12 +0100 Subject: [PATCH 5/5] ci: add pr check for conventional commit spec compliance (#73) --- .github/workflows/lint-pr.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/lint-pr.yml diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml new file mode 100644 index 00000000..047030c2 --- /dev/null +++ b/.github/workflows/lint-pr.yml @@ -0,0 +1,20 @@ +name: "Lint PR" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +permissions: + pull-requests: read + +jobs: + lint: + name: Validate PR title for conventional commit compliance + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file