diff --git a/packages/web/assets/academy/creatorgame.webp b/packages/web/assets/academy/creatorgame.webp new file mode 100644 index 000000000..7c38d0609 Binary files /dev/null and b/packages/web/assets/academy/creatorgame.webp differ diff --git a/packages/web/components/QuestChain/MintNFTTile.tsx b/packages/web/components/QuestChain/MintNFTTile.tsx index 4aecec23f..84e6bd414 100644 --- a/packages/web/components/QuestChain/MintNFTTile.tsx +++ b/packages/web/components/QuestChain/MintNFTTile.tsx @@ -72,7 +72,7 @@ export const MintNFTTile: React.FC = ({ duration: null, }); - const txHash = await contract.write.mintToken(); + const txHash = await contract.write.mintToken([], { account: address }); addToast({ description: 'Transaction submitted. Waiting for 1 block confirmation.', duration: null, diff --git a/packages/web/components/QuestChain/QuestChainDisplay.tsx b/packages/web/components/QuestChain/QuestChainDisplay.tsx index b879b5ad9..991b19bc9 100644 --- a/packages/web/components/QuestChain/QuestChainDisplay.tsx +++ b/packages/web/components/QuestChain/QuestChainDisplay.tsx @@ -254,7 +254,7 @@ const QuestChainDisplay: React.FC = ({ rel="noreferrer" color="purple.200" > - {`${creatorAddress?.slice(0, 5)}…${creatorAddress?.slice(-3)}`} + {creatorName ? creatorName : `${creatorAddress?.slice(0, 5)}…${creatorAddress?.slice(-3)}`} diff --git a/packages/web/components/QuestChain/QuestHeading.tsx b/packages/web/components/QuestChain/QuestHeading.tsx index 3e91060ed..d0a6b053b 100644 --- a/packages/web/components/QuestChain/QuestHeading.tsx +++ b/packages/web/components/QuestChain/QuestHeading.tsx @@ -71,15 +71,13 @@ export const ChainStats: React.FC<{ diff --git a/packages/web/components/QuestChain/UploadProof.tsx b/packages/web/components/QuestChain/UploadProof.tsx index 1c843af0a..21411c678 100644 --- a/packages/web/components/QuestChain/UploadProof.tsx +++ b/packages/web/components/QuestChain/UploadProof.tsx @@ -119,14 +119,17 @@ export const UploadProof: React.FC<{ addToast({ description: ( - - Wrote metadata to{' '} - - {details} - - .{'\n\n'} - Waiting for Confirmation: Confirm the transaction in your wallet.' - + + + Wrote metadata to{' '} + + {details} + . + + + Simulating Mint: Confirm the transaction in your wallet. + + ), duration: 3_000, }); @@ -134,10 +137,20 @@ export const UploadProof: React.FC<{ // eslint-disable-next-line no-console if (debug) console.debug({ quest }); - const txHash = await contract.write.submitProofs( + if(!address) throw new Error('Missing address.') + + const { request } = await contract.simulate.submitProofs( [[BigInt(quest.questId)], [details]], { account: address }, ); + + // eslint-disable-next-line no-console + if(debug) console.debug({ request }) + + const txHash = await viemClients.wallet.writeContract( + request as typeof request & { account: string } + ); + addToast({ description: `Transaction ${txHash} submitted. Waiting for 1 block confirmation.`, duration: null, @@ -149,7 +162,7 @@ export const UploadProof: React.FC<{ ), duration: null, }); - await helpers.waitUntilSubgraphIndexed(`${chainId}`, Number(receipt.blockNumber)); + await helpers.waitUntilSubgraphIndexed(`0x${chainId.toString(16)}`, Number(receipt.blockNumber)); addToast({ description: `Successfully submitted proof.`, duration: 5_000, diff --git a/packages/web/utils/questChains.ts b/packages/web/utils/questChains.ts index fd5fa7eed..3069900d9 100644 --- a/packages/web/utils/questChains.ts +++ b/packages/web/utils/questChains.ts @@ -38,7 +38,7 @@ import team from '#assets/academy/team.webp'; import time from '#assets/academy/time.webp'; import web3builder from '#assets/academy/web3builder.webp'; import buildingonoptimism from '#assets/academy/buildingonop.webp'; -import creatorgame from '#assets/academy/creatorgame.png'; +import creatorgame from '#assets/academy/creatorgame.webp'; import { useWeb3 } from '#lib/hooks'; export const useQuestChainContract = (address: string) => {