Skip to content

Commit

Permalink
Merge pull request #628 from hirosystems/refator/use-clarity-crate
Browse files Browse the repository at this point in the history
refactor: use clarity crate
  • Loading branch information
hugocaillard authored Jul 18, 2024
2 parents f8ace2d + f177a77 commit 138b3ea
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions components/chainhook-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ serde_json = { version = "1", features = ["arbitrary_precision"] }
serde-hex = "0.1.0"
serde_derive = "1"
stacks-codec = "2.4.1"
clarity = { git = "https://github.com/stacks-network/stacks-core.git", branch = "feat/clarity-wasm-develop", package = "clarity", default-features = false, features = [
"canonical",
"log",
] }
hiro-system-kit = { version = "0.3.4", optional = true }
chainhook-types = { version = "1.3.6", path = "../chainhook-types-rs" }
rocket = { version = "=0.5.0", features = ["json"] }
Expand Down
10 changes: 5 additions & 5 deletions components/chainhook-sdk/src/chainhooks/stacks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ use chainhook_types::{
StacksTransactionEvent, StacksTransactionEventPayload, StacksTransactionKind,
TransactionIdentifier,
};
use clarity::codec::StacksMessageCodec;
use clarity::vm::types::{
CharType, PrincipalData, QualifiedContractIdentifier, SequenceData, Value as ClarityValue,
};
use clarity::vm::ClarityName;
use hiro_system_kit::slog;
use regex::Regex;
use reqwest::{Client, Method};
use schemars::JsonSchema;
use serde_json::Value as JsonValue;
use stacks_codec::clarity::codec::StacksMessageCodec;
use stacks_codec::clarity::vm::types::PrincipalData;
use stacks_codec::clarity::vm::types::QualifiedContractIdentifier;
use stacks_codec::clarity::vm::types::{CharType, SequenceData, Value as ClarityValue};
use stacks_codec::clarity::ClarityName;
use std::collections::{BTreeMap, HashMap};
use std::io::Cursor;

Expand Down
6 changes: 3 additions & 3 deletions components/chainhook-sdk/src/indexer/stacks/mod.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
mod blocks_pool;

pub use blocks_pool::StacksBlockPool;
use stacks_codec::codec::{StacksTransaction, TransactionAuth, TransactionPayload};

use crate::chainhooks::stacks::try_decode_clarity_value;
use crate::indexer::AssetClassCache;
use crate::indexer::{IndexerConfig, StacksChainContext};
use crate::utils::Context;
use chainhook_types::*;
use clarity::codec::StacksMessageCodec;
use clarity::vm::types::{SequenceData, Value as ClarityValue};
use hiro_system_kit::slog;
use rocket::serde::json::Value as JsonValue;
use rocket::serde::Deserialize;
use stacks_codec::clarity::codec::StacksMessageCodec;
use stacks_codec::clarity::vm::types::{SequenceData, Value as ClarityValue};
use stacks_codec::codec::{StacksTransaction, TransactionAuth, TransactionPayload};
use std::collections::{BTreeMap, HashMap, HashSet};
use std::convert::TryInto;
use std::io::Cursor;
Expand Down

0 comments on commit 138b3ea

Please sign in to comment.