Skip to content

Commit

Permalink
fixup after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkuo committed Feb 8, 2023
1 parent 32665d8 commit 2e7eef8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
17 changes: 3 additions & 14 deletions crates/sui-types/src/base_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub use crate::committee::EpochId;
use crate::crypto::{
AuthorityPublicKey, AuthorityPublicKeyBytes, KeypairTraits, PublicKey, SuiPublicKey,
};
pub use crate::digests::{ObjectDigest, TransactionDigest, TransactionEffectsDigest};
use crate::error::ExecutionError;
use crate::error::ExecutionErrorKind;
use crate::error::SuiError;
Expand All @@ -16,6 +17,8 @@ use crate::sui_serde::Readable;
use crate::sui_serde::ToArray;
use anyhow::anyhow;
use fastcrypto::encoding::decode_bytes_hex;
use fastcrypto::encoding::{Encoding, Hex};
use fastcrypto::hash::{HashFunction, Sha3_256};
use move_core_types::account_address::AccountAddress;
use move_core_types::ident_str;
use move_core_types::identifier::IdentStr;
Expand All @@ -29,20 +32,6 @@ use std::convert::{TryFrom, TryInto};
use std::fmt;
use std::str::FromStr;

pub use crate::committee::EpochId;
use crate::crypto::{
AuthorityPublicKey, AuthorityPublicKeyBytes, KeypairTraits, PublicKey, SuiPublicKey,
};
pub use crate::digests::{ObjectDigest, TransactionDigest, TransactionEffectsDigest};
use crate::error::ExecutionError;
use crate::error::ExecutionErrorKind;
use crate::error::SuiError;
use crate::gas_coin::GasCoin;
use crate::object::{Object, Owner};
use crate::sui_serde::Readable;
use fastcrypto::encoding::{Encoding, Hex};
use fastcrypto::hash::{HashFunction, Sha3_256};

#[cfg(test)]
#[path = "unit_tests/base_types_tests.rs"]
mod base_types_tests;
Expand Down
6 changes: 3 additions & 3 deletions crates/sui-types/src/digests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
use std::fmt;

use crate::sui_serde::Readable;
use crate::sui_serde::ToArray;
use fastcrypto::encoding::{Base58, Base64, Encoding};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use serde_with::{serde_as, Bytes};

/// A representation of a SHA3-256 Digest
#[serde_as]
#[derive(
Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, JsonSchema,
)]
pub struct Sha3Digest(
#[schemars(with = "Base58")]
#[serde_as(as = "Readable<Base58, Bytes>")]
#[serde_as(as = "Readable<ToArray<Base58>, Bytes>")]
[u8; 32],
);

Expand Down Expand Up @@ -464,7 +464,7 @@ impl fmt::UpperHex for TransactionEffectsDigest {
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, JsonSchema)]
pub struct ObjectDigest(
#[schemars(with = "Base64")]
#[serde_as(as = "Readable<Base64, Bytes>")]
#[serde_as(as = "Readable<ToArray<Base64>, Bytes>")]
[u8; 32],
// Sha3Digest,
);
Expand Down
3 changes: 0 additions & 3 deletions crates/sui-types/src/messages_checkpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@ use crate::{
crypto::{sha3_hash, AuthoritySignature, VerificationObligation},
error::SuiError,
};
use fastcrypto::encoding::{Base58, Encoding, Hex};
use schemars::JsonSchema;
use serde::de::DeserializeOwned;
use serde::{Deserialize, Serialize};

pub use crate::digests::CheckpointContentsDigest;
pub use crate::digests::CheckpointDigest;
use std::fmt::{Debug, Display, Formatter};
use std::slice::Iter;

pub type CheckpointSequenceNumber = u64;
pub type CheckpointTimestamp = u64;
Expand Down

0 comments on commit 2e7eef8

Please sign in to comment.