Search
Search

Transaction: JAmLUq6...Bdkv

Receiver
Status
Succeeded
Transaction Fee
0.00084 
Deposit Value
0 
Gas Used
8 Tgas
Attached Gas
100 Tgas
Created
February 21, 2024 at 11:07:49pm
Hash
JAmLUq6WXLTAatNb49Mw7B4zboGaWqeSUUgKPexvBdkv

Actions

Called method: 'set' in contract: social.near
Arguments:
{ "data": { "flowscience.near": { "widget": { "NAS.view": { "": "const path = props.path; // every piece of data on social contract has a path\nconst blockHeight = props.blockHeight || \"final\"; // and a blockHeight (~version)\nconst options = props.options;\n\n// split the path\nconst parts = path.split(\"/\");\nconst creatorId = parts[0];\n\nlet type;\nif (parts.length === 1) {\n if (parts[0].charAt(0) === \"#\") {\n // hashtag\n type = \"hashtag\";\n } else {\n // every root of a path is an account\n type = \"account\";\n }\n} else {\n // otherwise the \"standard\" is the type (widget, post, type, thing...)\n // for thing, we'll extract the actual \"Type\" later\n type = parts[1];\n}\n\nState.init({});\n\nconst Container = styled.div`\n border: 1px solid #ccc;\n height: fit-content;\n`;\n\nconst Content = styled.div`\n padding: 1px;\n min-height: 300px;\n`;\n\nfunction Thing() {\n console.log(`Type before switch: ${type}`); // Logs the initial type determined from the path\n console.log(`Path before switch: ${path}`);\n // Renders the path according to type\n switch (type) {\n case \"thing\": {\n // get the thing data\n const thing = JSON.parse(Social.get(path, blockHeight) || \"null\");\n type = thing.type || null;\n // get the type data\n const typeObj = JSON.parse(Social.get(type, blockHeight) || \"null\");\n if (typeObj === null) {\n console.log(\n `edge case: thing ${path} had an invalid type: ${thingType}`\n );\n }\n // determine the widget to render this thing (is there a default view?)\n const widgetSrc =\n options?.templateOverride ||\n thing.template?.src ||\n typeObj?.widgets?.view;\n // Template\n return (\n <Widget\n src={widgetSrc}\n props={{ data: thing.data, path, blockHeight }}\n />\n );\n }\n case \"post\": {\n return (\n <Widget\n src=\"every.near/widget/every.post.view\"\n props={{\n path,\n blockHeight: a.blockHeight,\n }}\n />\n );\n }\n case \"widget\": {\n return <Widget src={path} props={props} />;\n }\n case \"account\": {\n return <Widget src=\"efiz.near/widget/Tree\" props={{ rootPath: path }} />;\n }\n case \"settings\": {\n // Standardize path to {accountId}/settings/**\n parts.splice(2);\n parts.push(\"**\");\n path = parts.join(\"/\");\n return (\n <Widget\n src=\"efiz.near/widget/Every.Setting\"\n props={{ path, blockHeight }}\n />\n );\n }\n case \"type\": {\n return (\n <Widget\n src=\"every.near/widget/every.type.create\"\n props={{ typeSrc: path }}\n />\n );\n }\n case \"hashtag\": {\n return (\n <Widget\n src=\"efiz.near/widget/every.hashtag.view\"\n props={{ hashtag: parts[0].substring(1) }}\n />\n );\n }\n case \"schema\": {\n return (\n <Widget\n src=\"every.near/widget/every.type.create\"\n props={{ typeSrc: path }}\n />\n );\n }\n // Adjusted case for \"attestation\" to handle and render attestation data correctly\n case \"attestation\": {\n // get the thing data\n const thing = Social.getr(path, blockHeight) || \"empty\";\n console.log({ thing });\n type = thing.type || null;\n // get the type data\n const typeObj = Social.get(type, blockHeight);\n console.log(`typeObj: ${typeObj}`);\n if (typeObj === null) {\n console.log(`edge case: ${path} had an invalid type: ${thingType}`);\n }\n // determine the widget to render this thing (is there a default view?)\n const widgetSrc =\n options?.templateOverride ||\n thing.template?.src ||\n typeObj?.widgets?.view;\n // Template\n return (\n <Widget\n src={widgetSrc}\n props={{ data: thing.data, path, blockHeight }}\n />\n );\n }\n // DEFAULT case to handle unsupported types\n default:\n console.log(`Unsupported type: ${type}`);\n return <p>The type: {type} is not yet supported.</p>;\n }\n}\n\nreturn (\n <Container id={path}>\n <Content>\n <Thing />\n <p>{type}</p>\n </Content>\n </Container>\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": { "flowscience.near": { "widget": { "NAS.view": { "": "const path = props.path; // every piece of data on social contract has a path\nconst blockHeight = props.blockHeight || \"final\"; // and a blockHeight (~version)\nconst options = props.options;\n\n// split the path\nconst parts = path.split(\"/\");\nconst creatorId = parts[0];\n\nlet type;\nif (parts.length === 1) {\n if (parts[0].charAt(0) === \"#\") {\n // hashtag\n type = \"hashtag\";\n } else {\n // every root of a path is an account\n type = \"account\";\n }\n} else {\n // otherwise the \"standard\" is the type (widget, post, type, thing...)\n // for thing, we'll extract the actual \"Type\" later\n type = parts[1];\n}\n\nState.init({});\n\nconst Container = styled.div`\n border: 1px solid #ccc;\n height: fit-content;\n`;\n\nconst Content = styled.div`\n padding: 1px;\n min-height: 300px;\n`;\n\nfunction Thing() {\n console.log(`Type before switch: ${type}`); // Logs the initial type determined from the path\n console.log(`Path before switch: ${path}`);\n // Renders the path according to type\n switch (type) {\n case \"thing\": {\n // get the thing data\n const thing = JSON.parse(Social.get(path, blockHeight) || \"null\");\n type = thing.type || null;\n // get the type data\n const typeObj = JSON.parse(Social.get(type, blockHeight) || \"null\");\n if (typeObj === null) {\n console.log(\n `edge case: thing ${path} had an invalid type: ${thingType}`\n );\n }\n // determine the widget to render this thing (is there a default view?)\n const widgetSrc =\n options?.templateOverride ||\n thing.template?.src ||\n typeObj?.widgets?.view;\n // Template\n return (\n <Widget\n src={widgetSrc}\n props={{ data: thing.data, path, blockHeight }}\n />\n );\n }\n case \"post\": {\n return (\n <Widget\n src=\"every.near/widget/every.post.view\"\n props={{\n path,\n blockHeight: a.blockHeight,\n }}\n />\n );\n }\n case \"widget\": {\n return <Widget src={path} props={props} />;\n }\n case \"account\": {\n return <Widget src=\"efiz.near/widget/Tree\" props={{ rootPath: path }} />;\n }\n case \"settings\": {\n // Standardize path to {accountId}/settings/**\n parts.splice(2);\n parts.push(\"**\");\n path = parts.join(\"/\");\n return (\n <Widget\n src=\"efiz.near/widget/Every.Setting\"\n props={{ path, blockHeight }}\n />\n );\n }\n case \"type\": {\n return (\n <Widget\n src=\"every.near/widget/every.type.create\"\n props={{ typeSrc: path }}\n />\n );\n }\n case \"hashtag\": {\n return (\n <Widget\n src=\"efiz.near/widget/every.hashtag.view\"\n props={{ hashtag: parts[0].substring(1) }}\n />\n );\n }\n case \"schema\": {\n return (\n <Widget\n src=\"every.near/widget/every.type.create\"\n props={{ typeSrc: path }}\n />\n );\n }\n // Adjusted case for \"attestation\" to handle and render attestation data correctly\n case \"attestation\": {\n // get the thing data\n const thing = Social.getr(path, blockHeight) || \"empty\";\n console.log({ thing });\n type = thing.type || null;\n // get the type data\n const typeObj = Social.get(type, blockHeight);\n console.log(`typeObj: ${typeObj}`);\n if (typeObj === null) {\n console.log(`edge case: ${path} had an invalid type: ${thingType}`);\n }\n // determine the widget to render this thing (is there a default view?)\n const widgetSrc =\n options?.templateOverride ||\n thing.template?.src ||\n typeObj?.widgets?.view;\n // Template\n return (\n <Widget\n src={widgetSrc}\n props={{ data: thing.data, path, blockHeight }}\n />\n );\n }\n // DEFAULT case to handle unsupported types\n default:\n console.log(`Unsupported type: ${type}`);\n return <p>The type: {type} is not yet supported.</p>;\n }\n}\n\nreturn (\n <Container id={path}>\n <Content>\n <Thing />\n <p>{type}</p>\n </Content>\n </Container>\n);\n" } } } } }
Result:
{ "block_height": "113316986" }
No logs
Receipt:
Predecessor ID:
Receiver ID:
Gas Burned:
223 Ggas
Tokens Burned:
0 
Transferred 0.01846  to flowscience.near
Empty result
No logs