Skip to content

Commit cc33efd

Browse files
committed
Use force_bytes_to_address helper to generate address
1 parent d4b0198 commit cc33efd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

eth/utils/address.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def force_bytes_to_address(value: bytes) -> Address:
1515

1616

1717
def generate_contract_address(address: Address, nonce: bytes) -> Address:
18-
return Address(keccak(rlp.encode([address, nonce]))[-20:])
18+
return force_bytes_to_address(keccak(rlp.encode([address, nonce])))
1919

2020

2121
def generate_safe_contract_address(address: Address,

eth/vm/opcode_values.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@
183183
# System
184184
#
185185
CREATE = 0xf0
186-
CREATE2 = 0xf5
187186
CALL = 0xf1
188187
CALLCODE = 0xf2
189188
RETURN = 0xf3
190189
DELEGATECALL = 0xf4
190+
CREATE2 = 0xf5
191191
STATICCALL = 0xfa
192192
REVERT = 0xfd
193193
SELFDESTRUCT = 0xff

0 commit comments

Comments
 (0)