From 734d68b6439941bf1577a4f1156b8e906185f7f5 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Mon, 19 Feb 2018 16:54:19 -0500 Subject: [PATCH] Use 32-byte words --- EIPS/eip-165.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EIPS/eip-165.md b/EIPS/eip-165.md index 4ce58d3f..740aa2d0 100644 --- a/EIPS/eip-165.md +++ b/EIPS/eip-165.md @@ -86,9 +86,9 @@ Implementation note, there are several logical ways to implement this function. ### How to Detect if a Contract Implements ERC-165 -1. The source contact makes a `STATICCALL` to the destination address with input data: `0x01ffc9a701ffc9a7` and gas 30,000. This corresponds to `contract.supportsInterface("0x01ffc9a7")`. +1. The source contact makes a `STATICCALL` to the destination address with input data: `0x01ffc9a700000000000000000000000001ffc9a7` and gas 30,000. This corresponds to `contract.supportsInterface("0x01ffc9a7")`. 2. If the call fails or return false, the destination contract does not implement ERC-165. -3. If the call returns true, a second call is made with input data `0x01ffc9a7ffffffff`. +3. If the call returns true, a second call is made with input data `0x01ffc9a7000000000000000000000000ffffffff`. 4. If the second call fails or returns true, the destination contract does not implement ERC-165. 5. Otherwise it implements ERC-165. @@ -171,7 +171,7 @@ contract ERC165Cache { 30000, // 30k gas _contract, // To addr x, // Inputs are stored at location x - 0x8, // Inputs are 8 bytes long + 0x20, // Inputs are 8 byes long x, // Store output over input (saves space) 0x20) // Outputs are 32 bytes long