mirror of
https://github.com/status-im/EIPs.git
synced 2025-01-26 14:51:17 +00:00
Update zero padding, thank you @veox
This commit is contained in:
parent
734d68b643
commit
b675b4b3fa
@ -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: `0x01ffc9a700000000000000000000000001ffc9a7` and gas 30,000. This corresponds to `contract.supportsInterface("0x01ffc9a7")`.
|
||||
1. The source contact makes a `STATICCALL` to the destination address with input data: `0x01ffc9a701ffc9a7000000000000000000000000` 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 `0x01ffc9a7000000000000000000000000ffffffff`.
|
||||
3. If the call returns true, a second call is made with input data `0x01ffc9a7ffffffff000000000000000000000000`.
|
||||
4. If the second call fails or returns true, the destination contract does not implement ERC-165.
|
||||
5. Otherwise it implements ERC-165.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user