v0.1.2
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
- feat: support for
post_condition_mode+ auth api token by @lgalabru in #134 - fix: broken reset by @lgalabru in #135
- fix: better errors by @lgalabru in #136
- feat(evm): allow relative paths for
get_contract_from_foundry_projectfn by @MicaiahReid in #133 - refactor: wallet to signer by @lgalabru in #138
- Evm-fixes by @MicaiahReid in #141
- Fix/evm contract address output by @MicaiahReid in #142
- ci: fix linux build; bump version on release by @MicaiahReid in #148
- feat(stacks): ability to rename contracts, pre-deployment. by @lgalabru in #139
- feat: sp1 addon by @lgalabru in #140
- chore: resolve workstream conflicts by @lgalabru in #150
- fix: readonly rpc fix by @lgalabru in #151
- ci: improve testing workflow by @MicaiahReid in #154
- feat: multisig m of n by @MicaiahReid in #106
- Fixes-clean by @MicaiahReid in #156
- tests: add txtx-test-utils crate; move stacks specific tests to stacks addon by @MicaiahReid in #153
- Bitcoin driver by @MicaiahReid in #160
- feat(cli): add
--jsonflag to print outputs in json format by @MicaiahReid in #161 - Stacks: Explain transactions; Fix/add/clean stacks (en|de)coders by @MicaiahReid in #162
- feat: output improvement by @lgalabru in #164
- Stacks: retrieve deployed contract by @lgalabru in #159
- migrate
mnemonicsigner action tosecret_keyby @MicaiahReid in #165 - Value store defaults by @MicaiahReid in #167
- Rename
inputconstruct tovarby @MicaiahReid in #168 - Language updates by @MicaiahReid in #170
- ci: upgrade upload-artifact to v4 by @MicaiahReid in #172
- chore(release): publish v0.1.2 by @MicaiahReid in #171
Full Changelog: v0.1.0...v0.1.2