diff --git a/CHANGELOG.md b/CHANGELOG.md index 146df59b98..bb16782151 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,9 @@ Description of the upcoming release here. - [#456](https://github.com/FuelLabs/fuel-vm/pull/456): Added a new type - `ChainId` to represent the identifier of the chain. It is a wrapper around the `u64`, so any `u64` can be converted into this type via `.into()` or `ChainId::new(...)`. +- [#459](https://github.com/FuelLabs/fuel-vm/pull/459) Require witness index to be specified when adding an unsigned coin to a transaction. +This allows for better reuse of witness data when using the transaction builder and helper methods to make transactions compact. + ### Changed - [#458](https://github.com/FuelLabs/fuel-vm/pull/458): Automatically sort storage slots for creation transactions. diff --git a/fuel-tx/src/builder.rs b/fuel-tx/src/builder.rs index 16febf3468..4d2896516d 100644 --- a/fuel-tx/src/builder.rs +++ b/fuel-tx/src/builder.rs @@ -9,6 +9,7 @@ use fuel_crypto::SecretKey; use fuel_types::{BlockHeight, Nonce, Salt, Word}; use alloc::vec::Vec; +use std::collections::HashMap; pub trait BuildableAloc where @@ -92,7 +93,8 @@ pub struct TransactionBuilder { // We take the key by reference so this lib won't have the responsibility to properly zeroize // the keys - sign_keys: Vec, + // Maps signing keys -> witness indexes + sign_keys: HashMap, } impl TransactionBuilder