mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-05-21 23:49:30 +00:00
fmt
This commit is contained in:
parent
e5ecf4a1ee
commit
ee0f8dd902
@ -1,9 +1,9 @@
|
|||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
|
use crate::traits::IPrivateOutput;
|
||||||
use accounts::account_core::{AccountAddress, AccountPublicMask};
|
use accounts::account_core::{AccountAddress, AccountPublicMask};
|
||||||
use common::merkle_tree_public::TreeHashType;
|
use common::merkle_tree_public::TreeHashType;
|
||||||
use serde::{ser::SerializeStruct, Serialize};
|
use serde::{ser::SerializeStruct, Serialize};
|
||||||
use crate::traits::IPrivateOutput;
|
|
||||||
|
|
||||||
pub const PUBLIC_SC_CONTEXT: &str = "PublicSCContext";
|
pub const PUBLIC_SC_CONTEXT: &str = "PublicSCContext";
|
||||||
pub const CALLER_ADDRESS: &str = "caller_address";
|
pub const CALLER_ADDRESS: &str = "caller_address";
|
||||||
@ -89,7 +89,10 @@ impl PublicSCContext {
|
|||||||
Ok(u64_list)
|
Ok(u64_list)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn encode_utxo_for_owners<IPO: IPrivateOutput>(&self, private_outputs: IPO) -> Vec<(Vec<u8>, Vec<u8>, u8)> {
|
pub fn encode_utxo_for_owners<IPO: IPrivateOutput>(
|
||||||
|
&self,
|
||||||
|
private_outputs: IPO,
|
||||||
|
) -> Vec<(Vec<u8>, Vec<u8>, u8)> {
|
||||||
let utxos = private_outputs.make_utxo_list();
|
let utxos = private_outputs.make_utxo_list();
|
||||||
|
|
||||||
// ToDo: when errorhandling is implemented this `unwrap()` call has to be removed
|
// ToDo: when errorhandling is implemented this `unwrap()` call has to be removed
|
||||||
@ -105,7 +108,7 @@ impl PublicSCContext {
|
|||||||
(
|
(
|
||||||
AccountPublicMask::encrypt_data(
|
AccountPublicMask::encrypt_data(
|
||||||
&ephm_key_holder,
|
&ephm_key_holder,
|
||||||
account_mask.viewing_public_key,
|
account_mask.viewing_public_key,
|
||||||
&serde_json::to_vec(&utxo).unwrap(),
|
&serde_json::to_vec(&utxo).unwrap(),
|
||||||
),
|
),
|
||||||
account_mask.make_tag(),
|
account_mask.make_tag(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user