-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add recipient feature, prices and custom RPC to domains pallet (#226)
* Add recipient field to register domain (#220) * Add beneficiary field for registering domains - Introduce DomainDeposit structure - Change `domain_deposit` type in `DomainMeta` structure: `Balance` to `DomainDeposit` - Fix clippy warnings * Remove force_register_domain * Update transaction_version to 5 * Fix mocks and tests * Fix runtime * Add migration to domains pallet * Add recipient field to DomainRegistered event * Fix benchmarks * Add prices configs to domains pallet (#221) * Remove MaxPromoDomainsPerAccount * Update spec_version to 27 * Improve docs - Changed MinDomainLength to 4 (to allow domains purchase with less chars in it) --------- Co-authored-by: Alex Siman <[email protected]> * Add custom RPC to domains pallet (#223) * Add more tests to domains pallet (#224) --------- Co-authored-by: Alex Siman <[email protected]> * Fix migration, try-runtime and weights (#227) * Update weights * Bump crates version to 0.1.9 (#228) * Update Cargo.lock --------- Co-authored-by: Alex Siman <[email protected]>
- Loading branch information
Showing
51 changed files
with
879 additions
and
312 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = 'integration-tests' | ||
version = '0.1.8' | ||
version = '0.1.9' | ||
authors = ['DappForce <[email protected]>'] | ||
edition = '2021' | ||
license = 'GPL-3.0-only' | ||
|
This file contains 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "subsocial-collator" | ||
version = "0.1.8" | ||
version = "0.1.9" | ||
build = "build.rs" | ||
authors = ["DappForce <[email protected]>"] | ||
edition = "2021" | ||
|
@@ -21,6 +21,7 @@ jsonrpsee = { version = "0.16.2", features = ["server"] } | |
|
||
# Local | ||
subsocial-parachain-runtime = { path = "../runtime" } | ||
pallet-domains-rpc = { path = "../pallets/domains/rpc" } | ||
|
||
# Substrate | ||
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" } | ||
|
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = 'pallet-account-follows' | ||
version = '0.1.8' | ||
version = '0.1.9' | ||
authors = ['DappForce <[email protected]>'] | ||
edition = '2021' | ||
license = 'GPL-3.0-only' | ||
|
This file contains 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = 'profile-follows-rpc' | ||
version = '0.7.3' | ||
version = '0.1.9' | ||
authors = ['DappForce <[email protected]>'] | ||
edition = '2018' | ||
license = 'GPL-3.0-only' | ||
|
This file contains 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = 'profile-follows-runtime-api' | ||
version = '0.7.3' | ||
version = '0.1.9' | ||
authors = ['DappForce <[email protected]>'] | ||
edition = '2018' | ||
license = 'GPL-3.0-only' | ||
|
This file contains 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
[package] | ||
name = "pallet-domains" | ||
version = "0.1.8" | ||
version = "0.1.9" | ||
authors = ["DappForce <[email protected]>"] | ||
edition = "2018" | ||
edition = "2021" | ||
license = "GPL-3.0-only" | ||
homepage = "https://subsocial.network" | ||
repository = "https://github.com/dappforce/subsocial-parachain" | ||
|
This file contains 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[package] | ||
name = "pallet-domains-rpc" | ||
version = "0.1.9" | ||
authors = ["DappForce <[email protected]>"] | ||
edition = "2021" | ||
license = "GPL-3.0-only" | ||
homepage = "https://subsocial.network" | ||
repository = "https://github.com/dappforce/subsocial-parachain" | ||
description = "RPC interface for the domains pallet." | ||
keywords = ["blockchain", "cryptocurrency", "social-network", "news-feed", "marketplace"] | ||
categories = ["cryptography::cryptocurrencies"] | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
|
||
[dependencies] | ||
codec = { package = "parity-scale-codec", version = "3.0.0" } | ||
jsonrpsee = { version = "0.16.2", features = ["client-core", "server", "macros"] } | ||
pallet-domains-rpc-runtime-api = { path = "./runtime-api" } | ||
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" } | ||
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" } | ||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" } | ||
sp-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" } | ||
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" } |
This file contains 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[package] | ||
name = "pallet-domains-rpc-runtime-api" | ||
version = "0.1.9" | ||
authors = ["DappForce <[email protected]>"] | ||
edition = "2021" | ||
license = "GPL-3.0-only" | ||
homepage = "https://subsocial.network" | ||
repository = "https://github.com/dappforce/subsocial-parachain" | ||
description = "RPC runtime API for the domains pallet." | ||
keywords = ["blockchain", "cryptocurrency", "social-network", "news-feed", "marketplace"] | ||
categories = ["cryptography::cryptocurrencies"] | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
|
||
[dependencies] | ||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } | ||
sp-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.37', default-features = false } | ||
sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.37', default-features = false } | ||
sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.37', default-features = false } | ||
|
||
[features] | ||
default = ["std"] | ||
std = [ | ||
"codec/std", | ||
"sp-api/std", | ||
"sp-runtime/std", | ||
"sp-std/std", | ||
] |
This file contains 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//! Runtime API definition for domains pallet. | ||
|
||
#![cfg_attr(not(feature = "std"), no_std)] | ||
|
||
use codec::Codec; | ||
use sp_runtime::traits::MaybeDisplay; | ||
use sp_std::vec::Vec; | ||
|
||
sp_api::decl_runtime_apis! { | ||
pub trait DomainsApi<Balance> where | ||
Balance: Codec + MaybeDisplay, | ||
{ | ||
fn calculate_price(subdomain: Vec<u8>) -> Option<Balance>; | ||
} | ||
} |
Oops, something went wrong.