Search
Search

Transaction: 2keSLrN...CKpW

Receiver
Status
Succeeded
Transaction Fee
0.0008 
Deposit Value
0 
Gas Used
12 Tgas
Attached Gas
100 Tgas
Created
September 26, 2023 at 7:21:11pm
Hash
2keSLrNBifZrXhSisChT4t3pNFAXcJcR6zteSbrKCKpW

Actions

Called method: 'set' in contract: social.near
Arguments:
{ "data": { "f2bc8abdb8ba64fe5aac9689ded9491ff0e6fdcd7a5c680b7cf364142d1789fb": { "widget": { "SayALot.UpVoteButton": { "": "const { isTest, authorForWidget, reactedElementData, widgets } = props;\n\nconst data = reactedElementData;\n\nconst libSrcArray = [widgets.libUpVotes];\n\nconst libCalls = [\n {\n functionName: \"getUpVotes\",\n key: \"upVotes\",\n props: {\n realArticleId: data.realArticleId ?? `${data.author}-${data.timeCreate}`,\n },\n },\n];\n\nState.init({\n libCalls,\n upVotes: [],\n});\n\nlet userVote = state.upVotes.find(\n (vote) => vote.accountId === context.accountId\n);\n\nlet hasUserVoted = userVote !== undefined;\n\nfunction getUpVoteButtonClass() {\n if (hasUserVoted) {\n return \"primary\";\n } else {\n return \"secondary dark\";\n }\n}\n\nfunction callLibs(srcArray, stateUpdate, libCalls) {\n return (\n <>\n {srcArray.map((src) => {\n return (\n <Widget\n src={src}\n props={{\n isTest,\n stateUpdate,\n libCalls,\n }}\n />\n );\n })}\n </>\n );\n}\n\nfunction stateUpdate(obj) {\n State.update(obj);\n}\n\nfunction upVoteButtonListener() {\n let newLibCalls = [...state.libCalls];\n\n if (!hasUserVoted) {\n newLibCalls.push({\n functionName: \"addVote\",\n key: \"newVote\",\n props: {\n realArticleId:\n data.realArticleId ?? `${data.author}-${data.timeCreate}`,\n },\n });\n } else {\n newLibCalls.push({\n functionName: \"deleteVote\",\n key: \"deletedVote\",\n props: {\n realArticleId:\n data.realArticleId ?? `${data.author}-${data.timeCreate}`,\n upVoteId: userVote.value.upVoteId,\n },\n });\n }\n State.update({ libCalls: newLibCalls });\n}\n\nconst IconContainer = styled.div`\n transform: rotate(-90deg);\n`;\n\nconst Icon = styled.i`\n margin: 0;\n`;\n\nconst CallLibrary = styled.div`\n display: none;\n`;\n\nreturn (\n <>\n <Widget\n src={widgets.styledComponents}\n props={{\n Button: {\n text: `+${state.upVotes.length}`,\n className: `${getUpVoteButtonClass()}`,\n size: \"sm\",\n onClick: upVoteButtonListener,\n icon: (\n <IconContainer>\n <Icon className=\"bi bi-fast-forward-btn\"></Icon>\n </IconContainer>\n ),\n // icon: <i className=\"bi bi-hand-thumbs-up\"></i>,\n // icon: \"⏫\",\n },\n }}\n />\n\n <CallLibrary>\n {callLibs(libSrcArray, stateUpdate, state.libCalls)}\n </CallLibrary>\n </>\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.00056 
Called method: 'set' in contract: social.near
Arguments:
{ "data": { "f2bc8abdb8ba64fe5aac9689ded9491ff0e6fdcd7a5c680b7cf364142d1789fb": { "widget": { "SayALot.UpVoteButton": { "": "const { isTest, authorForWidget, reactedElementData, widgets } = props;\n\nconst data = reactedElementData;\n\nconst libSrcArray = [widgets.libUpVotes];\n\nconst libCalls = [\n {\n functionName: \"getUpVotes\",\n key: \"upVotes\",\n props: {\n realArticleId: data.realArticleId ?? `${data.author}-${data.timeCreate}`,\n },\n },\n];\n\nState.init({\n libCalls,\n upVotes: [],\n});\n\nlet userVote = state.upVotes.find(\n (vote) => vote.accountId === context.accountId\n);\n\nlet hasUserVoted = userVote !== undefined;\n\nfunction getUpVoteButtonClass() {\n if (hasUserVoted) {\n return \"primary\";\n } else {\n return \"secondary dark\";\n }\n}\n\nfunction callLibs(srcArray, stateUpdate, libCalls) {\n return (\n <>\n {srcArray.map((src) => {\n return (\n <Widget\n src={src}\n props={{\n isTest,\n stateUpdate,\n libCalls,\n }}\n />\n );\n })}\n </>\n );\n}\n\nfunction stateUpdate(obj) {\n State.update(obj);\n}\n\nfunction upVoteButtonListener() {\n let newLibCalls = [...state.libCalls];\n\n if (!hasUserVoted) {\n newLibCalls.push({\n functionName: \"addVote\",\n key: \"newVote\",\n props: {\n realArticleId:\n data.realArticleId ?? `${data.author}-${data.timeCreate}`,\n },\n });\n } else {\n newLibCalls.push({\n functionName: \"deleteVote\",\n key: \"deletedVote\",\n props: {\n realArticleId:\n data.realArticleId ?? `${data.author}-${data.timeCreate}`,\n upVoteId: userVote.value.upVoteId,\n },\n });\n }\n State.update({ libCalls: newLibCalls });\n}\n\nconst IconContainer = styled.div`\n transform: rotate(-90deg);\n`;\n\nconst Icon = styled.i`\n margin: 0;\n`;\n\nconst CallLibrary = styled.div`\n display: none;\n`;\n\nreturn (\n <>\n <Widget\n src={widgets.styledComponents}\n props={{\n Button: {\n text: `+${state.upVotes.length}`,\n className: `${getUpVoteButtonClass()}`,\n size: \"sm\",\n onClick: upVoteButtonListener,\n icon: (\n <IconContainer>\n <Icon className=\"bi bi-fast-forward-btn\"></Icon>\n </IconContainer>\n ),\n // icon: <i className=\"bi bi-hand-thumbs-up\"></i>,\n // icon: \"⏫\",\n },\n }}\n />\n\n <CallLibrary>\n {callLibs(libSrcArray, stateUpdate, state.libCalls)}\n </CallLibrary>\n </>\n);\n" } } } } }
Empty result
No logs
Receipt:
Predecessor ID:
Receiver ID:
Gas Burned:
4 Tgas
Tokens Burned:
0 
Transferred 0.0185  to f2bc8…142d1789fb
Empty result
No logs