Search
Search

Transaction: BiEGhxe...WSS6

Receiver
Status
Succeeded
Transaction Fee
0.00083 
Deposit Value
0.0227 
Gas Used
8 Tgas
Attached Gas
300 Tgas
Created
December 08, 2023 at 8:42:28pm
Hash
BiEGhxeCAbAk1JtPcAPKspbM7jgsKozFwFkfPBpXWSS6

Actions

Called method: 'set' in contract: social.near
Arguments:
{ "data": { "fastvault.near": { "widget": { "files": { "": "const accountId = props.accountId ?? context.accountId;\n\nconst savedPassword = Storage.privateGet(\"encryptionPassword\");\nif (savedPassword && !state.ipfsCreds) {\n State.update({ password: JSON.parse(savedPassword) });\n}\n\nState.init({\n uploading: false,\n dialogIsOpen: false,\n});\n\n/**\n * Write event to SocialDB that a file was added\n * @param {string} name\n * @param {string} cid\n */\nconst writeAddToIndex = (encryptedMetadata) => {\n Social.set(\n {\n index: {\n fastvault_experimental: JSON.stringify({\n key: \"add\",\n // encryptedMetadata is of the form { nonce, ciphertext },\n value: encryptedMetadata,\n }),\n },\n },\n {\n onCommit: () => {\n State.update({ uploading: false });\n },\n }\n );\n};\n\n/**\n * Convert file to Data URL which can be passed into img src attribute for display\n * @param {*} blob\n */\nconst setDataUrlFromBlob = (blob) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n console.log(\"reader.result\", reader.result);\n State.update({ dataUrl: reader.result, dialogIsOpen: true });\n // const base64data = reader.result.split(\",\")[1];\n // console.log(\"base64data\", base64data);\n };\n reader.readAsDataURL(blob);\n};\n\nconst disclaimer =\n \"This is a hackathon project. Please do not upload large amounts of data or any sensitive information\";\nconst DisclaimerBanner = styled.div`\n height: 2rem;\n width: 100%;\n background-color: #ffe484;\n color: #21252a;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 1rem;\n border-radius: 0.5rem;\n`;\n\n// Show setup form if user has not entered IPFS credentials\nif (!state.password) {\n return (\n <>\n <DisclaimerBanner>{disclaimer}</DisclaimerBanner>\n <div className=\"d-flex flex-column gap-1\">\n <h2>Please enter encryption password</h2>\n <p>\n This will be used to encrypt future files and to attempt to decrypt\n existing files.\n <strong>\n Changing this will not affect the encryption of previously uploaded\n files\n </strong>\n </p>\n <div className=\"d-flex flex-row gap-2\">\n <input\n type=\"password\"\n className=\"form-control\"\n placeholder=\"password\"\n onChange={(e) => State.update({ formPassword: e.target.value })}\n />\n <Widget\n src=\"near/widget/DIG.Button\"\n props={{ label: \"Save\" }}\n onClick={() => {\n Storage.privateSet(\n \"encryptionPassword\",\n JSON.stringify(state.formPassword)\n );\n State.update({\n password: state.formPassword,\n });\n }}\n />\n </div>\n </div>\n </>\n );\n}\n\nreturn accountId ? (\n <div>\n <DisclaimerBanner>{disclaimer}</DisclaimerBanner>\n <div className=\"d-flex flex-column gap-1\">\n <div className=\"d-flex flex-row justify-content-end\">\n <Widget\n src=\"near/widget/DIG.Button\"\n props={{ label: \"Switch encryption password\" }}\n onClick={() => {\n Storage.privateSet(\"encryptionPassword\", null);\n State.update({\n password: null,\n });\n }}\n />\n </div>\n {state.password && (\n <Widget\n src=\"fastvault.near/widget/EncryptedIpfsUpload\"\n props={{\n password: state.password,\n onUpload: (_metadata, encryptedMetadata) => {\n writeAddToIndex(encryptedMetadata);\n },\n }}\n />\n )}\n {\n /* example of displaying an image in dialog */\n state.dataUrl && (\n <Widget\n src=\"near/widget/DIG.Dialog\"\n props={{\n type: \"dialog\",\n // title: \"Header\",\n // description: \"Some description\",\n // onCancel: handleCancelFunction,\n // onConfirm: handleConfirmFunction,\n // cancelButtonText: \"Cancel\",\n // confirmButtonText: \"Confirm\",\n open: state.dialogIsOpen,\n content: <img src={state.dataUrl} />,\n onOpenChange: (value) => State.update({ dialogIsOpen: value }),\n }}\n />\n )\n }\n <Widget\n src=\"fastvault.near/widget/voyager.index\"\n props={{\n password: state.password,\n }}\n />\n </div>\n </div>\n) : (\n <div>You must log-in in order to use the app</div>\n);\n" } } } } }

Transaction Execution Plan

