Skip to content

Commit

Permalink
chore: remove deprecated templates
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexD10S committed Dec 19, 2024
1 parent 9dc75af commit 2929ced
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
7 changes: 1 addition & 6 deletions crates/pop-parachains/src/new_parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,7 @@ pub fn instantiate_openzeppelin_template(
let source = temp_dir.path();

let tag = Git::clone_and_degit(template.repository_url()?, source, tag_version)?;
let mut template_name = template.template_name_without_provider();
// Handle deprecated OpenZeppelin template
if matches!(template, Parachain::DeprecatedOpenZeppelinGeneric) {
template_name = Parachain::OpenZeppelinGeneric.template_name_without_provider();
}

let template_name = template.template_name_without_provider();
extract_template_files(template_name, temp_dir.path(), target, None)?;
Ok(tag)
}
Expand Down
21 changes: 0 additions & 21 deletions crates/pop-parachains/src/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,23 +177,6 @@ pub enum Parachain {
)
)]
ParityFPT,
// OpenZeppelin
#[strum(
serialize = "polkadot-generic-runtime-template",
message = "Generic Runtime Template",
detailed_message = "A generic template for Substrate Runtime.",
props(
Provider = "OpenZeppelin",
Repository = "https://github.com/OpenZeppelin/polkadot-runtime-templates",
Network = "./zombienet-config/devnet.toml",
SupportedVersions = "v1.0.0,v2.0.1",
IsAudited = "true",
License = "GPL-3.0",
IsDeprecated = "true",
DeprecatedMessage = "This template is deprecated. Please use openzeppelin/generic-template in the future.",
)
)]
DeprecatedOpenZeppelinGeneric,
// templates for unit tests below
#[cfg(test)]
#[strum(
Expand Down Expand Up @@ -273,7 +256,6 @@ mod tests {
// openzeppelin
("openzeppelin/generic-template".to_string(), OpenZeppelinGeneric),
("openzeppelin/evm-template".to_string(), OpenZeppelinEVM),
("polkadot-generic-runtime-template".to_string(), DeprecatedOpenZeppelinGeneric),
("cpt".to_string(), ParityContracts),
("fpt".to_string(), ParityFPT),
("test_01".to_string(), TestTemplate01),
Expand All @@ -289,7 +271,6 @@ mod tests {
(EVM, "evm".to_string()),
(OpenZeppelinGeneric, "generic-template".to_string()),
(OpenZeppelinEVM, "evm-template".to_string()),
(DeprecatedOpenZeppelinGeneric, "polkadot-generic-runtime-template".to_string()),
(ParityContracts, "cpt".to_string()),
(ParityFPT, "fpt".to_string()),
(TestTemplate01, "test_01".to_string()),
Expand Down Expand Up @@ -331,7 +312,6 @@ mod tests {
(EVM, Some("./network.toml")),
(OpenZeppelinGeneric, Some("./zombienet-config/devnet.toml")),
(OpenZeppelinEVM, Some("./zombienet-config/devnet.toml")),
(DeprecatedOpenZeppelinGeneric, Some("./zombienet-config/devnet.toml")),
(ParityContracts, Some("./zombienet.toml")),
(ParityFPT, Some("./zombienet-config.toml")),
(TestTemplate01, Some("")),
Expand All @@ -348,7 +328,6 @@ mod tests {
(EVM, Some("Unlicense")),
(OpenZeppelinGeneric, Some("GPL-3.0")),
(OpenZeppelinEVM, Some("GPL-3.0")),
(DeprecatedOpenZeppelinGeneric, Some("GPL-3.0")),
(ParityContracts, Some("Unlicense")),
(ParityFPT, Some("Unlicense")),
(TestTemplate01, Some("Unlicense")),
Expand Down

0 comments on commit 2929ced

Please sign in to comment.