Search
Search

Transaction: 3WjkUfA...jr8H

Status
Succeeded
Transaction Fee
0.00079 
Deposit Value
0.00096 
Gas Used
8 Tgas
Attached Gas
300 Tgas
Created
November 09, 2023 at 9:20:03am
Hash
3WjkUfA9L36iDDwZEnk7o7XP1KdPjiDFWFaU5N41jr8H

Actions

Called method: 'set' in contract: v1.social08.testnet
Arguments:
{ "data": { "manztech.testnet": { "widget": { "readCampaign": { "": "console.log('REACHED THE BOS COMP')\nif (!props.managerAddress) return null;\nconst sender = Ethers.send(\"eth_requestAccounts\", [])[0];\n\nif (!sender) return <Web3Connect connectLabel=\"Connect with Web3\" />;\n\nconst campaignABI = [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n\nconst managerABI = [\n {\n \"inputs\": [],\n \"name\": \"getRandomCampaignNFT\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n\nconst managerIface = new ethers.utils.Interface(managerABI);\nconst campaignIface = new ethers.utils.Interface(campaignABI);\n\nState.init({\n contentURI: \"\",\n campaignAddress: \"\"\n});\n\n\nconst fetchAdCampaign = () => {\n try {\n const getCampaignSignature = \"0x501172e9\";\n\n return Ethers.provider().getSigner()\n .call({\n to: props.managerAddress,\n data: getCampaignSignature,\n })\n .then((campaignId) => {\n console.log('Returned campaign data', campaignId)\n const decoded = managerIface.decodeFunctionResult(\n \"getRandomCampaignNFT\",\n campaignId\n );\n console.log(\"SEPARATE CAMPAIGN CONTRACT\", campaignId, decoded)\n State.update({\n campaignAddress: decoded[1]\n })\n return decoded[0];\n })\n } catch (error) {\n console.log(error)\n }\n};\n\nconst fetchCampaignContent = (campaignNumber) => {\n try {\n\n const contentFunctionSignature = \"0xc87b56dd\" + (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(campaignNumber)), 32)).slice(2, 66)\n console.log(contentFunctionSignature, state.campaignAddress, 'func')\n\n // fetch to tokenURI passing in the token campaign number\n if (!state.campaignAddress) return null\n return Ethers.provider()\n .call({\n to: state.campaignAddress,\n data: contentFunctionSignature,\n })\n .then((content) => {\n const decoded = campaignIface.decodeFunctionResult(\n \"tokenURI\",\n content\n );\n return decoded[0];\n })\n } catch (error) {\n\n }\n}\nif (!state.contentURI) {\n fetchAdCampaign().then((campaignId) => {\n // Update view counter\n fetchCampaignContent(campaignId).then(contentURI => {\n State.update({\n ...state,\n [\"contentURI\"]: contentURI,\n });\n const currentViewCounter = Storage.get(\"viewCounter\")\n let counter = 1;\n if (currentViewCounter[campaignId]) {\n counter = currentViewCounter[campaignId] + 1;\n }\n const viewCounterObj = {\n ...currentViewCounter,\n [campaignId]: counter\n }\n console.log('setting: ', campaignId, counter)\n Storage.set(\"viewCounter\", viewCounterObj)\n })\n });\n}\n\n// Return displays the image element, with props for styling\nconsole.log('RENDERING: ', state.contentURI)\n\nreturn (\n <>\n {state.contentURI?.length > 0 ? <img src={state.contentURI} /> : <></>}\n </>);" } } } } }

Transaction Execution Plan

Convert Transaction To Receipt
Gas Burned:
2 Tgas
Tokens Burned:
0.00024 
Receipt:
Predecessor ID:
Gas Burned:
5 Tgas
Tokens Burned:
0.00055 
Called method: 'set' in contract: v1.social08.testnet
Arguments:
{ "data": { "manztech.testnet": { "widget": { "readCampaign": { "": "console.log('REACHED THE BOS COMP')\nif (!props.managerAddress) return null;\nconst sender = Ethers.send(\"eth_requestAccounts\", [])[0];\n\nif (!sender) return <Web3Connect connectLabel=\"Connect with Web3\" />;\n\nconst campaignABI = [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n\nconst managerABI = [\n {\n \"inputs\": [],\n \"name\": \"getRandomCampaignNFT\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n\nconst managerIface = new ethers.utils.Interface(managerABI);\nconst campaignIface = new ethers.utils.Interface(campaignABI);\n\nState.init({\n contentURI: \"\",\n campaignAddress: \"\"\n});\n\n\nconst fetchAdCampaign = () => {\n try {\n const getCampaignSignature = \"0x501172e9\";\n\n return Ethers.provider().getSigner()\n .call({\n to: props.managerAddress,\n data: getCampaignSignature,\n })\n .then((campaignId) => {\n console.log('Returned campaign data', campaignId)\n const decoded = managerIface.decodeFunctionResult(\n \"getRandomCampaignNFT\",\n campaignId\n );\n console.log(\"SEPARATE CAMPAIGN CONTRACT\", campaignId, decoded)\n State.update({\n campaignAddress: decoded[1]\n })\n return decoded[0];\n })\n } catch (error) {\n console.log(error)\n }\n};\n\nconst fetchCampaignContent = (campaignNumber) => {\n try {\n\n const contentFunctionSignature = \"0xc87b56dd\" + (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(campaignNumber)), 32)).slice(2, 66)\n console.log(contentFunctionSignature, state.campaignAddress, 'func')\n\n // fetch to tokenURI passing in the token campaign number\n if (!state.campaignAddress) return null\n return Ethers.provider()\n .call({\n to: state.campaignAddress,\n data: contentFunctionSignature,\n })\n .then((content) => {\n const decoded = campaignIface.decodeFunctionResult(\n \"tokenURI\",\n content\n );\n return decoded[0];\n })\n } catch (error) {\n\n }\n}\nif (!state.contentURI) {\n fetchAdCampaign().then((campaignId) => {\n // Update view counter\n fetchCampaignContent(campaignId).then(contentURI => {\n State.update({\n ...state,\n [\"contentURI\"]: contentURI,\n });\n const currentViewCounter = Storage.get(\"viewCounter\")\n let counter = 1;\n if (currentViewCounter[campaignId]) {\n counter = currentViewCounter[campaignId] + 1;\n }\n const viewCounterObj = {\n ...currentViewCounter,\n [campaignId]: counter\n }\n console.log('setting: ', campaignId, counter)\n Storage.set(\"viewCounter\", viewCounterObj)\n })\n });\n}\n\n// Return displays the image element, with props for styling\nconsole.log('RENDERING: ', state.contentURI)\n\nreturn (\n <>\n {state.contentURI?.length > 0 ? <img src={state.contentURI} /> : <></>}\n </>);" } } } } }
Empty result
No logs
Receipt:
Predecessor ID:
Receiver ID:
Gas Burned:
223 Ggas
Tokens Burned:
0 
Transferred 0.18848  to manztech.testnet
Empty result
No logs