From b15aab99f8caa92878eac96de22f29aa49a5231d Mon Sep 17 00:00:00 2001 From: blue Date: Tue, 1 Aug 2023 14:40:20 +0900 Subject: [PATCH] Refactor KIP17 page --- src/views/KCT/KIP17Deploy.tsx | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/views/KCT/KIP17Deploy.tsx b/src/views/KCT/KIP17Deploy.tsx index 689dc20..db9fc87 100644 --- a/src/views/KCT/KIP17Deploy.tsx +++ b/src/views/KCT/KIP17Deploy.tsx @@ -28,8 +28,11 @@ enum FunctionEnum { PUP = 'Pause/Unpause', } +const isMainnet = false +const network = URLMAP.network[isMainnet ? 'mainnet' : 'testnet'] + const KIP17Deploy = (): ReactElement => { - const caver = useMemo(() => new Caver(URLMAP.network['testnet']['rpc']), []) + const caver = useMemo(() => new Caver(network['rpc']), []) const [senderAddress, setSenderAddress] = useState('') const [senderKeystoreJSON, setSenderKeystoreJSON] = useState() @@ -155,7 +158,7 @@ const KIP17Deploy = (): ReactElement => { currentTokenId, tokenURI ) - const newMintMsg = `NFT(token ID: ${currentTokenId}) is successfully mintend!` + const newMintMsg = `NFT(token ID: ${currentTokenId}) is successfully minted!` if (minted) { setMintMsg(newMintMsg) @@ -309,7 +312,7 @@ const KIP17Deploy = (): ReactElement => {

Deploy Non-fungible Token (KIP-17)

You can deploy non-fungible token (KIP-17) contracts which provide - basic functionality to transfer NFTs on the Klaytn testnet. KIP-17 + basic functionality to transfer NFTs on the Klaytn network. KIP-17 is derived from ERC-721. But, there are some differences between KIP-17 and ERC-721; More optional extensions are defined, like minting with URI, burning, and pausing extensions. You can find more @@ -331,7 +334,11 @@ const KIP17Deploy = (): ReactElement => { - Testnet + {isMainnet ? ( + Mainnet + ) : ( + Testnet + )} @@ -427,9 +434,7 @@ const keyring = caver.wallet.keyring.decrypt(keystoreJSON, password)`} {deployMsg}You can check it below link:
- + NFT Address
@@ -501,7 +506,7 @@ const minted = await deployedContract.mintWithTokenURI( {mintMsg} You can check it below link:
NFT Inventory @@ -561,7 +566,7 @@ const burned = await deployedContract.burn(burnTokenId)`} {burnMsg} You can see that the NFT you just removed no longer exists:{' '} NFT Inventory @@ -628,7 +633,7 @@ const transferred = await deployedContract.safeTransferFrom( {transferMsg} You can see that the NFT you just sent:{' '} NFT Inventory