Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Commit

Permalink
fix: declareV0 hash computation (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
antiyro authored Oct 11, 2023
1 parent 36f1cbe commit 5003054
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Next release

- fix: fixed declare V0 placeholder with the hash of an empty list of felts
- feat(cli): `run` is the by default command when running the `madara` bin
- refacto(cli): `run` and `setup` commands are defined in their own files
- refacto(cli): `run.testnet` argument removed in favor of the substrate native
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ Thanks goes to these wonderful people
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kasteph"><img src="https://avatars.githubusercontent.com/u/3408478?v=4?s=100" width="100px;" alt="kasteph"/><br /><sub><b>kasteph</b></sub></a><br /><a href="https://github.com/keep-starknet-strange/madara/commits?author=kasteph" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ayushtom"><img src="https://avatars.githubusercontent.com/u/41674634?v=4?s=100" width="100px;" alt="Ayush Tomar"/><br /><sub><b>Ayush Tomar</b></sub></a><br /><a href="https://github.com/keep-starknet-strange/madara/commits?author=ayushtom" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tchataigner"><img src="https://avatars.githubusercontent.com/u/9974198?v=4?s=100" width="100px;" alt="tchataigner"/><br /><sub><b>tchataigner</b></sub></a><br /><a href="https://github.com/keep-starknet-strange/madara/commits?author=tchataigner" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/antiyro"><img src="https://avatars.githubusercontent.com/u/74653697?v=4?s=100" width="100px;" alt="antiyro"/><br /><sub><b>antiyro</b></sub></a><br /><a href="https://github.com/keep-starknet-strange/madara/commits?author=antiyro" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/transactions/src/compute_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl ComputeTransactionHash for DeclareTransactionV0 {
let version = if is_query { SIMULATE_TX_VERSION_OFFSET } else { FieldElement::ZERO };
let sender_address = self.sender_address.into();
let entrypoint_selector = FieldElement::ZERO;
let alignment_placeholder = FieldElement::ZERO;
let alignment_placeholder = compute_hash_on_elements(&[]);
let max_fee = FieldElement::from(self.max_fee);
let chain_id = chain_id.into();
let class_hash = self.class_hash.into();
Expand Down

0 comments on commit 5003054

Please sign in to comment.