Skip to content

Commit

Permalink
feat(outbox): implement outbox on transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
zcabter committed Aug 22, 2024
1 parent 48d8056 commit 995a24b
Show file tree
Hide file tree
Showing 7 changed files with 670 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ in-container = "^1"
indicatif = "0.17.0"
log = "0.4.20"
nix = { version = "^0.27.1", features = ["process", "signal"] }
nom = "7.1.3"
num-traits = "0.2.16"
parking_lot = "0.12.1"
prettytable = "0.10.0"
Expand Down
2 changes: 2 additions & 0 deletions crates/jstz_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jstz_crypto = { path = "../jstz_crypto" }
serde.workspace = true
tezos-smart-rollup-host.workspace = true
tezos-smart-rollup.workspace = true
tezos_data_encoding.workspace = true
nom.workspace = true

[dev-dependencies]
anyhow.workspace = true
Expand Down
6 changes: 6 additions & 0 deletions crates/jstz_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ pub enum Error {
SerializationError {
description: String,
},
OutboxError {
source: crate::kv::outbox::OutboxError,
},
}

impl From<Error> for JsError {
Expand All @@ -46,6 +49,9 @@ impl From<Error> for JsError {
Error::SerializationError { description } => JsNativeError::eval()
.with_message(format!("serialization error: {description}"))
.into(),
Error::OutboxError { source } => JsNativeError::eval()
.with_message(format!("OutboxError: {}", source))
.into(),
}
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/jstz_core/src/kv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use tezos_smart_rollup_host::{path::Path, runtime::Runtime};

use crate::error::Result;

pub mod outbox;
pub mod transaction;
pub mod value;

Expand Down
Loading

0 comments on commit 995a24b

Please sign in to comment.