Convert Transaction To Receipt
Gas Burned:
2 Tgas
Tokens Burned:
0.00024 
Receipt:
Predecessor ID:
Receiver ID:
Gas Burned:
5 Tgas
Tokens Burned:
0.00059 
Called method: 'set' in contract: social.near
Arguments:
{ "data": { "fastvault.near": { "widget": { "files": { "": "const accountId = props.accountId ?? context.accountId;\n\nconst savedPassword = Storage.privateGet(\"encryptionPassword\");\nif (savedPassword && !state.ipfsCreds) {\n State.update({ password: JSON.parse(savedPassword) });\n}\n\nState.init({\n uploading: false,\n dialogIsOpen: false,\n});\n\n/**\n * Write event to SocialDB that a file was added\n * @param {string} name\n * @param {string} cid\n */\nconst writeAddToIndex = (encryptedMetadata) => {\n Social.set(\n {\n index: {\n fastvault_experimental: JSON.stringify({\n key: \"add\",\n // encryptedMetadata is of the form { nonce, ciphertext },\n value: encryptedMetadata,\n }),\n },\n },\n {\n onCommit: () => {\n State.update({ uploading: false });\n },\n }\n );\n};\n\n/**\n * Convert file to Data URL which can be passed into img src attribute for display\n * @param {*} blob\n */\nconst setDataUrlFromBlob = (blob) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n console.log(\"reader.result\", reader.result);\n State.update({ dataUrl: reader.result, dialogIsOpen: true });\n // const base64data = reader.result.split(\",\")[1];\n // console.log(\"base64data\", base64data);\n };\n reader.readAsDataURL(blob);\n};\n\nconst disclaimer =\n \"This is a hackathon project. Please do not upload large amounts of data or any sensitive information\";\nconst DisclaimerBanner = styled.div`\n height: 2rem;\n width: 100%;\n background-color: #ffe484;\n color: #21252a;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 1rem;\n border-radius: 0.5rem;\n`;\n\n// Show setup form if user has not entered IPFS credentials\nif (!state.password) {\n return (\n <>\n <DisclaimerBanner>{disclaimer}</DisclaimerBanner>\n <div className=\"d-flex flex-column gap-1\">\n <h2>Please enter encryption password</h2>\n <p>\n This will be used to encrypt future files and to attempt to decrypt\n existing files.\n <strong>\n Changing this will not affect the encryption of previously uploaded\n files\n </strong>\n </p>\n <div className=\"d-flex flex-row gap-2\">\n <input\n type=\"password\"\n className=\"form-control\"\n placeholder=\"password\"\n onChange={(e) => State.update({ formPassword: e.target.value })}\n />\n <Widget\n src=\"near/widget/DIG.Button\"\n props={{ label: \"Save\" }}\n onClick={() => {\n Storage.privateSet(\n \"encryptionPassword\",\n JSON.stringify(state.formPassword)\n );\n State.update({\n password: state.formPassword,\n });\n }}\n />\n </div>\n </div>\n </>\n );\n}\n\nreturn accountId ? (\n <div>\n <DisclaimerBanner>{disclaimer}</DisclaimerBanner>\n <div className=\"d-flex flex-column gap-1\">\n <div className=\"d-flex flex-row justify-content-end\">\n <Widget\n src=\"near/widget/DIG.Button\"\n props={{ label: \"Switch encryption password\" }}\n onClick={() => {\n Storage.privateSet(\"encryptionPassword\", null);\n State.update({\n password: null,\n });\n }}\n />\n </div>\n {state.password && (\n <Widget\n src=\"fastvault.near/widget/EncryptedIpfsUpload\"\n props={{\n password: state.password,\n onUpload: (_metadata, encryptedMetadata) => {\n writeAddToIndex(encryptedMetadata);\n },\n }}\n />\n )}\n {\n /* example of displaying an image in dialog */\n state.dataUrl && (\n <Widget\n src=\"near/widget/DIG.Dialog\"\n props={{\n type: \"dialog\",\n // title: \"Header\",\n // description: \"Some description\",\n // onCancel: handleCancelFunction,\n // onConfirm: handleConfirmFunction,\n // cancelButtonText: \"Cancel\",\n // confirmButtonText: \"Confirm\",\n open: state.dialogIsOpen,\n content: <img src={state.dataUrl} />,\n onOpenChange: (value) => State.update({ dialogIsOpen: value }),\n }}\n />\n )\n }\n <Widget\n src=\"fastvault.near/widget/voyager.index\"\n props={{\n password: state.password,\n }}\n />\n </div>\n </div>\n) : (\n <div>You must log-in in order to use the app</div>\n);\n" } } } } }
Empty result
No logs
Receipt:
Predecessor ID:
Receiver ID:
Gas Burned:
223 Ggas
Tokens Burned:
0 
Transferred 0.18845  to fastvault.near
Empty result
No logs