remove non core models/macros

This commit is contained in:
shah 2024-12-02 13:48:41 -08:00
parent 2ae5fbfb7e
commit ad0372f587
32 changed files with 0 additions and 2663 deletions

View File

@ -1,399 +0,0 @@
{% macro config_evm_high_level_abstractions(blockchain, network) -%}
{#
This macro is used to generate the high level abstractions for an EVM
blockchain.
#}
{% set schema = blockchain ~ "_" ~ network %}
- name: {{ schema -}}.tf_latest_native_balance
signature:
- [wallet, STRING, The address to get the balance of at the latest block]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, symbol STRING, raw_balance STRING, balance FLOAT)"
- |
The table has the following columns:
* `blockchain` - The blockchain
* `network` - The network
* `wallet_address` - The wallet address
* `symbol` - The symbol of the native asset
* `raw_balance` - The unadjusted native asset balance
* `balance` - The adjusted native asset balance
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the native asset balance at the latest block for a given address.$$
sql: |
{{ evm_latest_native_balance_string(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_latest_native_balance
signature:
- [wallets, ARRAY, An array of addresses string to get the balance of at the latest block]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, symbol STRING, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the native asset balances at the latest block for given addresses.$$
sql: |
{{ evm_latest_native_balance_array(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_latest_token_balance
signature:
- [wallet, STRING, The address to get the balance of at the latest block]
- [token, STRING, The address of the token to get the balance of]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, token_address STRING, symbol STRING, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the token balance at the latest block for a given address and token address. Supports ERC20 and ERC721 tokens.$$
sql: |
{{ evm_latest_token_balance_ss(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_latest_token_balance
signature:
- [wallet, STRING, The address to get the balance of at the latest block]
- [tokens, ARRAY, An array of address strings of the tokens to get the balance of]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, token_address STRING, symbol STRING, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the token balances at the latest block for a given address and multiple token addresses. Supports ERC20 and ERC721 tokens.$$
sql: |
{{ evm_latest_token_balance_sa(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_latest_token_balance
signature:
- [wallets, ARRAY, An array of addresses string to get the balance of at the latest block]
- [token, STRING, The address of the token to get the balance of]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, token_address STRING, symbol STRING, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the token balances at the latest block for multiple addresses and a single token address. Supports ERC20 and ERC721 tokens.$$
sql: |
{{ evm_latest_token_balance_as(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_latest_token_balance
signature:
- [wallets, ARRAY, An array of addresses string to get the balance of at the latest block]
- [tokens, ARRAY, An array of address strings of the tokens to get the balance of]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, token_address STRING, symbol STRING, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the token balances at the latest block for multiple addresses and multiple token addresses. Supports ERC20 and ERC721 tokens.$$
sql: |
{{ evm_latest_token_balance_aa(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_historical_token_balance
signature:
- [wallet, STRING, The address to get the balance of at the input block]
- [token, STRING, The address of the token to get the balance of]
- [block_number, INTEGER, The block number to get the balance at]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, token_address STRING, symbol STRING, block_number INTEGER, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the token balance for a given address and token address at a specific block. Supports ERC20 and ERC721 tokens.$$
sql: |
{{ evm_historical_token_balance_ssi(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_historical_token_balance
signature:
- [wallet, STRING, The address to get the balance of at the input block]
- [token, STRING, The address of the token to get the balance of]
- [block_numbers, ARRAY, The block numbers to get the balance at]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, token_address STRING, symbol STRING, block_number INTEGER, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the token balances for a given address and token address at multiple specific blocks. Supports ERC20 and ERC721 tokens.$$
sql: |
{{ evm_historical_token_balance_ssa(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_historical_token_balance
signature:
- [wallets, ARRAY, The addresses to get the balance of at the input block]
- [token, STRING, The address of the token to get the balance of]
- [block_number, INTEGER, The block number to get the balance at]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, token_address STRING, symbol STRING, block_number INTEGER, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the token balances for multiple addresses and a given token addresses at a specific block. Supports ERC20 and ERC721 tokens.$$
sql: |
{{ evm_historical_token_balance_asi(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_historical_token_balance
signature:
- [wallet, STRING, The address to get the balance of at the input block]
- [tokens, ARRAY, An array of address strings of the tokens to get the balance of]
- [block_number, INTEGER, The block number to get the balance at]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, token_address STRING, symbol STRING, block_number INTEGER, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the token balances for a given address and multiple token addresses at a specific block. Supports ERC20 and ERC721 tokens.$$
sql: |
{{ evm_historical_token_balance_sai(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_historical_token_balance
signature:
- [wallet, STRING, The address to get the balance of at the input block]
- [tokens, ARRAY, An array of address strings of the tokens to get the balance of]
- [block_numbers, ARRAY, The block numbers to get the balance at]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, token_address STRING, symbol STRING, block_number INTEGER, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the token balances for a given address and multiple token addresses at multiple specific blocks. Supports ERC20 and ERC721 tokens.$$
sql: |
{{ evm_historical_token_balance_saa(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_historical_token_balance
signature:
- [wallets, ARRAY, An array of address strings to get the balance of at the input block]
- [tokens, ARRAY, An array of address strings of the tokens to get the balance of]
- [block_number, INTEGER, The block number to get the balance at]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, token_address STRING, symbol STRING, block_number INTEGER, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the token balances for multiple addresses and multiple token addresses at a specific block. Supports ERC20 and ERC721 tokens.$$
sql: |
{{ evm_historical_token_balance_aai(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_historical_token_balance
signature:
- [wallets, ARRAY, An array of address strings to get the balance of at the input block]
- [tokens, ARRAY, An array of address strings of the tokens to get the balance of]
- [block_numbers, ARRAY, The block numbers to get the balance at]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, token_address STRING, symbol STRING, block_number INTEGER, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the token balances for multiple addresses and multiple token addresses at multiple specific blocks. Supports ERC20 and ERC721 tokens.$$
sql: |
{{ evm_historical_token_balance_aaa(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_historical_native_balance
signature:
- [wallet, STRING, The address to get the balance of at the input block]
- [block_number, INTEGER, The block number to get the balance at]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, symbol STRING, block_number INTEGER, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the native asset balance for a given address at a specific block.$$
sql: |
{{ evm_historical_native_balance_si(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_historical_native_balance
signature:
- [wallet, STRING, The address to get the balance of at the input block]
- [block_numbers, ARRAY, The block numbers to get the balance at]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, symbol STRING, block_number INTEGER, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the native asset balances for a given address at multiple specific blocks.$$
sql: |
{{ evm_historical_native_balance_sa(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_historical_native_balance
signature:
- [wallets, ARRAY, An array of address strings to get the balance of at the input block]
- [block_number, INTEGER, The block number to get the balance at]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, symbol STRING, block_number INTEGER, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the native asset balances for multiple addresses at a specific block.$$
sql: |
{{ evm_historical_native_balance_ai(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_historical_native_balance
signature:
- [wallets, ARRAY, An array of address strings to get the balance of at the input block]
- [block_numbers, ARRAY, The block numbers to get the balance at]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, wallet_address STRING, symbol STRING, block_number INTEGER, raw_balance STRING, balance FLOAT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the native asset balances for multiple addresses at multiple specific blocks.$$
sql: |
{{ evm_historical_native_balance_aa(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_latest_contract_events
signature:
- [address, STRING, The address of the contract to get the events of]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, tx_hash STRING, block_number INTEGER, event_index INTEGER, contract_address STRING, event_topics ARRAY, event_data STRING)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the latest events emitted by a contract in the last 100 blocks.$$
sql: |
{{ evm_latest_contract_events_s(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_latest_contract_events
signature:
- [address, STRING, The address of the contract to get the events of]
- [lookback, INTEGER, The number of blocks to look back. Please note there are RPC limitations on this method.]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, tx_hash STRING, block_number INTEGER, event_index INTEGER, contract_address STRING, event_topics ARRAY, event_data STRING)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the latest events emitted by a contract within the last `lookback` blocks. *Please note there are RPC limitations on this method.*$$
sql: |
{{ evm_latest_contract_events_si(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_latest_contract_events
signature:
- [addresses, ARRAY, The addresses of the contracts to get the events of]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, tx_hash STRING, block_number INTEGER, event_index INTEGER, contract_address STRING, event_topics ARRAY, event_data STRING)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the latest events emitted by multiple contracts in the last 100 blocks.$$
sql: |
{{ evm_latest_contract_events_a(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_latest_contract_events
signature:
- [addresses, ARRAY, The addresses of the contracts to get the events of]
- [lookback, INTEGER, The number of blocks to look back. Please note there are RPC limitations on this method.]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, tx_hash STRING, block_number INTEGER, event_index INTEGER, contract_address STRING, event_topics ARRAY, event_data STRING)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the latest events emitted by multiple contracts within the last `lookback` blocks. *Please note there are RPC limitations on this method.*$$
sql: |
{{ evm_latest_contract_events_ai(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_latest_contract_events_decoded
signature:
- [address, STRING, The address of the contract to get the decoded events of]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, tx_hash STRING, block_number INTEGER, event_index INTEGER, event_name STRING, contract_address STRING, event_topics ARRAY, event_data STRING, decoded_data OBJECT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$RReturns the latest decoded events emitted by a contract in the last 100 blocks. Submit missing ABIs [here](https://science.flipsidecrypto.xyz/abi-requestor/).$$
sql: |
{{ evm_latest_contract_events_decoded_s(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_latest_contract_events_decoded
signature:
- [addresses, ARRAY, The addresses of the contracts to get the decoded events of]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, tx_hash STRING, block_number INTEGER, event_index INTEGER, event_name STRING, contract_address STRING, event_topics ARRAY, event_data STRING, decoded_data OBJECT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the latest decoded events emitted by multiple contracts in the last 100 blocks. Submit missing ABIs [here](https://science.flipsidecrypto.xyz/abi-requestor/).$$
sql: |
{{ evm_latest_contract_events_decoded_a(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_latest_contract_events_decoded
signature:
- [address, STRING, The address of the contract to get the decoded events of]
- [lookback, INTEGER, The number of blocks to look back. Please note there are RPC limitations on this method.]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, tx_hash STRING, block_number INTEGER, event_index INTEGER, event_name STRING, contract_address STRING, event_topics ARRAY, event_data STRING, decoded_data OBJECT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the latest decoded events emitted by a contract within the last `lookback` blocks. Submit missing ABIs [here](https://science.flipsidecrypto.xyz/abi-requestor/). *Please note there are RPC limitations on this method.*$$
sql: |
{{ evm_latest_contract_events_decoded_si(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_latest_contract_events_decoded
signature:
- [addresses, ARRAY, The addresses of the contracts to get the decoded events of]
- [lookback, INTEGER, The number of blocks to look back. Please note there are RPC limitations on this method.]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, tx_hash STRING, block_number INTEGER, event_index INTEGER, event_name STRING, contract_address STRING, event_topics ARRAY, event_data STRING, decoded_data OBJECT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the latest decoded events emitted by multiple contracts within the last `lookback` blocks. Submit missing ABIs [here](https://science.flipsidecrypto.xyz/abi-requestor/). *Please note there are RPC limitations on this method.* $$
sql: |
{{ evm_latest_contract_events_decoded_ai(schema, blockchain, network) | indent(4) -}}
{%- endmacro -%}
{% macro config_eth_high_level_abstractions(blockchain, network) -%}
{#
This macro is used to generate high level abstractions for Ethereum mainnet only.
#}
{% set schema = blockchain ~ "_" ~ network %}
- name: {{ schema -}}.tf_all_contract_events
signature:
- [address, STRING, The address of the contracts to get the events of]
- [min_block, INTEGER, The minimum block number to get the events from]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, tx_hash STRING, block_number INTEGER, event_index INTEGER, contract_address STRING, event_topics ARRAY, event_data STRING)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the events emitted by a contract from a specific block to the latest block.$$
sql: |
{{ evm_contract_events(schema, blockchain, network) | indent(4) -}}
- name: {{ schema -}}.tf_all_contract_events_decoded
signature:
- [address, STRING, The address of the contracts to get the events of]
- [min_block, INTEGER, The minimum block number to get the events from]
return_type:
- "TABLE(status STRING, blockchain STRING, network STRING, tx_hash STRING, block_number INTEGER, event_index INTEGER, event_name STRING, contract_address STRING, event_topics ARRAY, event_data STRING, decoded_data OBJECT)"
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the decoded events emitted by a contract from a specific block to the latest block. Submit missing ABIs [here](https://science.flipsidecrypto.xyz/abi-requestor/).$$
sql: |
{{ evm_contract_events_decoded(schema, blockchain, network) | indent(4) -}}
{%- endmacro -%}

File diff suppressed because it is too large Load Diff

View File

@ -1,91 +0,0 @@
{%- macro config_evm_rpc_primitives(blockchain, network) -%}
{#-
Generates a set of UDFs that call the Ethereum JSON RPC API
- rpc: Executes an RPC call on the {{ blockchain }} blockchain
- eth_call: Executes a new message call immediately without creating a transaction on the block chain
- eth_getLogs: Returns an array of all logs matching filter with given address
- eth_getBalance: Returns the balance of the account of given address
-#}
{% set schema = blockchain ~ "_" ~ network -%}
- name: {{ schema -}}.udf_rpc
signature:
- [method, STRING, RPC method to call]
- [parameters, VARIANT, Parameters to pass to the RPC method]
return_type: [VARIANT, The return value of the RPC method]
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Executes an RPC call on the {{ blockchain }} blockchain.$$
sql: |
SELECT live.udf_rpc('{{ blockchain }}', '{{ network }}', method, parameters)
- name: {{ schema -}}.udf_rpc_eth_call
signature:
- [transaction, OBJECT, The transaction object]
- [block_or_tag, STRING, The block number or tag to execute the call on]
return_type: [VARIANT, The return value of the executed contract code]
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Executes a new message call immediately without creating a transaction on the block chain.$$
sql: |
SELECT {{ schema -}}.udf_rpc('eth_call', [transaction, block_or_tag])
- name: {{ schema -}}.udf_rpc_eth_get_logs
signature:
- [filter, OBJECT, The filter object]
return_type: [VARIANT, An array of all logs matching filter with given address]
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns an array of all logs matching filter with given address.$$
sql: |
SELECT {{ schema -}}.udf_rpc('eth_getLogs', [filter])
- name: {{ schema -}}.udf_rpc_eth_get_balance
signature:
- [address, STRING, The address to get the balance of]
- [block_or_tag, STRING, The block number or tag to execute the call on]
return_type: [VARIANT, The balance of the account of given address]
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the balance of the account of given address.$$
sql: |
SELECT {{ schema -}}.udf_rpc('eth_getBalance', [address, block_or_tag])
- name: {{ schema -}}.udf_get_token_balance
signature:
- [wallet_address, STRING, The address to get the balance of]
- [token_address, STRING, The token to get the balance of]
return_type: [STRING, The balance of the account of given address]
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the balance of the wallet of given token address at the latest block.$$
sql: |
SELECT utils.udf_hex_to_int({{ schema -}}.udf_rpc_eth_call(object_construct_keep_null('from', null, 'to', token_address, 'data', concat('0x70a08231',LPAD(REPLACE(wallet_address, '0x', ''), 64, 0))),'latest')::string)
- name: {{ schema -}}.udf_get_token_balance
signature:
- [wallet_address, STRING, The address to get the balance of]
- [token_address, STRING, The token to get the balance of]
- [block_number, INTEGER, The block number to retrieve the balance at]
return_type: [STRING, The balance of the account of given address]
options: |
NOT NULL
RETURNS NULL ON NULL INPUT
VOLATILE
COMMENT = $$Returns the balance of the wallet of given token address at the given block.$$
sql: |
SELECT utils.udf_hex_to_int({{schema}}.udf_rpc_eth_call(OBJECT_CONSTRUCT_KEEP_NULL('from', NULL, 'to', token_address, 'data', concat('0x70a08231',LPAD(REPLACE(wallet_address, '0x', ''), 64, 0))), CONCAT('0x', TRIM(TO_CHAR(block_number, 'XXXXXXXXXX'))))::STRING)
{%- endmacro -%}

View File

@ -1,11 +0,0 @@
{% macro create_aws_ethereum_api() %}
{% if target.name == "prod" %}
{% set sql %}
CREATE api integration IF NOT EXISTS aws_ethereum_api api_provider = aws_api_gateway api_aws_role_arn = 'arn:aws:iam::661245089684:role/snowflake-api-ethereum' api_allowed_prefixes = (
'https://e03pt6v501.execute-api.us-east-1.amazonaws.com/prod/',
'https://mryeusnrob.execute-api.us-east-1.amazonaws.com/dev/'
) enabled = TRUE;
{% endset %}
{% do run_query(sql) %}
{% endif %}
{% endmacro %}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,13 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('_eth__logs') }}
-- depends_on: {{ ref('_eth__decoded_logs') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions,
config_eth_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,10 +0,0 @@
-- depends_on: {{ ref('_evm__contracts_map') }}
-- depends_on: {{ ref('_evm__abi_map') }}
-- depends_on: {{ ref('_evm__native_symbol_map') }}
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('utils') }}
{%- set configs = [
config_evm_rpc_primitives,
config_evm_high_level_abstractions
] -%}
{{- ephemeral_deploy(configs) -}}

View File

@ -1,11 +0,0 @@
{{ config(
materialized = 'view',
grants = {'+select': fromyaml(var('ROLES'))}
) }}
SELECT *
FROM
{{ source(
'ethereum_core',
'ez_decoded_event_logs'
) }}

View File

@ -1,11 +0,0 @@
{{ config(
materialized = 'view',
grants = {'+select': fromyaml(var('ROLES'))}
) }}
SELECT *
FROM
{{ source(
'ethereum_core',
'fact_event_logs'
) }}

View File

@ -1,22 +0,0 @@
{{ config(
materialized = 'view',
grants = {'+select': fromyaml(var('ROLES'))}
) }}
SELECT
parent_contract_address,
event_name,
event_signature,
abi,
start_block,
end_block,
CASE blockchain
WHEN 'avalanche' THEN 'avalanche_c'
WHEN 'arbitrum' THEN 'arbitrum_one'
ELSE blockchain
END AS blockchain
FROM
{{ source(
'crosschain',
'dim_evm_event_abis'
) }}

View File

@ -1,20 +0,0 @@
{{ config(
materialized = 'view',
grants = {'+select': fromyaml(var('ROLES'))}
) }}
SELECT
address,
symbol,
decimals,
CASE
blockchain
WHEN 'avalanche' THEN 'avalanche_c'
WHEN 'arbitrum' THEN 'arbitrum_one'
ELSE blockchain
END AS blockchain
FROM
{{ source(
'crosschain',
'dim_contracts'
) }}

View File

@ -1,129 +0,0 @@
{{ config(
materialized = 'view',
grants = {'+select': fromyaml(var('ROLES'))}
) }}
WITH blockchain_assets AS (
SELECT
'avalanche' AS blockchain,
'AVAX' AS asset_symbol,
'mainnet' AS network
UNION ALL
SELECT
'avalanche' AS blockchain,
'AVAX' AS asset_symbol,
'testnet' AS network
UNION ALL
SELECT
'binance' AS blockchain,
'BNB' AS asset_symbol,
'mainnet' AS network
UNION ALL
SELECT
'binance' AS blockchain,
'BNB' AS asset_symbol,
'testnet' AS network
UNION ALL
SELECT
'gnosis' AS blockchain,
'xDAI' AS asset_symbol,
'mainnet' AS network
UNION ALL
SELECT
'ethereum' AS blockchain,
'ETH' AS asset_symbol,
'goerli' AS network
UNION ALL
SELECT
'ethereum' AS blockchain,
'ETH' AS asset_symbol,
'mainnet' AS network
UNION ALL
SELECT
'ethereum' AS blockchain,
'ETH' AS asset_symbol,
'sepolia' AS network
UNION ALL
SELECT
'arbitrum_nova' AS blockchain,
'ETH' AS asset_symbol,
'mainnet' AS network
UNION ALL
SELECT
'arbitrum_one' AS blockchain,
'ETH' AS asset_symbol,
'goerli' AS network
UNION ALL
SELECT
'arbitrum_one' AS blockchain,
'ETH' AS asset_symbol,
'mainnet' AS network
UNION ALL
SELECT
'base' AS blockchain,
'ETH' AS asset_symbol,
'goerli' AS network
UNION ALL
SELECT
'fantom' AS blockchain,
'FTM' AS asset_symbol,
'mainnet' AS network
UNION ALL
SELECT
'gnosis' AS blockchain,
'xDAI' AS asset_symbol,
'mainnet' AS network
UNION ALL
SELECT
'harmony' AS blockchain,
'ONE' AS asset_symbol,
'mainnet' AS network
UNION ALL
SELECT
'harmony' AS blockchain,
'ONE' AS asset_symbol,
'testnet' AS network
UNION ALL
SELECT
'optimism' AS blockchain,
'ETH' AS asset_symbol,
'goerli' AS network
UNION ALL
SELECT
'optimism' AS blockchain,
'ETH' AS asset_symbol,
'mainnet' AS network
UNION ALL
SELECT
'polygon' AS blockchain,
'MATIC' AS asset_symbol,
'mainnet' AS network
UNION ALL
SELECT
'polygon' AS blockchain,
'MATIC' AS asset_symbol,
'testnet' AS network
UNION ALL
SELECT
'polygon_zkevm' AS blockchain,
'ETH' AS asset_symbol,
'mainnet' AS network
UNION ALL
SELECT
'polygon_zkevm' AS blockchain,
'ETH' AS asset_symbol,
'testnet' AS network
UNION ALL
SELECT
'CELO' AS blockchain,
'CELO' AS asset_symbol,
'mainnet' AS network
)
SELECT
blockchain,
network,
asset_symbol AS symbol
FROM
blockchain_assets