From 2fdab7602880904ce0cfd212ec963f65ea269dc1 Mon Sep 17 00:00:00 2001 From: AyadiGithub Date: Thu, 16 Feb 2023 14:46:48 -0500 Subject: [PATCH 1/2] add support for wMATIC token --- .../polygon/WMATIC_call_deposit.json | 22 ++++++++ .../polygon/WMATIC_call_withdraw.json | 33 ++++++++++++ .../polygon/WMATIC_event_Deposit.json | 41 +++++++++++++++ .../polygon/WMATIC_event_Transfer.json | 51 +++++++++++++++++++ .../polygon/WMATIC_event_Withdrawal.json | 41 +++++++++++++++ 5 files changed, 188 insertions(+) create mode 100644 airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_call_deposit.json create mode 100644 airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_call_withdraw.json create mode 100644 airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_event_Deposit.json create mode 100644 airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_event_Transfer.json create mode 100644 airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_event_Withdrawal.json diff --git a/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_call_deposit.json b/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_call_deposit.json new file mode 100644 index 00000000..914627f4 --- /dev/null +++ b/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_call_deposit.json @@ -0,0 +1,22 @@ +{ + "parser": { + "abi": { + "constant": false, + "inputs": [], + "name": "deposit", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + "contract_address": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270", + "field_mapping": {}, + "type": "trace" + }, + "table": { + "dataset_name": "polygon", + "schema": [], + "table_description": "", + "table_name": "WMATIC_call_deposit" + } +} \ No newline at end of file diff --git a/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_call_withdraw.json b/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_call_withdraw.json new file mode 100644 index 00000000..1c8e485f --- /dev/null +++ b/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_call_withdraw.json @@ -0,0 +1,33 @@ +{ + "parser": { + "abi": { + "constant": false, + "inputs": [ + { + "name": "wad", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + "contract_address": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270", + "field_mapping": {}, + "type": "trace" + }, + "table": { + "dataset_name": "polygon", + "schema": [ + { + "description": "", + "name": "wad", + "type": "STRING" + } + ], + "table_description": "", + "table_name": "WMATIC_call_withdraw" + } +} \ No newline at end of file diff --git a/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_event_Deposit.json b/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_event_Deposit.json new file mode 100644 index 00000000..84a2c549 --- /dev/null +++ b/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_event_Deposit.json @@ -0,0 +1,41 @@ +{ + "parser": { + "abi": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "dst", + "type": "address" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + "contract_address": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270", + "field_mapping": {}, + "type": "log" + }, + "table": { + "dataset_name": "polygon", + "schema": [ + { + "description": "", + "name": "dst", + "type": "STRING" + }, + { + "description": "", + "name": "wad", + "type": "STRING" + } + ], + "table_description": "", + "table_name": "WMATIC_event_Deposit" + } +} \ No newline at end of file diff --git a/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_event_Transfer.json b/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_event_Transfer.json new file mode 100644 index 00000000..0ca81482 --- /dev/null +++ b/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_event_Transfer.json @@ -0,0 +1,51 @@ +{ + "parser": { + "abi": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "src", + "type": "address" + }, + { + "indexed": true, + "name": "dst", + "type": "address" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + "contract_address": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270", + "field_mapping": {}, + "type": "log" + }, + "table": { + "dataset_name": "polygon", + "schema": [ + { + "description": "", + "name": "src", + "type": "STRING" + }, + { + "description": "", + "name": "dst", + "type": "STRING" + }, + { + "description": "", + "name": "wad", + "type": "STRING" + } + ], + "table_description": "", + "table_name": "WMATIC_event_Transfer" + } +} \ No newline at end of file diff --git a/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_event_Withdrawal.json b/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_event_Withdrawal.json new file mode 100644 index 00000000..01431c35 --- /dev/null +++ b/airflow/dags/resources/stages/parse/table_definitions/polygon/WMATIC_event_Withdrawal.json @@ -0,0 +1,41 @@ +{ + "parser": { + "abi": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "src", + "type": "address" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + "contract_address": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270", + "field_mapping": {}, + "type": "log" + }, + "table": { + "dataset_name": "polygon", + "schema": [ + { + "description": "", + "name": "src", + "type": "STRING" + }, + { + "description": "", + "name": "wad", + "type": "STRING" + } + ], + "table_description": "", + "table_name": "WMATIC_event_Withdrawal" + } +} \ No newline at end of file From 5e33f906ad4ae5d60c27ead407c6aa189881a5dc Mon Sep 17 00:00:00 2001 From: AyadiGithub Date: Thu, 16 Feb 2023 14:47:50 -0500 Subject: [PATCH 2/2] add support for wETH --- .../weth/WETH_call_deposit.json | 42 +++++++++++++++ .../weth/WETH_call_withdraw.json | 32 +++++++++++ .../weth/WETH_event_Transfer.json | 54 +++++++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 airflow/dags/resources/stages/parse/table_definitions/weth/WETH_call_deposit.json create mode 100644 airflow/dags/resources/stages/parse/table_definitions/weth/WETH_call_withdraw.json create mode 100644 airflow/dags/resources/stages/parse/table_definitions/weth/WETH_event_Transfer.json diff --git a/airflow/dags/resources/stages/parse/table_definitions/weth/WETH_call_deposit.json b/airflow/dags/resources/stages/parse/table_definitions/weth/WETH_call_deposit.json new file mode 100644 index 00000000..512c4340 --- /dev/null +++ b/airflow/dags/resources/stages/parse/table_definitions/weth/WETH_call_deposit.json @@ -0,0 +1,42 @@ +{ + "parser": { + "abi": { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "depositData", + "type": "bytes" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + "contract_address": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619", + "field_mapping": {}, + "type": "trace" + }, + "table": { + "dataset_name": "weth", + "schema": [ + { + "description": "", + "name": "user", + "type": "STRING" + }, + { + "description": "", + "name": "depositData", + "type": "STRING" + } + ], + "table_description": "", + "table_name": "WETH_call_deposit" + } +} \ No newline at end of file diff --git a/airflow/dags/resources/stages/parse/table_definitions/weth/WETH_call_withdraw.json b/airflow/dags/resources/stages/parse/table_definitions/weth/WETH_call_withdraw.json new file mode 100644 index 00000000..8cdb0dfb --- /dev/null +++ b/airflow/dags/resources/stages/parse/table_definitions/weth/WETH_call_withdraw.json @@ -0,0 +1,32 @@ +{ + "parser": { + "abi": { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + "contract_address": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619", + "field_mapping": {}, + "type": "trace" + }, + "table": { + "dataset_name": "weth", + "schema": [ + { + "description": "", + "name": "amount", + "type": "STRING" + } + ], + "table_description": "", + "table_name": "WETH_call_withdraw" + } +} \ No newline at end of file diff --git a/airflow/dags/resources/stages/parse/table_definitions/weth/WETH_event_Transfer.json b/airflow/dags/resources/stages/parse/table_definitions/weth/WETH_event_Transfer.json new file mode 100644 index 00000000..6636055c --- /dev/null +++ b/airflow/dags/resources/stages/parse/table_definitions/weth/WETH_event_Transfer.json @@ -0,0 +1,54 @@ +{ + "parser": { + "abi": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + "contract_address": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619", + "field_mapping": {}, + "type": "log" + }, + "table": { + "dataset_name": "weth", + "schema": [ + { + "description": "", + "name": "from", + "type": "STRING" + }, + { + "description": "", + "name": "to", + "type": "STRING" + }, + { + "description": "", + "name": "value", + "type": "STRING" + } + ], + "table_description": "", + "table_name": "WETH_event_Transfer" + } +} \ No newline at end of file