From e3dcef511cfd9323eed02c6bf09092bf784ba0a8 Mon Sep 17 00:00:00 2001 From: Momodu Afegbua Date: Thu, 14 Dec 2023 03:16:41 -0600 Subject: [PATCH 1/4] [WORKFLOW] Subgraph deloy all networks (#1760) * added VENDOR_NETWORKS variable * decaled variable --- packages/subgraph/tasks/deploy.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/subgraph/tasks/deploy.sh b/packages/subgraph/tasks/deploy.sh index e5881cd5f0..016e6673fe 100755 --- a/packages/subgraph/tasks/deploy.sh +++ b/packages/subgraph/tasks/deploy.sh @@ -17,6 +17,12 @@ SATSUMA_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "eth-sepolia" # shellcheck disable=SC2034 SUPERFLUID_NETWORKS=( "polygon-zkevm-testnet" "polygon-mainnet" "eth-sepolia" "base-goerli" "eth-mainnet" "xdai-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one") +declare -A VENDOR_NETWORKS=( + ["graph"]="${GRAPH_NETWORKS[@]}" + ["satsuma"]="${SATSUMA_NETWORKS[@]}" + ["superfluid"]="${SUPERFLUID_NETWORKS[@]}" +) + VENDOR="" NETWORK="" DEPLOYMENT_ENV="" @@ -163,7 +169,7 @@ fi # Handle all vs specific network if [ "$NETWORK" == "all" ]; then - for network in "${NETWORKS_REF[@]}"; do + for network in ${VENDOR_NETWORKS[$VENDOR]}; do deploy_to "$VENDOR" "$network" done else From e5da4ec5bcd24d3230c9d1ae451999f062365075 Mon Sep 17 00:00:00 2001 From: 0xdavinchee <0xdavinchee@gmail.com> Date: Thu, 14 Dec 2023 18:44:55 +0200 Subject: [PATCH 2/4] fix mapping (#1758) --- packages/subgraph/src/mappings/flowNFT.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/subgraph/src/mappings/flowNFT.ts b/packages/subgraph/src/mappings/flowNFT.ts index 9ac82c6ebe..a070abf8dd 100644 --- a/packages/subgraph/src/mappings/flowNFT.ts +++ b/packages/subgraph/src/mappings/flowNFT.ts @@ -15,6 +15,7 @@ import { createEventID, initializeEventEntity } from "../utils"; export function handleApproval(event: Approval): void { const eventId = createEventID("Approval", event); const ev = new ApprovalEvent(eventId); + initializeEventEntity(ev, event, []); ev.owner = event.params.owner.toHex(); ev.to = event.params.approved.toHex(); ev.tokenId = event.params.tokenId; From 5f66bbbc2eeaf1190b78276910e22e2c11409b65 Mon Sep 17 00:00:00 2001 From: Momodu Afegbua Date: Mon, 18 Dec 2023 09:14:06 -0600 Subject: [PATCH 3/4] added new supported subgraphs (#1761) --- packages/subgraph/tasks/deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/subgraph/tasks/deploy.sh b/packages/subgraph/tasks/deploy.sh index 016e6673fe..5afb9e84ec 100755 --- a/packages/subgraph/tasks/deploy.sh +++ b/packages/subgraph/tasks/deploy.sh @@ -15,7 +15,7 @@ GRAPH_NETWORKS=( $($JQ -r .[] ./hosted-service-networks.json) ) || exit 1 # shellcheck disable=SC2034 SATSUMA_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "eth-sepolia" "optimism-mainnet" "base-mainnet") # shellcheck disable=SC2034 -SUPERFLUID_NETWORKS=( "polygon-zkevm-testnet" "polygon-mainnet" "eth-sepolia" "base-goerli" "eth-mainnet" "xdai-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one") +SUPERFLUID_NETWORKS=( "polygon-zkevm-testnet" "polygon-mainnet" "eth-sepolia" "base-goerli" "eth-mainnet" "xdai-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "celo-mainnet" "bsc-mainnet" "avalanche-c") declare -A VENDOR_NETWORKS=( ["graph"]="${GRAPH_NETWORKS[@]}" From 1bf8e7cf51445957f7c5c775ea787826f248cfb8 Mon Sep 17 00:00:00 2001 From: 0xdavinchee <0xdavinchee@gmail.com> Date: Thu, 4 Jan 2024 18:18:39 +0200 Subject: [PATCH 4/4] type fix (#1771) --- packages/sdk-core/src/events.ts | 3 ++- packages/sdk-core/src/mapGetAllEventsQueryEvents.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/sdk-core/src/events.ts b/packages/sdk-core/src/events.ts index 2b7e1beced..6f06fa367d 100644 --- a/packages/sdk-core/src/events.ts +++ b/packages/sdk-core/src/events.ts @@ -436,5 +436,6 @@ export interface BondIncreasedEvent extends EventBase { } export interface UnknownEvent extends EventBase { - name: string; + // @note using the string type breaks the type guard + name: ""; } diff --git a/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts b/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts index 349983651d..4323613dae 100644 --- a/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts +++ b/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts @@ -680,7 +680,8 @@ export const mapGetAllEventsQueryEvents = ( `An unknown event [${eventBase.name}] was detected which couldn't be properly mapped. Please update to the latest version of @superfluid-finance/sdk-core.` ); return typeGuard({ - name: eventBase.name, + // force casted as empty string for the type system + name: eventBase.name as "", id: eventBase.id, blockNumber: eventBase.blockNumber, transactionHash: eventBase.transactionHash,