Skip to content

Commit

Permalink
Merge branch 'next' into santiagopittella-split-tx-prover-crates-same…
Browse files Browse the repository at this point in the history
…-repo-approach
  • Loading branch information
SantiagoPittella committed Jan 15, 2025
2 parents ec167ee + ff3d01e commit 9a54c60
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
- Introduce `AccountIdError` and make account ID byte representations (`u128`, `[u8; 15]`) consistent (#1055).
- Refactor `AccountId` and `AccountIdPrefix` into version wrappers (#1058).
- Remove multi-threaded account seed generation due to single-threaded generation being faster (#1061).
- Made `AccountIdError` public (#1067).
- Made `BasicFungibleFaucet::MAX_DECIMALS` public (#1063).
- [BREAKING] Removed `miden-tx-prover` crate and created `miden-proving-service` and `miden-remote-provers` (#1047).

## 0.6.2 (2024-11-20)
Expand Down
11 changes: 6 additions & 5 deletions miden-lib/src/accounts/faucets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use miden_objects::{
Account, AccountBuilder, AccountComponent, AccountIdAnchor, AccountStorageMode,
AccountType, StorageSlot,
},
assets::TokenSymbol,
assets::{FungibleAsset, TokenSymbol},
AccountError, Felt, FieldElement, Word,
};

Expand Down Expand Up @@ -33,8 +33,9 @@ pub struct BasicFungibleFaucet {
impl BasicFungibleFaucet {
// CONSTANTS
// --------------------------------------------------------------------------------------------
const MAX_MAX_SUPPLY: u64 = (1 << 63) - 1;
const MAX_DECIMALS: u8 = 12;

/// The maximum number of decimals supported by the component.
pub const MAX_DECIMALS: u8 = 12;

// CONSTRUCTORS
// --------------------------------------------------------------------------------------------
Expand All @@ -47,10 +48,10 @@ impl BasicFungibleFaucet {
actual: decimals,
max: Self::MAX_DECIMALS,
});
} else if max_supply.as_int() > Self::MAX_MAX_SUPPLY {
} else if max_supply.as_int() > FungibleAsset::MAX_AMOUNT {
return Err(AccountError::FungibleFaucetMaxSupplyTooLarge {
actual: max_supply.as_int(),
max: Self::MAX_MAX_SUPPLY,
max: FungibleAsset::MAX_AMOUNT,
});
}

Expand Down
6 changes: 3 additions & 3 deletions objects/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ mod errors;
pub use block::BlockHeader;
pub use constants::*;
pub use errors::{
AccountDeltaError, AccountError, AssetError, AssetVaultError, BlockError, ChainMmrError,
NoteError, ProvenTransactionError, TransactionInputError, TransactionOutputError,
TransactionScriptError,
AccountDeltaError, AccountError, AccountIdError, AssetError, AssetVaultError, BlockError,
ChainMmrError, NoteError, ProvenTransactionError, TransactionInputError,
TransactionOutputError, TransactionScriptError,
};
pub use miden_crypto::hash::rpo::{Rpo256 as Hasher, RpoDigest as Digest};
pub use vm_core::{Felt, FieldElement, StarkField, Word, EMPTY_WORD, ONE, WORD_SIZE, ZERO};
Expand Down

0 comments on commit 9a54c60

Please sign in to comment.