This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{ | |
"index": "1", | |
"blob": "0x5Cf48CD275dAf3DF3ece6ce1BCE5FcA3Fbf40F0dBFcaA5Ec5eB4Cc2bc5Ccd3D6fa0C2AAF1067A17157c2Ce122ddBCde1af7AEfB33fdD4dA8c493EF22fACfACBEC98e9FC0362E7B28a1DAba6bdD84B250fcF4aa10Db94D8A6274dd1fdebDF9e056B9eAC693bC80C41A8F3dBDC0d29927A16526BF42ddfe1CCF97a0c1BB3C8ef4fDF4FcD50e160af32b9C9Db35de19cEA8ecBec089cA62A73619ec9Be4075a49CCeedFd95e6cC1Fab28B6ced7FAF78FaB0dCaeB2180d84f5175ceFF4c9C24015A1e3ab76cadaBA8f6251Fe11DBbdff3beB63482EFbbd2c19F8218CEC6da72cE004DF5c5e2b7Bd1f745efFDFFd87fDBce13fF5aefE3DFD9FDDdfFc223b3EB7dd3CD9D44A4c98ea6B27355b0590BDca367Dc7A88f8Af5B43f11D344FD5D5cbfd12f4D0975E84a87bcCdc8557FdE46CBE93ceD9FF78D210Edc8B0ca1a98aFf6658636fFEd76b2C058185B7c1DfaDa1ad947F273CD8A8EBeB1280E8d6Aa3894fb6E1F8bEcfeFf257Ba5C00FAb75bbE9cE304bfBacF2AeF5BCC92121F2CD45b435feC6Cc7a53dE1b5bEA3Cf571FBda9BBbDD6e4dfe770DF905bAAB178C43E457A0aBe91BD83bD2c9a71fEaF8EF5628B2fBa835fB784FEC09abEBDdf7FdE46Be2d74f28448B98026Ca044CFddE4A79EeB93cf026EdD83267e2dfaC96fB2D9a410Cc56c12dbBDaCc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"type": "transaction", "block_timestamp": "2021-07-28 18:59:02.000000Z", "slot": 89000000, "transaction_id": "4W1J6b5tBnrA6cQYmMthrf7AxHG8mdPEYsYPg1RmMfgAQtyA58psQnQHHmkwwNZJWiDLoFAzJn7MPHvwHQXuYtQE", "accounts": [{"address": "7ivguYMpnUBMboByJbKc7z31fJMg2pXYQ4nNPziWLchZ", "pre_sol_balance": 809768525100, "post_sol_balance": 809768520100, "pre_token_balances": null, "post_token_balances": null}, {"address": "J4SRVzse5saap5Y5truLytnnnYA6vw2b2jgGFvdTLQk7", "pre_sol_balance": 23357760, "post_sol_balance": 23357760, "pre_token_balances": null, "post_token_balances": null}, {"address": "3hwH1txjJVS8qv588tWrjHfRxdqNjBykM1kMcit484up", "pre_sol_balance": 3591360, "post_sol_balance": 3591360, "pre_token_balances": null, "post_token_balances": null}, {"address": "9ZZ8eGhTEYK3uBNaFWSYo6ugLD6UVvudxpFXff7XSrmx", "pre_sol_balance": 7299063360, "post_sol_balance": 7299063360, "pre_token_balances": null, "post_token_balances": null}, {"address": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin", "pre_sol_balance": 1141440, "po |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"jsonrpc": "2.0", | |
"id": 83, | |
"result": [ | |
{ | |
"result": { | |
"type": "CALL", | |
"from": "0x85cf05f35b6d542ac1d777d3f8cfde57578696fc", | |
"to": "0x96c12aec4224b4be16b3d4096b70f5a89a8442e9", | |
"value": "0x105eba203a73400", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"jsonrpc":"2.0","id":83,"result":[{"result":{"type":"CALL","from":"0xc8a50c25ea639e3bd95b26fc3027ca670bba00b7","to":"0xc9174f86db174fde0dd232c3a85b44dfd23005cb","value":"0x0","gas":"0x43a94","gasUsed":"0x20e89","input":"0xe3e5786f000000000000000000000000000000000000000000000100326cd89430180000000000000000000000000000000000000000000000000001009d488e84600000000000000000000000000000000000000000000000000000000000000000008031afa961cc60bfef962fb818e3742c576979d3ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000023396cf899ca06c4472205fc903bdb4de249d6fc00000000000000000000000049022089e78a8d46ec87a3af86a1db6c189afa6f","output":"0x","time":"402.406042ms","calls":[{"type":"CALL","from":"0xc9174f86db174fde0dd232c3a85b44dfd23005cb","to":"0x10ed43c718714eb63d5aa57b78b54704e256024e","value":"0x0","gas":"0x41a48","gasUsed":"0x1c678","input":"0x38ed1739000000000000000000000000000000000000000000000100326cd8943018000000000000000000000000000000000000000000000000000 |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"output": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000eea53b8816488d370000000000000000000000000000000000000000000000af09962b3550500000", | |
"stateDiff": { | |
"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984": { | |
"balance": "=", | |
"code": "=", | |
"nonce": "=", | |
"storage": { | |
"0x6efc1de1d1f97ee83932fac447be36dc1d497877c59023ee23571a0d5ba443fa": { | |
"*": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * | |
from `bigquery-public-data.crypto_ethereum.logs` | |
where (address in ('0x39755357759ce0d7f32dc8dc45414cca409ae24e', '0x794e6e91555438afc3ccf1c5076a74f42133d08d', '0x8fd3121013a07c57f0d69646e86e7a4880b467b7', '0x4572f2554421bd64bef1c22c8a81840e8d496bea', '0x4aea7cf559f67cedcad07e12ae6bc00f07e8cf65', '0x8d12a197cb00d4747a1fe03395095ce2a5cc6819', '0x818e6fecd516ecc3849daf6845e3ec868087b755', '0x12459c951127e0c374ff9105dda097662a027093', '0x4f833a24e1f95d70f028921e27040ca56e09ab0b', '0x080bf510fcbf18b91105470639e9561022937712', '0x61935cbdd02287b511119ddb11aeb42f1593b7ef', '0x79a8c46dea5ada233abaffd40f3a0a2b1e5a4f27', '0x79a8c46dea5ada233abaffd40f3a0a2b1e5a4f27', '0xa2b47e3d5c44877cca798226b7b8118f9bfb7a56', '0xa2b47e3d5c44877cca798226b7b8118f9bfb7a56', '0x06364f10b501e868329afbc005b3492902d6c763', '0x06364f10b501e868329afbc005b3492902d6c763', '0x93054188d876f558f4a66b2ef1d97d16edf0895b', '0x7fc77b5c7614e1533320ea6ddc2eb61fa00a9714', '0xa5407eae9ba41422680e2e00537571bcc53efbfd', '0xa5407eae9ba41422680e2e00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TEMP FUNCTION PARSE_LOG(data STRING, topics ARRAY<STRING>) RETURNS STRUCT<`from` STRING, `to` STRING, `value` STRING> LANGUAGE js | |
OPTIONS (library=["gs://blockchain-etl-bigquery/ethers.js"]) AS """ | |
var abi = {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "Transfer", "type": "event"} | |
var interface_instance = new ethers.utils.Interface([abi]); | |
var parsedLog = interface_instance.parseLog({topics: topics, data: data}); | |
var parsedValues = parsedLog.values; | |
var transformParams = function(params, abiInputs) { | |
var result = {}; | |
if (params && params.length >= abiInputs.length) { | |
for (var i = 0; i < abiInputs.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TEMP FUNCTION PARSE_LOG(data STRING, topics ARRAY<STRING>) RETURNS STRUCT<`from` STRING, `to` STRING, `value` STRING, `data` STRING> LANGUAGE js | |
OPTIONS (library=["gs://blockchain-etl-bigquery/ethers.js"]) AS """ | |
var abi = {"anonymous": false, "inputs": [{"indexed": true, "name": "from", "type": "address"}, {"indexed": true, "name": "to", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}, {"indexed": true, "name": "data", "type": "bytes"}], "name": "Transfer", "type": "event"} | |
var interface_instance = new ethers.utils.Interface([abi]); | |
var parsedLog = interface_instance.parseLog({topics: topics, data: data}); | |
var parsedValues = parsedLog.values; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Pads indexes in trace_address to 5 so trace addresses can be chronologically ordered | |
CREATE TEMPORARY FUNCTION normalize_trace_address(trace_address STRING) | |
RETURNS STRING AS (( | |
SELECT ARRAY_TO_STRING(ARRAY_AGG(lpadded), ',') as arr | |
FROM | |
( | |
SELECT LPAD(addr, 5, '0') as lpadded | |
FROM UNNEST(( | |
SELECT SPLIT(trace_address, ',')) | |
) AS addr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import uuid | |
from ocean_keeper.utils import get_account | |
from ocean_keeper.contract_handler import ContractHandler | |
from squid_py import Ocean, ConfigProvider, Config | |
from ocean_utils.agreements.service_types import ServiceTypes | |
from ocean_utils.agreements.service_agreement import ServiceAgreement |
NewerOlder