Search
Search

Transaction: 7JBnhvH...9miY

Signed by
Receiver
Status
Succeeded
Transaction Fee
0.00112 
Deposit Value
0.08583 
Gas Used
11 Tgas
Attached Gas
100 Tgas
Created
January 03, 2024 at 2:56:53pm
Hash
7JBnhvHBRBSzfrKHmwnB1aMeB8czJGeNhhAtFmo9miY

Actions

Called method: 'set' in contract: social.near
Arguments:
{ "data": { "aaron.near": { "post": { "commit": { "text": "set to one award", "keys": "[\"aaron.near/widget/Award-Minter/branch/draft\"]" } }, "widget": { "Award-Minter": { "branch": { "draft": { "": "const awardContract = \"main.isnft.near\";\nconst ownerId = \"codequity.near\"; // attribution\nlet accountId = context.accountId;\nconst gas = 200000000000000;\nconst deposit = 10000000000000000000000;\nconst metadata = {\n name: state.award_title,\n description: state.award_description,\n properties: [],\n image: `ipfs://${state.image.cid}`,\n};\n\nState.init({\n award_title: \"\",\n award_description: \"\",\n award_citation: \"\",\n recipient: \"\",\n showAlert: false,\n toastMessage: \"\",\n});\n\nconst handleMint = () => {\n if (!state.image.cid) {\n return;\n }\n if (!state.award_title) {\n console.log(\"Please enter name of award\");\n State.update({\n showAlert: true,\n toastMessage: \"Please enter award name.\",\n });\n setTimeout(() => {\n State.update({\n showAlert: false,\n });\n }, 3000);\n } else if (!state.award_description) {\n State.update({\n showAlert: true,\n toastMessage: \"Please enter award description.\",\n });\n setTimeout(() => {\n State.update({\n showAlert: false,\n });\n }, 3000);\n } else if (!state.award_citation) {\n State.update({\n showAlert: true,\n toastMessage: \"Please enter citation.\",\n });\n setTimeout(() => {\n State.update({\n showAlert: false,\n });\n }, 3000);\n } else {\n asyncFetch(\"https://ipfs.near.social/add\", {\n method: \"POST\",\n headers: {\n Accept: \"application/json\",\n },\n body: metadata,\n }).then((res) => {\n const cid = res.body.cid;\n const Id = Math.floor(Math.random() * (9999999 - 100000 + 1) + 100000);\n\n Near.call([\n {\n contractName: awardContract,\n methodName: \"nft_mint\",\n args: {\n token_id: `${Date.now()}`,\n metadata: {\n title: state.award_title,\n description: state.award_description,\n media: `https://ipfs.io/ipfs/${state.image.cid}`,\n extra: JSON.stringify({\n type: \"award\",\n citation: `${state.award_citation}`,\n }),\n reference: `ipfs://${cid}`,\n },\n receiver_id: state.recipient || accountId,\n },\n gas: gas,\n deposit: deposit,\n },\n ]);\n });\n return;\n }\n console.log(\"passed checks\");\n};\n\nconst onChangeTitle = (award_title) => {\n State.update({\n award_title,\n });\n};\n\nconst onChangeRecipient = (recipient) => {\n State.update({\n recipient,\n });\n};\n\nconst onChangeDesc = (award_description) => {\n State.update({\n award_description,\n });\n};\n\nconst onChangeCitation = (award_citation) => {\n State.update({\n award_citation,\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`;\n\nconst Main = styled.div`\n display: grid;\n gap: 3rem;\n align-content:center;\n grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));\n justify-content: center;\n // background: linear-gradient(180deg,#e4f1fb,hsla(0,0%,85.1%,0));\n margin-top: 5px;\n width:100%;\n padding: 1rem;\n`;\n\nconst Text = styled.p`\nfont-size: .9rem;\ncolor: #525c76;\nline-height:1.rem;\nmargin: 3px;\n`;\n\nconst MainRoot = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n justify-content: space-between;\n`;\n\nconst Ellipse = styled.div`\nbackground-color:#dff3f9;\nheight: 100px;\nwidth: 100px;\nborder-radius: 50%;\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:100%;\n max-height:100%;\n width: 90%;\n max-width: 500px;\n border-radius: 1rem;\n &>img{\n object-fit: cover;\n width: 100%;\n height: 100%;\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\nconst SelectTag = styled.select`\n height: fit-content;\n width: 300px;\n`;\n\nconst ChainIcon = styled.option`\n display: flex;\n height: 130px;\n padding: 1rem auto;\n &>img{\n height:100px;\n width: 100px;\n object-fit: contain;\n }\n`;\n\nif (!accountId) {\n console.log(\"Please login here now\");\n State.update({\n showAlert: true,\n toastMessage: \"Please sign in.\",\n });\n}\n\nreturn (\n <MainRoot>\n {state.showAlert && <Widget src=\"aaron.near/widget/Toast\" props={state} />}\n <Main className=\"container-fluid\">\n {!state.image.cid ? (\n <div className=\"flex-grow-1\">\n <ImageUploadCard className=\"flex-grow-1\">\n <Ellipse />\n <IpfsImageUpload\n image={state.image}\n className=\"btn text-decoration-none link-primary pe-auto\"\n />\n <div>\n <Text>Supported file types: .jpg, .jpeg, .png, .webp, .gif</Text>\n <Text>Max file size: 20mb</Text>\n </div>\n </ImageUploadCard>\n </div>\n ) : (\n <>\n <Card className=\"d-flex flex-column align-items-center w-100\">\n <div>\n <IpfsImageUpload\n image={state.image}\n className=\"btn btn-outline-primary border-0 rounded-3\"\n />\n </div>\n <ImageCard>\n <img\n src={`https://ipfs.io/ipfs/` + state.image.cid}\n alt=\"uploaded image\"\n width=\"100%\"\n height=\"100%\"\n className=\"rounded-3\"\n />\n </ImageCard>\n </Card>\n <div>\n <Card>\n <Card>\n Name of Award:\n <Input\n type=\"text\"\n value={state.award_title || \"\"}\n onChange={(e) => onChangeTitle(e.target.value)}\n />\n </Card>\n <Card>\n Award Description:\n <TextArea\n type=\"text\"\n value={state.award_description || \"\"}\n onChange={(e) => onChangeDesc(e.target.value)}\n />\n </Card>\n <Card>\n Award Citation:\n <TextArea\n type=\"text\"\n value={state.award_citation || \"\"}\n onChange={(e) => onChangeCitation(e.target.value)}\n />\n </Card>\n <Card>\n Award to:\n <Input\n type=\"text\"\n placeholder={accountId}\n value={state.recipient}\n onChange={(e) => onChangeRecipient(e.target.value)}\n />\n </Card>\n </Card>\n <button\n type=\"button\"\n className=\"btn btn-primary d-flex flex-column align-items-center mx-auto\"\n onClick={handleMint}\n >\n Create and Send Award\n </button>\n </div>\n </>\n )}\n </Main>\n </MainRoot>\n);\n" } } } } } } }

