remove marketplace macros/models

This commit is contained in:
shah 2024-12-03 11:08:01 -08:00
parent 27b35561f6
commit e37424031c
135 changed files with 0 additions and 4094 deletions

View File

@ -1,11 +0,0 @@
{% macro alchemy_nft_get_api_call(schema_name, api_path) %}
SELECT {{ schema_name -}}.nfts_get(NETWORK, '/{{api_path}}', QUERY_ARGS) as response
{% endmacro %}
{% macro alchemy_nft_post_api_call(schema_name, api_path) %}
SELECT {{ schema_name -}}.nfts_post(NETWORK, '/{{api_path}}', BODY) as response
{% endmacro %}
{% macro alchemy_rpc_call(schema_name, method) %}
SELECT {{ schema_name -}}.rpc(NETWORK, '{{method}}', PARAMS) as response
{% endmacro %}

View File

@ -1,216 +0,0 @@
{% macro config_alchemy_nfts_udfs(schema_name = "alchemy_nfts", utils_schema_name = "alchemy_utils") -%}
{#
This macro is used to generate the alchemy nft endpoints
#}
- name: {{ schema_name -}}.get_nfts
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Gets all NFTs currently owned by a given address. [Alchemy docs here](https://docs.alchemy.com/reference/getnfts).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'getNFTs') | trim }}
- name: {{ schema_name -}}.get_owners_for_token
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Get the owner(s) for a token. [Alchemy docs here](https://docs.alchemy.com/reference/getownersfortoken).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'getOwnersForToken') | trim }}
- name: {{ schema_name -}}.get_owners_for_collection
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Gets all owners for a given NFT contract. [Alchemy docs here](https://docs.alchemy.com/reference/getownersforcollection).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'getOwnersForCollection') | trim }}
- name: {{ schema_name -}}.is_holder_of_collection
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Checks whether a wallet holds a NFT in a given collection. [Alchemy docs here](https://docs.alchemy.com/reference/isholderofcollection).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'isHolderOfCollection') | trim }}
- name: {{ schema_name -}}.get_contracts_for_owner
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Gets all NFT contracts held by an owner address. [Alchemy docs here](https://docs.alchemy.com/reference/getcontractsforowner).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'getContractsForOwner') | trim }}
- name: {{ schema_name -}}.get_nft_metadata
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Gets the metadata associated with a given NFT. [Alchemy docs here](https://docs.alchemy.com/reference/getnftmetadata).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'getNFTMetadata') | trim }}
- name: {{ schema_name -}}.get_nft_metadata_batch
signature:
- [NETWORK, STRING, The blockchain/network]
- [BODY, OBJECT, JSON Body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Gets the metadata associated with up to 100 given NFT contracts. [Alchemy docs here](https://docs.alchemy.com/reference/getnftmetadatabatch).$$
sql: {{ alchemy_nft_post_api_call(utils_schema_name, 'getNFTMetadataBatch') | trim }}
- name: {{ schema_name -}}.get_contract_metadata
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Queries NFT high-level collection/contract level information. [Alchemy docs here](https://docs.alchemy.com/reference/getcontractmetadata).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'getContractMetadata') | trim }}
- name: {{ schema_name -}}.get_contract_metadata_batch
signature:
- [NETWORK, STRING, The blockchain/network]
- [BODY, OBJECT, JSON Body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Gets the metadata associated with the given list of contract addresses. [Alchemy docs here](https://docs.alchemy.com/reference/getcontractmetadatabatch).$$
sql: {{ alchemy_nft_post_api_call(utils_schema_name, 'getContractMetadataBatch') | trim }}
- name: {{ schema_name -}}.invalidate_contract
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Marks all cached tokens for the particular contract as stale. So the next time the endpoint is queried it fetches live data instead of fetching from cache. [Alchemy docs here](https://docs.alchemy.com/reference/invalidatecontract).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'invalidateContract') | trim }}
- name: {{ schema_name -}}.reingest_contract
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Triggers metadata refresh for an entire NFT collection and refreshes stale metadata after a collection reveal/collection changes. [Alchemy docs here](https://docs.alchemy.com/reference/reingestcontract).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'reingestContract') | trim }}
- name: {{ schema_name -}}.search_contract_metadata
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts. [Alchemy docs here](https://docs.alchemy.com/reference/searchcontractmetadata).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'searchContractMetadata') | trim }}
- name: {{ schema_name -}}.get_nfts_for_collection
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Gets all NFTs for a given NFT contract. [Alchemy docs here](https://docs.alchemy.com/reference/getnftsforcollection).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'getNFTsForCollection') | trim }}
- name: {{ schema_name -}}.get_spam_contracts
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns a list of all spam contracts marked by Alchemy. [Alchemy docs here](https://docs.alchemy.com/reference/getspamcontracts).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'getSpamContracts') | trim }}
- name: {{ schema_name -}}.is_spam_contract
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns whether a contract is marked as spam or not by Alchemy. [Alchemy docs here](https://docs.alchemy.com/reference/isspamcontract).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'isSpamContract') | trim }}
- name: {{ schema_name -}}.is_airdrop
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns whether a token is marked as an airdrop or not. Airdrops are defined as NFTs that were minted to a user address in a transaction sent by a different address. [Alchemy docs here](https://docs.alchemy.com/reference/isairdrop).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'isAirdrop') | trim }}
- name: {{ schema_name -}}.report_spam
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Report a particular address to our APIs if you think it is spam. [Alchemy docs here](https://docs.alchemy.com/reference/reportspam).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'reportSpam') | trim }}
- name: {{ schema_name -}}.get_floor_price
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns the floor prices of a NFT collection by marketplace. [Alchemy docs here](https://docs.alchemy.com/reference/getfloorprice).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'getFloorPrice') | trim }}
- name: {{ schema_name -}}.get_nft_sales
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Gets NFT sales that have happened through on-chain marketplaces. [Alchemy docs here](https://docs.alchemy.com/reference/getnftsales).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'getNFTSales') | trim }}
- name: {{ schema_name -}}.compute_rarity
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Computes the rarity of each attribute of an NFT. [Alchemy docs here](https://docs.alchemy.com/reference/computerarity).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'computeRarity') | trim }}
- name: {{ schema_name -}}.summarize_nft_attributes
signature:
- [NETWORK, STRING, The blockchain/network]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Generate a summary of attribute prevalence for an NFT collection. [Alchemy docs here](https://docs.alchemy.com/reference/summarizenftattributes).$$
sql: {{ alchemy_nft_get_api_call(utils_schema_name, 'summarizeNFTAttributes') | trim }}
{% endmacro %}

View File

@ -1,35 +0,0 @@
{% macro config_alchemy_tokens_udfs(schema_name = "alchemy_tokens", utils_schema_name = "alchemy_utils") -%}
{#
This macro is used to generate the alchemy token endpoints
#}
- name: {{ schema_name -}}.get_token_allowance
signature:
- [NETWORK, STRING, The blockchain/network]
- [PARAMS, ARRAY, Array of JSON param objects for RPC request]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns the amount which the spender is allowed to withdraw from the owner. [Alchemy docs here](https://docs.alchemy.com/reference/alchemy-gettokenallowance).$$
sql: {{alchemy_rpc_call(utils_schema_name, "alchemy_getTokenAllowance") | trim}}
- name: {{ schema_name -}}.get_token_balances
signature:
- [NETWORK, STRING, The blockchain/network]
- [PARAMS, ARRAY, Array of JSON param objects for RPC request]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns ERC20 token balances for all tokens the given address has ever transacted in with. Optionally accepts a list of contracts. [Alchemy docs here](https://docs.alchemy.com/reference/alchemy-gettokenbalances).$$
sql: {{alchemy_rpc_call(utils_schema_name, "alchemy_getTokenBalances") | trim}}
- name: {{ schema_name -}}.get_token_metadata
signature:
- [NETWORK, STRING, The blockchain/network]
- [PARAMS, ARRAY, Array of JSON param objects for RPC request]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns metadata (name, symbol, decimals, logo) for a given token contract address. [Alchemy docs here](https://docs.alchemy.com/reference/alchemy-gettokenmetadata).$$
sql: {{alchemy_rpc_call(utils_schema_name, "alchemy_getTokenMetadata") | trim}}
{% endmacro %}

View File

@ -1,16 +0,0 @@
{% macro config_alchemy_transfers_udfs(schema_name = "alchemy_transfers", utils_schema_name = "alchemy_utils") -%}
{#
This macro is used to generate the alchemy transfers endpoints
#}
- name: {{ schema_name -}}.get_asset_transfers
signature:
- [NETWORK, STRING, The blockchain/network]
- [PARAMS, ARRAY, Array of JSON param objects for RPC request]
return_type:
- "VARIANT"
options: |
COMMENT = $$The Transfers API allows you to easily fetch historical transactions for any address across Ethereum and supported L2s including Polygon, Arbitrum, and Optimism. [Alchemy docs here](https://docs.alchemy.com/reference/alchemy-getassettransfers).$$
sql: {{alchemy_rpc_call(utils_schema_name, "alchemy_getAssetTransfers") | trim}}
{% endmacro %}

View File

@ -1,60 +0,0 @@
{% macro config_alchemy_utils_udfs(schema_name = "alchemy_utils", utils_schema_name="alchemy_utils") -%}
{#
This macro is used to generate the alchemy base endpoints
#}
- name: {{ schema -}}.nfts_get
signature:
- [NETWORK, STRING, The blockchain/network]
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Alchemy NFT API.$$
sql: |
SELECT
live.udf_api(
concat(
'https://', NETWORK,'.g.alchemy.com/nft/v2/{',NETWORK,'}', PATH, '?',
utils.udf_object_to_url_query_string(QUERY_ARGS)
),
'_FSC_SYS/ALCHEMY'
) as response
- name: {{ schema -}}.nfts_post
signature:
- [NETWORK, STRING, The blockchain/network]
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Alchemy NFT API.$$
sql: |
SELECT
live.udf_api(
'POST',
concat('https://', NETWORK,'.g.alchemy.com/nft/v2/{',NETWORK,'}', PATH),
{},
BODY,
'_FSC_SYS/ALCHEMY'
) as response
- name: {{ schema -}}.rpc
signature:
- [NETWORK, STRING, The blockchain/network]
- [METHOD, STRING, The RPC method to call]
- [PARAMS, ARRAY, The RPC Params arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue an RPC call to Alchemy.$$
sql: |
SELECT live.udf_api(
'POST',
concat('https://', NETWORK,'.g.alchemy.com/v2/{',NETWORK,'}'),
{},
{'id': 1,'jsonrpc': '2.0','method': METHOD,'params': PARAMS},
'_FSC_SYS/ALCHEMY') as response
{% endmacro %}

View File

@ -1,23 +0,0 @@
{% macro config_allday_udfs(schema_name = "allday", utils_schema_name = "allday_utils") -%}
{#
This macro is used to generate the AllDay calls
#}
- name: {{ schema_name -}}.graphql
signature:
- [QUERY, OBJECT, The GraphQL query]
return_type:
- "VARIANT"
options: |
COMMENT = $$Run a graphql query on AllDay.$$
sql: |
SELECT
live.udf_api(
'GET',
CONCAT('https://nflallday.com/consumer/graphql?query=', utils.udf_object_to_url_query_string(QUERY)),
{'User-Agent': 'Flipside_Flow_metadata/0.1','Accept-Encoding': 'gzip', 'Content-Type': 'application/json', 'Accept': 'application/json','Connection': 'keep-alive'},
{},
'_FSC_SYS/ALLDAY'
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_apilayer_udfs(schema_name = "apilayer", utils_schema_name="apilayer_utils") -%}
{#
This macro is used to generate the ApiLayer Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the ApiLayer API. [ApiLayer docs here](https://apilayer.com/docs/article/getting-started).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.apilayer.com', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'apikey': '{API_KEY}'},
{},
'_FSC_SYS/APILAYER'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the ApiLayer API. [ApiLayer docs here](https://apilayer.com/docs/article/getting-started).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT('https://api.apilayer.com', PATH),
{'apikey': '{API_KEY}'},
BODY,
'_FSC_SYS/APILAYER'
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_binance_udfs(schema_name = "binance", utils_schema_name="binance_utils") -%}
{#
This macro is used to generate the Binance Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [URL, STRING, The full url including the path]
- [QUERY_ARGS, ARRAY, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Binance API. [Binance docs here](https://binance-docs.github.io/apidocs/spot/en/#api-key-setup).$$
sql: |
SELECT
live.udf_api(
'GET',
concat(URL, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'X-MBX-APIKEY': '{API_KEY}'},
{},
'_FSC_SYS/BINANCE'
) as response
- name: {{ schema_name -}}.post
signature:
- [URL, STRING, The full url]
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Binance API. [Binance docs here](https://binance-docs.github.io/apidocs/spot/en/#api-key-setup).$$
sql: |
SELECT
live.udf_api(
'POST',
URL,
{'X-MBX-APIKEY': '{API_KEY}'},
BODY,
'_FSC_SYS/BINANCE'
) as response
{% endmacro %}

View File

@ -1,23 +0,0 @@
{% macro config_bitquery_udfs(schema_name = "bitquery", utils_schema_name = "bitquery_utils") -%}
{#
This macro is used to generate the BitQuery calls
#}
- name: {{ schema_name -}}.graphql
signature:
- [QUERY, OBJECT, The GraphQL query]
return_type:
- "VARIANT"
options: |
COMMENT = $$Run a graphql query on BitQuery [BitQuery docs here](https://docs.bitquery.io/docs/start/first-query/).$$
sql: |
SELECT
live.udf_api(
'POST',
'https://graphql.bitquery.io',
{'X-API-KEY': '{API_KEY}'},
QUERY,
'_FSC_SYS/BITQUERY'
) as response
{% endmacro %}

View File

@ -1,44 +0,0 @@
{% macro config_blockpour_utils_udfs(schema_name = "blockpour_utils", utils_schema_name="blockpour_utils") -%}
{#
This macro is used to generate the Blockpour base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Blockpour API.$$
sql: |
SELECT
live.udf_api(
'GET',
concat(
'https://services.blockpour.com/api', PATH, '?',
utils.udf_object_to_url_query_string(QUERY_ARGS)
),
{'api-key': '{API_KEY}'},
{},
'_FSC_SYS/BLOCKPOUR'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the BlockPour API.$$
sql: |
SELECT
live.udf_api(
'POST',
concat('https://services.blockpour.com/api', PATH),
{'api-key': '{API_KEY}'},
BODY,
'_FSC_SYS/BLOCKPOUR'
) as response
{% endmacro %}

View File

@ -1,61 +0,0 @@
{% macro config_chainbase_utils_udfs(schema_name = "chainbase_utils", utils_schema_name="chainbase_utils") -%}
{#
This macro is used to generate the alchemy base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Chainbase API. [Chainbase Docs](https://docs.chainbase.com/reference/supported-chains)$$
sql: |
SELECT
live.udf_api(
'GET',
concat(
'https://api.chainbase.online', PATH, '?',
utils.udf_object_to_url_query_string(QUERY_ARGS)
),
{'x-api-key': '{API_KEY}'},
{},
'_FSC_SYS/CHAINBASE'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Chainbase API. [Chainbase Docs](https://docs.chainbase.com/reference/supported-chains)$$
sql: |
SELECT
live.udf_api(
'POST',
concat('https://api.chainbase.online', PATH),
{'x-api-key': '{API_KEY}'},
BODY,
'_FSC_SYS/CHAINBASE'
) as response
- name: {{ schema_name -}}.rpc
signature:
- [METHOD, STRING, The RPC method to call]
- [PARAMS, ARRAY, The RPC Params arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue an RPC call to Chainbase. [Chainbase Docs](https://docs.chainbase.com/reference/supported-chains)$$
sql: |
SELECT live.udf_api(
'POST',
concat('https://api.chainbase.online'),
{'x-api-key': '{API_KEY}'},
{'id': 1,'jsonrpc': '2.0','method': METHOD,'params': PARAMS},
'_FSC_SYS/CHAINBASE') as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_chainstack_udfs(schema_name = "chainstack", utils_schema_name="chainstack_utils") -%}
{#
This macro is used to generate the Chainstack Base api endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Chainstack API. [Chainstack docs here](https://docs.chainstack.com/reference/blockchain-apis).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.chainstack.com', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'authorization': 'Bearer {API_KEY}'},
{},
'_FSC_SYS/CHAINSTACK'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Chainstack API. [Chainstack docs here](https://docs.chainstack.com/reference/blockchain-apis).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT('https://api.chainstack.com', PATH),
{'authorization': 'Bearer {API_KEY}'},
BODY,
'_FSC_SYS/CHAINSTACK'
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_cmc_udfs(schema_name = "cmc", utils_schema_name="cmc_utils") -%}
{#
This macro is used to generate the CoinmarketCap Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the CoinmarketCap API. [CoinmarketCap docs here](https://coinmarketcap.com/api/documentation/v1/).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://pro-api.coinmarketcap.com', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'X-CMC_PRO_API_KEY': '{API_KEY}'},
{},
'_FSC_SYS/CMC'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the CoinmarketCap API. [CoinmarketCap docs here](https://coinmarketcap.com/api/documentation/v1/).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT('https://pro-api.coinmarketcap.com', PATH),
{'X-CMC_PRO_API_KEY': '{API_KEY}'},
BODY,
'_FSC_SYS/CMC'
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_coingecko_udfs(schema_name = "coingecko", utils_schema_name="coingecko_utils") -%}
{#
This macro is used to generate the Coingecko Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the CoinGecko API. [CoinGecko docs here](https://apiguide.coingecko.com/getting-started/introduction).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://pro-api.coingecko.com', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'x-cg-pro-api-key': '{API_KEY}'},
{},
'_FSC_SYS/COINGECKO'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path after '/api' starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the CoinGecko API. [CoinGecko docs here](https://apiguide.coingecko.com/getting-started/introduction).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT('https://pro-api.coingecko.com', PATH),
{'x-cg-pro-api-key': '{API_KEY}'},
BODY,
'_FSC_SYS/COINGECKO'
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_covalent_udfs(schema_name = "covalent", utils_schema_name="covalent_utils") -%}
{#
This macro is used to generate the Covalent Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Covalent API. [Covalent docs here](https://www.covalenthq.com/docs/unified-api/).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.covalenthq.com', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'Authorization': 'Bearer {API_KEY}'},
{},
'_FSC_SYS/COVALENT'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Covalent API. [Covalent docs here](https://www.covalenthq.com/docs/unified-api/).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT('https://api.covalenthq.com', PATH),
{'Authorization': 'Bearer {API_KEY}'},
BODY,
'_FSC_SYS/COVALENT'
) as response
{% endmacro %}

View File

@ -1,45 +0,0 @@
{% macro config_credmark_utils_udfs(schema_name = "credmark_utils", utils_schema_name="credmark_utils") -%}
{#
This macro is used to generate the Credmark base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Credmark API.$$
sql: |
SELECT
live.udf_api(
'GET',
concat(
'https://gateway.credmark.com', PATH, '?',
utils.udf_object_to_url_query_string(QUERY_ARGS)
),
{'Authorization': 'Bearer {API_KEY}'},
{},
'_FSC_SYS/CREDMARK'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Credmark API.$$
sql: |
SELECT
live.udf_api(
'POST',
concat('https://gateway.credmark.com', PATH),
{'Authorization': 'Bearer {API_KEY}'},
BODY,
'_FSC_SYS/CREDMARK'
) as response
{% endmacro %}

View File

@ -1,23 +0,0 @@
{% macro config_dapplooker_udfs(schema_name = "dapplooker", utils_schema_name = "dapplooker_utils") -%}
{#
This macro is used to generate the DappLooker endpoints
#}
- name: {{ schema_name -}}.get_chart
signature:
- [CHART_ID, STRING, The UUID of the chart]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns the chart data. [DappLooker docs here](https://github.com/dapplooker/dapplooker-sdk).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.dapplooker.com/chart/', CHART_ID, '?api_key={API_KEY}&output_format=json'),
{},
{},
'_FSC_SYS/DAPPLOOKER'
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_dappradar_udfs(schema_name = "dappradar", utils_schema_name="dappradar_utils") -%}
{#
This macro is used to generate the DappRadar Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the DappRadar API. [DappRadar docs here](https://api-docs.dappradar.com/#section/Introduction).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.dappradar.com', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'X-BLOBR-KEY': '{API_KEY}'},
{},
'_FSC_SYS/DAPPRADAR'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the DappRadar API. [DappRadar docs here](https://api-docs.dappradar.com/#section/Introduction).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT('https://api.dappradar.com', PATH),
{'X-BLOBR-KEY': '{API_KEY}'},
BODY,
'_FSC_SYS/DAPPRADAR'
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_deepnftvalue_udfs(schema_name = "deepnftvalue", utils_schema_name="deepnftvalue_utils") -%}
{#
This macro is used to generate the DeepNftValue Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the DeepNftValue API. [DeepNftValue docs here](https://deepnftvalue.readme.io/reference/getting-started-with-deepnftvalue-api).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.deepnftvalue.com', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'Authorization': 'Token {API_KEY}'},
{},
'_FSC_SYS/DEEPNFTVALUE'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the DeepNftValue API. [DeepNftValue docs here](https://deepnftvalue.readme.io/reference/getting-started-with-deepnftvalue-api).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT('https://api.deepnftvalue.com', PATH),
{'Authorization': 'Token {API_KEY}'},
BODY,
'_FSC_SYS/DEEPNFTVALUE'
) as response
{% endmacro %}

View File

@ -1,24 +0,0 @@
{% macro config_defillama_udfs(schema_name = "defillama", utils_schema_name="defillama_utils") -%}
{#
This macro is used to generate the Defillama endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Defillama API. [Defillama docs here](https://defillama.com/docs/api).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.llama.fi', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'Accept': '*/*', 'User-Agent': 'livequery/1.0 (Snowflake)', 'Host':'api.llama.fi', 'Connection': 'keep-alive'},
{},
IFF(ARRAY_CONTAINS('api_key'::VARIANT, OBJECT_KEYS(QUERY_ARGS)), '_FSC_SYS/DEFILLAMA', '')
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_dune_udfs(schema_name = "dune", utils_schema_name="dune_utils") -%}
{#
This macro is used to generate the Dune Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Dune API. [Dune docs here](https://dune.com/docs/api/api-reference/authentication/).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.dune.com', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'x-dune-api-key': '{API_KEY}'},
{},
'_FSC_SYS/DUNE'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Dune API. [Dune docs here](https://dune.com/docs/api/api-reference/authentication/).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT('https://api.dune.com', PATH),
{'x-dune-api-key': '{API_KEY}'},
BODY,
'_FSC_SYS/DUNE'
) as response
{% endmacro %}

View File

@ -1,39 +0,0 @@
{% macro config_espn_udfs(schema_name = "espn", utils_schema_name="espn_utils") -%}
{#
This macro is used to generate the ESPN Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [URL, STRING, The full url including the path]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the ESPN API. [ESPN docs here](https://gist.github.com/akeaswaran/b48b02f1c94f873c6655e7129910fc3b#file-espn-api-docs-md).$$
sql: |
SELECT
live.udf_api(
'GET',
concat(URL, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{},
{}
) as response
- name: {{ schema_name -}}.post
signature:
- [URL, STRING, The full url]
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the ESPN API. [ESPN docs here](https://gist.github.com/akeaswaran/b48b02f1c94f873c6655e7129910fc3b#file-espn-api-docs-md).$$
sql: |
SELECT
live.udf_api(
'POST',
URL,
{},
BODY
) as response
{% endmacro %}

View File

@ -1,7 +0,0 @@
{% macro footprint_get_api_call(schema_name, api_path) %}
SELECT {{ schema_name -}}.get('/{{api_path}}', QUERY_PARAMS) as response
{% endmacro %}
{% macro footprint_post_api_call(schema_name, api_path) %}
SELECT {{ schema_name -}}.post('/{{api_path}}', BODY) as response
{% endmacro %}

View File

@ -1,82 +0,0 @@
{% macro config_footprint_utils_udfs(schema_name = "footprint_utils", utils_schema_name="footprint_utils") -%}
{#
This macro is used to generate the Footprint base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, ARRAY, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Footprint API.$$
sql: |
SELECT
live.udf_api(
'GET',
concat(
'https://api.footprint.network/api', PATH, '?',
utils.udf_urlencode(QUERY_ARGS, TRUE)
),
{'api-key': '{API_KEY}'},
{},
'_FSC_SYS/FOOTPRINT'
) as response
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Footprint API.$$
sql: |
SELECT
live.udf_api(
'GET',
concat(
'https://api.footprint.network/api', PATH, '?',
utils.udf_urlencode(QUERY_ARGS, TRUE)
),
{'api-key': '{API_KEY}'},
{},
'_FSC_SYS/FOOTPRINT'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Footprint API.$$
sql: |
SELECT
live.udf_api(
'POST',
concat('https://api.footprint.network/api', PATH),
{'api-key': '{API_KEY}'},
BODY,
'_FSC_SYS/FOOTPRINT'
) as response
- name: {{ schema_name -}}.rpc
signature:
- [METHOD, STRING, The RPC method to call]
- [PARAMS, ARRAY, The RPC Params arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue an RPC call to Footprint.$$
sql: |
SELECT live.udf_api(
'POST',
concat('https://api.footprint.network/api'),
{'api-key': '{API_KEY}'},
{'id': 1,'jsonrpc': '2.0','method': METHOD,'params': PARAMS},
'_FSC_SYS/FOOTPRINT') as response
{% endmacro %}

View File

@ -1,22 +0,0 @@
{% macro config_fred_udfs(schema_name = "fred", utils_schema_name = "fred_utils") -%}
{#
This macro is used to generate the FRED Calls
#}
- name: {{ schema_name -}}.get_series
signature:
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Get a FRED series [FRED docs here](https://fred.stlouisfed.org/docs/api/fred/series.html).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.stlouisfed.org/fred/series/observations?api_key={API_KEY}&', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{},
{},
'_FSC_SYS/FRED'
) as response
{% endmacro %}

View File

@ -1,148 +0,0 @@
{% macro config_github_actions_udfs(schema_name = "github_actions", utils_schema_name = "github_utils") -%}
{#
This macro is used to generate the Github API Calls
#}
- name: {{ schema_name -}}.workflows
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
- [query, "OBJECT"]
return_type:
- "OBJECT"
options: |
COMMENT = $$[List repository workflows](https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#list-repository-workflows).$$
sql: |
SELECT
{{ utils_schema_name }}.GET(
CONCAT_WS('/', 'repos', owner, repo, 'actions/workflows'),
query
):data::OBJECT
- name: {{ schema_name -}}.workflows
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
return_type:
- "OBJECT"
options: |
COMMENT = $$[List repository workflows](https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#list-repository-workflows).$$
sql: |
SELECT
{{ schema_name -}}.workflows(owner, repo, {})
- name: {{ schema_name -}}.runs
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
- [query, "OBJECT"]
return_type:
- "OBJECT"
options: |
COMMENT = $$Lists all workflow runs for a repository. You can use query parameters to narrow the list of results. [Docs](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository).$$
sql: |
SELECT
{{ utils_schema_name }}.GET(
CONCAT_WS('/', 'repos', owner, repo, 'actions/runs'),
query
):data::OBJECT
- name: {{ schema_name -}}.runs
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
return_type:
- "OBJECT"
options: |
COMMENT = $$Lists all workflow runs for a repository. You can use query parameters to narrow the list of results. [Docs](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository).$$
sql: |
SELECT
{{ schema_name -}}.runs(owner, repo, {})
- name: {{ schema_name -}}.workflow_runs
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
- [workflow_id, "TEXT"]
- [query, "OBJECT"]
return_type:
- "OBJECT"
options: |
COMMENT = $$List all workflow runs for a workflow. You can replace workflow_id with the workflow file name. You can use query parameters to narrow the list of results. [Docs](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-workflow).$$
sql: |
SELECT
{{ utils_schema_name }}.GET(
CONCAT_WS('/', 'repos', owner, repo, 'actions/workflows', workflow_id, 'runs'),
query
):data::OBJECT
- name: {{ schema_name -}}.workflow_runs
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
- [workflow_id, "TEXT"]
return_type:
- "OBJECT"
options: |
COMMENT = $$List all workflow runs for a workflow. You can replace workflow_id with the workflow file name. You can use query parameters to narrow the list of results. [Docs](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-workflow).$$
sql: |
SELECT
{{ schema_name -}}.workflow_runs(owner, repo, workflow_id, {})
- name: {{ schema_name -}}.workflow_dispatches
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
- [workflow_id, "TEXT"]
- [body, "OBJECT"]
return_type:
- "OBJECT"
options: |
COMMENT = $$You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace workflow_id with the workflow file name. For example, you could use main.yaml. [Docs](https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event).$$
sql: |
SELECT
{{ utils_schema_name }}.POST(
CONCAT_WS('/', 'repos', owner, repo, 'actions/workflows', workflow_id, 'dispatches'),
COALESCE(body, {'ref': 'main'})::OBJECT
)::OBJECT
- name: {{ schema_name -}}.workflow_dispatches
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
- [workflow_id, "TEXT"]
return_type:
- "OBJECT"
options: |
COMMENT = $$You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace workflow_id with the workflow file name. For example, you could use main.yaml. [Docs](https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event).$$
sql: |
SELECT
{{ schema_name -}}.workflow_dispatches(owner, repo, workflow_id, NULL)
- name: {{ schema_name -}}.workflow_enable
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
- [workflow_id, "TEXT"]
return_type:
- "OBJECT"
options: |
COMMENT = $$Enables a workflow. You can replace workflow_id with the workflow file name. For example, you could use main.yaml. [Docs](https://docs.github.com/en/rest/reference/actions#enable-a-workflow).$$
sql: |
SELECT
{{ utils_schema_name }}.PUT(
CONCAT_WS('/', 'repos', owner, repo, 'actions/workflows', workflow_id, 'enable'),
{}
)::OBJECT
- name: {{ schema_name -}}.workflow_disable
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
- [workflow_id, "TEXT"]
return_type:
- "OBJECT"
options: |
COMMENT = $$Disables a workflow. You can replace workflow_id with the workflow file name. For example, you could use main.yaml. [Docs](https://docs.github.com/en/rest/reference/actions#disable-a-workflow).$$
sql: |
SELECT
{{ utils_schema_name }}.PUT(
CONCAT_WS('/', 'repos', owner, repo, 'actions/workflows', workflow_id, 'disable'),
{}
)::OBJECT
{% endmacro %}

View File

@ -1,169 +0,0 @@
{% macro config_github_actions_udtfs(schema_name = "github_actions", utils_schema_name = "github_utils") -%}
{#
This macro is used to generate the Github API Calls
#}
- name: {{ schema_name -}}.tf_workflows
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
- [query, "OBJECT"]
return_type:
- "TABLE(id INTEGER, badge_url STRING, created_at TIMESTAMP, html_url STRING, name STRING, node_id STRING, path STRING, state STRING, updated_at TIMESTAMP, url STRING)"
options: |
COMMENT = $$[List repository workflows](https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#list-repository-workflows).$$
sql: |
WITH workflows AS
(
SELECT
github_actions.workflows(OWNER, REPO, QUERY) AS response
)
SELECT
value:id::INTEGER AS id
,value:badge_url::STRING AS badge_url
,value:created_at::TIMESTAMP AS created_at
,value:html_url::STRING AS html_url
,value:name::STRING AS name
,value:node_id::STRING AS node_id
,value:path::STRING AS path
,value:state::STRING AS state
,value:updated_at::TIMESTAMP AS updated_at
,value:url::STRING AS url
FROM workflows, LATERAL FLATTEN( input=> response:workflows)
- name: {{ schema_name -}}.tf_workflows
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
return_type:
- "TABLE(id INTEGER, badge_url STRING, created_at TIMESTAMP, html_url STRING, name STRING, node_id STRING, path STRING, state STRING, updated_at TIMESTAMP, url STRING)"
options: |
COMMENT = $$[List repository workflows](https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#list-repository-workflows).$$
sql: |
SELECT *
FROM TABLE({{ schema_name -}}.tf_workflows(owner, repo, {}))
- name: {{ schema_name -}}.tf_runs
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
- [query, "OBJECT"]
return_type:
- "TABLE(id NUMBER, name STRING, node_id STRING, check_suite_id NUMBER, check_suite_node_id STRING, head_branch STRING, head_sha STRING, run_number NUMBER, event STRING, display_title STRING, status STRING, conclusion STRING, workflow_id NUMBER, url STRING, html_url STRING, pull_requests STRING, created_at TIMESTAMP, updated_at TIMESTAMP, actor OBJECT, run_attempt STRING, run_started_at TIMESTAMP, triggering_actor OBJECT, jobs_url STRING, logs_url STRING, check_suite_url STRING, artifacts_url STRING, cancel_url STRING, rerun_url STRING, workflow_url STRING, head_commit OBJECT, repository OBJECT, head_repository OBJECT)"
options: |
COMMENT = $$Lists all workflow runs for a repository. You can use query parameters to narrow the list of results. [Docs](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository).$$
sql: |
WITH response AS
(
SELECT
github_actions.runs(OWNER, REPO, QUERY) AS response
)
SELECT
value:id::NUMBER AS id
,value:name::STRING AS name
,value:node_id::STRING AS node_id
,value:check_suite_id::NUMBER AS check_suite_id
,value:check_suite_node_id::STRING AS check_suite_node_id
,value:head_branch::STRING AS head_branch
,value:head_sha::STRING AS head_sha
,value:run_number::NUMBER AS run_number
,value:event::STRING AS event
,value:display_title::STRING AS display_title
,value:status::STRING AS status
,value:conclusion::STRING AS conclusion
,value:workflow_id::NUMBER AS workflow_id
,value:url::STRING AS url
,value:html_url::STRING AS html_url
,value:pull_requests::STRING AS pull_requests
,value:created_at::TIMESTAMP AS created_at
,value:updated_at::TIMESTAMP AS updated_at
,value:actor::OBJECT AS actor
,value:run_attempt::STRING AS run_attempt
,value:run_started_at::TIMESTAMP AS run_started_at
,value:triggering_actor::OBJECT AS triggering_actor
,value:jobs_url::STRING AS jobs_url
,value:logs_url::STRING AS logs_url
,value:check_suite_url::STRING AS check_suite_url
,value:artifacts_url::STRING AS artifacts_url
,value:cancel_url::STRING AS cancel_url
,value:rerun_url::STRING AS rerun_url
,value:workflow_url::STRING AS workflow_url
,value:head_commit::OBJECT AS head_commit
,value:repository::OBJECT AS repository
,value:head_repository::OBJECT AS head_repository
FROM response, LATERAL FLATTEN( input=> response:workflow_runs)
- name: {{ schema_name -}}.tf_runs
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
return_type:
- "TABLE(id NUMBER, name STRING, node_id STRING, check_suite_id NUMBER, check_suite_node_id STRING, head_branch STRING, head_sha STRING, run_number NUMBER, event STRING, display_title STRING, status STRING, conclusion STRING, workflow_id NUMBER, url STRING, html_url STRING, pull_requests STRING, created_at TIMESTAMP, updated_at TIMESTAMP, actor OBJECT, run_attempt STRING, run_started_at TIMESTAMP, triggering_actor OBJECT, jobs_url STRING, logs_url STRING, check_suite_url STRING, artifacts_url STRING, cancel_url STRING, rerun_url STRING, workflow_url STRING, head_commit OBJECT, repository OBJECT, head_repository OBJECT)"
options: |
COMMENT = $$Lists all workflow runs for a repository. You can use query parameters to narrow the list of results. [Docs](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository).$$
sql: |
SELECT *
FROM TABLE({{ schema_name -}}.tf_runs(owner, repo, {}))
- name: {{ schema_name -}}.tf_workflow_runs
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
- [workflkow_id, "TEXT"]
- [query, "OBJECT"]
return_type:
- "TABLE(id NUMBER, name STRING, node_id STRING, check_suite_id NUMBER, check_suite_node_id STRING, head_branch STRING, head_sha STRING, run_number NUMBER, event STRING, display_title STRING, status STRING, conclusion STRING, workflow_id NUMBER, url STRING, html_url STRING, pull_requests STRING, created_at TIMESTAMP, updated_at TIMESTAMP, actor OBJECT, run_attempt STRING, run_started_at TIMESTAMP, triggering_actor OBJECT, jobs_url STRING, logs_url STRING, check_suite_url STRING, artifacts_url STRING, cancel_url STRING, rerun_url STRING, workflow_url STRING, head_commit OBJECT, repository OBJECT, head_repository OBJECT)"
options: |
COMMENT = $$Lists all workflow runs for a repository. You can use query parameters to narrow the list of results. [Docs](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository).$$
sql: |
WITH response AS
(
SELECT
github_actions.workflow_runs(OWNER, REPO, WORKFLKOW_ID, QUERY) AS response
)
SELECT
value:id::NUMBER AS id
,value:name::STRING AS name
,value:node_id::STRING AS node_id
,value:check_suite_id::NUMBER AS check_suite_id
,value:check_suite_node_id::STRING AS check_suite_node_id
,value:head_branch::STRING AS head_branch
,value:head_sha::STRING AS head_sha
,value:run_number::NUMBER AS run_number
,value:event::STRING AS event
,value:display_title::STRING AS display_title
,value:status::STRING AS status
,value:conclusion::STRING AS conclusion
,value:workflow_id::NUMBER AS workflow_id
,value:url::STRING AS url
,value:html_url::STRING AS html_url
,value:pull_requests::STRING AS pull_requests
,value:created_at::TIMESTAMP AS created_at
,value:updated_at::TIMESTAMP AS updated_at
,value:actor::OBJECT AS actor
,value:run_attempt::STRING AS run_attempt
,value:run_started_at::TIMESTAMP AS run_started_at
,value:triggering_actor::OBJECT AS triggering_actor
,value:jobs_url::STRING AS jobs_url
,value:logs_url::STRING AS logs_url
,value:check_suite_url::STRING AS check_suite_url
,value:artifacts_url::STRING AS artifacts_url
,value:cancel_url::STRING AS cancel_url
,value:rerun_url::STRING AS rerun_url
,value:workflow_url::STRING AS workflow_url
,value:head_commit::OBJECT AS head_commit
,value:repository::OBJECT AS repository
,value:head_repository::OBJECT AS head_repository
FROM response, LATERAL FLATTEN( input=> response:workflow_runs)
- name: {{ schema_name -}}.tf_workflow_runs
signature:
- [owner, "TEXT"]
- [repo, "TEXT"]
- [workflkow_id, "TEXT"]
return_type:
- "TABLE(id NUMBER, name STRING, node_id STRING, check_suite_id NUMBER, check_suite_node_id STRING, head_branch STRING, head_sha STRING, run_number NUMBER, event STRING, display_title STRING, status STRING, conclusion STRING, workflow_id NUMBER, url STRING, html_url STRING, pull_requests STRING, created_at TIMESTAMP, updated_at TIMESTAMP, actor OBJECT, run_attempt STRING, run_started_at TIMESTAMP, triggering_actor OBJECT, jobs_url STRING, logs_url STRING, check_suite_url STRING, artifacts_url STRING, cancel_url STRING, rerun_url STRING, workflow_url STRING, head_commit OBJECT, repository OBJECT, head_repository OBJECT)"
options: |
COMMENT = $$Lists all workflow runs for a repository. You can use query parameters to narrow the list of results. [Docs](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository).$$
sql: |
SELECT *
FROM TABLE({{ schema_name -}}.tf_workflow_runs(owner, repo, WORKFLKOW_ID, {}))
{% endmacro %}

View File

@ -1,88 +0,0 @@
{% macro config_github_utils_udfs(schema_name = "github_utils", utils_schema_name = "github_utils") -%}
{#
This macro is used to generate the Github API Calls
#}
- name: {{ schema_name -}}.octocat
signature:
- []
return_type:
- "VARIANT"
options: |
COMMENT = $$Verify token [Authenticating to the REST API](https://docs.github.com/en/rest/overview/authenticating-to-the-rest-api?apiVersion=2022-11-28).$$
sql: |
SELECT
live.udf_api(
'GET',
'https://api.github.com/octocat',
{'Authorization': 'Bearer {TOKEN}',
'X-GitHub-Api-Version': '2022-11-28'},
{},
IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'vault/github/api')
) as response
- name: {{ schema_name -}}.headers
signature: []
return_type:
- "TEXT"
options: |
NOT NULL
IMMUTABLE
MEMOIZABLE
sql: |
SELECT '{"Authorization": "Bearer {TOKEN}",
"X-GitHub-Api-Version": "2022-11-28",
"Accept": "application/vnd.github+json"}'
- name: {{ schema_name -}}.get
signature:
- [route, "TEXT"]
- [query, "OBJECT"]
return_type:
- "VARIANT"
options: |
COMMENT = $$List all workflow runs for a workflow. You can replace workflow_id with the workflow file name. You can use parameters to narrow the list of results. [Docs](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-workflow).$$
sql: |
SELECT
live.udf_api(
'GET',
CONCAT_WS('/', 'https://api.github.com', route || '?') || utils.udf_urlencode(query),
PARSE_JSON({{ schema_name -}}.headers()),
{},
IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'vault/github/api')
)
- name: {{ schema_name -}}.post
signature:
- [route, "TEXT"]
- [data, "OBJECT"]
return_type:
- "VARIANT"
options: |
COMMENT = $$List all workflow runs for a workflow. You can replace workflow_id with the workflow file name. You can use parameters to narrow the list of results. [Docs](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-workflow).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT_WS('/', 'https://api.github.com', route),
PARSE_JSON({{ schema_name -}}.headers()),
data,
IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'vault/github/api')
)
- name: {{ schema_name -}}.put
signature:
- [route, "TEXT"]
- [data, "OBJECT"]
return_type:
- "VARIANT"
options: |
COMMENT = $$List all workflow runs for a workflow. You can replace workflow_id with the workflow file name. You can use parameters to narrow the list of results. [Docs](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-workflow).$$
sql: |
SELECT
live.udf_api(
'PUT',
CONCAT_WS('/', 'https://api.github.com', route),
PARSE_JSON({{ schema_name -}}.headers()),
data,
IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'vault/github/api')
)
{% endmacro %}

View File

@ -1,49 +0,0 @@
{% macro config_helius_apis_udfs(schema_name = "helius_apis", utils_schema_name = "helius_utils") -%}
{#
This macro is used to generate the Helius API endpoints
#}
- name: {{ schema_name -}}.token_metadata
signature:
- [NETWORK, STRING, mainnet or devnet]
- [BODY, OBJECT, The body of the API request]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns metadata for a list of given token mint addresses. [Helius docs here](https://docs.helius.xyz/solana-apis/token-metadata-api).$$
sql: {{ helius_post_call(utils_schema_name, '/v0/token-metadata') | trim }}
- name: {{ schema_name -}}.balances
signature:
- [NETWORK, STRING, mainnet or devnet]
- [ADDRESS, STRING, The address to retrieve balances for]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns the native Solana balance (in lamports) and all token balances for a given address. [Helius docs here](https://docs.helius.xyz/solana-apis/balances-api).$$
sql: |
SELECT live.udf_api(
'GET',
CASE
WHEN NETWORK = 'devnet' THEN
concat('https://api-devnet.helius.xyz/v0/addresses/', ADDRESS, '/balances?api-key={API_KEY}')
ELSE
concat('https://api.helius.xyz/v0/addresses/', ADDRESS, '/balances?api-key={API_KEY}')
END,
{},
{},
'_FSC_SYS/HELIUS'
) as response
- name: {{ schema_name -}}.parse_transactions
signature:
- [NETWORK, STRING, mainnet or devnet]
- [TRANSACTIONS, ARRAY, An array of transaction signatures]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns an array of enriched, human-readable transactions of the given transaction signatures. Up to 100 transactions per call. [Helius docs here](https://docs.helius.xyz/solana-apis/enhanced-transactions-api/parse-transaction-s).$$
sql: |
SELECT {{ utils_schema_name -}}.post(NETWORK, '/v0/transactions', {'transactions': TRANSACTIONS}) as response
{% endmacro %}

View File

@ -1,86 +0,0 @@
{% macro config_helius_das_udfs(schema_name = "helius_das", utils_schema_name = "helius_utils") -%}
{#
This macro is used to generate the Helius DAS endpoints
#}
- name: {{ schema_name -}}.get_asset
signature:
- [NETWORK, STRING, mainnet or devnet]
- [PARAMS, OBJECT, The RPC Params argument]
return_type:
- "VARIANT"
options: |
COMMENT = $$Get an asset by its ID. [Helius docs here](https://docs.helius.xyz/solana-compression/digital-asset-standard-das-api/get-asset).$$
sql: {{ helius_rpc_call(utils_schema_name, 'getAsset') | trim }}
- name: {{ schema_name -}}.get_signatures_for_asset
signature:
- [NETWORK, STRING, mainnet or devnet]
- [PARAMS, OBJECT, The RPC Params argument]
return_type:
- "VARIANT"
options: |
COMMENT = $$Get a list of transaction signatures related to a compressed asset. [Helius docs here](https://docs.helius.xyz/solana-compression/digital-asset-standard-das-api/get-signatures-for-asset).$$
sql: {{ helius_rpc_call(utils_schema_name, 'getSignaturesForAsset') | trim }}
- name: {{ schema_name -}}.search_assets
signature:
- [NETWORK, STRING, mainnet or devnet]
- [PARAMS, OBJECT, The RPC Params argument]
return_type:
- "VARIANT"
options: |
COMMENT = $$Search for assets by a variety of parameters. [Helius docs here](https://docs.helius.xyz/solana-compression/digital-asset-standard-das-api/search-assets).$$
sql: {{ helius_rpc_call(utils_schema_name, 'searchAssets') | trim }}
- name: {{ schema_name -}}.get_asset_proof
signature:
- [NETWORK, STRING, mainnet or devnet]
- [PARAMS, OBJECT, The RPC Params argument]
return_type:
- "VARIANT"
options: |
COMMENT = $$Get a merkle proof for a compressed asset by its ID. [Helius docs here](https://docs.helius.xyz/solana-compression/digital-asset-standard-das-api/get-asset-proof).$$
sql: {{ helius_rpc_call(utils_schema_name, 'getAssetProof') | trim }}
- name: {{ schema_name -}}.get_assets_by_owner
signature:
- [NETWORK, STRING, mainnet or devnet]
- [PARAMS, OBJECT, The RPC Params argument]
return_type:
- "VARIANT"
options: |
COMMENT = $$Get a list of assets owned by an address. [Helius docs here](https://docs.helius.xyz/solana-compression/digital-asset-standard-das-api/get-assets-by-owner).$$
sql: {{ helius_rpc_call(utils_schema_name, 'getAssetsByOwner') | trim }}
- name: {{ schema_name -}}.get_assets_by_authority
signature:
- [NETWORK, STRING, mainnet or devnet]
- [PARAMS, OBJECT, The RPC Params argument]
return_type:
- "VARIANT"
options: |
COMMENT = $$Get a list of assets with a specific authority. [Helius docs here](https://docs.helius.xyz/solana-compression/digital-asset-standard-das-api/get-assets-by-authority).$$
sql: {{ helius_rpc_call(utils_schema_name, 'getAssetsByAuthority') | trim }}
- name: {{ schema_name -}}.get_assets_by_creator
signature:
- [NETWORK, STRING, mainnet or devnet]
- [PARAMS, OBJECT, The RPC Params argument]
return_type:
- "VARIANT"
options: |
COMMENT = $$Get a list of assets created by an address. [Helius docs here](https://docs.helius.xyz/solana-compression/digital-asset-standard-das-api/get-assets-by-creator).$$
sql: {{ helius_rpc_call(utils_schema_name, 'getAssetsByCreator') | trim }}
- name: {{ schema_name -}}.get_assets_by_group
signature:
- [NETWORK, STRING, mainnet or devnet]
- [PARAMS, OBJECT, The RPC Params argument]
return_type:
- "VARIANT"
options: |
COMMENT = $$Get a list of assets by a group key and value. [Helius docs here](https://docs.helius.xyz/solana-compression/digital-asset-standard-das-api/get-assets-by-group).$$
sql: {{ helius_rpc_call(utils_schema_name, 'getAssetsByGroup') | trim }}
{% endmacro %}

View File

@ -1,11 +0,0 @@
{% macro helius_rpc_call(schema_name, method) %}
SELECT {{ schema_name -}}.rpc(NETWORK, '{{method}}', PARAMS) as response
{% endmacro %}
{% macro helius_get_call(schema_name, path) %}
SELECT {{ schema_name -}}.get(NETWORK, '{{path}}', QUERY_PARAMS) as response
{% endmacro %}
{% macro helius_post_call(schema_name, path) %}
SELECT {{ schema_name -}}.post(NETWORK, '{{path}}', BODY) as response
{% endmacro %}

View File

@ -1,75 +0,0 @@
{% macro config_helius_utils_udfs(schema = "helius_utils", utils_schema_name="helius_utils") -%}
{#
This macro is used to generate the Helius base endpoints
#}
- name: {{ schema -}}.get
signature:
- [NETWORK, STRING, The network 'devnet' or 'mainnet']
- [PATH, STRING, The API path starting with '/']
- [QUERY_PARAMS, OBJECT, The query parameters]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue an HTTP GET request to Helius.$$
sql: |
SELECT live.udf_api(
'GET',
CASE
WHEN NETWORK = 'devnet' THEN
concat('https://api-devnet.helius.xyz', PATH, '?api-key={API_KEY}&', utils.udf_object_to_url_query_string(QUERY_PARAMS))
ELSE
concat('https://api.helius.xyz', PATH, '?api-key={API_KEY}&', utils.udf_object_to_url_query_string(QUERY_PARAMS))
END,
{},
{},
'_FSC_SYS/HELIUS'
) as response
- name: {{ schema -}}.post
signature:
- [NETWORK, STRING, The network 'devnet' or 'mainnet']
- [PATH, STRING, The API path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue an HTTP POST request to Helius.$$
sql: |
SELECT live.udf_api(
'POST',
CASE
WHEN NETWORK = 'devnet' THEN
concat('https://api-devnet.helius.xyz', PATH, '?api-key={API_KEY}')
ELSE
concat('https://api.helius.xyz', PATH, '?api-key={API_KEY}')
END,
{},
BODY,
'_FSC_SYS/HELIUS'
) as response
- name: {{ schema -}}.rpc
signature:
- [NETWORK, STRING, The network 'devnet' or 'mainnet']
- [METHOD, STRING, The RPC method to call]
- [PARAMS, OBJECT, The RPC Params arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue an RPC call to Helius.$$
sql: |
SELECT live.udf_api(
'POST',
CASE
WHEN NETWORK = 'devnet' THEN
'https://devnet.helius-rpc.com?api-key={API_KEY}'
ELSE
'https://rpc.helius.xyz?api-key={API_KEY}'
END,
{},
{'id': 1,'jsonrpc': '2.0','method': METHOD,'params': PARAMS},
'_FSC_SYS/HELIUS'
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_nftscan_udfs(schema_name = "nftscan", utils_schema_name="nftscan_utils") -%}
{#
This macro is used to generate the NFTScan Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [URL, STRING, The full url including the path]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the NFTScan API. [NFTScan docs here](https://docs.nftscan.com/guides/Overview/1).$$
sql: |
SELECT
live.udf_api(
'GET',
concat(URL, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'X-API-KEY': '{API_KEY}'},
{},
'_FSC_SYS/NFTSCAN'
) as response
- name: {{ schema_name -}}.post
signature:
- [URL, STRING, The full url]
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the NFTScan API. [NFTScan docs here](https://docs.nftscan.com/guides/Overview/1).$$
sql: |
SELECT
live.udf_api(
'POST',
URL,
{'X-API-KEY': '{API_KEY}'},
BODY,
'_FSC_SYS/NFTSCAN'
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_opensea_udfs(schema_name = "opensea", utils_schema_name="opensea_utils") -%}
{#
This macro is used to generate the OpenSea Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the OpenSea API. [OpenSea docs here](https://docs.opensea.io/reference/api-overview).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.opensea.io', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'X-API-KEY': '{API_KEY}'},
{},
'_FSC_SYS/OPENSEA'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the OpenSea API. [OpenSea docs here](https://docs.opensea.io/reference/api-overview).$$
sql: |
SELECT
live.udf_api(
'POST',
concat('https://api.opensea.io', PATH),
{'X-API-KEY': '{API_KEY}'},
BODY,
'_FSC_SYS/OPENSEA'
) as response
{% endmacro %}

View File

@ -1,24 +0,0 @@
{% macro config_playgrounds_udfs(schema_name = "playgrounds", utils_schema_name = "playgrounds_utils") -%}
{#
This macro is used to generate the Playgrounds calls
#}
- name: {{ schema_name -}}.query_subgraph
signature:
- [SUBGRAPH_ID, STRING, The ID of the Subgraph]
- [QUERY, OBJECT, The GraphQL query]
return_type:
- "VARIANT"
options: |
COMMENT = $$Query a subgraph via the Playgrounds Proxy [Playgrounds docs here](https://docs.playgrounds.network/api/subgraph-proxy/).$$
sql: |
SELECT
live.udf_api(
'POST',
concat('https://api.playgrounds.network/v1/proxy/subgraphs/id/', SUBGRAPH_ID),
{'Playgrounds-Api-Key': '{API_KEY}', 'Content-Type': 'application/json'},
QUERY,
'_FSC_SYS/PLAYGROUNDS'
) as response
{% endmacro %}

View File

@ -1,50 +0,0 @@
{% macro config_quicknode_ethereum_nfts_udfs(schema_name = "quicknode_ethereum_nfts", utils_schema_name = "quicknode_utils") -%}
{#
This macro is used to generate the QuickNode Ethereum NFT endpoints
#}
- name: {{ schema_name -}}.fetch_nft_collection_details
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns collection details for specified contracts. [QuickNode docs here](https://www.quicknode.com/docs/ethereum/qn_fetchNFTCollectionDetails_v2).$$
sql: {{ quicknode_ethereum_mainnet_rpc_call(utils_schema_name, 'qn_fetchNFTCollectionDetails') | trim }}
- name: {{ schema_name -}}.fetch_nfts
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns aggregated data on NFTs for a given wallet. [QuickNode docs here](https://www.quicknode.com/docs/ethereum/qn_fetchNFTs).$$
sql: {{ quicknode_ethereum_mainnet_rpc_call(utils_schema_name, 'qn_fetchNFTs') | trim }}
- name: {{ schema_name -}}.fetch_nfts_by_collection
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns aggregated data on NFTs within a given collection. [QuickNode docs here](https://www.quicknode.com/docs/ethereum/qn_fetchNFTsByCollection_v2).$$
sql: {{ quicknode_ethereum_mainnet_rpc_call(utils_schema_name, 'qn_fetchNFTsByCollection') | trim }}
- name: {{ schema_name -}}.get_transfers_by_nft
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns transfers by given NFT. [QuickNode docs here](https://www.quicknode.com/docs/ethereum/qn_getTransfersByNFT_v2).$$
sql: {{ quicknode_ethereum_mainnet_rpc_call(utils_schema_name, 'qn_getTransfersByNFT') | trim }}
- name: {{ schema_name -}}.verify_nfts_owner
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Confirms ownership of specified NFTs for a given wallet. [QuickNode docs here](https://www.quicknode.com/docs/ethereum/qn_verifyNFTsOwner_v2).$$
sql: {{ quicknode_ethereum_mainnet_rpc_call(utils_schema_name, 'qn_verifyNFTsOwner') | trim }}
{% endmacro %}

View File

@ -1,50 +0,0 @@
{% macro config_quicknode_ethereum_tokens_udfs(schema_name = "quicknode_ethereum_tokens", utils_schema_name = "quicknode_utils") -%}
{#
This macro is used to generate the QuickNode Ethereum Token endpoints
#}
- name: {{ schema_name -}}.get_token_metadata_by_contract_address
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns token details for specified contract. [QuickNode docs here](https://www.quicknode.com/docs/ethereum/qn_getTokenMetadataByContractAddress_v2).$$
sql: {{ quicknode_ethereum_mainnet_rpc_call(utils_schema_name, 'qn_getTokenMetadataByContractAddress') | trim }}
- name: {{ schema_name -}}.get_token_metadata_by_symbol
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns token details for specified token symbol. [QuickNode docs here](https://www.quicknode.com/docs/ethereum/qn_getTokenMetadataBySymbol_v2).$$
sql: {{ quicknode_ethereum_mainnet_rpc_call(utils_schema_name, 'qn_getTokenMetadataBySymbol') | trim }}
- name: {{ schema_name -}}.get_transactions_by_address
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns transactions within a specified wallet address. [QuickNode docs here](https://www.quicknode.com/docs/ethereum/qn_getTransactionsByAddress_v2).$$
sql: {{ quicknode_ethereum_mainnet_rpc_call(utils_schema_name, 'qn_getTransactionsByAddress') | trim }}
- name: {{ schema_name -}}.get_wallet_token_balance
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns ERC-20 tokens and token balances within a wallet. [QuickNode docs here](https://www.quicknode.com/docs/ethereum/qn_getWalletTokenBalance_v2).$$
sql: {{ quicknode_ethereum_mainnet_rpc_call(utils_schema_name, 'qn_getWalletTokenBalance') | trim }}
- name: {{ schema_name -}}.get_wallet_token_transactions
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns transfers of a specified token within a specified wallet address. [QuickNode docs here](https://www.quicknode.com/docs/ethereum/qn_getWalletTokenTransactions_v2).$$
sql: {{ quicknode_ethereum_mainnet_rpc_call(utils_schema_name, 'qn_getWalletTokenTransactions') | trim }}
{% endmacro %}

View File

@ -1,50 +0,0 @@
{% macro config_quicknode_polygon_nfts_udfs(schema_name = "quicknode_polygon_nfts", utils_schema_name = "quicknode_utils") -%}
{#
This macro is used to generate the QuickNode Polygon NFT endpoints
#}
- name: {{ schema_name -}}.fetch_nft_collection_details
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns collection details for specified contracts. [QuickNode docs here](https://www.quicknode.com/docs/polygon/qn_fetchNFTCollectionDetails_v2).$$
sql: {{ quicknode_polygon_mainnet_rpc_call(utils_schema_name, 'qn_fetchNFTCollectionDetails') | trim }}
- name: {{ schema_name -}}.fetch_nfts
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns aggregated data on NFTs for a given wallet. [QuickNode docs here](https://www.quicknode.com/docs/polygon/qn_fetchNFTs_v2).$$
sql: {{ quicknode_polygon_mainnet_rpc_call(utils_schema_name, 'qn_fetchNFTs') | trim }}
- name: {{ schema_name -}}.fetch_nfts_by_collection
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns aggregated data on NFTs within a given collection. [QuickNode docs here](https://www.quicknode.com/docs/polygon/qn_fetchNFTsByCollection_v2).$$
sql: {{ quicknode_polygon_mainnet_rpc_call(utils_schema_name, 'qn_fetchNFTsByCollection') | trim }}
- name: {{ schema_name -}}.get_transfers_by_nft
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns transfers by given NFT. [QuickNode docs here](https://www.quicknode.com/docs/polygon/qn_getTransfersByNFT_v2).$$
sql: {{ quicknode_polygon_mainnet_rpc_call(utils_schema_name, 'qn_getTransfersByNFT') | trim }}
- name: {{ schema_name -}}.verify_nfts_owner
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Confirms ownership of specified NFTs for a given wallet. [QuickNode docs here](https://www.quicknode.com/docs/polygon/qn_verifyNFTsOwner_v2).$$
sql: {{ quicknode_polygon_mainnet_rpc_call(utils_schema_name, 'qn_verifyNFTsOwner') | trim }}
{% endmacro %}

View File

@ -1,50 +0,0 @@
{% macro config_quicknode_polygon_tokens_udfs(schema_name = "quicknode_polygon_tokens", utils_schema_name = "quicknode_utils") -%}
{#
This macro is used to generate the QuickNode Polygon Token endpoints
#}
- name: {{ schema_name -}}.get_token_metadata_by_contract_address
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns token details for specified contract. [QuickNode docs here](https://www.quicknode.com/docs/polygon/qn_getTokenMetadataByContractAddress_v2).$$
sql: {{ quicknode_polygon_mainnet_rpc_call(utils_schema_name, 'qn_getTokenMetadataByContractAddress') | trim }}
- name: {{ schema_name -}}.get_token_metadata_by_symbol
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns token details for specified token symbol. [QuickNode docs here](https://www.quicknode.com/docs/polygon/qn_getTokenMetadataBySymbol_v2).$$
sql: {{ quicknode_polygon_mainnet_rpc_call(utils_schema_name, 'qn_getTokenMetadataBySymbol') | trim }}
- name: {{ schema_name -}}.get_transactions_by_address
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns transactions within a specified wallet address. [QuickNode docs here](https://www.quicknode.com/docs/polygon/qn_getTransactionsByAddress_v2).$$
sql: {{ quicknode_polygon_mainnet_rpc_call(utils_schema_name, 'qn_getTransactionsByAddress') | trim }}
- name: {{ schema_name -}}.get_wallet_token_balance
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns ERC-20 tokens and token balances within a wallet. [QuickNode docs here](https://www.quicknode.com/docs/polygon/qn_getWalletTokenBalance_v2).$$
sql: {{ quicknode_polygon_mainnet_rpc_call(utils_schema_name, 'qn_getWalletTokenBalance') | trim }}
- name: {{ schema_name -}}.get_wallet_token_transactions
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns transfers of a specified token within a specified wallet address. [QuickNode docs here](https://www.quicknode.com/docs/polygon/qn_getWalletTokenTransactions_v2).$$
sql: {{ quicknode_polygon_mainnet_rpc_call(utils_schema_name, 'qn_getWalletTokenTransactions') | trim }}
{% endmacro %}

View File

@ -1,11 +0,0 @@
{% macro quicknode_ethereum_mainnet_rpc_call(schema_name, method) %}
SELECT {{ schema_name -}}.ethereum_mainnet_rpc('{{method}}', PARAMS) as response
{% endmacro %}
{% macro quicknode_polygon_mainnet_rpc_call(schema_name, method) %}
SELECT {{ schema_name -}}.polygon_mainnet_rpc('{{method}}', PARAMS) as response
{% endmacro %}
{% macro quicknode_solana_mainnet_rpc_call(schema_name, method) %}
SELECT {{ schema_name -}}.solana_mainnet_rpc('{{method}}', PARAMS) as response
{% endmacro %}

View File

@ -1,24 +0,0 @@
{% macro config_quicknode_solana_nfts_udfs(schema_name = "quicknode_solana_nfts", utils_schema_name = "quicknode_utils") -%}
{#
This macro is used to generate the QuickNode Solana NFT endpoints
#}
- name: {{ schema_name -}}.fetch_nfts
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns aggregated data on NFTs for a given wallet. [QuickNode docs here](https://www.quicknode.com/docs/solana/qn_fetchNFTs).$$
sql: {{ quicknode_solana_mainnet_rpc_call(utils_schema_name, 'qn_fetchNFTs') | trim }}
- name: {{ schema_name -}}.fetch_nfts_by_creator
signature:
- [PARAMS, OBJECT, The RPC Params]
return_type:
- "VARIANT"
options: |
COMMENT = $$Returns aggregated data on NFTs that have been created by an address. [QuickNode docs here](https://www.quicknode.com/docs/solana/qn_fetchNFTsByCreator).$$
sql: {{ quicknode_solana_mainnet_rpc_call(utils_schema_name, 'qn_fetchNFTsByCreator') | trim }}
{% endmacro %}

View File

@ -1,57 +0,0 @@
{% macro config_quicknode_utils_udfs(schema_name = "quicknode_utils", utils_schema_name="quicknode_utils") -%}
{#
This macro is used to generate the QuickNode base endpoints/RPC calls
#}
- name: {{ schema_name -}}.ethereum_mainnet_rpc
signature:
- [METHOD, STRING, The RPC method to call]
- [PARAMS, OBJECT, The RPC Params arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue an Ethereum RPC call to QuickNode.$$
sql: |
SELECT live.udf_api(
'POST',
'{ethereum-mainnet}',
{},
{'id': 1,'jsonrpc': '2.0','method': METHOD,'params': [PARAMS]},
'_FSC_SYS/QUICKNODE'
) as response
- name: {{ schema_name -}}.polygon_mainnet_rpc
signature:
- [METHOD, STRING, The RPC method to call]
- [PARAMS, OBJECT, The RPC Params arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a Polygon RPC call to QuickNode.$$
sql: |
SELECT live.udf_api(
'POST',
'{polygon-matic}',
{},
{'id': 1,'jsonrpc': '2.0','method': METHOD,'params': [PARAMS]},
'_FSC_SYS/QUICKNODE'
) as response
- name: {{ schema_name -}}.solana_mainnet_rpc
signature:
- [METHOD, STRING, The RPC method to call]
- [PARAMS, OBJECT, The RPC Params arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a Solana RPC call to QuickNode.$$
sql: |
SELECT live.udf_api(
'POST',
'{solana-solana-mainnet}',
{},
{'id': 1,'jsonrpc': '2.0','method': METHOD,'params': PARAMS},
'_FSC_SYS/QUICKNODE'
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_reservoir_udfs(schema_name = "reservoir", utils_schema_name="reservoir_utils") -%}
{#
This macro is used to generate the Reservoir Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Reservoir NFT Data API. [Reservoir docs here](https://docs.reservoir.tools/reference/nft-data-overview).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.reservoir.tools', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'x-api-key': '{API_KEY}'},
{},
'_FSC_SYS/RESERVOIR'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Reservoir NFT Data API. [Reservoir docs here](https://docs.reservoir.tools/reference/nft-data-overview).$$
sql: |
SELECT
live.udf_api(
'POST',
concat('https://api.reservoir.tools', PATH),
{'x-api-key': '{API_KEY}'},
BODY,
'_FSC_SYS/RESERVOIR'
) as response
{% endmacro %}

View File

@ -1,22 +0,0 @@
{% macro config_snapshot_udfs(schema_name = "snapshot", utils_schema_name="snapshot_utils") -%}
{#
This macro is used to generate the Snapshot Base endpoints
#}
- name: {{ schema_name -}}.query
signature:
- [QUERY, OBJECT, The GraphQL query]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a Graphql Query to the Snapshot API. [Snapshot docs here](https://docs.snapshot.org/tools/api).$$
sql: |
SELECT
live.udf_api(
'POST',
'https://hub.snapshot.org/graphql',
{},
QUERY
) as response
{% endmacro %}

View File

@ -1,79 +0,0 @@
{% macro config_solscan_udfs(schema_name = "solscan", utils_schema_name="solscan_utils") -%}
{#
This macro is used to generate the Solscan Base endpoints
#}
- name: {{ schema_name -}}.pro_api_get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Private Solscan API. [Solscan docs here](https://pro-api.solscan.io/pro-api-docs/v1.0).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://pro-api.solscan.io', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'token': '{API_KEY}'},
{},
'_FSC_SYS/SOLSCAN'
) as response
- name: {{ schema_name -}}.pro_api_post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Private Solscan API. [Solscan docs here](https://pro-api.solscan.io/pro-api-docs/v1.0).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT('https://pro-api.solscan.io', PATH),
{'token': '{API_KEY}'},
BODY,
'_FSC_SYS/SOLSCAN'
) as response
- name: {{ schema_name -}}.public_api_get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Public Solscan API. [Solscan docs here](https://public-api.solscan.io/docs/#/).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://public-api.solscan.io', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'token': '{API_KEY}'},
{},
'_FSC_SYS/SOLSCAN'
) as response
- name: {{ schema_name -}}.public_api_post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Public Solscan API. [Solscan docs here](https://public-api.solscan.io/docs/#/).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT('https://public-api.solscan.io', PATH),
{'token': '{API_KEY}'},
BODY,
'_FSC_SYS/SOLSCAN'
) as response
{% endmacro %}

View File

@ -1,23 +0,0 @@
{% macro config_stakingrewards_udfs(schema_name = "stakingrewards", utils_schema_name="stakingrewards_utils") -%}
{#
This macro is used to generate the StakingRewards Base endpoints
#}
- name: {{ schema_name -}}.query
signature:
- [QUERY, OBJECT, The GraphQL query]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a Graphql Query to the StakingRewards API. [StakingRewards docs here](https://api-docs.stakingrewards.com/api-docs/get-started/quick-start-guide).$$
sql: |
SELECT
live.udf_api(
'POST',
'https://api.stakingrewards.com/public/query',
{'X-API-KEY': '{API_KEY}'},
QUERY,
'_FSC_SYS/STAKINGREWARDS'
) as response
{% endmacro %}

View File

@ -1,45 +0,0 @@
{% macro config_strangelove_udfs(schema_name = "strangelove", utils_schema_name = "strangelove_utils") -%}
{#
This macro is used to generate the Subquery Calls
#}
- name: {{ schema_name -}}.get
signature:
- [URL, STRING, The url to issue a get request to]
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Issue a GET request to a Strangelove Endpoint [Strangelove docs here](https://voyager.strange.love/docs/cosmoshub/mainnet#/).$$
sql: |
SELECT
live.udf_api(
'GET',
concat(
URL, '?',
utils.udf_object_to_url_query_string(QUERY_ARGS)
),
{'x-apikey': '{API_KEY}'},
{},
'_FSC_SYS/STRANGELOVE'
) as response
- name: {{ schema_name -}}.post
signature:
- [URL, STRING, The url to issue a post request to]
- [QUERY, OBJECT, The body of the request]
return_type:
- "VARIANT"
options: |
COMMENT = $$Issue a POST request to a Strangelove Endpoint [Strangelove docs here](https://voyager.strange.love/docs/cosmoshub/mainnet#/).$$
sql: |
SELECT
live.udf_api(
'POST',
URL,
{'x-apikey': '{API_KEY}'},
QUERY,
'_FSC_SYS/STRANGELOVE'
) as response
{% endmacro %}

View File

@ -1,22 +0,0 @@
{% macro config_subquery_udfs(schema_name = "subquery", utils_schema_name = "subquery_utils") -%}
{#
This macro is used to generate the Subquery Calls
#}
- name: {{ schema_name -}}.graphql
signature:
- [PROJECT, STRING, The sub-query project name]
- [QUERY, OBJECT, The graphql query]
return_type:
- "VARIANT"
options: |
COMMENT = $$Query a SubQuery Project [SubQuery docs here](https://explorer.subquery.network/subquery/subquery/kepler-network).$$
sql: |
SELECT
live.udf_api(
'POST',
concat('https://api.subquery.network/sq/subquery/', PROJECT),
{},
QUERY
) as response
{% endmacro %}

View File

@ -1,23 +0,0 @@
{% macro config_topshot_udfs(schema_name = "topshot", utils_schema_name = "topshot_utils") -%}
{#
This macro is used to generate the Topshot calls
#}
- name: {{ schema_name -}}.graphql
signature:
- [QUERY, OBJECT, The GraphQL query]
return_type:
- "VARIANT"
options: |
COMMENT = $$Run a graphql query on TopShot.$$
sql: |
SELECT
live.udf_api(
'POST',
'https://public-api.nbatopshot.com/graphql',
{'User-Agent': 'Flipside_Flow_metadata/0.1','Accept-Encoding': 'gzip', 'Content-Type': 'application/json', 'Accept': 'application/json','Connection': 'keep-alive'},
QUERY,
'_FSC_SYS/TOPSHOT'
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_transpose_udfs(schema_name = "transpose", utils_schema_name="transpose_utils") -%}
{#
This macro is used to generate the Transpose Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Transpose API. [Transpose docs here](https://docs.transpose.io/rest/overview/).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.transpose.io', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'X-API-KEY': '{API_KEY}'},
{},
'_FSC_SYS/TRANSPOSE'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Transpose API. [Transpose docs here](https://docs.transpose.io/rest/overview/).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT('https://api.transpose.io', PATH),
{'X-API-KEY': '{API_KEY}'},
BODY,
'_FSC_SYS/TRANSPOSE'
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_zapper_udfs(schema_name = "zapper", utils_schema_name="zapper_utils") -%}
{#
This macro is used to generate the Zapper Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Zapper API. [Zapper docs here](https://studio.zapper.xyz/docs/apis/getting-started).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.zapper.xyz', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'Authorization': 'Basic {API_KEY}'},
{},
'_FSC_SYS/ZAPPER'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Zapper API. [Zapper docs here](https://studio.zapper.xyz/docs/apis/getting-started).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT('https://api.zapper.xyz', PATH),
{'Authorization': 'Basic {API_KEY}'},
BODY,
'_FSC_SYS/ZAPPER'
) as response
{% endmacro %}

View File

@ -1,42 +0,0 @@
{% macro config_zettablock_udfs(schema_name = "zettablock", utils_schema_name="zettablock_utils") -%}
{#
This macro is used to generate the Zettablock Base endpoints
#}
- name: {{ schema_name -}}.get
signature:
- [PATH, STRING, The path starting with '/']
- [QUERY_ARGS, OBJECT, The query arguments]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'GET' request to the Zettablock API. [Zettablock docs here](https://docs.zettablock.com/reference/api-intro).$$
sql: |
SELECT
live.udf_api(
'GET',
concat('https://api.zettablock.com', PATH, '?', utils.udf_object_to_url_query_string(QUERY_ARGS)),
{'Authorization': 'Bearer {API_KEY}'},
{},
'_FSC_SYS/ZETTABLOCK'
) as response
- name: {{ schema_name -}}.post
signature:
- [PATH, STRING, The path starting with '/']
- [BODY, OBJECT, The request body]
return_type:
- "VARIANT"
options: |
COMMENT = $$Used to issue a 'POST' request to the Zettablock API. [Zettablock docs here](https://docs.zettablock.com/reference/api-intro).$$
sql: |
SELECT
live.udf_api(
'POST',
CONCAT('https://api.zettablock.com', PATH),
{'Authorization': 'Bearer {API_KEY}'},
BODY,
'_FSC_SYS/ZETTABLOCK'
) as response
{% endmacro %}

View File

@ -1,6 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_alchemy_nfts_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}
-- depends_on: {{ ref('alchemy_utils__alchemy_utils') }}

View File

@ -1,215 +0,0 @@
version: 2
models:
- name: alchemy_nfts__alchemy_utils
columns:
- name: get_nfts
tests:
- test_udf:
name: test_alchemy_nfts__get_nfts_status_200
args: >
'eth-mainnet', {'owner': '0x4a9318F375937B56045E5a548e7E66AEA61Dd610'}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_owners_for_token
tests:
- test_udf:
name: test_alchemy_nfts__get_owners_for_token_status_200
args: >
'eth-mainnet', {'contractAddress': '0xe785E82358879F061BC3dcAC6f0444462D4b5330', 'tokenId': 44}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_owners_for_collection
tests:
- test_udf:
name: test_alchemy_nfts__get_owners_for_collection_status_200
args: >
'eth-mainnet', {'contractAddress': '0xe785E82358879F061BC3dcAC6f0444462D4b5330', 'withTokenBalances': True}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: is_holder_of_collection
tests:
- test_udf:
name: test_alchemy_nfts__is_holder_of_collection_status_200
args: >
'eth-mainnet', {'wallet': '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', 'contractAddress': '0xe785E82358879F061BC3dcAC6f0444462D4b5330'}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_contracts_for_owner
tests:
- test_udf:
name: test_alchemy_nfts__get_contracts_for_owner_status_200
args: >
'eth-mainnet', {'owner': 'vitalik.eth', 'pageSize': 100, 'page': 1}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_nft_metadata
tests:
- test_udf:
name: test_alchemy_nfts__get_nft_metadata_status_200
args: >
'eth-mainnet', {'contractAddress': '0xe785E82358879F061BC3dcAC6f0444462D4b5330', 'tokenId': 44}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_nft_metadata_batch
tests:
- test_udf:
name: test_alchemy_nfts__get_nft_metadata_batch_status_200
args: >
'eth-mainnet', {'tokens': [{'contractAddress': '0xe785E82358879F061BC3dcAC6f0444462D4b5330', 'tokenId': 44}, {'contractAddress': '0xe785E82358879F061BC3dcAC6f0444462D4b5330', 'tokenId': 43}]}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_contract_metadata
tests:
- test_udf:
name: test_alchemy_nfts__get_contract_metadata_status_200
args: >
'eth-mainnet', {'contractAddress': '0xe785E82358879F061BC3dcAC6f0444462D4b5330'}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_contract_metadata_batch
tests:
- test_udf:
name: test_alchemy_nfts__get_contract_metadata_batch_status_200
args: >
'eth-mainnet', {'contractAddresses': ['0xe785E82358879F061BC3dcAC6f0444462D4b5330', '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d']}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: invalidate_contract
tests:
- test_udf:
name: test_alchemy_nfts__invalidate_contract_status_200
args: >
'eth-mainnet', {'contractAddress': '0xe785E82358879F061BC3dcAC6f0444462D4b5330'}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: reingest_contract
tests:
- test_udf:
name: test_alchemy_nfts__reingest_contract_status_200
args: >
'eth-mainnet', {'contractAddress': '0xe785E82358879F061BC3dcAC6f0444462D4b5330'}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: search_contract_metadata
tests:
- test_udf:
name: test_alchemy_nfts__search_contract_metadata_status_200
args: >
'eth-mainnet', {'query': 'bored'}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_nfts_for_collection
tests:
- test_udf:
name: test_alchemy_nfts__get_nfts_for_collection_status_200
args: >
'eth-mainnet', {'contractAddress': '0xe785E82358879F061BC3dcAC6f0444462D4b5330', 'withMetadata': True}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_spam_contracts
tests:
- test_udf:
name: test_alchemy_nfts__get_spam_contracts_status_200
args: >
'eth-mainnet', {}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: is_spam_contract
tests:
- test_udf:
name: test_alchemy_nfts__is_spam_contract_status_200
args: >
'eth-mainnet', {'contractAddress': '0xe785E82358879F061BC3dcAC6f0444462D4b5330'}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: is_airdrop
tests:
- test_udf:
name: test_alchemy_nfts__is_airdrop_status_200
args: >
'eth-mainnet', {'contractAddress': '0xe785E82358879F061BC3dcAC6f0444462D4b5330', 'tokenId': 44}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: report_spam
tests:
- test_udf:
config:
# we don't want to run this test in CI
enabled: false
name: test_alchemy_nfts__report_spam_status_200
args: null
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_floor_price
tests:
- test_udf:
name: test_alchemy_nfts__get_floor_price_status_200
args: >
'eth-mainnet', {'contractAddress': '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d'}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_nft_sales
tests:
- test_udf:
name: test_alchemy_nfts__get_nft_sales_status_200
args: >
'eth-mainnet', {'fromBlock': 0, 'toBlock': 'latest', 'order': 'asc', 'contractAddress': '0xe785E82358879F061BC3dcAC6f0444462D4b5330', 'tokenId': 44}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: compute_rarity
tests:
- test_udf:
name: test_alchemy_nfts__compute_rarity_status_200
args: >
'eth-mainnet', {'tokenId': 3603, 'contractAddress': '0xb6a37b5d14d502c3ab0ae6f3a0e058bc9517786e'}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: summarize_nft_attributes
tests:
- test_udf:
name: test_alchemy_nfts__summarize_nft_attributes_status_200
args: >
'eth-mainnet', {'contractAddress': '0xb6a37b5d14d502c3ab0ae6f3a0e058bc9517786e'}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,6 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_alchemy_tokens_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}
-- depends_on: {{ ref('alchemy_utils__alchemy_utils') }}

View File

@ -1,35 +0,0 @@
version: 2
models:
- name: alchemy_tokens__alchemy_utils
columns:
- name: get_token_allowance
tests:
- test_udf:
name: test_alchemy_tokens__get_token_allowance_status_200
args: >
'eth-mainnet', [{'contract': '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', 'owner': '0xf1a726210550c306a9964b251cbcd3fa5ecb275d', 'spender': '0xdef1c0ded9bec7f1a1670819833240f027b25eff'}]
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_token_balances
tests:
- test_udf:
name: test_alchemy_tokens__get_token_balances_status_200
args: >
'eth-mainnet', ['0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5', 'erc20']
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_token_metadata
tests:
- test_udf:
name: test_alchemy_tokens__get_token_metadata_status_200
args: >
'eth-mainnet', ['0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48']
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,6 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_alchemy_transfers_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}
-- depends_on: {{ ref('alchemy_utils__alchemy_utils') }}

View File

@ -1,14 +0,0 @@
version: 2
models:
- name: alchemy_transfers__alchemy_utils
columns:
- name: get_asset_transfers
tests:
- test_udf:
name: test_alchemy_transfers__get_asset_transfers_status_200
args: >
'eth-mainnet', [{'fromBlock': '0x0', 'toBlock': 'latest', 'toAddress': '0x5c43B1eD97e52d009611D89b74fA829FE4ac56b1', 'category': ['external'], 'withMetadata': True, 'excludeZeroValue': True}]
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_alchemy_utils_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_allday_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,35 +0,0 @@
version: 2
models:
- name: allday__
columns:
- name: graphql
tests:
- test_udf:
name: test_allday__graphql_status_200
args: >
{
'query': '{
searchPlays(input: {filters: {byFlowIDs: ["1666"]}}){
plays {
id
flowID
metadata {
description
playerID
playTypeV2
classification
week
season
playerFullName
playerPosition
playerDraftTeam
gameDate
teamName
}
}
}',
'variables': '{}'
}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_apilayer_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,14 +0,0 @@
version: 2
models:
- name: apilayer__
columns:
- name: get
tests:
- test_udf:
name: test_apilayer__get_status_200
args: >
'/odds/sports'
, {}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_bitquery_udfs
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,39 +0,0 @@
version: 2
models:
- name: bitquery__
columns:
- name: graphql
tests:
- test_udf:
name: test_bitquery__graphql_status_200
args: >
{
'query': '{
ethereum( network: bsc ) {
dexTrades(
options: {limit: 1}
baseCurrency: {is: "0x6679eB24F59dFe111864AEc72B443d1Da666B360"}
quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
) {
buyAmount
buyAmountInUsd: buyAmount(in: USD)
buyCurrency {
symbol
address
}
sellAmount
sellCurrency {
symbol
address
}
tradeAmount(in: USD)
}
}
}',
'variables': '{}'
}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_blockpour_utils_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,31 +0,0 @@
version: 2
models:
- name: blockpour_utils__
columns:
- name: get
tests:
- test_udf:
name: test_blockpour_utils__get_status_200
args: >
'/v1/tokens/1/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', {
'blockNumber': 17767007
}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: post
tests:
- test_udf:
name: test_blockpour_utils__post_status_200
args: >
'/v1/model/run', {
'slug': 'price.quote',
'version': '1.0',
'chainId': 1,
'blockNumber': 17767016,
'input': {}
}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_chainbase_utils_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,19 +0,0 @@
version: 2
models:
- name: chainbase_utils__
columns:
- name: get
tests:
- test_udf:
name: test_chainbase_utils__get_status_200
args: >
'/v1/nft/metadata'
, {
'chain_id': 1,
'contract_address': '0xed5af388653567af2f388e6224dc7c4b3241c544',
'token_id': 1
}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_cmc_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,14 +0,0 @@
version: 2
models:
- name: cmc__
columns:
- name: get
tests:
- test_udf:
name: test_cmc__get_status_200
args: >
'/v2/cryptocurrency/ohlcv/historical'
, {'interval': 'hourly', 'time_period': 'hourly', 'time_start': 1691524740, 'time_end': 1691528400, 'id': '15478,15479'}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_coingecko_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,14 +0,0 @@
version: 2
models:
- name: coingecko__
columns:
- name: get
tests:
- test_udf:
name: test_coingecko__get_status_200
args: >
'/api/v3/simple/price'
, {'ids': '0x', 'vs_currencies': 'btc,usd,eth'}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_covalent_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,14 +0,0 @@
version: 2
models:
- name: covalent__
columns:
- name: get
tests:
- test_udf:
name: test_covalent__get_status_200
args: >
'/v1/1/block_v2/5000000/'
, {}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_credmark_utils_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,16 +0,0 @@
version: 2
models:
- name: credmark_utils__
columns:
- name: get
tests:
- test_udf:
name: test_credmark_utils__get_status_200
args: >
'/v1/tokens/1/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
, {
'blockNumber': 17767007
}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_dapplooker_udfs
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,13 +0,0 @@
version: 2
models:
- name: dapplooker__
columns:
- name: get_chart
tests:
- test_udf:
name: test_dapplooker__get_chart_status_202
args: >
'a68cc6dd-1bc1-40ca-aaf8-b5155785f0b4'
assertions:
- result:status_code between 200 and 299

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_dappradar_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,14 +0,0 @@
version: 2
models:
- name: dappradar__
columns:
- name: get
tests:
- test_udf:
name: test_dappradar__get_status_200
args: >
'/4tsxo4vuhotaojtl/defi/chains'
, {}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_deepnftvalue_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,14 +0,0 @@
version: 2
models:
- name: deepnftvalue__
columns:
- name: get
tests:
- test_udf:
name: test_deepnftvalue__get_status_200
args: >
'/v1/collections'
, {'limit': 5}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_defillama_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,14 +0,0 @@
version: 2
models:
- name: defillama__
columns:
- name: get
tests:
- test_udf:
name: test_defillama__get_status_200
args: >
'/protocols'
, {}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_espn_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,14 +0,0 @@
version: 2
models:
- name: espn__
columns:
- name: get
tests:
- test_udf:
name: test_espn__get_status_200
args: >
'http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard'
, {}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_footprint_utils_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,19 +0,0 @@
version: 2
models:
- name: footprint_utils__footprint_utils
columns:
- name: get
tests:
- test_udf:
name: test_footprint_utils__get_status_200_v2_protocol_info
args: >
'/v2/protocol/info'
, {
'chain': 'Ethereum',
'protocol_slug': 'the-sandbox',
'limit': 10,
'offset': 0
}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_fred_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,16 +0,0 @@
version: 2
models:
- name: fred__
columns:
- name: get_series
tests:
- test_udf:
name: test_fred__get_series_status_200
args: >
{
'series_id': 'CORESTICKM679SFRBATL',
'file_type': 'json'
}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,7 +0,0 @@
-- depends_on: {{ ref('live') }}
-- depends_on: {{ ref('github_utils__github_utils') }}
{%- set configs = [
config_github_actions_udfs,
config_github_actions_udtfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,37 +0,0 @@
version: 2
models:
- name: github_actions__github_utils
columns:
- name: workflows
tests:
- test_udf:
name: test_github_actions__workflows_status_200
args: >
'FlipsideCrypto',
'admin-models'
assertions:
- result:status_code = 200
- result:error IS NULL
- name: runs
tests:
- test_udf:
name: test_github_actions__runs_status_200
args: >
'FlipsideCrypto',
'admin-models',
{}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: workflow_runs
tests:
- test_udf:
name: test_github_actions__workflow_runs_status_200
args: >
'FlipsideCrypto',
'admin-models',
'dbt_run_dev_refresh.yml',
{}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_github_utils_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

View File

@ -1,11 +0,0 @@
version: 2
models:
- name: github_utils__github_utils
columns:
- name: octocat
tests:
- test_udf:
name: test_github_utils__octocat_status_200
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,6 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_helius_apis_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}
-- depends_on: {{ ref('helius_utils__helius_utils') }}

View File

@ -1,46 +0,0 @@
version: 2
models:
- name: helius_apis__helius_utils
columns:
- name: token_metadata
tests:
- test_udf:
name: test_helius_apis__token_metadata_status_200
args: >
'mainnet'
, {
'mintAccounts': [
'BAAzgRGWY2v5AJBNZNFd2abiRXAUo56UxywKEjoCZW2',
'8s6kQUZfdm7GSaThAcsmSs56wMinXrbk6SdNVngutrz5'
],
'includeOffChain': true
}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: balances
tests:
- test_udf:
name: test_helius_apis__balances_status_200
args: >
'mainnet'
, '231B38ZpsbtrWbsBEjSXfjVj9JT2XyuNXy4f98V5NXxg'
assertions:
- result:status_code = 200
- result:error IS NULL
- name: parse_transactions
tests:
- test_udf:
name: test_helius_apis__parse_transactions_status_200
args: >
'mainnet'
, [
'5u5S6yWN5wJkEDr3hKeqF3Y8nWcyWaZDboEnpfUuAw1zcvbvevs58rEfCpN6VkfxaS4N8RCMkBcyhxBFs3eoL4U4',
'2bWLiRSA8GCh7UNEpiZdgsh2BMxZwKawk8ND4Z3iWrqDZE6JQk69n9WoCU9rKDrgWHw6qV25g8UBMJYddRJRHR9v'
]
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,6 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_helius_das_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}
-- depends_on: {{ ref('helius_utils__helius_utils') }}

View File

@ -1,122 +0,0 @@
version: 2
models:
- name: helius_das__helius_utils
columns:
- name: get_asset
tests:
- test_udf:
name: test_helius_das__get_asset_status_200
args: >
'mainnet'
, {
'id': 'F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk'
}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_signatures_for_asset
tests:
- test_udf:
name: test_helius_das__get_signatures_for_asset_status_200
args: >
'mainnet'
, {
'id': 'FNt6A9Mfnqbwc1tY7uwAguKQ1JcpBrxmhczDgbdJy5AC',
'page': 1, -- Starts at 1
'limit': 1000 -- Limit 1000 per request.
}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: search_assets
tests:
- test_udf:
name: test_helius_das__search_assets_status_200
args: >
'mainnet'
, {
'ownerAddress': '2k5AXX4guW9XwRQ1AKCpAuUqgWDpQpwFfpVFh3hnm2Ha',
'compressed': true,
'page': 1, -- Starts at 1
'limit': 1000
}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_asset_proof
tests:
- test_udf:
name: test_helius_das__get_asset_proof_status_200
args: >
'mainnet'
, {
'id': 'Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss'
}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_assets_by_owner
tests:
- test_udf:
name: test_helius_das__get_assets_by_owner_status_200
args: >
'mainnet'
, {
'ownerAddress': '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY',
'page': 1, -- Starts at 1
'limit': 1000
}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_assets_by_authority
tests:
- test_udf:
name: test_helius_das__get_assets_by_authority_status_200
args: >
'mainnet'
, {
'authorityAddress': '2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW',
'page': 1, -- Starts at 1
'limit': 1000
}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_assets_by_creator
tests:
- test_udf:
name: test_helius_das__get_assets_by_creator_status_200
args: >
'mainnet'
, {
'creatorAddress': 'D3XrkNZz6wx6cofot7Zohsf2KSsu2ArngNk8VqU9cTY3',
'onlyVerified': true,
'page': 1, -- Starts at 1
'limit': 1000
}
assertions:
- result:status_code = 200
- result:error IS NULL
- name: get_assets_by_group
tests:
- test_udf:
name: test_helius_das__get_assets_by_group_status_200
args: >
'mainnet'
, {
'groupKey': 'collection',
'groupValue': 'J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w',
'page': 1,
'limit': 1000
}
assertions:
- result:status_code = 200
- result:error IS NULL

View File

@ -1,5 +0,0 @@
-- depends_on: {{ ref('live') }}
{%- set configs = [
config_helius_utils_udfs,
] -%}
{{- ephemeral_deploy_marketplace(configs) -}}

Some files were not shown because too many files have changed in this diff Show More