From a9625be77535767d9453bf33129e5b13c78b2e11 Mon Sep 17 00:00:00 2001 From: Elias Tazartes <66871571+Eikix@users.noreply.github.com> Date: Mon, 8 Apr 2024 17:30:25 -0300 Subject: [PATCH] take chain_id modulo u32 in account as well (#1085) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Time spent on this PR: ## Pull request type Please check the type of change your PR introduces: - [x] Bugfix - [ ] Feature - [ ] Code style update (formatting, renaming) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior? Resolves # ## What is the new behavior? - - - - - - This change is [Reviewable](https://reviewable.io/reviews/kkrt-labs/kakarot/1085) --- src/kakarot/accounts/library.cairo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kakarot/accounts/library.cairo b/src/kakarot/accounts/library.cairo index addf5f921..2212e7b3e 100644 --- a/src/kakarot/accounts/library.cairo +++ b/src/kakarot/accounts/library.cairo @@ -188,7 +188,7 @@ namespace AccountContract { let r = Uint256(tx_info.signature[0], tx_info.signature[1]); let s = Uint256(tx_info.signature[2], tx_info.signature[3]); let v = tx_info.signature[4]; - let (_, chain_id) = unsigned_div_rem(tx_info.chain_id, 2 ** 64); + let (_, chain_id) = unsigned_div_rem(tx_info.chain_id, 2 ** 32); EthTransaction.validate( address,