Search
Search

Transaction: 99k5Ezq...xohN

Status
Failed
Transaction Fee
0.00055 
Deposit Value
0 
Gas Used
5 Tgas
Attached Gas
200 Tgas
Created
April 03, 2024 at 10:30:57pm
Hash
99k5EzqJ38x5ignxye4pMEVbE42dFo62JjvDgCJ6xohN

Actions

Called method: 'register' in contract: query…tform.near
Arguments:
{ "function_name": "access_keys_v1", "code": "\n const startTime = Date.now();\n\n const blockDateTime = new Date(\n block.streamerMessage.block.header.timestamp / 1000000\n ).getTime();\n\n const actions = block.actions().filter((a) =>\n block\n .receipts()\n .find((r) => r.receiptId === a.receiptId)\n .status.hasOwnProperty(\"SuccessValue\")\n );\n\n const addedKeys = actions.flatMap((a) => {\n return a.operations\n .filter((op) => op.AddKey)\n .flatMap((op) =>\n Object.keys(op).map((actionKind) => {\n return {\n public_key: op[actionKind].publicKey,\n permission_kind: op[actionKind].accessKey.permission.FunctionCall\n ? \"FUNCTION_CALL\"\n : \"FULL_ACCESS\",\n account_id: a.receiverId,\n created_by_receipt_id: a.receiptId,\n last_updated_block_height: block.blockHeight,\n block_timestamp_utc: new Date(blockDateTime).toISOString(),\n indexed_at_timestamp_utc: new Date(Date.now()).toISOString(),\n indexed_lag_in_seconds: (Date.now() - blockDateTime) / 1000,\n };\n })\n );\n });\n const deletedKeys = actions.flatMap((a) => {\n return a.operations\n .filter((op) => op.DeleteKey)\n .flatMap((op) =>\n Object.keys(op).map((actionKind) => {\n return {\n public_key: op[actionKind].publicKey,\n account_id: a.receiverId,\n deleted_by_receipt_id: a.receiptId,\n last_updated_block_height: block.blockHeight,\n block_timestamp_utc: new Date(blockDateTime).toISOString(),\n indexed_at_timestamp_utc: new Date(Date.now()).toISOString(),\n indexed_lag_in_seconds: (Date.now() - blockDateTime) / 1000,\n };\n })\n );\n });\n\n const deletedAccounts = actions.flatMap((a) => {\n return a.operations\n .filter((op) => op.DeleteAccount)\n .flatMap((op) =>\n Object.keys(op).map((actionKind) => {\n return {\n account_id: a.receiverId,\n deleted_by_receipt_id:\n actionKind === \"DeleteAccount\" ? a.receiptId : null,\n last_updated_block_height: block.blockHeight,\n block_timestamp_utc: new Date(blockDateTime).toISOString(),\n indexed_at_timestamp_utc: new Date(Date.now()).toISOString(),\n indexed_lag_in_seconds: (Date.now() - blockDateTime) / 1000,\n };\n })\n );\n });\n\n await Promise.all([\n context.db.AccessKeysV1.upsert(\n addedKeys,\n [\"public_key\", \"account_id\"],\n [\n \"deleted_by_receipt_id\",\n \"last_updated_block_height\",\n \"block_timestamp_utc\",\n \"indexed_at_timestamp_utc\",\n \"indexed_lag_in_seconds\",\n ]\n ),\n ...deletedAccounts.map((da) =>\n context.db.AccessKeysV1.update(\n { account_id: da.account_id },\n {\n account_deleted_by_receipt_id: da.deleted_by_receipt_id,\n last_updated_block_height: da.last_updated_block_height,\n block_timestamp_utc: da.block_timestamp_utc,\n indexed_at_timestamp_utc: da.indexed_at_timestamp_utc,\n indexed_lag_in_seconds: da.indexed_lag_in_seconds,\n }\n )\n ),\n ...deletedKeys.map((da) =>\n context.db.AccessKeysV1.update(\n { account_id: da.account_id, public_key: da.public_key },\n {\n deleted_by_receipt_id: da.deleted_by_receipt_id,\n last_updated_block_height: da.last_updated_block_height,\n block_timestamp_utc: da.block_timestamp_utc,\n indexed_at_timestamp_utc: da.indexed_at_timestamp_utc,\n indexed_lag_in_seconds: da.indexed_lag_in_seconds,\n }\n )\n ),\n ]);\n const endTime = Date.now();\n console.log(startTime, \" to \", endTime, \"lag\", (endTime - startTime) / 1000);\n", "schema": "CREATE TABLE\n \"access_keys_v1\" (\n \"public_key\" text NOT NULL,\n \"account_id\" text NOT NULL,\n \"created_by_receipt_id\" text NULL,\n \"deleted_by_receipt_id\" text NULL,\n \"account_deleted_by_receipt_id\" text NULL,\n \"permission_kind\" text NOT NULL,\n \"last_updated_block_height\" numeric(20) NOT NULL,\n \"block_timestamp_utc\" timestamp,\n \"indexed_at_timestamp_utc\" timestamp,\n \"indexed_lag_in_seconds\" numeric(20)\n );\n\nCREATE INDEX\n access_keys_v1_account_id_idx ON access_keys_v1 USING btree (account_id);\n\nCREATE INDEX\n access_keys_v1_last_updated_block_height_idx ON access_keys_v1 USING btree (last_updated_block_height);\n\nCREATE INDEX\n access_keys_v1_public_key_idx ON access_keys_v1 USING btree (public_key);\n\nALTER TABLE\n access_keys_v1\nADD\n PRIMARY KEY (\"public_key\", \"account_id\");\n", "start_block": { "HEIGHT": 115848882 }, "rule": { "kind": "ACTION_ANY", "affected_account_id": "*", "status": "SUCCESS" } }

