diff --git a/CHANGELOG.md b/CHANGELOG.md index 46345e744..1a4ddee28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +#### 1.1.0 (2022-11-17) + +##### New Features + +* Support for Stacks 2.1 ([790c14bf](https://github.com/hirosystems/clarinet/commit/790c14bf8fd4a30d1f50c2c4a55873aecac1a076)) +* Display clarity documentation on hover in VSCode ([e605acb4](https://github.com/hirosystems/clarinet/commit/e605acb49f0892cb75b7a16edf37807f29133a20)) + +##### Chores + +* Better error management in chainhook-node ([353ceb61](https://github.com/hirosystems/clarinet/commit/353ceb617b8a5b710331fe3387b07f6ad48e3f48)) + #### 1.0.6 (2022-11-10) ##### New Features diff --git a/Cargo.lock b/Cargo.lock index 4781a908a..ff3712179 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "clarinet-cli" -version = "1.0.6" +version = "1.1.0" dependencies = [ "aes 0.7.5", "ansi_term", @@ -1146,7 +1146,7 @@ dependencies = [ [[package]] name = "clarity-repl" -version = "1.0.6" +version = "1.1.0" dependencies = [ "ansi_term", "atty", @@ -6109,7 +6109,7 @@ dependencies = [ [[package]] name = "stacks-devnet-js" -version = "1.0.6" +version = "1.1.0" dependencies = [ "chainhook-types", "clarinet-deployments", diff --git a/components/chainhook-types-js/package.json b/components/chainhook-types-js/package.json index a5ae35850..08da67334 100644 --- a/components/chainhook-types-js/package.json +++ b/components/chainhook-types-js/package.json @@ -1,6 +1,6 @@ { "name": "@hirosystems/chainhook-types", - "version": "1.0.6", + "version": "1.1.0", "description": "", "main": "dist/index.js", "scripts": { diff --git a/components/clarinet-cli/Cargo.toml b/components/clarinet-cli/Cargo.toml index fb49fc691..76d99f205 100644 --- a/components/clarinet-cli/Cargo.toml +++ b/components/clarinet-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clarinet-cli" -version = "1.0.6" +version = "1.1.0" authors = ["Ludo Galabru ", "Brice Dobry "] edition = "2021" description = "Clarinet is a simple, modern and opinionated runtime for testing, integrating and deploying Clarity smart contracts." diff --git a/components/clarinet-deployments/src/onchain/mod.rs b/components/clarinet-deployments/src/onchain/mod.rs index 106ab8592..1b9181aca 100644 --- a/components/clarinet-deployments/src/onchain/mod.rs +++ b/components/clarinet-deployments/src/onchain/mod.rs @@ -174,7 +174,7 @@ pub fn encode_stx_transfer( pub fn encode_contract_publish( contract_name: &ContractName, source: &str, - clarity_version: &ClarityVersion, + clarity_version: Option, account: &AccountConfig, nonce: u64, tx_fee: u64, @@ -187,7 +187,7 @@ pub fn encode_contract_publish( }; sign_transaction_payload( account, - TransactionPayload::SmartContract(payload, Some(clarity_version.clone())), + TransactionPayload::SmartContract(payload, clarity_version.clone()), nonce, tx_fee, anchor_mode, @@ -342,12 +342,15 @@ pub fn apply_on_chain_deployment( let mut accounts_cached_nonces: BTreeMap = BTreeMap::new(); let mut stx_accounts_lookup: BTreeMap = BTreeMap::new(); let mut btc_accounts_lookup: BTreeMap = BTreeMap::new(); - + let mut clarity_version_available = false; if !fetch_initial_nonces { if network == StacksNetwork::Devnet { for (_, account) in network_manifest.accounts.iter() { accounts_cached_nonces.insert(account.stx_address.clone(), 0); } + if let Some(ref devnet) = network_manifest.devnet { + clarity_version_available = devnet.enable_next_features; + }; } } @@ -544,10 +547,16 @@ pub fn apply_on_chain_deployment( false => TransactionAnchorMode::Any, }; + let clarity_version = if clarity_version_available { + Some(tx.clarity_version.clone()) + } else { + None + }; + let transaction = match encode_contract_publish( &tx.contract_name, &source, - &tx.clarity_version, + clarity_version, *account, nonce, tx.cost, @@ -623,7 +632,7 @@ pub fn apply_on_chain_deployment( let transaction = match encode_contract_publish( &tx.contract_id.name, &source, - &tx.clarity_version, + None, *account, nonce, tx.cost, diff --git a/components/clarinet-files/src/network_manifest.rs b/components/clarinet-files/src/network_manifest.rs index 3fe79ec8b..35323434f 100644 --- a/components/clarinet-files/src/network_manifest.rs +++ b/components/clarinet-files/src/network_manifest.rs @@ -34,8 +34,8 @@ pub const DEFAULT_DOCKER_SOCKET: &str = "npipe:////./pipe/docker_engine"; pub const DEFAULT_DOCKER_SOCKET: &str = "/var/run/docker.sock"; pub const DEFAULT_EPOCH_2_0: u64 = 100; -pub const DEFAULT_EPOCH_2_05: u64 = 115; -pub const DEFAULT_EPOCH_2_1: u64 = 130; +pub const DEFAULT_EPOCH_2_05: u64 = 107; +pub const DEFAULT_EPOCH_2_1: u64 = 114; #[derive(Serialize, Deserialize, Debug)] pub struct NetworkManifestFile { diff --git a/components/clarity-repl/Cargo.toml b/components/clarity-repl/Cargo.toml index 132c75f97..744b6efb0 100644 --- a/components/clarity-repl/Cargo.toml +++ b/components/clarity-repl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clarity-repl" -version = "1.0.6" +version = "1.1.0" description = "Clarity REPL" authors = [ "Ludo Galabru ", diff --git a/components/stacks-devnet-js/Cargo.toml b/components/stacks-devnet-js/Cargo.toml index fe52376a1..95bbe8181 100644 --- a/components/stacks-devnet-js/Cargo.toml +++ b/components/stacks-devnet-js/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stacks-devnet-js" -version = "1.0.6" +version = "1.1.0" license = "ISC" edition = "2018" exclude = ["index.node"] diff --git a/components/stacks-devnet-js/package.json b/components/stacks-devnet-js/package.json index 8e072f288..b4f88f56e 100644 --- a/components/stacks-devnet-js/package.json +++ b/components/stacks-devnet-js/package.json @@ -1,6 +1,6 @@ { "name": "@hirosystems/stacks-devnet-js", - "version": "1.0.6", + "version": "1.1.0", "description": "stacks-devnet-js is a library for writing end to end tests for protocols interacting with the Stacks blockchain and the Bitcoin blockchain.", "author": "Ludo Galabru", "repository": "https://github.com/hirosystems/clarinet/tree/main/components/stacks-devnet-js", diff --git a/components/stacks-network/src/chains_coordinator.rs b/components/stacks-network/src/chains_coordinator.rs index e2ee42379..c08a75a20 100644 --- a/components/stacks-network/src/chains_coordinator.rs +++ b/components/stacks-network/src/chains_coordinator.rs @@ -306,7 +306,14 @@ pub async fn start_chains_coordinator( let _ = devnet_event_tx.send(DevnetEvent::ServiceStatus(ServiceStatusData { order: 1, status: Status::Green, - name: "stacks-node".into(), + name: format!( + "stacks-node {}", + if config.devnet_config.enable_next_features { + "🚧" + } else { + "" + } + ), comment: format!( "mining blocks (chaintip = #{})", known_tip.block.block_identifier.index