Skip to content

Commit

Permalink
Merge pull request #673 from hirosystems/release/next
Browse files Browse the repository at this point in the history
release/next
  • Loading branch information
Ludo Galabru authored Nov 17, 2022
2 parents bb5a8a0 + 75f0b5a commit f91140d
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 16 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/chainhook-types-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hirosystems/chainhook-types",
"version": "1.0.6",
"version": "1.1.0",
"description": "",
"main": "dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion components/clarinet-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clarinet-cli"
version = "1.0.6"
version = "1.1.0"
authors = ["Ludo Galabru <[email protected]>", "Brice Dobry <[email protected]>"]
edition = "2021"
description = "Clarinet is a simple, modern and opinionated runtime for testing, integrating and deploying Clarity smart contracts."
Expand Down
19 changes: 14 additions & 5 deletions components/clarinet-deployments/src/onchain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ClarityVersion>,
account: &AccountConfig,
nonce: u64,
tx_fee: u64,
Expand All @@ -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,
Expand Down Expand Up @@ -342,12 +342,15 @@ pub fn apply_on_chain_deployment(
let mut accounts_cached_nonces: BTreeMap<String, u64> = BTreeMap::new();
let mut stx_accounts_lookup: BTreeMap<String, &AccountConfig> = BTreeMap::new();
let mut btc_accounts_lookup: BTreeMap<String, &AccountConfig> = 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;
};
}
}

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions components/clarinet-files/src/network_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion components/clarity-repl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clarity-repl"
version = "1.0.6"
version = "1.1.0"
description = "Clarity REPL"
authors = [
"Ludo Galabru <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion components/stacks-devnet-js/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stacks-devnet-js"
version = "1.0.6"
version = "1.1.0"
license = "ISC"
edition = "2018"
exclude = ["index.node"]
Expand Down
2 changes: 1 addition & 1 deletion components/stacks-devnet-js/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
9 changes: 8 additions & 1 deletion components/stacks-network/src/chains_coordinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f91140d

Please sign in to comment.