const BOOT_CODE_POX_BODY: &str = std::include_str!("pox.clar");
const BOOT_CODE_POX_TESTNET_CONSTS: &str = std::include_str!("pox-testnet.clar");
const BOOT_CODE_POX_MAINNET_CONSTS: &str = std::include_str!("pox-mainnet.clar");
const BOOT_CODE_LOCKUP: &str = std::include_str!("lockup.clar");
pub const BOOT_CODE_COSTS: &str = std::include_str!("costs.clar");
pub const BOOT_CODE_COSTS_2: &str = std::include_str!("costs-2.clar");
pub const BOOT_CODE_COSTS_3: &str = std::include_str!("costs-3.clar");
pub const BOOT_CODE_COSTS_2_TESTNET: &str = std::include_str!("costs-2-testnet.clar");
pub const BOOT_CODE_COSTS_3_TESTNET: &str = std::include_str!("costs-3.clar");
const BOOT_CODE_COST_VOTING_MAINNET: &str = std::include_str!("cost-voting.clar");
const BOOT_CODE_BNS: &str = std::include_str!("bns.clar");
const BOOT_CODE_GENESIS: &str = std::include_str!("genesis.clar");
pub const POX_1_NAME: &str = "pox";
pub const POX_2_NAME: &str = "pox-2";
pub const POX_3_NAME: &str = "pox-3";
const POX_2_TESTNET_CONSTS: &str = std::include_str!("pox-testnet.clar");
const POX_2_MAINNET_CONSTS: &str = std::include_str!("pox-mainnet.clar");
const POX_2_BODY: &str = std::include_str!("pox-2.clar");
const POX_3_BODY: &str = std::include_str!("pox-3.clar");
pub const COSTS_1_NAME: &str = "costs";
pub const COSTS_2_NAME: &str = "costs-2";
lazy_static! {
pub static ref BOOT_CODE_POX_MAINNET: String =
format!("{}\n{}", BOOT_CODE_POX_MAINNET_CONSTS, BOOT_CODE_POX_BODY);
pub static ref BOOT_CODE_POX_TESTNET: String =
format!("{}\n{}", BOOT_CODE_POX_TESTNET_CONSTS, BOOT_CODE_POX_BODY);
pub static ref POX_2_MAINNET_CODE: String =
format!("{}\n{}", BOOT_CODE_POX_MAINNET_CONSTS, POX_2_BODY);
pub static ref POX_2_TESTNET_CODE: String =
format!("{}\n{}", BOOT_CODE_POX_TESTNET_CONSTS, POX_2_BODY);
pub static ref POX_3_MAINNET_CODE: String =
format!("{}\n{}", BOOT_CODE_POX_MAINNET_CONSTS, POX_3_BODY);
pub static ref POX_3_TESTNET_CODE: String =
format!("{}\n{}", BOOT_CODE_POX_TESTNET_CONSTS, POX_3_BODY);
pub static ref BOOT_CODE_COST_VOTING_TESTNET: String = make_testnet_cost_voting();
pub static ref STACKS_BOOT_CODE_MAINNET: [(&'static str, &'static str); 11] = [
("pox", &BOOT_CODE_POX_MAINNET),
("lockup", BOOT_CODE_LOCKUP),
("costs", BOOT_CODE_COSTS),
("cost-voting", BOOT_CODE_COST_VOTING_MAINNET),
("bns", &BOOT_CODE_BNS),
("genesis", &BOOT_CODE_GENESIS),
("costs-2", &BOOT_CODE_COSTS_2),
("costs-v2", &BOOT_CODE_COSTS_2), ("pox-2", &POX_2_MAINNET_CODE),
("costs-3", &BOOT_CODE_COSTS_3),
("pox-3", &POX_3_MAINNET_CODE),
];
pub static ref STACKS_BOOT_CODE_TESTNET: [(&'static str, &'static str); 11] = [
("pox", &BOOT_CODE_POX_TESTNET),
("lockup", BOOT_CODE_LOCKUP),
("costs", BOOT_CODE_COSTS),
("cost-voting", &BOOT_CODE_COST_VOTING_TESTNET),
("bns", &BOOT_CODE_BNS),
("genesis", &BOOT_CODE_GENESIS),
("costs-2", &BOOT_CODE_COSTS_2_TESTNET),
("costs-v2", &BOOT_CODE_COSTS_2_TESTNET), ("pox-2", &POX_2_TESTNET_CODE),
("costs-3", &BOOT_CODE_COSTS_3_TESTNET),
("pox-3", &POX_3_TESTNET_CODE),
];
}
fn make_testnet_cost_voting() -> String {
BOOT_CODE_COST_VOTING_MAINNET
.replacen(
"(define-constant VETO_LENGTH u1008)",
"(define-constant VETO_LENGTH u50)",
1,
)
.replacen(
"(define-constant REQUIRED_VETOES u500)",
"(define-constant REQUIRED_VETOES u25)",
1,
)
}