|
1 |
| -// Copyright (C) 2013-2020 Blockstack PBC, a public benefit corporation |
2 |
| -// Copyright (C) 2020 Stacks Open Internet Foundation |
| 1 | +// Copyright (C) 2025 Stacks Open Internet Foundation |
3 | 2 | //
|
4 | 3 | // This program is free software: you can redistribute it and/or modify
|
5 | 4 | // it under the terms of the GNU General Public License as published by
|
|
18 | 17 | #![allow(non_snake_case)]
|
19 | 18 | #![allow(non_upper_case_globals)]
|
20 | 19 |
|
21 |
| -extern crate blockstack_lib; |
22 | 20 | extern crate clarity;
|
23 | 21 | extern crate stacks_common;
|
| 22 | +extern crate stackslib; |
24 | 23 |
|
| 24 | +use std::io::Read; |
25 | 25 | #[cfg(test)]
|
26 | 26 | use std::io::prelude::*;
|
27 |
| -use std::io::Read; |
28 | 27 | use std::{env, fs, io};
|
29 | 28 |
|
30 |
| -use blockstack_lib::burnchains::bitcoin::address::{ |
31 |
| - ADDRESS_VERSION_MAINNET_SINGLESIG, ADDRESS_VERSION_TESTNET_SINGLESIG, |
32 |
| -}; |
33 |
| -use blockstack_lib::burnchains::Address; |
34 |
| -use blockstack_lib::chainstate::stacks::{ |
35 |
| - StacksBlock, StacksBlockHeader, StacksMicroblock, StacksPrivateKey, StacksPublicKey, |
36 |
| - StacksTransaction, StacksTransactionSigner, TokenTransferMemo, TransactionAnchorMode, |
37 |
| - TransactionAuth, TransactionContractCall, TransactionPayload, TransactionPostConditionMode, |
38 |
| - TransactionSmartContract, TransactionSpendingCondition, TransactionVersion, |
39 |
| - C32_ADDRESS_VERSION_MAINNET_SINGLESIG, C32_ADDRESS_VERSION_TESTNET_SINGLESIG, |
40 |
| -}; |
41 |
| -use blockstack_lib::clarity_cli::vm_execute; |
42 |
| -use blockstack_lib::core::{CHAIN_ID_MAINNET, CHAIN_ID_TESTNET}; |
43 |
| -use blockstack_lib::net::Error as NetError; |
44 |
| -use blockstack_lib::util_lib::strings::StacksString; |
45 | 29 | use clarity::vm::errors::{Error as ClarityError, RuntimeErrorType};
|
46 | 30 | use clarity::vm::types::PrincipalData;
|
47 | 31 | use clarity::vm::{ClarityName, ClarityVersion, ContractName, Value};
|
48 |
| -use stacks_common::address::{b58, AddressHashMode}; |
| 32 | +use stacks_common::address::{AddressHashMode, b58}; |
49 | 33 | use stacks_common::codec::{Error as CodecError, StacksMessageCodec};
|
50 | 34 | use stacks_common::types::chainstate::StacksAddress;
|
51 | 35 | use stacks_common::util::hash::{hex_bytes, to_hex};
|
52 | 36 | use stacks_common::util::retry::LogReader;
|
| 37 | +use stackslib::burnchains::Address; |
| 38 | +use stackslib::burnchains::bitcoin::address::{ |
| 39 | + ADDRESS_VERSION_MAINNET_SINGLESIG, ADDRESS_VERSION_TESTNET_SINGLESIG, |
| 40 | +}; |
| 41 | +use stackslib::chainstate::stacks::{ |
| 42 | + C32_ADDRESS_VERSION_MAINNET_SINGLESIG, C32_ADDRESS_VERSION_TESTNET_SINGLESIG, StacksBlock, |
| 43 | + StacksBlockHeader, StacksMicroblock, StacksPrivateKey, StacksPublicKey, StacksTransaction, |
| 44 | + StacksTransactionSigner, TokenTransferMemo, TransactionAnchorMode, TransactionAuth, |
| 45 | + TransactionContractCall, TransactionPayload, TransactionPostConditionMode, |
| 46 | + TransactionSmartContract, TransactionSpendingCondition, TransactionVersion, |
| 47 | +}; |
| 48 | +use stackslib::clarity_cli::vm_execute; |
| 49 | +use stackslib::core::{CHAIN_ID_MAINNET, CHAIN_ID_TESTNET}; |
| 50 | +use stackslib::net::Error as NetError; |
| 51 | +use stackslib::util_lib::strings::StacksString; |
53 | 52 |
|
54 | 53 | const USAGE: &str = "blockstack-cli (options) [method] [args...]
|
55 | 54 |
|
@@ -1071,8 +1070,8 @@ fn main_handler(mut argv: Vec<String>) -> Result<String, CliError> {
|
1071 | 1070 | mod test {
|
1072 | 1071 | use std::panic;
|
1073 | 1072 |
|
1074 |
| - use blockstack_lib::chainstate::stacks::TransactionPostCondition; |
1075 | 1073 | use stacks_common::util::cargo_workspace;
|
| 1074 | + use stackslib::chainstate::stacks::TransactionPostCondition; |
1076 | 1075 | use tempfile::NamedTempFile;
|
1077 | 1076 |
|
1078 | 1077 | use super::*;
|
@@ -1721,7 +1720,7 @@ mod test {
|
1721 | 1720 | fn simple_decode_tx() {
|
1722 | 1721 | let tx_args = [
|
1723 | 1722 | "decode-tx",
|
1724 |
| - "8080000000040021a3c334fc0ee50359353799e8b2605ac6be1fe4000000000000000100000000000000000100c90ae0235365f3a73c595f8c6ab3c529807feb3cb269247329c9a24218d50d3f34c7eef5d28ba26831affa652a73ec32f098fec4bf1decd1ceb3fde4b8ce216b030200000000021a21a3c334fc0ee50359353799e8b2605ac6be1fe40573746f7265096765742d76616c7565000000010d00000003666f6f" |
| 1723 | + "8080000000040021a3c334fc0ee50359353799e8b2605ac6be1fe4000000000000000100000000000000000100c90ae0235365f3a73c595f8c6ab3c529807feb3cb269247329c9a24218d50d3f34c7eef5d28ba26831affa652a73ec32f098fec4bf1decd1ceb3fde4b8ce216b030200000000021a21a3c334fc0ee50359353799e8b2605ac6be1fe40573746f7265096765742d76616c7565000000010d00000003666f6f", |
1725 | 1724 | ];
|
1726 | 1725 |
|
1727 | 1726 | let result = main_handler(to_string_vec(&tx_args)).unwrap();
|
|
0 commit comments