bee icon indicating copy to clipboard operation
bee copied to clipboard

Missing check in output builder

Open Thoralf-M opened this issue 2 years ago • 0 comments

Bug description

Currently one can build an output with a higher amount in the storage deposit return unlock condition than the actual amount of the output has

Basic(BasicOutput { amount: BoundedU64(246500), native_tokens: NativeTokens(BoxedSlicePrefix([])), unlock_conditions: UnlockConditions(BoxedSlicePrefix([Address(AddressUnlockCondition(Ed25519(Ed25519Address(0x60200bad8137a704216e84f8f9acfe65b972d9f4155becb4815282b03cef99fe)))), StorageDepositReturn(StorageDepositReturnUnlockCondition { return_address: Ed25519(Ed25519Address(0x3caa890c6f24b8c9b86c4c287000f3be50b8116b21da0986a94722af793e3abd)), amount: BoundedU64(259000) })])), features: Features(BoxedSlicePrefix([Metadata(MetadataFeature(0x34383635366336633666323037373666373236633634))])) })

amount: BoundedU64(246500) amount: BoundedU64(259000)

Thoralf-M avatar Jun 14 '22 12:06 Thoralf-M