|
|
|
@ -56,7 +56,7 @@ def test_upgrades_implementation_var() -> None: |
|
|
|
|
sl = Slither(os.path.join(UPGRADE_TEST_ROOT, "TestUpgrades-0.5.0.sol")) |
|
|
|
|
|
|
|
|
|
eip_1822_proxy = sl.get_contract_from_name("EIP1822Proxy")[0] |
|
|
|
|
zos_proxy = sl.get_contract_from_name("ZosProxy")[0] |
|
|
|
|
# zos_proxy = sl.get_contract_from_name("ZosProxy")[0] |
|
|
|
|
master_copy_proxy = sl.get_contract_from_name("MasterCopyProxy")[0] |
|
|
|
|
|
|
|
|
|
target = get_proxy_implementation_var(eip_1822_proxy) |
|
|
|
@ -68,10 +68,11 @@ def test_upgrades_implementation_var() -> None: |
|
|
|
|
== "0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7" |
|
|
|
|
) |
|
|
|
|
assert slot.slot == 0xC5F16F0FCC639FA48A6947836D9850F504798523BF8C9A3A87D5876CF622BCF7 |
|
|
|
|
target = get_proxy_implementation_var(zos_proxy) |
|
|
|
|
slot = get_proxy_implementation_slot(zos_proxy) |
|
|
|
|
assert target == zos_proxy.get_state_variable_from_name("IMPLEMENTATION_SLOT") |
|
|
|
|
assert slot.slot == 0x7050C9E0F4CA769C69BD3A8EF740BC37934F8E2C036E5A723FD8EE048ED3F8C3 |
|
|
|
|
# # The util fails with this proxy due to how Slither parses assembly w/ Solidity versions < 0.6.0 (see issue #1775) |
|
|
|
|
# target = get_proxy_implementation_var(zos_proxy) |
|
|
|
|
# slot = get_proxy_implementation_slot(zos_proxy) |
|
|
|
|
# assert target == zos_proxy.get_state_variable_from_name("IMPLEMENTATION_SLOT") |
|
|
|
|
# assert slot.slot == 0x7050C9E0F4CA769C69BD3A8EF740BC37934F8E2C036E5A723FD8EE048ED3F8C3 |
|
|
|
|
target = get_proxy_implementation_var(master_copy_proxy) |
|
|
|
|
slot = get_proxy_implementation_slot(master_copy_proxy) |
|
|
|
|
assert target == master_copy_proxy.get_state_variable_from_name("masterCopy") |
|
|
|
|