Search
Search

Transaction: CAz1vnN...YYvP

Status
Succeeded
Transaction Fee
0.0008 
Deposit Value
<0.00001 
Gas Used
8 Tgas
Attached Gas
300 Tgas
Created
November 09, 2023 at 9:20:58am
Hash
CAz1vnN72qzFW8nYYHwMvNCRwLcVj3ByDyAyDkppYYvP

Actions

Called method: 'set' in contract: v1.social08.testnet
Arguments:
{ "data": { "manztech.testnet": { "widget": { "transactionMiddleware": { "": "const sender = Ethers.send(\"eth_requestAccounts\", [])[0];\n\nif (!sender) return <Web3Connect connectLabel=\"Connect with Web3\" />;\n\nconst managerABI = [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"txTarget\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"campaignsTokenIds\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"campaignsViewedCounters\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signature\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"functionData\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"executionMiddleware\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n\n// Pass function call data thru props.calldata\n// pass contract call target address thru props.target\n// read ad view data\n// call executionMiddleware(\n// address txTarget,\n// address[] memory campaignsViewedAddresses,\n// uint256[] memory campaignsViewedCounters,\n// bytes memory signature,\n// bytes memory functionData\n// )\n// \nconst managerIface = new ethers.utils.Interface(managerABI);\n\n\nconst execution = () => {\n console.log(props)\n try {\n // const encoded = managerIface.encodeFunctionData(\"executionMiddleware\", [props.target, [campaignIds], [campaignCounts], (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(0)), 32)), (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(0)), 32))]);\n // console.log('ADDRESSES', props.target, props.managerAddress, encoded)\n const currentViewCounter = Storage.get(\"viewCounter\")\n\n console.log(currentViewCounter, 'storage')\n let campaignIds = {}\n let campaignCounts = {}\n if (currentViewCounter) {\n campaignIds = Object.keys(currentViewCounter).map(x => Number(x))\n campaignCounts = Object.values(currentViewCounter).map(x => Number(x))\n }\n\n\n const managerContract = new ethers.Contract(\n props.managerAddress,\n managerABI,\n Ethers.provider().getSigner()\n );\n\n console.log('TEST VALS', props.target,\n campaignIds,\n campaignCounts,\n (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(0)), 32)),\n (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(0)), 32)),\n )\n\n return managerContract.executionMiddleware(\n props.target,\n campaignIds,\n campaignCounts,\n (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(0)), 32)),\n (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(0)), 32)),\n {}\n ).then(returnData => {\n const decoded = managerIface.decodeFunctionResult(\n \"executionMiddleware\",\n returnData\n );\n console.log('RETURN VALUE FROM EXECUTE ROUTING:', decoded)\n return decoded[0];\n })\n } catch (error) {\n console.log(error)\n }\n};\n\n\n// Read from state the transaction data to send\n// Read from state the ad campaigns that have been shown and should have counts updated\n\n// Take the transaction data and make a signer call, passing in the ad campaign info saved in state.\n// The transactions must be routed through the manager contract\n// Upon tx success, set state.viewCounter: {}\n\n\nexecution()\n\n\nreturn (\n <>\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.00056 
Called method: 'set' in contract: v1.social08.testnet
Arguments:
{ "data": { "manztech.testnet": { "widget": { "transactionMiddleware": { "": "const sender = Ethers.send(\"eth_requestAccounts\", [])[0];\n\nif (!sender) return <Web3Connect connectLabel=\"Connect with Web3\" />;\n\nconst managerABI = [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"txTarget\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"campaignsTokenIds\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"campaignsViewedCounters\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signature\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"functionData\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"executionMiddleware\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n\n// Pass function call data thru props.calldata\n// pass contract call target address thru props.target\n// read ad view data\n// call executionMiddleware(\n// address txTarget,\n// address[] memory campaignsViewedAddresses,\n// uint256[] memory campaignsViewedCounters,\n// bytes memory signature,\n// bytes memory functionData\n// )\n// \nconst managerIface = new ethers.utils.Interface(managerABI);\n\n\nconst execution = () => {\n console.log(props)\n try {\n // const encoded = managerIface.encodeFunctionData(\"executionMiddleware\", [props.target, [campaignIds], [campaignCounts], (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(0)), 32)), (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(0)), 32))]);\n // console.log('ADDRESSES', props.target, props.managerAddress, encoded)\n const currentViewCounter = Storage.get(\"viewCounter\")\n\n console.log(currentViewCounter, 'storage')\n let campaignIds = {}\n let campaignCounts = {}\n if (currentViewCounter) {\n campaignIds = Object.keys(currentViewCounter).map(x => Number(x))\n campaignCounts = Object.values(currentViewCounter).map(x => Number(x))\n }\n\n\n const managerContract = new ethers.Contract(\n props.managerAddress,\n managerABI,\n Ethers.provider().getSigner()\n );\n\n console.log('TEST VALS', props.target,\n campaignIds,\n campaignCounts,\n (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(0)), 32)),\n (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(0)), 32)),\n )\n\n return managerContract.executionMiddleware(\n props.target,\n campaignIds,\n campaignCounts,\n (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(0)), 32)),\n (ethers.utils.hexZeroPad(ethers.utils.hexlify(Number(0)), 32)),\n {}\n ).then(returnData => {\n const decoded = managerIface.decodeFunctionResult(\n \"executionMiddleware\",\n returnData\n );\n console.log('RETURN VALUE FROM EXECUTE ROUTING:', decoded)\n return decoded[0];\n })\n } catch (error) {\n console.log(error)\n }\n};\n\n\n// Read from state the transaction data to send\n// Read from state the ad campaigns that have been shown and should have counts updated\n\n// Take the transaction data and make a signer call, passing in the ad campaign info saved in state.\n// The transactions must be routed through the manager contract\n// Upon tx success, set state.viewCounter: {}\n\n\nexecution()\n\n\nreturn (\n <>\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