Transaction Execution Plan

Convert Transaction To Receipt
Gas Burned:
2 Tgas
Tokens Burned:
0.00024 
Receipt:
Predecessor ID:
Receiver ID:
Gas Burned:
8 Tgas
Tokens Burned:
0.00087 
Called method: 'set' in contract: social.near
Arguments:
{ "data": { "aaron.near": { "post": { "commit": { "text": "set to one award", "keys": "[\"aaron.near/widget/Award-Minter/branch/draft\"]" } }, "widget": { "Award-Minter": { "branch": { "draft": { "": "const awardContract = \"main.isnft.near\";\nconst ownerId = \"codequity.near\"; // attribution\nlet accountId = context.accountId;\nconst gas = 200000000000000;\nconst deposit = 10000000000000000000000;\nconst metadata = {\n name: state.award_title,\n description: state.award_description,\n properties: [],\n image: `ipfs://${state.image.cid}`,\n};\n\nState.init({\n award_title: \"\",\n award_description: \"\",\n award_citation: \"\",\n recipient: \"\",\n showAlert: false,\n toastMessage: \"\",\n});\n\nconst handleMint = () => {\n if (!state.image.cid) {\n return;\n }\n if (!state.award_title) {\n console.log(\"Please enter name of award\");\n State.update({\n showAlert: true,\n toastMessage: \"Please enter award name.\",\n });\n setTimeout(() => {\n State.update({\n showAlert: false,\n });\n }, 3000);\n } else if (!state.award_description) {\n State.update({\n showAlert: true,\n toastMessage: \"Please enter award description.\",\n });\n setTimeout(() => {\n State.update({\n showAlert: false,\n });\n }, 3000);\n } else if (!state.award_citation) {\n State.update({\n showAlert: true,\n toastMessage: \"Please enter citation.\",\n });\n setTimeout(() => {\n State.update({\n showAlert: false,\n });\n }, 3000);\n } else {\n asyncFetch(\"https://ipfs.near.social/add\", {\n method: \"POST\",\n headers: {\n Accept: \"application/json\",\n },\n body: metadata,\n }).then((res) => {\n const cid = res.body.cid;\n const Id = Math.floor(Math.random() * (9999999 - 100000 + 1) + 100000);\n\n Near.call([\n {\n contractName: awardContract,\n methodName: \"nft_mint\",\n args: {\n token_id: `${Date.now()}`,\n metadata: {\n title: state.award_title,\n description: state.award_description,\n media: `https://ipfs.io/ipfs/${state.image.cid}`,\n extra: JSON.stringify({\n type: \"award\",\n citation: `${state.award_citation}`,\n }),\n reference: `ipfs://${cid}`,\n },\n receiver_id: state.recipient || accountId,\n },\n gas: gas,\n deposit: deposit,\n },\n ]);\n });\n return;\n }\n console.log(\"passed checks\");\n};\n\nconst onChangeTitle = (award_title) => {\n State.update({\n award_title,\n });\n};\n\nconst onChangeRecipient = (recipient) => {\n State.update({\n recipient,\n });\n};\n\nconst onChangeDesc = (award_description) => {\n State.update({\n award_description,\n });\n};\n\nconst onChangeCitation = (award_citation) => {\n State.update({\n award_citation,\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`;\n\nconst Main = styled.div`\n display: grid;\n gap: 3rem;\n align-content:center;\n grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));\n justify-content: center;\n // background: linear-gradient(180deg,#e4f1fb,hsla(0,0%,85.1%,0));\n margin-top: 5px;\n width:100%;\n padding: 1rem;\n`;\n\nconst Text = styled.p`\nfont-size: .9rem;\ncolor: #525c76;\nline-height:1.rem;\nmargin: 3px;\n`;\n\nconst MainRoot = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n justify-content: space-between;\n`;\n\nconst Ellipse = styled.div`\nbackground-color:#dff3f9;\nheight: 100px;\nwidth: 100px;\nborder-radius: 50%;\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:100%;\n max-height:100%;\n width: 90%;\n max-width: 500px;\n border-radius: 1rem;\n &>img{\n object-fit: cover;\n width: 100%;\n height: 100%;\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\nconst SelectTag = styled.select`\n height: fit-content;\n width: 300px;\n`;\n\nconst ChainIcon = styled.option`\n display: flex;\n height: 130px;\n padding: 1rem auto;\n &>img{\n height:100px;\n width: 100px;\n object-fit: contain;\n }\n`;\n\nif (!accountId) {\n console.log(\"Please login here now\");\n State.update({\n showAlert: true,\n toastMessage: \"Please sign in.\",\n });\n}\n\nreturn (\n <MainRoot>\n {state.showAlert && <Widget src=\"aaron.near/widget/Toast\" props={state} />}\n <Main className=\"container-fluid\">\n {!state.image.cid ? (\n <div className=\"flex-grow-1\">\n <ImageUploadCard className=\"flex-grow-1\">\n <Ellipse />\n <IpfsImageUpload\n image={state.image}\n className=\"btn text-decoration-none link-primary pe-auto\"\n />\n <div>\n <Text>Supported file types: .jpg, .jpeg, .png, .webp, .gif</Text>\n <Text>Max file size: 20mb</Text>\n </div>\n </ImageUploadCard>\n </div>\n ) : (\n <>\n <Card className=\"d-flex flex-column align-items-center w-100\">\n <div>\n <IpfsImageUpload\n image={state.image}\n className=\"btn btn-outline-primary border-0 rounded-3\"\n />\n </div>\n <ImageCard>\n <img\n src={`https://ipfs.io/ipfs/` + state.image.cid}\n alt=\"uploaded image\"\n width=\"100%\"\n height=\"100%\"\n className=\"rounded-3\"\n />\n </ImageCard>\n </Card>\n <div>\n <Card>\n <Card>\n Name of Award:\n <Input\n type=\"text\"\n value={state.award_title || \"\"}\n onChange={(e) => onChangeTitle(e.target.value)}\n />\n </Card>\n <Card>\n Award Description:\n <TextArea\n type=\"text\"\n value={state.award_description || \"\"}\n onChange={(e) => onChangeDesc(e.target.value)}\n />\n </Card>\n <Card>\n Award Citation:\n <TextArea\n type=\"text\"\n value={state.award_citation || \"\"}\n onChange={(e) => onChangeCitation(e.target.value)}\n />\n </Card>\n <Card>\n Award to:\n <Input\n type=\"text\"\n placeholder={accountId}\n value={state.recipient}\n onChange={(e) => onChangeRecipient(e.target.value)}\n />\n </Card>\n </Card>\n <button\n type=\"button\"\n className=\"btn btn-primary d-flex flex-column align-items-center mx-auto\"\n onClick={handleMint}\n >\n Create and Send Award\n </button>\n </div>\n </>\n )}\n </Main>\n </MainRoot>\n);\n" } } } } } } }
Empty result
No logs
Receipt:
Predecessor ID:
Receiver ID:
Gas Burned:
223 Ggas
Tokens Burned:
0 
Transferred 0.01818  to aaron.near
Empty result
No logs