Search
Search

Transaction: 81NsGiH...1Hd4

Receiver
Status
Succeeded
Transaction Fee
0.00089 
Deposit Value
0 
Gas Used
9 Tgas
Attached Gas
100 Tgas
Created
August 02, 2023 at 10:45:31pm
Hash
81NsGiHnhuBQ2tDzL5KKPGEJxMe3hVf3itZrKBig1Hd4

Actions

Called method: 'set' in contract: social.near
Arguments:
{ "data": { "socialcap.near": { "widget": { "CredentialMint": { "": "let accountId = context.accountId;\nconst mintButton = props.mintButton ?? \"Mint Credential\";\nconst showDetails = props.showDetails ?? true;\nconst receiver = props.receiver ?? accountId;\nconst apiUrl = props.apiUrl ?? \"http://localhost:3080/api\";\nconst credentialUid = props.uid ?? \"caaaaff63a48400a9ce57f3ad6960001\";\nif (!accountId) {\n return \"Please, login\";\n}\n\nif (!credentialUid) {\n return \"Please include a Credential Account to verify proof\";\n}\n\nconst profile = socialGetr(`${accountId}/profile`);\n\nif (profile === null) {\n IpfsImageUpload();\n return \"Loading\";\n}\n\nconst getCredential = fetch(\n `${apiUrl}/query/get_credential?params=${JSON.stringify({\n uid: credentialUid,\n })}`,\n {\n method: \"GET\",\n }\n);\nif (!getCredential) {\n return \"Loading...\";\n}\nconsole.log(\"getCredential\", getCredential);\nconst credential = getCredential.body.data;\n\nState.init({\n cid: credential.image,\n description: credential.description,\n title: credential.type,\n community: credential.community,\n userAlias: credential.alias,\n issuedUtc: credential.issuedUtc,\n expireUtc: credential.expiresUTC,\n receiver: receiver,\n showAlert: false,\n toastMessage: \"\",\n openModal: false,\n});\n\nif (props.transactionHashes) {\n const statusResult = fetch(\"https://rpc.mainnet.near.org\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n jsonrpc: \"2.0\",\n id: \"dontcare\",\n method: \"tx\",\n params: [props.transactionHashes, accountId],\n }),\n });\n //check status and open modal\n\n if (\n statusResult.body.result.status &&\n Object.keys(statusResult.body.result.status)[0] == \"SuccessValue\"\n ) {\n State.update({ openModal: true });\n }\n}\n\nconst handleMint = () => {\n if (!state.cid) {\n return;\n }\n if (!accountId) {\n console.log(\"Please login\"); // add share dogvwallet\n State.update({\n showAlert: true,\n toastMessage: \"Please log in before continuing\",\n });\n setTimeout(() => {\n State.update({\n showAlert: false,\n });\n }, 3000);\n } else if (!state.title) {\n console.log(\"Please Enter title\");\n State.update({\n showAlert: true,\n toastMessage: \"Please enter a title for the Credential\",\n });\n\n setTimeout(() => {\n State.update({\n showAlert: false,\n });\n }, 3000);\n } else if (!state.description) {\n State.update({\n showAlert: true,\n toastMessage: \"Please enter a description for the Credential\",\n });\n setTimeout(() => {\n State.update({\n showAlert: false,\n });\n }, 3000);\n } else {\n const metadata = {\n name: state.title,\n description: state.description,\n properties: [{ credentialUid }],\n image: `ipfs://${state.cid}`,\n reference: credentialUid,\n };\n console.log(\"come\", metadata);\n asyncFetch(\"https://ipfs.near.social/add\", {\n method: \"POST\",\n headers: {\n Accept: \"application/json\",\n },\n body: metadata,\n }).then((res) => {\n console.log(\"GO ON SOUN\", res);\n const cid = res.body.cid;\n const gas = 200000000000000;\n const deposit = 10000000000000000000000;\n console.log(\"State Image CID: \" + state.cid);\n console.log(\"Reference CID: \" + cid);\n Near.call([\n {\n contractName: \"nft.genadrop.near\",\n methodName: \"nft_mint\",\n args: {\n token_id: `${Date.now()}`,\n metadata: {\n title: state.title,\n description: state.description,\n media: `https://ipfs.io/ipfs/${state.cid}`,\n reference: credentialUid,\n },\n receiver_id: state.receiver,\n },\n gas: gas,\n deposit: deposit,\n },\n ]);\n });\n }\n};\n\nconst onChangeReceiver = (receiver) => {\n State.update({\n receiver,\n });\n};\n\nconst ImageUploadCard = styled.div`\ndisplay:flex;\nflex-flow: column nowrap;\nalign-items: center;\n width:80%;\n border: 2px dashed #0d99ff;\n border-radius: 1rem;\n box-shadow: 4px 4px 20px 6px rgba(0,0,0,.2);\n margin:30px auto;\n padding:1.5rem;\n text-align: center;\n`;\nconst Main = styled.div`\nposition:relative;\n font-family: \"SF Pro Display\",sans-serif;\n`;\n\nconst Heading = styled.p`\n margin: 10px auto 10px auto;\n font-size: 1em;\n color:#0f1d40;\n width:60%;\n text-align: center;\n font-family: \"SF Pro Display\",sans-serif;\n`;\n\nconst Toast = styled.div`\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n align-conten: center;\n bottom: 60px;\n right: 20px;\n background-color: red;\n color: #fff;\n padding: 16px;\n border-radius: 8px;\n z-index: 100;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);\n line-height:1;\n`;\n\nconst Elipse = styled.div`\nbackground-color:#eff3f9;\nheight: 100px;\nwidth: 100px;\nborder-radius: 50%;\n`;\n\nconst Text = styled.p`\nfont-size: .9rem;\ncolor: #525c76;\nline-height:1.rem;\nmargin: 3px;\n`;\n\nconst Card = styled.div`\npadding: 1em;\nborder: 1px solid #e5e8eb;\ngap: 2em;\nmargin: 10px auto;\nborder-radius: .7em;\n`;\n\nconst ImageCard = styled.div`\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);\n height:fit-content;\n max-height:500px;\n width: 90%;\n max-width: 500px;\n border-radius: 1rem;\n &>img{\n object-fit: contain;\n }\n`;\n\nconst Input = styled.input`\n display: block;\n padding:.5em;\n width:100%;\n border: 1px solid #e5e8eb;\n border-radius: 10px;\n outline: none;\n background: #f4f5f6;\n color: #525c76;\n :focus{\n border:1px solid #0d99ff;\n }\n ::placeholder {\n color: palevioletred;\n }\n`;\n\nconst TextArea = styled.textarea`\n display: block;\n padding:.5em;\n width:100%;\n border: 1px solid #e5e8eb;\n border-radius: 10px;\n outline: none;\n background: #f4f5f6;\n color: #525c76;\n :focus{\n border:1px solid #0d99ff;\n }\n`;\n// state.cid\nreturn (\n <Main className=\"container-fluid\">\n <Widget\n src={`manzanal.near/widget/Common.Modal.RedirectModal`}\n props={{\n open: state.openModal,\n title: \"Minting Credential Succes\",\n description:\n \"Credential minting was successful. Would you like to be redirected to your profile and see the NFT?\",\n href: `/near/widget/ProfilePage?accountId=${accountId}&tab=nfts`,\n showClose: true,\n accept: () => console.log(\"REDIRECT TO NFT PAGE\"),\n }}\n />\n <div>\n <Card className=\"d-flex flex-column align-items-center\">\n <ImageCard>\n <img\n src={`https://ipfs.io/ipfs/` + state.cid}\n alt=\"credential mage\"\n width=\"100%\"\n height=\"100%\"\n />\n </ImageCard>\n </Card>\n {showDetails && (\n <Card>\n <h5>Credential Details</h5>\n <Card>\n Title:\n <Input type=\"text\" disabled value={state.title} />\n </Card>\n <Card>\n Description:\n <TextArea type=\"text\" disabled value={state.description} />\n </Card>\n <Card>\n Receiver:\n <Input\n type=\"text\"\n onChange={(e) => onChangeReceiver(e.target.value)}\n value={state.receiver}\n />\n </Card>\n </Card>\n )}\n <div className=\"d-flex justify-content-center mb-2\">\n <button type=\"button\" className=\"btn btn-primary\" onClick={handleMint}>\n {mintButton}\n </button>\n </div>\n </div>\n\n {state.showAlert && (\n <Widget src=\"jgodwill.near/widget/genalert\" props={state} />\n )}\n </Main>\n);\n" } } } } }

