mirror of
https://github.com/FlipsideCrypto/optimism-models.git
synced 2026-02-06 11:01:44 +00:00
42 lines
1.8 KiB
SQL
42 lines
1.8 KiB
SQL
{% macro create_udf_get_chainhead() %}
|
|
CREATE
|
|
OR REPLACE EXTERNAL FUNCTION streamline.udf_get_chainhead() returns variant api_integration =
|
|
{% if target.name == "prod" %}
|
|
aws_optimism_api AS 'https://s7qxto6wkd.execute-api.us-east-1.amazonaws.com/prod/get_chainhead'
|
|
{% else %}
|
|
aws_optimism_api_dev AS 'https://ngiz4ozok1.execute-api.us-east-1.amazonaws.com/dev/get_chainhead'
|
|
{%- endif %};
|
|
{% endmacro %}
|
|
|
|
{% macro create_udf_bulk_json_rpc() %}
|
|
CREATE
|
|
OR REPLACE EXTERNAL FUNCTION streamline.udf_bulk_json_rpc(
|
|
json variant
|
|
) returns text api_integration = {% if target.name == "prod" %}
|
|
aws_optimism_api AS 'https://s7qxto6wkd.execute-api.us-east-1.amazonaws.com/prod/udf_bulk_json_rpc'
|
|
{% else %}
|
|
aws_optimism_api_dev AS 'https://ngiz4ozok1.execute-api.us-east-1.amazonaws.com/dev/udf_bulk_json_rpc'
|
|
{%- endif %};
|
|
{% endmacro %}
|
|
|
|
{% macro create_udf_bulk_decode_logs() %}
|
|
CREATE
|
|
OR REPLACE EXTERNAL FUNCTION streamline.udf_bulk_decode_logs(
|
|
json OBJECT
|
|
) returns ARRAY api_integration = {% if target.name == "prod" %}
|
|
aws_optimism_api AS 'https://s7qxto6wkd.execute-api.us-east-1.amazonaws.com/prod/bulk_decode_logs'
|
|
{% else %}
|
|
aws_optimism_api_dev AS'https://ngiz4ozok1.execute-api.us-east-1.amazonaws.com/dev/bulk_decode_logs'
|
|
{%- endif %};
|
|
{% endmacro %}
|
|
|
|
{% macro create_udf_bulk_get_traces() %}
|
|
CREATE
|
|
OR REPLACE EXTERNAL FUNCTION streamline.udf_bulk_get_traces(
|
|
json variant
|
|
) returns text api_integration = {% if target.name == "prod" %}
|
|
aws_optimism_api AS 'https://s7qxto6wkd.execute-api.us-east-1.amazonaws.com/prod/udf_bulk_get_traces'
|
|
{% else %}
|
|
aws_optimism_api_dev AS 'https://ngiz4ozok1.execute-api.us-east-1.amazonaws.com/dev/udf_bulk_get_traces'
|
|
{%- endif %};
|
|
{% endmacro %} |