From 50f59da47f40c76c433e9bd54c00a4a44aa78d18 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Fri, 16 Feb 2018 06:35:16 -0500 Subject: [PATCH] Updated to use staticcall --- EIPS/eip-165.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/EIPS/eip-165.md b/EIPS/eip-165.md index 5769a84f..75082b04 100644 --- a/EIPS/eip-165.md +++ b/EIPS/eip-165.md @@ -145,16 +145,14 @@ contract ERC165Cache { return ImplStatus.No; } - // Update this after the Metropolis hard fork to use staticcall! function noThrowCall(address _contract, bytes4 _interfaceId) internal view returns (bool result) { bytes4 erc165ID = ERC165ID; assembly { let x := mload(0x40) // Find empty storage location using "free memory pointer" mstore(x, erc165ID) // Place signature at begining of empty storage mstore(add(x, 0x04), _interfaceId) // Place first argument directly next to signature - call(30000, // 30k gas + staticcall(30000, // 30k gas _contract, // To addr - 0, // No value x, // Inputs are stored at location x 0x8, // Inputs are 8 byes long x, // Store output over input (saves space)