Skip to content

Commit

Permalink
fix(iota-genesis-builder): storage deposit amounts (#1811)
Browse files Browse the repository at this point in the history
  • Loading branch information
miker83z authored Aug 14, 2024
1 parent 0680770 commit 234622f
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ use crate::stardust::{
};

const OUTPUT_IOTA_AMOUNT: u64 = 1_000_000;
const STORAGE_DEPOSIT_AMOUNT: u64 = 500_000;

struct StardustWallet {
mnemonic: &'static str,
Expand Down Expand Up @@ -237,20 +238,20 @@ fn new_basic_or_nft_outputs(
ExpirationUnlockCondition::new(address, rng.gen())?.into(),
]);
add_output_with_unlock_conditions(vec![
StorageDepositReturnUnlockCondition::new(address, 500_0000, u64::MAX)?.into(),
StorageDepositReturnUnlockCondition::new(address, STORAGE_DEPOSIT_AMOUNT, u64::MAX)?.into(),
]);

add_output_with_unlock_conditions(vec![
StorageDepositReturnUnlockCondition::new(
Ed25519Address::new([0u8; 32]),
500_0000,
STORAGE_DEPOSIT_AMOUNT,
u64::MAX,
)?
.into(),
]);
add_output_with_unlock_conditions(vec![
AddressUnlockCondition::new(Ed25519Address::new([0u8; 32])).into(),
StorageDepositReturnUnlockCondition::new(address, 500_0000, u64::MAX)?.into(),
StorageDepositReturnUnlockCondition::new(address, STORAGE_DEPOSIT_AMOUNT, u64::MAX)?.into(),
]);
add_output_with_unlock_conditions(vec![
TimelockUnlockCondition::new(rng.gen())?.into(),
Expand All @@ -259,7 +260,7 @@ fn new_basic_or_nft_outputs(
add_output_with_unlock_conditions(vec![
TimelockUnlockCondition::new(rng.gen())?.into(),
ExpirationUnlockCondition::new(address, rng.gen())?.into(),
StorageDepositReturnUnlockCondition::new(address, 500_0000, u64::MAX)?.into(),
StorageDepositReturnUnlockCondition::new(address, STORAGE_DEPOSIT_AMOUNT, u64::MAX)?.into(),
]);

outputs.push(finish_with_header(
Expand Down

0 comments on commit 234622f

Please sign in to comment.