diff --git a/packages/automation-contracts/autowrap/package.json b/packages/automation-contracts/autowrap/package.json index d2dab4d495..e6d8d15fde 100644 --- a/packages/automation-contracts/autowrap/package.json +++ b/packages/automation-contracts/autowrap/package.json @@ -15,6 +15,6 @@ "dependencies": { "@openzeppelin/contracts": "4.9.3", "@superfluid-finance/ethereum-contracts": "1.8.1", - "@superfluid-finance/metadata": "1.1.17" + "@superfluid-finance/metadata": "1.1.18" } } diff --git a/packages/automation-contracts/scheduler/package.json b/packages/automation-contracts/scheduler/package.json index db1d54a2b7..68b0e8658e 100644 --- a/packages/automation-contracts/scheduler/package.json +++ b/packages/automation-contracts/scheduler/package.json @@ -15,6 +15,6 @@ "dependencies": { "@openzeppelin/contracts": "4.9.3", "@superfluid-finance/ethereum-contracts": "1.8.1", - "@superfluid-finance/metadata": "1.1.17" + "@superfluid-finance/metadata": "1.1.18" } } diff --git a/packages/ethereum-contracts/package.json b/packages/ethereum-contracts/package.json index f9c5b0c155..1a20f66c02 100644 --- a/packages/ethereum-contracts/package.json +++ b/packages/ethereum-contracts/package.json @@ -89,7 +89,7 @@ "@safe-global/safe-service-client": "^2.0.3", "@safe-global/safe-web3-lib": "^1.9.4", "@superfluid-finance/js-sdk": "0.6.3", - "@superfluid-finance/metadata": "1.1.17", + "@superfluid-finance/metadata": "1.1.18", "async": "^3.2.4", "csv-writer": "^1.6.0", "ethers": "^5.7.2", diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index 4163284e82..e3c759410c 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -43,7 +43,7 @@ "cloc": "sh tasks/cloc.sh" }, "dependencies": { - "@superfluid-finance/metadata": "1.1.17", + "@superfluid-finance/metadata": "1.1.18", "@truffle/contract": "4.6.29", "auto-bind": "4.0.0", "node-fetch": "2.7.0" diff --git a/packages/metadata/CHANGELOG.md b/packages/metadata/CHANGELOG.md index b6aa04fce1..7a29817ea0 100644 --- a/packages/metadata/CHANGELOG.md +++ b/packages/metadata/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to the metadata will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.1.18] +### Fixed +- Changed the `module/networks/list.d.ts` file to correctly reflect the `contractsV1` object in our `networks.json` file. + ## [v1.1.17] ### Fixed - Removed `governance` from testnets, changes frequently and can't be reliably kept up to date here diff --git a/packages/metadata/module/networks/list.d.ts b/packages/metadata/module/networks/list.d.ts index 620a360eeb..5a7d32ac45 100644 --- a/packages/metadata/module/networks/list.d.ts +++ b/packages/metadata/module/networks/list.d.ts @@ -5,7 +5,7 @@ interface AutowrapAddresses { interface ContractAddresses { readonly resolver: string; readonly host: string; - readonly governance: string; + readonly governance?: string; readonly cfaV1: string; readonly cfaV1Forwarder: string; readonly idaV1: string; @@ -14,11 +14,12 @@ interface ContractAddresses { readonly constantOutflowNFT?: string; readonly constantInflowNFT?: string; readonly superfluidLoader: string; - readonly toga: string; - readonly vestingScheduler: string; - readonly flowScheduler: string; - readonly batchLiquidator: string; - readonly autowrap: AutowrapAddresses; + readonly toga?: string; + readonly vestingScheduler?: string; + readonly flowScheduler?: string; + readonly batchLiquidator?: string; + readonly superSpreader?: string; + readonly autowrap?: AutowrapAddresses; readonly existentialNFTCloneFactory: string; } interface SubgraphData { diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 403de30760..0fa6c190cc 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/metadata", - "version": "1.1.17", + "version": "1.1.18", "description": "Superfluid Metadata", "main": "main/index.cjs", "module": "module/index.js", diff --git a/packages/sdk-core/CHANGELOG.md b/packages/sdk-core/CHANGELOG.md index e4f6bf2764..e52a669066 100644 --- a/packages/sdk-core/CHANGELOG.md +++ b/packages/sdk-core/CHANGELOG.md @@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +## [0.6.11] - 2023-10-20 + +### Fixed +- Handle the case when `networkData.addresses.governance` is null. This was due to a removal of the `governance` address from the metadata for test networks in `metadata@v1.1.17`. ## [0.6.10] - 2023-10-16 diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index ea93ff722a..7953193b94 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/sdk-core", - "version": "0.6.10", + "version": "0.6.11", "description": "SDK Core for building with Superfluid Protocol", "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/sdk-core#readme", "repository": { @@ -57,7 +57,7 @@ }, "dependencies": { "@superfluid-finance/ethereum-contracts": "1.8.1", - "@superfluid-finance/metadata": "1.1.17", + "@superfluid-finance/metadata": "1.1.18", "browserify": "^17.0.0", "graphql-request": "^6.1.0", "lodash": "^4.17.21", diff --git a/packages/sdk-core/src/Framework.ts b/packages/sdk-core/src/Framework.ts index 2b47f18dc6..df663fe217 100644 --- a/packages/sdk-core/src/Framework.ts +++ b/packages/sdk-core/src/Framework.ts @@ -180,6 +180,15 @@ export default class Framework { networkData != null && baseSettings.protocolReleaseVersion === V1 ) { + let governanceAddress = ethers.constants.AddressZero; + + if (networkData.addresses.governance == null) { + governanceAddress = await Superfluid__factory.connect( + networkData.addresses.host, + provider + ).getGovernance(); + } + const settings: IFrameworkSettings = { ...baseSettings, config: { @@ -187,7 +196,7 @@ export default class Framework { hostAddress: networkData.addresses.host, cfaV1Address: networkData.addresses.cfaV1, idaV1Address: networkData.addresses.idaV1, - governanceAddress: networkData.addresses.governance, + governanceAddress, cfaV1ForwarderAddress: networkData.addresses.cfaV1Forwarder, }, diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 17f5b5fc0a..0bc6761663 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -54,7 +54,7 @@ "mustache": "^4.2.0" }, "devDependencies": { - "@superfluid-finance/metadata": "1.1.17", + "@superfluid-finance/metadata": "1.1.18", "coingecko-api": "^1.0.10", "graphql": "^16.8.0", "graphql-request": "^6.1.0",