Transaction Execution Plan

Convert Transaction To Receipt
Gas Burned:
2 Tgas
Tokens Burned:
0.00024 
Receipt:
Predecessor ID:
Receiver ID:
Gas Burned:
6 Tgas
Tokens Burned:
0.00065 
Called method: 'set' in contract: social.near
Arguments:
{ "data": { "socialcap.near": { "widget": { "CredentialMint": { "": "let accountId = context.accountId;\nconst mintButton = props.mintButton ?? \"Mint Credential\";\nconst showDetails = props.showDetails ?? true;\nconst receiver = props.receiver ?? accountId;\nconst apiUrl = props.apiUrl ?? \"http://localhost:3080/api\";\nconst credentialUid = props.uid ?? \"caaaaff63a48400a9ce57f3ad6960001\";\nif (!accountId) {\n return \"Please, login\";\n}\n\nif (!credentialUid) {\n return \"Please include a Credential Account to verify proof\";\n}\n\nconst profile = socialGetr(`${accountId}/profile`);\n\nif (profile === null) {\n IpfsImageUpload();\n return \"Loading\";\n}\n\nconst getCredential = fetch(\n `${apiUrl}/query/get_credential?params=${JSON.stringify({\n uid: credentialUid,\n })}`,\n {\n method: \"GET\",\n }\n);\nif (!getCredential) {\n return \"Loading...\";\n}\nconsole.log(\"getCredential\", getCredential);\nconst credential = getCredential.body.data;\n\nState.init({\n cid: credential.image,\n description: credential.description,\n title: credential.type,\n community: credential.community,\n userAlias: credential.alias,\n issuedUtc: credential.issuedUtc,\n expireUtc: credential.expiresUTC,\n receiver: receiver,\n showAlert: false,\n toastMessage: \"\",\n openModal: false,\n});\n\nif (props.transactionHashes) {\n const statusResult = fetch(\"https://rpc.mainnet.near.org\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n jsonrpc: \"2.0\",\n id: \"dontcare\",\n method: \"tx\",\n params: [props.transactionHashes, accountId],\n }),\n });\n //check status and open modal\n\n if (\n statusResult.body.result.status &&\n Object.keys(statusResult.body.result.status)[0] == \"SuccessValue\"\n ) {\n State.update({ openModal: true });\n }\n}\n\nconst handleMint = () => {\n if (!state.cid) {\n return;\n }\n if (!accountId) {\n console.log(\"Please login\"); // add share dogvwallet\n State.update({\n showAlert: true,\n toastMessage: \"Please log in before continuing\",\n });\n setTimeout(() => {\n State.update({\n showAlert: false,\n });\n }, 3000);\n } else if (!state.title) {\n console.log(\"Please Enter title\");\n State.update({\n showAlert: true,\n toastMessage: \"Please enter a title for the Credential\",\n });\n\n setTimeout(() => {\n State.update({\n showAlert: false,\n });\n }, 3000);\n } else if (!state.description) {\n State.update({\n showAlert: true,\n toastMessage: \"Please enter a description for the Credential\",\n });\n setTimeout(() => {\n State.update({\n showAlert: false,\n });\n }, 3000);\n } else {\n const metadata = {\n name: state.title,\n description: state.description,\n properties: [{ credentialUid }],\n image: `ipfs://${state.cid}`,\n reference: credentialUid,\n };\n console.log(\"come\", metadata);\n asyncFetch(\"https://ipfs.near.social/add\", {\n method: \"POST\",\n headers: {\n Accept: \"application/json\",\n },\n body: metadata,\n }).then((res) => {\n console.log(\"GO ON SOUN\", res);\n const cid = res.body.cid;\n const gas = 200000000000000;\n const deposit = 10000000000000000000000;\n console.log(\"State Image CID: \" + state.cid);\n console.log(\"Reference CID: \" + cid);\n Near.call([\n {\n contractName: \"nft.genadrop.near\",\n methodName: \"nft_mint\",\n args: {\n token_id: `${Date.now()}`,\n metadata: {\n title: state.title,\n description: state.description,\n media: `https://ipfs.io/ipfs/${state.cid}`,\n reference: credentialUid,\n },\n receiver_id: state.receiver,\n },\n gas: gas,\n deposit: deposit,\n },\n ]);\n });\n }\n};\n\nconst onChangeReceiver = (receiver) => {\n State.update({\n receiver,\n });\n};\n\nconst ImageUploadCard = styled.div`\ndisplay:flex;\nflex-flow: column nowrap;\nalign-items: center;\n width:80%;\n border: 2px dashed #0d99ff;\n border-radius: 1rem;\n box-shadow: 4px 4px 20px 6px rgba(0,0,0,.2);\n margin:30px auto;\n padding:1.5rem;\n text-align: center;\n`;\nconst Main = styled.div`\nposition:relative;\n font-family: \"SF Pro Display\",sans-serif;\n`;\n\nconst Heading = styled.p`\n margin: 10px auto 10px auto;\n font-size: 1em;\n color:#0f1d40;\n width:60%;\n text-align: center;\n font-family: \"SF Pro Display\",sans-serif;\n`;\n\nconst Toast = styled.div`\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n align-conten: center;\n bottom: 60px;\n right: 20px;\n background-color: red;\n color: #fff;\n padding: 16px;\n border-radius: 8px;\n z-index: 100;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);\n line-height:1;\n`;\n\nconst Elipse = styled.div`\nbackground-color:#eff3f9;\nheight: 100px;\nwidth: 100px;\nborder-radius: 50%;\n`;\n\nconst Text = styled.p`\nfont-size: .9rem;\ncolor: #525c76;\nline-height:1.rem;\nmargin: 3px;\n`;\n\nconst Card = styled.div`\npadding: 1em;\nborder: 1px solid #e5e8eb;\ngap: 2em;\nmargin: 10px auto;\nborder-radius: .7em;\n`;\n\nconst ImageCard = styled.div`\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);\n height:fit-content;\n max-height:500px;\n width: 90%;\n max-width: 500px;\n border-radius: 1rem;\n &>img{\n object-fit: contain;\n }\n`;\n\nconst Input = styled.input`\n display: block;\n padding:.5em;\n width:100%;\n border: 1px solid #e5e8eb;\n border-radius: 10px;\n outline: none;\n background: #f4f5f6;\n color: #525c76;\n :focus{\n border:1px solid #0d99ff;\n }\n ::placeholder {\n color: palevioletred;\n }\n`;\n\nconst TextArea = styled.textarea`\n display: block;\n padding:.5em;\n width:100%;\n border: 1px solid #e5e8eb;\n border-radius: 10px;\n outline: none;\n background: #f4f5f6;\n color: #525c76;\n :focus{\n border:1px solid #0d99ff;\n }\n`;\n// state.cid\nreturn (\n <Main className=\"container-fluid\">\n <Widget\n src={`manzanal.near/widget/Common.Modal.RedirectModal`}\n props={{\n open: state.openModal,\n title: \"Minting Credential Succes\",\n description:\n \"Credential minting was successful. Would you like to be redirected to your profile and see the NFT?\",\n href: `/near/widget/ProfilePage?accountId=${accountId}&tab=nfts`,\n showClose: true,\n accept: () => console.log(\"REDIRECT TO NFT PAGE\"),\n }}\n />\n <div>\n <Card className=\"d-flex flex-column align-items-center\">\n <ImageCard>\n <img\n src={`https://ipfs.io/ipfs/` + state.cid}\n alt=\"credential mage\"\n width=\"100%\"\n height=\"100%\"\n />\n </ImageCard>\n </Card>\n {showDetails && (\n <Card>\n <h5>Credential Details</h5>\n <Card>\n Title:\n <Input type=\"text\" disabled value={state.title} />\n </Card>\n <Card>\n Description:\n <TextArea type=\"text\" disabled value={state.description} />\n </Card>\n <Card>\n Receiver:\n <Input\n type=\"text\"\n onChange={(e) => onChangeReceiver(e.target.value)}\n value={state.receiver}\n />\n </Card>\n </Card>\n )}\n <div className=\"d-flex justify-content-center mb-2\">\n <button type=\"button\" className=\"btn btn-primary\" onClick={handleMint}>\n {mintButton}\n </button>\n </div>\n </div>\n\n {state.showAlert && (\n <Widget src=\"jgodwill.near/widget/genalert\" props={state} />\n )}\n </Main>\n);\n" } } } } }
Empty result
No logs
Receipt:
Predecessor ID:
Receiver ID:
Gas Burned:
223 Ggas
Tokens Burned:
0 
Transferred 0.01841  to socialcap.near
Empty result
No logs