From 6d6ab0c6551352285ab23f442a268948c797fbce Mon Sep 17 00:00:00 2001 From: juanmardefago Date: Tue, 2 Apr 2024 01:26:55 -0300 Subject: [PATCH 1/4] feat: add basic chain aliasing --- .../subgraph/config/arbitrum-sepolia.json | 2 + packages/subgraph/config/arbitrum.json | 1 + packages/subgraph/config/local.json | 1 + packages/subgraph/config/mainnet.json | 1 + packages/subgraph/config/sepolia.json | 2 + packages/subgraph/config/test.json | 2 + packages/subgraph/package.json | 4 +- packages/subgraph/schema.graphql | 9 + packages/subgraph/src/constants.template.ts | 47 ++ packages/subgraph/src/constants.ts | 57 ++- packages/subgraph/src/helpers.ts | 6 +- packages/subgraph/src/mapping.ts | 112 ++++- packages/subgraph/subgraph.yaml | 11 +- packages/subgraph/yarn.lock | 406 +++++------------- 14 files changed, 349 insertions(+), 312 deletions(-) diff --git a/packages/subgraph/config/arbitrum-sepolia.json b/packages/subgraph/config/arbitrum-sepolia.json index 479e91dd..8976d8ee 100644 --- a/packages/subgraph/config/arbitrum-sepolia.json +++ b/packages/subgraph/config/arbitrum-sepolia.json @@ -9,6 +9,7 @@ { "entry": "ResetStateMessage" }, { "entry": "UpdateVersionsMessage" }, { "entry": "RegisterNetworksMessage" }, + { "entry": "RegisterNetworksAndAliasesMessage" }, { "entry": "ChangePermissionsMessage", "lastEntry": true } ], "validThrough": "0" @@ -18,6 +19,7 @@ "permissions": [ { "entry": "UpdateVersionsMessage" }, { "entry": "RegisterNetworksMessage" }, + { "entry": "RegisterNetworksAndAliasesMessage" }, { "entry": "ChangePermissionsMessage", "lastEntry": true } ], "validThrough": "0" diff --git a/packages/subgraph/config/arbitrum.json b/packages/subgraph/config/arbitrum.json index 0bcddd4b..4e9677ff 100644 --- a/packages/subgraph/config/arbitrum.json +++ b/packages/subgraph/config/arbitrum.json @@ -33,6 +33,7 @@ "permissions": [ { "entry": "UpdateVersionsMessage" }, { "entry": "RegisterNetworksMessage" }, + { "entry": "RegisterNetworksAndAliasesMessage" }, { "entry": "ChangePermissionsMessage", "lastEntry": true } ], "validThrough": "0" diff --git a/packages/subgraph/config/local.json b/packages/subgraph/config/local.json index ab03dfac..f76e8c1b 100644 --- a/packages/subgraph/config/local.json +++ b/packages/subgraph/config/local.json @@ -8,6 +8,7 @@ { "entry": "CorrectEpochsMessage" }, { "entry": "UpdateVersionsMessage" }, { "entry": "RegisterNetworksMessage" }, + { "entry": "RegisterNetworksAndAliasesMessage" }, { "entry": "ChangePermissionsMessage" }, { "entry": "ResetStateMessage", "lastEntry": true } ], diff --git a/packages/subgraph/config/mainnet.json b/packages/subgraph/config/mainnet.json index 73e148cc..9a7993b3 100644 --- a/packages/subgraph/config/mainnet.json +++ b/packages/subgraph/config/mainnet.json @@ -34,6 +34,7 @@ { "entry": "SetBlockNumbersForEpochMessage" }, { "entry": "UpdateVersionsMessage" }, { "entry": "RegisterNetworksMessage" }, + { "entry": "RegisterNetworksAndAliasesMessage" }, { "entry": "ChangePermissionsMessage", "lastEntry": true } ], "validThrough": "0" diff --git a/packages/subgraph/config/sepolia.json b/packages/subgraph/config/sepolia.json index 05ff8ab4..3cedb350 100644 --- a/packages/subgraph/config/sepolia.json +++ b/packages/subgraph/config/sepolia.json @@ -9,6 +9,7 @@ { "entry": "ResetStateMessage" }, { "entry": "UpdateVersionsMessage" }, { "entry": "RegisterNetworksMessage" }, + { "entry": "RegisterNetworksAndAliasesMessage" }, { "entry": "ChangePermissionsMessage", "lastEntry": true } ], "validThrough": "0" @@ -18,6 +19,7 @@ "permissions": [ { "entry": "UpdateVersionsMessage" }, { "entry": "RegisterNetworksMessage" }, + { "entry": "RegisterNetworksAndAliasesMessage" }, { "entry": "ChangePermissionsMessage", "lastEntry": true } ], "validThrough": "0" diff --git a/packages/subgraph/config/test.json b/packages/subgraph/config/test.json index dca4e1b8..f636f7b0 100644 --- a/packages/subgraph/config/test.json +++ b/packages/subgraph/config/test.json @@ -8,6 +8,7 @@ { "entry": "CorrectEpochsMessage" }, { "entry": "UpdateVersionsMessage" }, { "entry": "RegisterNetworksMessage" }, + { "entry": "RegisterNetworksAndAliasesMessage" }, { "entry": "ChangePermissionsMessage" }, { "entry": "ResetStateMessage", "lastEntry": true } ], @@ -28,6 +29,7 @@ { "entry": "CorrectEpochsMessage" }, { "entry": "UpdateVersionsMessage" }, { "entry": "RegisterNetworksMessage" }, + { "entry": "RegisterNetworksAndAliasesMessage" }, { "entry": "ChangePermissionsMessage" }, { "entry": "ResetStateMessage", "lastEntry": true } ], diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index ac486e6c..142cb2a1 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -25,8 +25,8 @@ "prep:arbitrum-sepolia": "mustache ./config/arbitrum-sepolia.json subgraph.template.yaml > subgraph.yaml && mustache ./config/arbitrum-sepolia.json src/constants.template.ts > src/constants.ts" }, "devDependencies": { - "@graphprotocol/graph-cli": "^0.52.0", - "@graphprotocol/graph-ts": "^0.31.0", + "@graphprotocol/graph-cli": "^0.69.1", + "@graphprotocol/graph-ts": "^0.34.0", "matchstick-as": "^0.5.0", "mustache": "^4.0.1" } diff --git a/packages/subgraph/schema.graphql b/packages/subgraph/schema.graphql index 0ed73e18..25ca2748 100644 --- a/packages/subgraph/schema.graphql +++ b/packages/subgraph/schema.graphql @@ -70,9 +70,18 @@ type RegisterNetworksMessage implements Message @entity { addCount: BigInt! } +type RegisterNetworksAndAliasesMessage implements Message @entity { + id: ID! + block: MessageBlock! + data: Bytes + removeCount: BigInt! + addCount: BigInt! +} + type Network @entity { id: ID! # chainID now #chainID: String! + alias: String! addedAt: Message! lastUpdatedAt: Message! removedAt: Message diff --git a/packages/subgraph/src/constants.template.ts b/packages/subgraph/src/constants.template.ts index e910d76e..d3152261 100644 --- a/packages/subgraph/src/constants.template.ts +++ b/packages/subgraph/src/constants.template.ts @@ -12,3 +12,50 @@ INITIAL_PERMISSION_SET.set("{{address}}", [["{{validThrough}}"],[{{#permissions} {{/permissionList}} export let BIGINT_ZERO = BigInt.fromI32(0); export let BIGINT_ONE = BigInt.fromI32(1); +export let PRELOADED_ALIASES = new Map(); +PRELOADED_ALIASES.set("bip122:000000000019d6689c085ae165831e93", "btc") +PRELOADED_ALIASES.set("eip155:1", "mainnet") +PRELOADED_ALIASES.set("eip155:5", "goerli") +PRELOADED_ALIASES.set("eip155:10", "optimism") +PRELOADED_ALIASES.set("eip155:56", "bsc") +PRELOADED_ALIASES.set("eip155:97", "chapel") +PRELOADED_ALIASES.set("eip155:99", "poa-core") +PRELOADED_ALIASES.set("eip155:100", "gnosis") +PRELOADED_ALIASES.set("eip155:122", "fuse") +PRELOADED_ALIASES.set("eip155:137", "matic") +PRELOADED_ALIASES.set("eip155:250", "fantom") +PRELOADED_ALIASES.set("eip155:280", "zksync-era-testnet") +PRELOADED_ALIASES.set("eip155:288", "boba") +PRELOADED_ALIASES.set("eip155:1023", "clover") +PRELOADED_ALIASES.set("eip155:1284", "moonbeam") +PRELOADED_ALIASES.set("eip155:1285", "moonriver") +PRELOADED_ALIASES.set("eip155:1287", "mbase") +PRELOADED_ALIASES.set("eip155:4002", "fantom-testnet") +PRELOADED_ALIASES.set("eip155:42161", "arbitrum-one") +PRELOADED_ALIASES.set("eip155:42220", "celo") +PRELOADED_ALIASES.set("eip155:43113", "fuji") +PRELOADED_ALIASES.set("eip155:43114", "avalanche") +PRELOADED_ALIASES.set("eip155:44787", "celo-alfajores") +PRELOADED_ALIASES.set("eip155:80001", "mumbai") +PRELOADED_ALIASES.set("eip155:17000", "holesky") +PRELOADED_ALIASES.set("eip155:1313161554", "aurora") +PRELOADED_ALIASES.set("eip155:1313161555", "aurora-testnet") +PRELOADED_ALIASES.set("eip155:1666600000", "harmony") +PRELOADED_ALIASES.set("eip155:84532", "base-sepolia") +PRELOADED_ALIASES.set("eip155:300", "zksync-era-sepolia") +PRELOADED_ALIASES.set("eip155:1101", "polygon-zkevm") +PRELOADED_ALIASES.set("eip155:324", "zksync-era") +PRELOADED_ALIASES.set("eip155:11155111", "sepolia") +PRELOADED_ALIASES.set("eip155:421613", "arbitrum-goerli") +PRELOADED_ALIASES.set("eip155:421614", "arbitrum-sepolia") +PRELOADED_ALIASES.set("eip155:1442", "polygon-zkevm-testnet") +PRELOADED_ALIASES.set("eip155:59144", "linea") +PRELOADED_ALIASES.set("eip155:59140", "linea-goerli") +PRELOADED_ALIASES.set("eip155:8453", "base") +PRELOADED_ALIASES.set("eip155:534351", "scroll-sepolia") +PRELOADED_ALIASES.set("eip155:534352", "scroll") +PRELOADED_ALIASES.set("eip155:12611", "astar-zkevm-sepolia") +PRELOADED_ALIASES.set("eip155:81457", "blast-mainnet") +PRELOADED_ALIASES.set("eip155:3776", "astar-zkevm-mainnet") +PRELOADED_ALIASES.set("eip155:713715", "sei-testnet") +PRELOADED_ALIASES.set("eip155:168587773", "blast-testnet") \ No newline at end of file diff --git a/packages/subgraph/src/constants.ts b/packages/subgraph/src/constants.ts index 41e7b4ec..8c4872df 100644 --- a/packages/subgraph/src/constants.ts +++ b/packages/subgraph/src/constants.ts @@ -4,10 +4,59 @@ export const PREAMBLE_BIT_LENGTH = 8; export const PREAMBLE_BYTE_LENGTH = PREAMBLE_BIT_LENGTH / 8; export const TAG_BIT_LENGTH = 4; //export const OWNER_ADDRESS_STRING = ""; -export const EPOCH_MANAGER_ADDRESS = "0x64f990bf16552a693dcb043bb7bf3866c5e05ddb"; +export const EPOCH_MANAGER_ADDRESS = "0x5a843145c43d328b9bb7a4401d94918f131bb281"; -export let INITIAL_PERMISSION_SET = new Map>(); -INITIAL_PERMISSION_SET.set("0xeb4ad97a099defc85c900a60adfd2405c455b2c0", ["SetBlockNumbersForEpochMessage","CorrectEpochsMessage","ResetStateMessage"]) -INITIAL_PERMISSION_SET.set("0x48301fe520f72994d32ead72e2b6a8447873cf50", ["SetBlockNumbersForEpochMessage","UpdateVersionsMessage","RegisterNetworksMessage","ChangePermissionsMessage"]) +export let INITIAL_PERMISSION_SET = new Map>>(); +INITIAL_PERMISSION_SET.set("0x881355f34b1c4c8e02ed6b20d16d4bf2c35f5d07", [["67713000"],["SetBlockNumbersForEpochMessage","CorrectEpochsMessage","ResetStateMessage"]]) +INITIAL_PERMISSION_SET.set("0x3e4470ac38a67a81b5d855aaef8936d45afafa88", [["97000000"],["SetBlockNumbersForEpochMessage","CorrectEpochsMessage","ResetStateMessage"]]) +INITIAL_PERMISSION_SET.set("0x5f49491e965895ded343af13389ee45ef60ed793", [["0"],["SetBlockNumbersForEpochMessage","CorrectEpochsMessage","ResetStateMessage"]]) +INITIAL_PERMISSION_SET.set("0x8c6de8f8d562f3382417340a6994601ee08d3809", [["0"],["UpdateVersionsMessage","RegisterNetworksMessage","RegisterNetworksAndAliasesMessage","ChangePermissionsMessage"]]) export let BIGINT_ZERO = BigInt.fromI32(0); export let BIGINT_ONE = BigInt.fromI32(1); +export let PRELOADED_ALIASES = new Map(); +PRELOADED_ALIASES.set("bip122:000000000019d6689c085ae165831e93", "btc") +PRELOADED_ALIASES.set("eip155:1", "mainnet") +PRELOADED_ALIASES.set("eip155:5", "goerli") +PRELOADED_ALIASES.set("eip155:10", "optimism") +PRELOADED_ALIASES.set("eip155:56", "bsc") +PRELOADED_ALIASES.set("eip155:97", "chapel") +PRELOADED_ALIASES.set("eip155:99", "poa-core") +PRELOADED_ALIASES.set("eip155:100", "gnosis") +PRELOADED_ALIASES.set("eip155:122", "fuse") +PRELOADED_ALIASES.set("eip155:137", "matic") +PRELOADED_ALIASES.set("eip155:250", "fantom") +PRELOADED_ALIASES.set("eip155:280", "zksync-era-testnet") +PRELOADED_ALIASES.set("eip155:288", "boba") +PRELOADED_ALIASES.set("eip155:1023", "clover") +PRELOADED_ALIASES.set("eip155:1284", "moonbeam") +PRELOADED_ALIASES.set("eip155:1285", "moonriver") +PRELOADED_ALIASES.set("eip155:1287", "mbase") +PRELOADED_ALIASES.set("eip155:4002", "fantom-testnet") +PRELOADED_ALIASES.set("eip155:42161", "arbitrum-one") +PRELOADED_ALIASES.set("eip155:42220", "celo") +PRELOADED_ALIASES.set("eip155:43113", "fuji") +PRELOADED_ALIASES.set("eip155:43114", "avalanche") +PRELOADED_ALIASES.set("eip155:44787", "celo-alfajores") +PRELOADED_ALIASES.set("eip155:80001", "mumbai") +PRELOADED_ALIASES.set("eip155:17000", "holesky") +PRELOADED_ALIASES.set("eip155:1313161554", "aurora") +PRELOADED_ALIASES.set("eip155:1313161555", "aurora-testnet") +PRELOADED_ALIASES.set("eip155:1666600000", "harmony") +PRELOADED_ALIASES.set("eip155:84532", "base-sepolia") +PRELOADED_ALIASES.set("eip155:300", "zksync-era-sepolia") +PRELOADED_ALIASES.set("eip155:1101", "polygon-zkevm") +PRELOADED_ALIASES.set("eip155:324", "zksync-era") +PRELOADED_ALIASES.set("eip155:11155111", "sepolia") +PRELOADED_ALIASES.set("eip155:421613", "arbitrum-goerli") +PRELOADED_ALIASES.set("eip155:421614", "arbitrum-sepolia") +PRELOADED_ALIASES.set("eip155:1442", "polygon-zkevm-testnet") +PRELOADED_ALIASES.set("eip155:59144", "linea") +PRELOADED_ALIASES.set("eip155:59140", "linea-goerli") +PRELOADED_ALIASES.set("eip155:8453", "base") +PRELOADED_ALIASES.set("eip155:534351", "scroll-sepolia") +PRELOADED_ALIASES.set("eip155:534352", "scroll") +PRELOADED_ALIASES.set("eip155:12611", "astar-zkevm-sepolia") +PRELOADED_ALIASES.set("eip155:81457", "blast-mainnet") +PRELOADED_ALIASES.set("eip155:3776", "astar-zkevm-mainnet") +PRELOADED_ALIASES.set("eip155:713715", "sei-testnet") +PRELOADED_ALIASES.set("eip155:168587773", "blast-testnet") \ No newline at end of file diff --git a/packages/subgraph/src/helpers.ts b/packages/subgraph/src/helpers.ts index 61a8cbbe..aaf0a82c 100644 --- a/packages/subgraph/src/helpers.ts +++ b/packages/subgraph/src/helpers.ts @@ -26,7 +26,8 @@ export enum MessageTag { UpdateVersionsMessage, RegisterNetworksMessage, ChangePermissionsMessage, - ResetStateMessage + ResetStateMessage, + RegisterNetworksAndAliasesMessage } export namespace MessageTag { @@ -36,7 +37,8 @@ export namespace MessageTag { "UpdateVersionsMessage", "RegisterNetworksMessage", "ChangePermissionsMessage", - "ResetStateMessage" + "ResetStateMessage", + "RegisterNetworksAndAliasesMessage" ]; export function toString(tag: MessageTag): string { return tags[tag]; diff --git a/packages/subgraph/src/mapping.ts b/packages/subgraph/src/mapping.ts index cb3389fb..cab589cf 100644 --- a/packages/subgraph/src/mapping.ts +++ b/packages/subgraph/src/mapping.ts @@ -27,7 +27,7 @@ import { SafeExecutionContext } from "./helpers"; import { StoreCache } from "./store-cache"; -import { BIGINT_ZERO, BIGINT_ONE } from "./constants"; +import { BIGINT_ZERO, BIGINT_ONE, PRELOADED_ALIASES } from "./constants"; export function handleLogCrossChainEpochOracle(event: Log): void { // this is used in deployments on networks that lack trace support, and needs to strip the calldata to only @@ -189,6 +189,8 @@ export function processMessage( executeChangePermissionsMessage(cache, snapshot, reader, id, messageBlock); } else if (tag == MessageTag.ResetStateMessage) { executeResetStateMessage(cache, snapshot, reader, id, messageBlock); + } else if (tag == MessageTag.RegisterNetworksAndAliasesMessage) { + executeRegisterNetworksAndAliasesMessage(cache, snapshot, reader, id, messageBlock); } else { reader.fail( "Unknown message tag '{}'. This is most likely a bug!".replace( @@ -450,6 +452,7 @@ function executeRegisterNetworksMessage( if (!cache.isNetworkAlreadyRegistered(chainId)) { let network = cache.getNetwork(chainId); + network.alias = PRELOADED_ALIASES.get(network.id).toString() network.addedAt = message.id; network.removedAt = null; // unsetting to make sure that if the network existed before, it's no longer flagged as removed networks.push(network); @@ -471,6 +474,113 @@ function executeRegisterNetworksMessage( message.data = reader.diff(snapshot); } +function executeRegisterNetworksAndAliasesMessage( + cache: StoreCache, + snapshot: BytesReader, + reader: BytesReader, + id: String, + messageBlock: MessageBlock +): void { + let globalState = cache.getGlobalState(); + let message = cache.getRegisterNetworksMessage(id); + let networks = getActiveNetworks(cache); + let networksMapped = networks.map>(element => [element]); + let removedNetworks: Array = []; + let idsToRemove: Array = []; + + // Get the number of networks to remove. + let numRemovals = decodeU64(reader) as i32; + if (!reader.ok) { + return; + } + + // now get all the removed network ids and apply the changes to the pre-loaded list + for (let i = 0; i < numRemovals; i++) { + let networkId = decodeU64(reader) as i32; + // Besides checking that the decoding was successful, we must perform a + // bounds check over the newly provided network ID. + if (networkId >= networks.length) { + reader.fail( + "Tried deleting a network ID that is out of bounds. NetworkID decoded: {}. Network list length: {}." + .replace("{}", networkId.toString()) + .replace("{}", networks.length.toString()) + ); + } + if (!reader.ok) { + return; + } + + idsToRemove.push(networkId); + } + log.warning("ids to remove {}", [ + idsToRemove + .map(element => element.toString()) + .toString() + ]); + + for (let i = 0; i < idsToRemove.length; i++) { + let network = networksMapped[idsToRemove[i]][0]; + removedNetworks.push(network); + networksMapped[idsToRemove[i]] = []; + } + log.warning("networks mapped {}", [ + networksMapped + .map(element => (element.length > 0 ? element[0].id : "")) + .toString() + ]); + networksMapped = networksMapped.filter(element => element.length > 0); + log.warning("networks mapped filtered {}", [ + networksMapped + .map(element => (element.length > 0 ? element[0].id : "")) + .toString() + ]); + + networks = networksMapped.flat(); + + let numInsertions = decodeU64(reader) as i32; + if (!reader.ok) { + return; + } + + // now get all the add network strings + for (let i = 0; i < numInsertions; i++) { + // Get CAIP2 chain ID + let chainId = decodeString(reader); + if (!reader.ok) { + return; + } + + if (!cache.isNetworkAlreadyRegistered(chainId)) { + let network = cache.getNetwork(chainId); + network.addedAt = message.id; + network.removedAt = null; // unsetting to make sure that if the network existed before, it's no longer flagged as removed + + // Get manifest alias for that CAIP2 id + let alias = decodeString(reader); + if (!reader.ok) { + return; + } + + network.alias = alias; + networks.push(network); + } else { + reader.fail("Network {} is already registered.".replace("{}", chainId)); + return; + } + } + + globalState.activeNetworkCount += numInsertions; + globalState.activeNetworkCount -= numRemovals; + globalState.networkCount += numInsertions; + + commitNetworkChanges(removedNetworks, networks, globalState, message.id); + + message.removeCount = BigInt.fromU64(numRemovals); + message.addCount = BigInt.fromU64(numInsertions); + message.block = messageBlock.id; + message.data = reader.diff(snapshot); +} + function executeChangePermissionsMessage( cache: StoreCache, snapshot: BytesReader, diff --git a/packages/subgraph/subgraph.yaml b/packages/subgraph/subgraph.yaml index 0c4c2b19..71402a25 100644 --- a/packages/subgraph/subgraph.yaml +++ b/packages/subgraph/subgraph.yaml @@ -6,9 +6,9 @@ dataSources: name: DataEdge network: mainnet source: + address: "0xae6ADd894F8a1BcAC10b153dc59Cab1da9656836" abi: DataEdge - address: "0xADE906194C923b28F03F48BC5D9D987AAE21fFab" - startBlock: 15233152 + startBlock: 12052156 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -21,7 +21,8 @@ dataSources: file: ./abis/DataEdgeFull.json - name: EpochManager file: ./abis/EpochManager.json - callHandlers: - - function: crossChainEpochOracle(bytes) - handler: handleCrossChainEpochOracle + eventHandlers: + - event: Log(bytes) + handler: handleLogCrossChainEpochOracle + receipt: true file: ./src/mapping.ts diff --git a/packages/subgraph/yarn.lock b/packages/subgraph/yarn.lock index fc033bc8..a8d7fd7a 100644 --- a/packages/subgraph/yarn.lock +++ b/packages/subgraph/yarn.lock @@ -218,13 +218,15 @@ graphql-import-node "^0.0.5" js-yaml "^4.1.0" -"@graphprotocol/graph-cli@^0.52.0": - version "0.52.0" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.52.0.tgz#8232fa6852d26ec7c2ddf3567de9bbeb6edd5f5e" - integrity sha512-eypShsC0sB7QWiPz4O2k0oh/sY75JYL1XXSCdBUFOIh+N5Pf0oKjKRx88B9wKLlUTlS2m+/tCVnHuTA9tL0wlQ== +"@graphprotocol/graph-cli@^0.69.1": + version "0.69.1" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.69.1.tgz#2ea248fb1636b46afb6101236e3f387e9d2f3275" + integrity sha512-PekTli4hsBkF48y2NA2ufNjtdG/VL4N+E7GAavNXxFmSHM9VoCWbR4OBeJ93dAOpgHRGyx8yO1NE9DDT7yEZsg== dependencies: "@float-capital/float-subgraph-uncrashable" "^0.0.0-alpha.4" "@oclif/core" "2.8.6" + "@oclif/plugin-autocomplete" "^2.3.6" + "@oclif/plugin-not-found" "^2.4.0" "@whatwg-node/fetch" "^0.8.4" assemblyscript "0.19.23" binary-install-raw "0.0.13" @@ -235,14 +237,13 @@ dockerode "2.5.8" fs-extra "9.1.0" glob "9.3.5" - gluegun "5.1.2" + gluegun "5.1.6" graphql "15.5.0" immutable "4.2.1" ipfs-http-client "55.0.0" jayson "4.0.0" js-yaml "3.14.1" - prettier "1.19.1" - request "2.88.2" + prettier "3.0.3" semver "7.4.0" sync-request "6.1.0" tmp-promise "3.0.3" @@ -250,10 +251,10 @@ which "2.0.2" yaml "1.10.2" -"@graphprotocol/graph-ts@^0.31.0": - version "0.31.0" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.31.0.tgz#730668c0369828b31bef81e8d9bc66b9b48e3480" - integrity sha512-xreRVM6ho2BtolyOh2flDkNoGZximybnzUnF53zJVp0+Ed0KnAlO1/KOCUYw06euVI9tk0c9nA2Z/D5SIQV2Rg== +"@graphprotocol/graph-ts@^0.34.0": + version "0.34.0" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.34.0.tgz#ca47398295b114f25b412faa364b98af31fa2bb7" + integrity sha512-gnhjai65AV4YMYe9QHGz+HP/jdzI54z/nOfEXZFfh6m987EP2iy3ycLXrTi+ahcogHH7vtoWFdXbUzZbE8bCAg== dependencies: assemblyscript "0.19.10" @@ -354,6 +355,58 @@ wordwrap "^1.0.0" wrap-ansi "^7.0.0" +"@oclif/core@^2.15.0": + version "2.15.0" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.15.0.tgz#f27797b30a77d13279fba88c1698fc34a0bd0d2a" + integrity sha512-fNEMG5DzJHhYmI3MgpByTvltBOMyFcnRIUMxbiz2ai8rhaYgaTHMG3Q38HcosfIvtw9nCjxpcQtC8MN8QtVCcA== + dependencies: + "@types/cli-progress" "^3.11.0" + ansi-escapes "^4.3.2" + ansi-styles "^4.3.0" + cardinal "^2.1.1" + chalk "^4.1.2" + clean-stack "^3.0.1" + cli-progress "^3.12.0" + debug "^4.3.4" + ejs "^3.1.8" + get-package-type "^0.1.0" + globby "^11.1.0" + hyperlinker "^1.0.0" + indent-string "^4.0.0" + is-wsl "^2.2.0" + js-yaml "^3.14.1" + natural-orderby "^2.0.3" + object-treeify "^1.1.33" + password-prompt "^1.1.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + supports-color "^8.1.1" + supports-hyperlinks "^2.2.0" + ts-node "^10.9.1" + tslib "^2.5.0" + widest-line "^3.1.0" + wordwrap "^1.0.0" + wrap-ansi "^7.0.0" + +"@oclif/plugin-autocomplete@^2.3.6": + version "2.3.10" + resolved "https://registry.yarnpkg.com/@oclif/plugin-autocomplete/-/plugin-autocomplete-2.3.10.tgz#787f6208cdfe10ffc68ad89e9e7f1a7ad0e8987f" + integrity sha512-Ow1AR8WtjzlyCtiWWPgzMyT8SbcDJFr47009riLioHa+MHX2BCDtVn2DVnN/E6b9JlPV5ptQpjefoRSNWBesmg== + dependencies: + "@oclif/core" "^2.15.0" + chalk "^4.1.0" + debug "^4.3.4" + +"@oclif/plugin-not-found@^2.4.0": + version "2.4.3" + resolved "https://registry.yarnpkg.com/@oclif/plugin-not-found/-/plugin-not-found-2.4.3.tgz#3d24095adb0f3876cb4bcfdfdcb775086cf6d4b5" + integrity sha512-nIyaR4y692frwh7wIHZ3fb+2L6XEecQwRDIb4zbEam0TvaVmBQWZoColQyWA84ljFBPZ8XWiQyTz+ixSwdRkqg== + dependencies: + "@oclif/core" "^2.15.0" + chalk "^4" + fast-levenshtein "^3.0.0" + "@peculiar/asn1-schema@^2.3.6": version "2.3.6" resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz#3dd3c2ade7f702a9a94dfb395c192f5fa5d6b922" @@ -615,16 +668,6 @@ acorn@^8.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== -ajv@^6.12.3: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - ansi-colors@^4.1.1: version "4.1.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" @@ -726,13 +769,6 @@ asap@~2.0.6: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== -asn1@~0.2.3: - version "0.2.6" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" - integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== - dependencies: - safer-buffer "~2.1.0" - asn1js@^3.0.1, asn1js@^3.0.5: version "3.0.5" resolved "https://registry.yarnpkg.com/asn1js/-/asn1js-3.0.5.tgz#5ea36820443dbefb51cc7f88a2ebb5b462114f38" @@ -759,10 +795,10 @@ assemblyscript@0.19.23: long "^5.2.0" source-map-support "^0.5.20" -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== async@^3.2.3: version "3.2.4" @@ -779,16 +815,6 @@ at-least-node@^1.0.0: resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== - -aws4@^1.8.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" - integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== - axios@^0.21.1, axios@^0.21.4: version "0.21.4" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" @@ -813,13 +839,6 @@ base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== - dependencies: - tweetnacl "^0.14.3" - binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -1030,7 +1049,7 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.2, chalk@^4.1.2: +chalk@^4, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1141,7 +1160,7 @@ colors@1.4.0, colors@^1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -combined-stream@^1.0.6, combined-stream@~1.0.6: +combined-stream@^1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -1168,11 +1187,6 @@ concat-stream@^1.6.0, concat-stream@^1.6.2, concat-stream@~1.6.2: readable-stream "^2.2.2" typedarray "^0.0.6" -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== - core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" @@ -1226,13 +1240,6 @@ cross-spawn@7.0.3, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== - dependencies: - assert-plus "^1.0.0" - debug@4.3.4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -1311,20 +1318,12 @@ dockerode@2.5.8: docker-modem "^1.0.8" tar-fs "~1.16.3" -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ejs@3.1.6: - version "3.1.6" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.6.tgz#5bfd0a0689743bb5268b3550cceeebbc1702822a" - integrity sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw== +ejs@3.1.8: + version "3.1.8" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.8.tgz#758d32910c78047585c7ef1f92f9ee041c1c190b" + integrity sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ== dependencies: - jake "^10.6.1" + jake "^10.8.5" ejs@^3.1.8: version "3.1.9" @@ -1493,21 +1492,6 @@ execa@5.1.1: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== - -extsprintf@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" - integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== - eyes@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" @@ -1518,11 +1502,6 @@ fast-decode-uri-component@^1.0.1: resolved "https://registry.yarnpkg.com/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz#46f8b6c22b30ff7a81357d4f59abfae938202543" integrity sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg== -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - fast-fifo@^1.0.0: version "1.3.2" resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" @@ -1539,10 +1518,12 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-levenshtein@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-3.0.0.tgz#37b899ae47e1090e40e3fd2318e4d5f0142ca912" + integrity sha512-hKKNajm46uNmTlhHSyZkmToAc56uZJwYq7yrciZjqOxnlfQwERDQJmHPUp7m1m9wx8vgOe8IaCKZ5Kv2k1DdCQ== + dependencies: + fastest-levenshtein "^1.0.7" fast-querystring@^1.1.1: version "1.1.2" @@ -1558,6 +1539,11 @@ fast-url-parser@^1.1.3: dependencies: punycode "^1.3.2" +fastest-levenshtein@^1.0.7: + version "1.0.16" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== + fastq@^1.6.0: version "1.15.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" @@ -1584,11 +1570,6 @@ follow-redirects@^1.14.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== - form-data@^2.2.0: version "2.5.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" @@ -1598,15 +1579,6 @@ form-data@^2.2.0: combined-stream "^1.0.6" mime-types "^2.1.12" -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - fs-constants@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" @@ -1682,13 +1654,6 @@ get-stream@^6.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== - dependencies: - assert-plus "^1.0.0" - glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1730,10 +1695,10 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -gluegun@5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/gluegun/-/gluegun-5.1.2.tgz#ffa0beda0fb6bbc089a867157b08602beae2c8cf" - integrity sha512-Cwx/8S8Z4YQg07a6AFsaGnnnmd8mN17414NcPS3OoDtZRwxgsvwRNJNg69niD6fDa8oNwslCG0xH7rEpRNNE/g== +gluegun@5.1.6: + version "5.1.6" + resolved "https://registry.yarnpkg.com/gluegun/-/gluegun-5.1.6.tgz#74ec13193913dc610f5c1a4039972c70c96a7bad" + integrity sha512-9zbi4EQWIVvSOftJWquWzr9gLX2kaDgPkNR5dYWbM53eVvCI3iKuxLlnKoHC0v4uPoq+Kr/+F569tjoFbA4DSA== dependencies: apisauce "^2.1.5" app-module-path "^2.2.0" @@ -1741,7 +1706,7 @@ gluegun@5.1.2: colors "1.4.0" cosmiconfig "7.0.1" cross-spawn "7.0.3" - ejs "3.1.6" + ejs "3.1.8" enquirer "2.3.6" execa "5.1.1" fs-jetpack "4.3.1" @@ -1786,19 +1751,6 @@ graphql@^16.6.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.0.tgz#374478b7f27b2dc6153c8f42c1b80157f79d79d4" integrity sha512-0oKGaR+y3qcS5mCu1vb7KG+a89vjn06C7Ihq/dDl3jA+A8B3TKomvi3CiEcVLJQGalbu8F52LxkOym7U5sSfbg== -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -1869,15 +1821,6 @@ http-response-object@^3.0.1: dependencies: "@types/node" "^10.0.3" -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -2116,11 +2059,6 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" @@ -2153,11 +2091,6 @@ isomorphic-ws@^4.0.1: resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== - it-all@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/it-all/-/it-all-1.0.6.tgz#852557355367606295c4c3b7eff0136f07749335" @@ -2203,7 +2136,7 @@ it-to-stream@^1.0.0: p-fifo "^1.0.0" readable-stream "^3.6.0" -jake@^10.6.1, jake@^10.8.5: +jake@^10.8.5: version "10.8.7" resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.7.tgz#63a32821177940c33f356e0ba44ff9d34e1c7d8f" integrity sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w== @@ -2256,27 +2189,12 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== - json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" - integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== - -json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: +json-stringify-safe@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== @@ -2295,16 +2213,6 @@ jsonparse@^1.2.0: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -jsprim@^1.2.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" - integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.4.0" - verror "1.10.0" - keccak@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" @@ -2474,7 +2382,7 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12, mime-types@~2.1.19: +mime-types@^2.1.12: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -2660,11 +2568,6 @@ number-to-bn@1.7.0: bn.js "4.11.6" strip-hex-prefix "1.0.0" -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -2789,11 +2692,6 @@ pbkdf2@^3.0.17: safe-buffer "^5.0.1" sha.js "^2.4.8" -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== - picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -2804,10 +2702,10 @@ pluralize@^8.0.0: resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== -prettier@1.19.1: - version "1.19.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" - integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== +prettier@3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643" + integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg== process-nextick-args@~2.0.0: version "2.0.1" @@ -2840,11 +2738,6 @@ protobufjs@^6.10.2: "@types/node" ">=13.7.0" long "^4.0.0" -psl@^1.1.28: - version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - pump@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" @@ -2858,11 +2751,6 @@ punycode@^1.3.2: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== -punycode@^2.1.0, punycode@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== - pvtsutils@^1.3.2: version "1.3.5" resolved "https://registry.yarnpkg.com/pvtsutils/-/pvtsutils-1.3.5.tgz#b8705b437b7b134cd7fd858f025a23456f1ce910" @@ -2882,11 +2770,6 @@ qs@^6.4.0: dependencies: side-channel "^1.0.4" -qs@~6.5.2: - version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -2959,32 +2842,6 @@ redeyed@~2.1.0: dependencies: esprima "~4.0.0" -request@2.88.2: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -3054,7 +2911,7 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -"safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -3138,6 +2995,15 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + source-map-support@^0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" @@ -3161,21 +3027,6 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -sshpk@^1.7.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" - integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - stream-to-it@^0.2.2: version "0.2.4" resolved "https://registry.yarnpkg.com/stream-to-it/-/stream-to-it-0.2.4.tgz#d2fd7bfbd4a899b4c0d6a7e6a533723af5749bd0" @@ -3379,14 +3230,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -3416,18 +3259,6 @@ tslib@^2.0.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.6.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== - type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -3450,13 +3281,6 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - urlpattern-polyfill@^8.0.0: version "8.0.2" resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz#99f096e35eff8bf4b5a2aa7d58a1523d6ebc7ce5" @@ -3472,11 +3296,6 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" @@ -3492,15 +3311,6 @@ varint@^6.0.0: resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0" integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg== -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - wabt@1.0.24: version "1.0.24" resolved "https://registry.yarnpkg.com/wabt/-/wabt-1.0.24.tgz#c02e0b5b4503b94feaf4a30a426ef01c1bea7c6c" From 8df36975a1161d4306d96af72047801ded3c02e9 Mon Sep 17 00:00:00 2001 From: juanmardefago Date: Thu, 4 Apr 2024 02:36:33 -0300 Subject: [PATCH 2/4] feat: added encoding for RegisterNetworksAndAliasesMessage --- crates/encoding/src/lib.rs | 13 +++++ crates/encoding/src/messages.rs | 10 ++++ crates/encoding/src/serialize.rs | 18 +++++++ crates/json-oracle-encoder/src/lib.rs | 8 +++ packages/subgraph/tests/payload.test.ts | 67 +++++++++++++++++++++++++ 5 files changed, 116 insertions(+) diff --git a/crates/encoding/src/lib.rs b/crates/encoding/src/lib.rs index 880cb358..4c56e444 100644 --- a/crates/encoding/src/lib.rs +++ b/crates/encoding/src/lib.rs @@ -155,6 +155,19 @@ impl Encoder { new_owner_address: *new_owner_address, }); } + Message::RegisterNetworksAndAliases { remove, add } => { + for index in remove { + self.remove_network(*index); + } + for (id, _) in add { + self.add_network(id); + } + + self.compressed.push(CompressedMessage::RegisterNetworksAndAliases { + remove: remove.clone(), + add: add.clone(), + }); + } }; Ok(()) } diff --git a/crates/encoding/src/messages.rs b/crates/encoding/src/messages.rs index 81ceac31..6513ab31 100644 --- a/crates/encoding/src/messages.rs +++ b/crates/encoding/src/messages.rs @@ -45,6 +45,12 @@ pub enum Message { new_owner_address: [u8; 20], }, Reset, + RegisterNetworksAndAliases { + // Remove is by index + remove: Vec, + // Add is by CAIP2 id and Alias + add: Vec<(String, String)>, + }, } #[derive(Clone, Debug, PartialEq, Eq)] @@ -64,6 +70,10 @@ pub enum CompressedMessage { new_owner_address: [u8; 20], }, Reset, + RegisterNetworksAndAliases { + remove: Vec, + add: Vec<(String, String)>, + }, } impl CompressedMessage { diff --git a/crates/encoding/src/serialize.rs b/crates/encoding/src/serialize.rs index 069ab82b..ca5a56da 100644 --- a/crates/encoding/src/serialize.rs +++ b/crates/encoding/src/serialize.rs @@ -44,6 +44,9 @@ fn serialize_message(message: &CompressedMessage, bytes: &mut Vec) { CompressedMessage::ChangeOwnership { new_owner_address } => { bytes.extend_from_slice(new_owner_address); } + CompressedMessage::RegisterNetworksAndAliases { add, remove } => { + serialize_register_networks_and_aliases(add, remove, bytes) + } } } @@ -78,6 +81,20 @@ fn serialize_register_networks(add: &[String], remove: &[NetworkIndex], bytes: & } } +fn serialize_register_networks_and_aliases(add: &[(String, String)], remove: &[NetworkIndex], bytes: &mut Vec) { + serialize_u64(remove.len() as u64, bytes); + for id in remove { + // TODO: Compression - could delta encode series here. Probably not worth it. + serialize_u64(*id, bytes); + } + + serialize_u64(add.len() as u64, bytes); + for (add0, add1) in add { + serialize_str(add0, bytes); + serialize_str(add1, bytes); + } +} + fn serialize_str(value: &str, bytes: &mut Vec) { serialize_u64(value.len() as u64, bytes); bytes.extend_from_slice(value.as_bytes()); @@ -119,6 +136,7 @@ fn message_tag(m: &CompressedMessage) -> u8 { CompressedMessage::RegisterNetworks { .. } => 3, CompressedMessage::ChangeOwnership { .. } => 4, CompressedMessage::Reset => 5, + CompressedMessage::RegisterNetworksAndAliases { .. } => 6, } } diff --git a/crates/json-oracle-encoder/src/lib.rs b/crates/json-oracle-encoder/src/lib.rs index ea44f69a..bfbb143c 100644 --- a/crates/json-oracle-encoder/src/lib.rs +++ b/crates/json-oracle-encoder/src/lib.rs @@ -77,6 +77,9 @@ fn messages_to_encoded_message_blocks( Message::RegisterNetworks { remove, add } => { ee::CompressedMessage::RegisterNetworks { remove, add } } + Message::RegisterNetworksAndAliases { remove, add } => { + ee::CompressedMessage::RegisterNetworksAndAliases { remove, add } + } Message::ChangeOwnership { new_owner_address } => { ee::CompressedMessage::ChangeOwnership { new_owner_address: new_owner_address @@ -150,6 +153,10 @@ pub enum Message { #[serde(deserialize_with = "deserialize_hex")] new_owner_address: Vec, }, + RegisterNetworksAndAliases { + remove: Vec, + add: Vec<(String, String)>, + }, } impl Message { @@ -161,6 +168,7 @@ impl Message { Message::UpdateVersion { .. } => "UpdateVersion", Message::Reset => "Reset", Message::ChangeOwnership { .. } => "ChangeOwnership", + Message::RegisterNetworksAndAliases { .. } => "RegisterNetworksAndAliases", } } } diff --git a/packages/subgraph/tests/payload.test.ts b/packages/subgraph/tests/payload.test.ts index e969ebd0..9bb3bfb3 100644 --- a/packages/subgraph/tests/payload.test.ts +++ b/packages/subgraph/tests/payload.test.ts @@ -686,3 +686,70 @@ test("(RegisterNetworks, SetBlockNumbersForNextEpoch) -> (RegisterNetworks, SetB assert.fieldEquals("NetworkEpochBlockNumber", "2-C", "acceleration", "6"); assert.fieldEquals("NetworkEpochBlockNumber", "2-C", "delta", "9"); }); + +// [[ +// { +// "add": [ +// ["eip155:20000000", "juanmanet"] +// ], +// "message": "RegisterNetworksAndAliases", +// "remove": [] +// }, +// { +// "accelerations": [ +// 15 +// ], +// "merkleRoot": "0x66ebb0afd80c906e2b0564e921c3feefa9a5ecb71e98e3c7b7e661515e87dc49", +// "message": "SetBlockNumbersForNextEpoch" +// } +// ] +// ] + +test("(RegisterNetworksAndAliases)", () => { + let payloadBytes = Bytes.fromHexString("0x0601031f6569703135353a3230303030303030136a75616e6d616e6574") as Bytes; + let submitter = "0x0000000000000000000000000000000000000000"; + let txHash = "0x00"; + + processPayload(submitter, payloadBytes, txHash, BIGINT_ONE); // Network registration with aliases + + assert.entityCount("Epoch", 0); + assert.entityCount("Network", 1); + assert.entityCount("NetworkEpochBlockNumber", 0); + + // Check message composition and entities created based on it + assert.entityCount("Payload", 1); + assert.entityCount("MessageBlock", 1); + assert.entityCount("SetBlockNumbersForEpochMessage", 0); + assert.entityCount("RegisterNetworksMessage", 1); + assert.entityCount("CorrectEpochsMessage", 0); + assert.entityCount("UpdateVersionsMessage", 0); + + assert.fieldEquals("GlobalState", "0", "activeNetworkCount", "1"); + assert.fieldEquals("Network", "eip155:20000000", "alias", "juanmanet"); + assert.fieldEquals("Network", "eip155:20000000", "id", "eip155:20000000"); + + // processPayload(submitter, payloadBytes2, txHash2, BIGINT_ONE); // Acceleration + + // assert.entityCount("Epoch", 1); + // assert.entityCount("Network", 1); + // assert.entityCount("NetworkEpochBlockNumber", 1); + + // // Check message composition and entities created based on it + // assert.entityCount("Payload", 2); + // assert.entityCount("MessageBlock", 2); + // assert.entityCount("SetBlockNumbersForEpochMessage", 1); + // assert.entityCount("RegisterNetworksMessage", 1); + // assert.entityCount("CorrectEpochsMessage", 0); + // assert.entityCount("UpdateVersionsMessage", 0); + + // assert.fieldEquals("Network", "A", "id", "A"); + // assert.fieldEquals("Epoch", "1", "id", "1"); + // assert.fieldEquals("NetworkEpochBlockNumber", "1-A", "id", "1-A"); + // assert.fieldEquals("NetworkEpochBlockNumber", "1-A", "acceleration", "15"); + // assert.fieldEquals("NetworkEpochBlockNumber", "1-A", "delta", "15"); + // assert.fieldEquals("GlobalState", "0", "networkArrayHead", "A"); + // assert.fieldEquals("Network", "A", "state", "0"); + // assert.fieldEquals("Network", "A", "arrayIndex", "0"); + // let networkA = Network.load("A")!; + // assert.assertNull(networkA.nextArrayElement); +}); \ No newline at end of file From e88ee85a9ca6a2994cf73ccef2c785c2a34cfa5c Mon Sep 17 00:00:00 2001 From: juanmardefago Date: Thu, 4 Apr 2024 02:46:24 -0300 Subject: [PATCH 3/4] fix: missing key check on preloaded aliasing --- packages/subgraph/src/mapping.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/subgraph/src/mapping.ts b/packages/subgraph/src/mapping.ts index cab589cf..6c8b255d 100644 --- a/packages/subgraph/src/mapping.ts +++ b/packages/subgraph/src/mapping.ts @@ -452,7 +452,7 @@ function executeRegisterNetworksMessage( if (!cache.isNetworkAlreadyRegistered(chainId)) { let network = cache.getNetwork(chainId); - network.alias = PRELOADED_ALIASES.get(network.id).toString() + network.alias = PRELOADED_ALIASES.keys().includes(network.id) ? PRELOADED_ALIASES.get(network.id).toString() : "" network.addedAt = message.id; network.removedAt = null; // unsetting to make sure that if the network existed before, it's no longer flagged as removed networks.push(network); From aa194b522ed3005e4b5188c35af6e8e6a83f5885 Mon Sep 17 00:00:00 2001 From: juanmardefago Date: Thu, 4 Apr 2024 03:06:21 -0300 Subject: [PATCH 4/4] fix: workflows and formatting --- .github/workflows/subgraph.yml | 2 +- crates/encoding/src/lib.rs | 9 +++++---- crates/encoding/src/serialize.rs | 6 +++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/subgraph.yml b/.github/workflows/subgraph.yml index 75159831..e11cdbf6 100644 --- a/.github/workflows/subgraph.yml +++ b/.github/workflows/subgraph.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: '16' + node-version: '20' registry-url: https://registry.npmjs.org - name: test working-directory: ./packages/subgraph diff --git a/crates/encoding/src/lib.rs b/crates/encoding/src/lib.rs index 4c56e444..81b9396f 100644 --- a/crates/encoding/src/lib.rs +++ b/crates/encoding/src/lib.rs @@ -163,10 +163,11 @@ impl Encoder { self.add_network(id); } - self.compressed.push(CompressedMessage::RegisterNetworksAndAliases { - remove: remove.clone(), - add: add.clone(), - }); + self.compressed + .push(CompressedMessage::RegisterNetworksAndAliases { + remove: remove.clone(), + add: add.clone(), + }); } }; Ok(()) diff --git a/crates/encoding/src/serialize.rs b/crates/encoding/src/serialize.rs index ca5a56da..734353e2 100644 --- a/crates/encoding/src/serialize.rs +++ b/crates/encoding/src/serialize.rs @@ -81,7 +81,11 @@ fn serialize_register_networks(add: &[String], remove: &[NetworkIndex], bytes: & } } -fn serialize_register_networks_and_aliases(add: &[(String, String)], remove: &[NetworkIndex], bytes: &mut Vec) { +fn serialize_register_networks_and_aliases( + add: &[(String, String)], + remove: &[NetworkIndex], + bytes: &mut Vec, +) { serialize_u64(remove.len() as u64, bytes); for id in remove { // TODO: Compression - could delta encode series here. Probably not worth it.