Transaction Execution Plan

Convert Transaction To Receipt
Gas Burned:
2 Tgas
Tokens Burned:
0.00024 
Receipt:
Predecessor ID:
Receiver ID:
Gas Burned:
3 Tgas
Tokens Burned:
0.00031 
Called method: 'register' in contract: query…tform.near
Arguments:
{ "function_name": "access_keys_v1", "code": "\n const startTime = Date.now();\n\n const blockDateTime = new Date(\n block.streamerMessage.block.header.timestamp / 1000000\n ).getTime();\n\n const actions = block.actions().filter((a) =>\n block\n .receipts()\n .find((r) => r.receiptId === a.receiptId)\n .status.hasOwnProperty(\"SuccessValue\")\n );\n\n const addedKeys = actions.flatMap((a) => {\n return a.operations\n .filter((op) => op.AddKey)\n .flatMap((op) =>\n Object.keys(op).map((actionKind) => {\n return {\n public_key: op[actionKind].publicKey,\n permission_kind: op[actionKind].accessKey.permission.FunctionCall\n ? \"FUNCTION_CALL\"\n : \"FULL_ACCESS\",\n account_id: a.receiverId,\n created_by_receipt_id: a.receiptId,\n last_updated_block_height: block.blockHeight,\n block_timestamp_utc: new Date(blockDateTime).toISOString(),\n indexed_at_timestamp_utc: new Date(Date.now()).toISOString(),\n indexed_lag_in_seconds: (Date.now() - blockDateTime) / 1000,\n };\n })\n );\n });\n const deletedKeys = actions.flatMap((a) => {\n return a.operations\n .filter((op) => op.DeleteKey)\n .flatMap((op) =>\n Object.keys(op).map((actionKind) => {\n return {\n public_key: op[actionKind].publicKey,\n account_id: a.receiverId,\n deleted_by_receipt_id: a.receiptId,\n last_updated_block_height: block.blockHeight,\n block_timestamp_utc: new Date(blockDateTime).toISOString(),\n indexed_at_timestamp_utc: new Date(Date.now()).toISOString(),\n indexed_lag_in_seconds: (Date.now() - blockDateTime) / 1000,\n };\n })\n );\n });\n\n const deletedAccounts = actions.flatMap((a) => {\n return a.operations\n .filter((op) => op.DeleteAccount)\n .flatMap((op) =>\n Object.keys(op).map((actionKind) => {\n return {\n account_id: a.receiverId,\n deleted_by_receipt_id:\n actionKind === \"DeleteAccount\" ? a.receiptId : null,\n last_updated_block_height: block.blockHeight,\n block_timestamp_utc: new Date(blockDateTime).toISOString(),\n indexed_at_timestamp_utc: new Date(Date.now()).toISOString(),\n indexed_lag_in_seconds: (Date.now() - blockDateTime) / 1000,\n };\n })\n );\n });\n\n await Promise.all([\n context.db.AccessKeysV1.upsert(\n addedKeys,\n [\"public_key\", \"account_id\"],\n [\n \"deleted_by_receipt_id\",\n \"last_updated_block_height\",\n \"block_timestamp_utc\",\n \"indexed_at_timestamp_utc\",\n \"indexed_lag_in_seconds\",\n ]\n ),\n ...deletedAccounts.map((da) =>\n context.db.AccessKeysV1.update(\n { account_id: da.account_id },\n {\n account_deleted_by_receipt_id: da.deleted_by_receipt_id,\n last_updated_block_height: da.last_updated_block_height,\n block_timestamp_utc: da.block_timestamp_utc,\n indexed_at_timestamp_utc: da.indexed_at_timestamp_utc,\n indexed_lag_in_seconds: da.indexed_lag_in_seconds,\n }\n )\n ),\n ...deletedKeys.map((da) =>\n context.db.AccessKeysV1.update(\n { account_id: da.account_id, public_key: da.public_key },\n {\n deleted_by_receipt_id: da.deleted_by_receipt_id,\n last_updated_block_height: da.last_updated_block_height,\n block_timestamp_utc: da.block_timestamp_utc,\n indexed_at_timestamp_utc: da.indexed_at_timestamp_utc,\n indexed_lag_in_seconds: da.indexed_lag_in_seconds,\n }\n )\n ),\n ]);\n const endTime = Date.now();\n console.log(startTime, \" to \", endTime, \"lag\", (endTime - startTime) / 1000);\n", "schema": "CREATE TABLE\n \"access_keys_v1\" (\n \"public_key\" text NOT NULL,\n \"account_id\" text NOT NULL,\n \"created_by_receipt_id\" text NULL,\n \"deleted_by_receipt_id\" text NULL,\n \"account_deleted_by_receipt_id\" text NULL,\n \"permission_kind\" text NOT NULL,\n \"last_updated_block_height\" numeric(20) NOT NULL,\n \"block_timestamp_utc\" timestamp,\n \"indexed_at_timestamp_utc\" timestamp,\n \"indexed_lag_in_seconds\" numeric(20)\n );\n\nCREATE INDEX\n access_keys_v1_account_id_idx ON access_keys_v1 USING btree (account_id);\n\nCREATE INDEX\n access_keys_v1_last_updated_block_height_idx ON access_keys_v1 USING btree (last_updated_block_height);\n\nCREATE INDEX\n access_keys_v1_public_key_idx ON access_keys_v1 USING btree (public_key);\n\nALTER TABLE\n access_keys_v1\nADD\n PRIMARY KEY (\"public_key\", \"account_id\");\n", "start_block": { "HEIGHT": 115848882 }, "rule": { "kind": "ACTION_ANY", "affected_account_id": "*", "status": "SUCCESS" } }
Failure:
{
  "type": "action",
  "error": {
    "type": "functionCallError",
    "error": {
      "type": "executionError",
      "error": "Smart contract panicked: Account dataplatform.near does not have one of required roles [Owner]"
    }
  }
}
Registering function access_keys_v1 for account dataplatform.near
Receipt:
Predecessor ID:
Receiver ID:
Gas Burned:
223 Ggas
Tokens Burned:
0 
Transferred 0.06975  to dataplatform.near
Empty result
No logs