You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In CairoZero, the address of an EVM storage is computed as
// @notice Compute the storage address of the given key when the storage var interface is
// Account_storage(key: Uint256)
// @dev Just the generated addr method when compiling the account_contract
func _storage_addr{pedersen_ptr: HashBuiltin*, range_check_ptr}(key: Uint256*) -> (res: felt) {
let res = 0x0127c52d6fa812547d8a5b435341b8c12e82048913e7193c0e318e8a6642876d;
let (res) = hash2{hash_ptr=pedersen_ptr}(res, cast(key, felt*)[0]);
let (res) = hash2{hash_ptr=pedersen_ptr}(res, cast(key, felt*)[1]);
let (res) = normalize_address(addr=res);
return (res=res);
}
In CairoZero, the address of an EVM storage is computed as
Ensure that
is computing the same key and compatibility is kept.
The text was updated successfully, but these errors were encountered: