Skip to content

Commit 8647c66

Browse files
committed
fix(validate): use released uplc crate to enable publish
1 parent 4a7af2a commit 8647c66

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

pallas-validate/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ itertools = "0.14.0"
2424
tracing = "0.1.41"
2525

2626
# phase2 dependencies
27-
uplc-turbo = { git = "https://github.com/txpipe/uplc-turbo.git", rev = "bd174b3", optional = true }
28-
# uplc-turbo = { path = "../../../pragma-org/uplc/crates/uplc", optional = true }
27+
pallas-uplc = { version = "0.1.0", optional = true }
28+
# pallas-uplc = { git = "https://github.com/txpipe/uplc-turbo.git", rev = "bd174b3", optional = true }
2929

3030
[features]
31-
phase2 = ["uplc-turbo"]
31+
phase2 = ["pallas-uplc"]

pallas-validate/src/phase2/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use pallas_primitives::{conway::Language, TransactionInput};
2-
use uplc_turbo::{
2+
use pallas_uplc::{
33
binder::DeBruijn,
44
flat::FlatDecodeError,
55
machine::{self, ExBudget},

pallas-validate/src/phase2/script_context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ impl<'a> TxInfo<'a> {
394394
}
395395
}
396396

397-
pub fn inputs(&self) -> &[TxInInfo] {
397+
pub fn inputs(&self) -> &[TxInInfo<'_>] {
398398
match self {
399399
TxInfo::V1(info) => &info.inputs,
400400
TxInfo::V2(info) => &info.inputs,
@@ -967,7 +967,7 @@ pub fn from_alonzo_value(value: &alonzo::Value) -> Value {
967967
}
968968
}
969969

970-
pub fn from_alonzo_output(output: &alonzo::TransactionOutput) -> TransactionOutput {
970+
pub fn from_alonzo_output(output: &alonzo::TransactionOutput) -> TransactionOutput<'_> {
971971
TransactionOutput::PostAlonzo(
972972
PostAlonzoTransactionOutput {
973973
address: output.address.clone(),

pallas-validate/src/phase2/tx.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@ use pallas_primitives::{
1818
};
1919
use pallas_traverse::{MultiEraRedeemer, MultiEraTx};
2020

21-
use tracing::{debug, instrument};
22-
use uplc_turbo::{
23-
binder::DeBruijn,
24-
bumpalo::Bump,
25-
constant::{Constant, Integer},
26-
data::PlutusData as PragmaPlutusData,
21+
use pallas_uplc::{
22+
binder::DeBruijn, bumpalo::Bump, constant::Constant, data::PlutusData as PragmaPlutusData,
2723
term::Term,
2824
};
25+
use tracing::{debug, instrument};
2926

3027
#[derive(Debug)]
3128
pub struct TxEvalResult {
@@ -69,7 +66,7 @@ pub fn map_pallas_data_to_pragma_data<'a>(
6966
PragmaPlutusData::integer_from(arena, val)
7067
}
7168
pallas_primitives::BigInt::BigNInt(big_num_bytes) => {
72-
let val = uplc_turbo::constant::integer_from_bytes_and_sign(
69+
let val = pallas_uplc::constant::integer_from_bytes_and_sign(
7370
arena,
7471
big_num_bytes.as_slice(),
7572
-1,
@@ -79,7 +76,7 @@ pub fn map_pallas_data_to_pragma_data<'a>(
7976
}
8077
// @TODO: recheck this implementations correctness
8178
pallas_primitives::BigInt::BigUInt(big_num_bytes) => {
82-
let val = uplc_turbo::constant::integer_from_bytes_and_sign(
79+
let val = pallas_uplc::constant::integer_from_bytes_and_sign(
8380
arena,
8481
big_num_bytes.as_slice(),
8582
1,
@@ -168,7 +165,7 @@ fn execute_script(
168165
pallas_codec::minicbor::decode(&script_bytes)
169166
.map_err(pallas_codec::minicbor::decode::Error::from)?;
170167

171-
let program = uplc_turbo::flat::decode(&arena, &flat)?;
168+
let program = pallas_uplc::flat::decode(&arena, &flat)?;
172169

173170
let program = match script_context {
174171
ScriptContext::V1V2 { .. } => if let Some(datum_term) = datum_term {

0 commit comments

Comments
 (0)