From 7bc32123cf58a0869b965d81f741623c64efdf84 Mon Sep 17 00:00:00 2001 From: lash Date: Thu, 3 Aug 2023 15:51:28 +0100 Subject: [PATCH] Add token quote interface identifier --- solidity/DecimalQuote.sol | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/solidity/DecimalQuote.sol b/solidity/DecimalQuote.sol index e6bfe62..4eea72c 100644 --- a/solidity/DecimalQuote.sol +++ b/solidity/DecimalQuote.sol @@ -36,4 +36,15 @@ contract DecimalQuote { return _value * d; } } + + // Implements EIP165 + function supportsInterface(bytes4 _sum) public pure returns (bool) { + if (_sum == 0x01ffc9a7) { // ERC165 + return true; + } + if (_sum == 0xdbb21d40) { // TokenQuote + return true; + } + return false; + } }