Skip to content

Commit

Permalink
feat: add check for support ERC721 interface (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 authored Jun 14, 2024
1 parent fdf9afa commit 66673bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pages/inspector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const Home: NextPage = () => {
useState(false);
const [isLSP9Vault, setIsLSP9Vault] = useState(false);

const [isERC721, setIsERC721] = useState(false);

const [errorMessage, setErrorMessage] = useState('');
const [isEmptyInput, setIsEmptyInput] = useState(true);

Expand Down Expand Up @@ -254,6 +256,14 @@ const Home: NextPage = () => {
>
LSP9Vault ↗️
</a>
<a
className={`button is-info mr-2 mt-2 ${!isERC721 && 'is-outlined'}`}
href="https://eips.ethereum.org/EIPS/eip-721"
target="_blank"
rel="noreferrer"
>
ERC721 ↗️
</a>
</div>
);
}
Expand Down
2 changes: 2 additions & 0 deletions utils/web3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const checkInterface = async (address: string, web3: Web3) => {
INTERFACE_IDS.LSP1UniversalReceiver,
INTERFACE_IDS.LSP6KeyManager,
INTERFACE_IDS.LSP9Vault,
INTERFACE_IDS.ERC721,
],
web3,
);
Expand Down Expand Up @@ -102,6 +103,7 @@ export const checkInterface = async (address: string, web3: Web3) => {
supportsAssetInterface[4] ||
supportsAssetInterface[5],
isLsp9Vault: supportsContractInterface[6],
isERC721: supportsContractInterface[7],
};
};

Expand Down

0 comments on commit 66673bd

Please sign in to comment.