From 7c646f1094d0c31b3026b8b4f2fc50072ceb6ade Mon Sep 17 00:00:00 2001 From: b00ste Date: Wed, 26 Jun 2024 10:56:48 +0300 Subject: [PATCH] Create page for LSP4 Metadata encoding --- components/NavBar/NavBar.tsx | 9 ++++ pages/lsp4-metadata-encoder.tsx | 77 +++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 pages/lsp4-metadata-encoder.tsx diff --git a/components/NavBar/NavBar.tsx b/components/NavBar/NavBar.tsx index 68c52c7..375f585 100644 --- a/components/NavBar/NavBar.tsx +++ b/components/NavBar/NavBar.tsx @@ -96,6 +96,15 @@ const NavBar: React.FC = () => { ๐Ÿ“– LSP2 Encoder + + + ๐Ÿ“– LSP4 Metadata Encoder + +
diff --git a/pages/lsp4-metadata-encoder.tsx b/pages/lsp4-metadata-encoder.tsx new file mode 100644 index 0000000..48f6532 --- /dev/null +++ b/pages/lsp4-metadata-encoder.tsx @@ -0,0 +1,77 @@ +import { NextPage } from 'next'; +import { useEffect, useState } from 'react'; +import { keccak256 } from 'web3-utils'; + +const Lsp4MetadataEncoderPage: NextPage = () => { + const [images, setImages] = useState< + { + name: string; + type: string; + hash: string; + buffer: Buffer; + image?: string; + }[] + >([]); + + useEffect(() => { + console.log(images); + }, [images]); + + return ( +
+
+
+ +