Skip to content

v0.1.2

Choose a tag to compare

@github-actions github-actions released this 12 Sep 02:05
· 613 commits to main since this release
c1f6a56

Breaking Changes

This release rethinks some of the core .tx language, so all runbooks are likely to need to make some changes.

1️⃣ Input Construct -> Variable

The input construct has been renamed to variable. As such, all references to input will need to be updated.

--input "my_var" {
++variable "my_var" {
  value = 1
}
output "out" {
--  value = input.my_var
++  value = variable.my_var 
}

💡 Note, a global search and replace of input " -> variable " and input. -> variable. on your .tx files should do the trick.

2️⃣ Environment Variables -> Inputs

Any environment variables passed in from the Runbook manifest (txtx.yml file), as well as inputs passed via the CLI option --input were previously referenced via env. in a Runbook.

This has been changed to be referenced by input.:

variable "my_var" {
--  value = env.network_id
++ value = input.network_id
}

💡 Note, a global search and replace of env. -> input. should be adequate for this change.

3️⃣ Runtime -> Addon

The runtime construct was unclear and overloaded. Now, the addon command is used to declare an addon and its default variables.

--runtime "addon::stacks" {
--  default {
--    network_id = "testnet"
--    rpc_api_url = "api.testnet.hiro.so"
--  }
++addon "stacks" {
++  network_id = "testnet"
++  rpc_api_url = "api.testnet.hiro.so"
}

When declaring an addon, any inputs entered within the `addo block will be available by default for all commands from that addon:

addon "stacks" {
  network_id = "testnet"
}
action "deploy" "stacks::deploy_contract" {
  contract = ...
  signer = ...
   # the network_id field does not need to be added, though it is required by `deploy_contract`, 
   # because it was already declared in the addon block
}

4️⃣ New Signer Names

The stacks::mnemonic and evm::mnemonic wallets were renamed to stacks::secret_key and evm::secret_key.
Also, the stacks::connect wallet was renamed to stacks::web_wallet

--signer "alice" "stacks::mnemonic" {
++signer "alice" "stacks::secret_key" {
   mnemonic = "..."
}

--signer "bob" "stacks::connect" {
++signer "bob" "stacks::web_wallet" {
   expected_address = "..."
}

The secret key signer also allows providing a secret key rather than a mnemonic:

# now valid
signer "alice" "stacks::secret_key" {
  secret_key = "..."
}
# also valid
signer "bob" "stacks::secret_key" {
  mnemonic = "..."
  derivation_path = "..." # this field is optional
}

5️⃣ Batch -> Flow

Previously the runtime block could specify batch inputs:

runtime "batch" {
   # runbook is executed once for each item in this array
    inputs = [...]
}

This has been changed to use the flow construct:

# The Runbook is executed once for each flow
flow "sepolia" {
   chain_id = 11155111
   rpc_api_url = "https://sepolia.infura.io/v3"
}
flow "arbitrum-sepolia" {
   chain_id = 421614
   rpc_api_url = "https://arbitrum-sepolia.infura.io/v3"
}

What's Changed

Full Changelog: v0.1.0...v0.1.2