From e34d54b2890920aaa384cac749e43a65611a7b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Carranza=20V=C3=A9lez?= Date: Thu, 11 Aug 2022 14:30:54 +0200 Subject: [PATCH 1/4] chore: syncAllContracts calls in all config files --- config/graph.arbitrum-goerli.yml | 13 ++++++++++++- config/graph.arbitrum-localhost.yml | 11 +++++++++++ config/graph.arbitrum-one.yml | 11 +++++++++++ config/graph.goerli.yml | 15 ++++++++++++++- config/graph.localhost.yml | 13 +++++++++++++ config/graph.mainnet.yml | 13 +++++++++++++ 6 files changed, 74 insertions(+), 2 deletions(-) diff --git a/config/graph.arbitrum-goerli.yml b/config/graph.arbitrum-goerli.yml index 73021f042..2025181f1 100644 --- a/config/graph.arbitrum-goerli.yml +++ b/config/graph.arbitrum-goerli.yml @@ -45,6 +45,8 @@ contracts: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" EpochManager: proxy: true init: @@ -53,7 +55,7 @@ contracts: L2GraphToken: proxy: true init: - governor: "${{Env.deployer}}" + owner: "${{Env.deployer}}" calls: - fn: "addMinter" minter: "${{RewardsManager.address}}" @@ -69,6 +71,8 @@ contracts: reserveRatio: 500000 # in parts per million curationTaxPercentage: 10000 # in parts per million minimumCurationDeposit: "1000000000000000000" # in wei + calls: + - fn: "syncAllContracts" DisputeManager: proxy: true init: @@ -78,6 +82,8 @@ contracts: fishermanRewardPercentage: 500000 # in parts per million idxSlashingPercentage: 25000 # in parts per million qrySlashingPercentage: 25000 # in parts per million + calls: + - fn: "syncAllContracts" GNS: proxy: true init: @@ -86,6 +92,7 @@ contracts: subgraphNFT: "${{SubgraphNFT.address}}" calls: - fn: "approveAll" + - fn: "syncAllContracts" SubgraphNFT: init: governor: "${{Env.deployer}}" @@ -119,6 +126,7 @@ contracts: - fn: "setAssetHolder" assetHolder: "${{AllocationExchange.address}}" allowed: true + - fn: "syncAllContracts" RewardsManager: proxy: true init: @@ -126,6 +134,7 @@ contracts: calls: - fn: "setSubgraphAvailabilityOracle" subgraphAvailabilityOracle: *availabilityOracle + - fn: "syncAllContracts" AllocationExchange: init: graphToken: "${{L2GraphToken.address}}" @@ -138,3 +147,5 @@ contracts: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" diff --git a/config/graph.arbitrum-localhost.yml b/config/graph.arbitrum-localhost.yml index 2e185a14a..e929b81ee 100644 --- a/config/graph.arbitrum-localhost.yml +++ b/config/graph.arbitrum-localhost.yml @@ -45,6 +45,8 @@ contracts: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" EpochManager: proxy: true init: @@ -69,6 +71,8 @@ contracts: reserveRatio: 500000 # in parts per million curationTaxPercentage: 10000 # in parts per million minimumCurationDeposit: "1000000000000000000" # in wei + calls: + - fn: "syncAllContracts" DisputeManager: proxy: true init: @@ -78,6 +82,8 @@ contracts: fishermanRewardPercentage: 500000 # in parts per million idxSlashingPercentage: 25000 # in parts per million qrySlashingPercentage: 25000 # in parts per million + calls: + - fn: "syncAllContracts" GNS: proxy: true init: @@ -86,6 +92,7 @@ contracts: subgraphNFT: "${{SubgraphNFT.address}}" calls: - fn: "approveAll" + - fn: "syncAllContracts" SubgraphNFT: init: governor: "${{Env.deployer}}" @@ -119,6 +126,7 @@ contracts: - fn: "setAssetHolder" assetHolder: "${{AllocationExchange.address}}" allowed: true + - fn: "syncAllContracts" RewardsManager: proxy: true init: @@ -126,6 +134,7 @@ contracts: calls: - fn: "setSubgraphAvailabilityOracle" subgraphAvailabilityOracle: *availabilityOracle + - fn: "syncAllContracts" AllocationExchange: init: graphToken: "${{L2GraphToken.address}}" @@ -138,3 +147,5 @@ contracts: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" diff --git a/config/graph.arbitrum-one.yml b/config/graph.arbitrum-one.yml index 8fb876d8f..2708b7254 100644 --- a/config/graph.arbitrum-one.yml +++ b/config/graph.arbitrum-one.yml @@ -45,6 +45,8 @@ contracts: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" EpochManager: proxy: true init: @@ -69,6 +71,8 @@ contracts: reserveRatio: 500000 # in parts per million curationTaxPercentage: 10000 # in parts per million minimumCurationDeposit: "1000000000000000000" # in wei + calls: + - fn: "syncAllContracts" DisputeManager: proxy: true init: @@ -78,6 +82,8 @@ contracts: fishermanRewardPercentage: 500000 # in parts per million idxSlashingPercentage: 25000 # in parts per million qrySlashingPercentage: 25000 # in parts per million + calls: + - fn: "syncAllContracts" GNS: proxy: true init: @@ -86,6 +92,7 @@ contracts: subgraphNFT: "${{SubgraphNFT.address}}" calls: - fn: "approveAll" + - fn: "syncAllContracts" SubgraphNFT: init: governor: "${{Env.deployer}}" @@ -119,6 +126,7 @@ contracts: - fn: "setAssetHolder" assetHolder: "${{AllocationExchange.address}}" allowed: true + - fn: "syncAllContracts" RewardsManager: proxy: true init: @@ -126,6 +134,7 @@ contracts: calls: - fn: "setSubgraphAvailabilityOracle" subgraphAvailabilityOracle: *availabilityOracle + - fn: "syncAllContracts" AllocationExchange: init: graphToken: "${{L2GraphToken.address}}" @@ -138,3 +147,5 @@ contracts: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" diff --git a/config/graph.goerli.yml b/config/graph.goerli.yml index d24e3c23d..05a53e058 100644 --- a/config/graph.goerli.yml +++ b/config/graph.goerli.yml @@ -45,6 +45,8 @@ contracts: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" EpochManager: proxy: true init: @@ -68,6 +70,8 @@ contracts: reserveRatio: 500000 # in parts per million curationTaxPercentage: 10000 # in parts per million minimumCurationDeposit: "1000000000000000000" # in wei + calls: + - fn: "syncAllContracts" DisputeManager: proxy: true init: @@ -77,6 +81,8 @@ contracts: fishermanRewardPercentage: 500000 # in parts per million idxSlashingPercentage: 25000 # in parts per million qrySlashingPercentage: 25000 # in parts per million + calls: + - fn: "syncAllContracts" GNS: proxy: true init: @@ -85,6 +91,7 @@ contracts: subgraphNFT: "${{SubgraphNFT.address}}" calls: - fn: "approveAll" + - fn: "syncAllContracts" SubgraphNFT: init: governor: "${{Env.deployer}}" @@ -118,6 +125,7 @@ contracts: - fn: "setAssetHolder" assetHolder: "${{AllocationExchange.address}}" allowed: true + - fn: "syncAllContracts" RewardsManager: proxy: true init: @@ -127,6 +135,7 @@ contracts: issuanceRate: "1000000012184945188" # per block increase of total supply, blocks in a year = 365*60*60*24/13 - fn: "setSubgraphAvailabilityOracle" subgraphAvailabilityOracle: *availabilityOracle + - fn: "syncAllContracts" AllocationExchange: init: graphToken: "${{GraphToken.address}}" @@ -139,7 +148,11 @@ contracts: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" BridgeEscrow: proxy: true init: - controller: "${{Controller.address}}" \ No newline at end of file + controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" diff --git a/config/graph.localhost.yml b/config/graph.localhost.yml index d6268c269..1fd885fb7 100644 --- a/config/graph.localhost.yml +++ b/config/graph.localhost.yml @@ -45,6 +45,8 @@ contracts: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" EpochManager: proxy: true init: @@ -68,6 +70,8 @@ contracts: reserveRatio: 500000 # in parts per million curationTaxPercentage: 10000 # in parts per million minimumCurationDeposit: "1000000000000000000" # in wei + calls: + - fn: "syncAllContracts" DisputeManager: proxy: true init: @@ -77,6 +81,8 @@ contracts: fishermanRewardPercentage: 500000 # in parts per million idxSlashingPercentage: 25000 # in parts per million qrySlashingPercentage: 25000 # in parts per million + calls: + - fn: "syncAllContracts" GNS: proxy: true init: @@ -85,6 +91,7 @@ contracts: subgraphNFT: "${{SubgraphNFT.address}}" calls: - fn: "approveAll" + - fn: "syncAllContracts" SubgraphNFT: init: governor: "${{Env.deployer}}" @@ -118,6 +125,7 @@ contracts: - fn: "setAssetHolder" assetHolder: "${{AllocationExchange.address}}" allowed: true + - fn: "syncAllContracts" RewardsManager: proxy: true init: @@ -127,6 +135,7 @@ contracts: issuanceRate: "1000000012184945188" # per block increase of total supply, blocks in a year = 365*60*60*24/13 - fn: "setSubgraphAvailabilityOracle" subgraphAvailabilityOracle: *availabilityOracle + - fn: "syncAllContracts" AllocationExchange: init: graphToken: "${{GraphToken.address}}" @@ -139,7 +148,11 @@ contracts: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" BridgeEscrow: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" diff --git a/config/graph.mainnet.yml b/config/graph.mainnet.yml index 88e32d38b..36b3669de 100644 --- a/config/graph.mainnet.yml +++ b/config/graph.mainnet.yml @@ -45,6 +45,8 @@ contracts: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" EpochManager: proxy: true init: @@ -68,6 +70,8 @@ contracts: reserveRatio: 500000 # in parts per million curationTaxPercentage: 10000 # in parts per million minimumCurationDeposit: "1000000000000000000" # in wei + calls: + - fn: "syncAllContracts" DisputeManager: proxy: true init: @@ -77,6 +81,8 @@ contracts: fishermanRewardPercentage: 500000 # in parts per million idxSlashingPercentage: 25000 # in parts per million qrySlashingPercentage: 25000 # in parts per million + calls: + - fn: "syncAllContracts" GNS: proxy: true init: @@ -85,6 +91,7 @@ contracts: subgraphNFT: "${{SubgraphNFT.address}}" calls: - fn: "approveAll" + - fn: "syncAllContracts" SubgraphNFT: init: governor: "${{Env.deployer}}" @@ -118,6 +125,7 @@ contracts: - fn: "setAssetHolder" assetHolder: "${{AllocationExchange.address}}" allowed: true + - fn: "syncAllContracts" RewardsManager: proxy: true init: @@ -127,6 +135,7 @@ contracts: issuanceRate: "1000000012184945188" # per block increase of total supply, blocks in a year = 365*60*60*24/13 - fn: "setSubgraphAvailabilityOracle" subgraphAvailabilityOracle: *availabilityOracle + - fn: "syncAllContracts" AllocationExchange: init: graphToken: "${{GraphToken.address}}" @@ -139,7 +148,11 @@ contracts: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" BridgeEscrow: proxy: true init: controller: "${{Controller.address}}" + calls: + - fn: "syncAllContracts" From 41683ec72275123662b028a0259ef28977c70b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Carranza=20V=C3=A9lez?= Date: Thu, 11 Aug 2022 16:26:04 +0200 Subject: [PATCH 2/4] chore: set gateway pause guardians in config, remove addMinter in fixtures --- config/graph.arbitrum-goerli.yml | 2 ++ config/graph.arbitrum-localhost.yml | 2 ++ config/graph.arbitrum-one.yml | 2 ++ config/graph.goerli.yml | 2 ++ config/graph.localhost.yml | 2 ++ config/graph.mainnet.yml | 2 ++ test/lib/fixtures.ts | 4 +++- 7 files changed, 15 insertions(+), 1 deletion(-) diff --git a/config/graph.arbitrum-goerli.yml b/config/graph.arbitrum-goerli.yml index 2025181f1..68a656a31 100644 --- a/config/graph.arbitrum-goerli.yml +++ b/config/graph.arbitrum-goerli.yml @@ -149,3 +149,5 @@ contracts: controller: "${{Controller.address}}" calls: - fn: "syncAllContracts" + - fn: "setPauseGuardian" + pauseGuardian: *pauseGuardian diff --git a/config/graph.arbitrum-localhost.yml b/config/graph.arbitrum-localhost.yml index e929b81ee..da29ab4b6 100644 --- a/config/graph.arbitrum-localhost.yml +++ b/config/graph.arbitrum-localhost.yml @@ -149,3 +149,5 @@ contracts: controller: "${{Controller.address}}" calls: - fn: "syncAllContracts" + - fn: "setPauseGuardian" + pauseGuardian: *pauseGuardian diff --git a/config/graph.arbitrum-one.yml b/config/graph.arbitrum-one.yml index 2708b7254..1b33edacc 100644 --- a/config/graph.arbitrum-one.yml +++ b/config/graph.arbitrum-one.yml @@ -149,3 +149,5 @@ contracts: controller: "${{Controller.address}}" calls: - fn: "syncAllContracts" + - fn: "setPauseGuardian" + pauseGuardian: *pauseGuardian diff --git a/config/graph.goerli.yml b/config/graph.goerli.yml index 05a53e058..b4b735b4e 100644 --- a/config/graph.goerli.yml +++ b/config/graph.goerli.yml @@ -150,6 +150,8 @@ contracts: controller: "${{Controller.address}}" calls: - fn: "syncAllContracts" + - fn: "setPauseGuardian" + pauseGuardian: *pauseGuardian BridgeEscrow: proxy: true init: diff --git a/config/graph.localhost.yml b/config/graph.localhost.yml index 1fd885fb7..4a90dfd20 100644 --- a/config/graph.localhost.yml +++ b/config/graph.localhost.yml @@ -150,6 +150,8 @@ contracts: controller: "${{Controller.address}}" calls: - fn: "syncAllContracts" + - fn: "setPauseGuardian" + pauseGuardian: *pauseGuardian BridgeEscrow: proxy: true init: diff --git a/config/graph.mainnet.yml b/config/graph.mainnet.yml index 36b3669de..6eb08b233 100644 --- a/config/graph.mainnet.yml +++ b/config/graph.mainnet.yml @@ -150,6 +150,8 @@ contracts: controller: "${{Controller.address}}" calls: - fn: "syncAllContracts" + - fn: "setPauseGuardian" + pauseGuardian: *pauseGuardian BridgeEscrow: proxy: true init: diff --git a/test/lib/fixtures.ts b/test/lib/fixtures.ts index ae6832938..8375a86a4 100644 --- a/test/lib/fixtures.ts +++ b/test/lib/fixtures.ts @@ -159,7 +159,9 @@ export class NetworkFixture { await staking.connect(deployer).setSlasher(slasherAddress, true) await gns.connect(deployer).approveAll() - await grt.connect(deployer).addMinter(rewardsManager.address) + if (!isL2) { + await grt.connect(deployer).addMinter(rewardsManager.address) + } // Unpause the protocol await controller.connect(deployer).setPaused(false) From bd35a9ba074401269a8f9251db7f2995373bae6a Mon Sep 17 00:00:00 2001 From: Pablo Carranza Velez Date: Fri, 23 Sep 2022 13:09:45 -0300 Subject: [PATCH 3/4] fix(config): param name in L2GraphToken initializer --- config/graph.arbitrum-localhost.yml | 2 +- config/graph.arbitrum-one.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/graph.arbitrum-localhost.yml b/config/graph.arbitrum-localhost.yml index da29ab4b6..c58aabf44 100644 --- a/config/graph.arbitrum-localhost.yml +++ b/config/graph.arbitrum-localhost.yml @@ -55,7 +55,7 @@ contracts: L2GraphToken: proxy: true init: - governor: "${{Env.deployer}}" + owner: "${{Env.deployer}}" calls: - fn: "addMinter" minter: "${{RewardsManager.address}}" diff --git a/config/graph.arbitrum-one.yml b/config/graph.arbitrum-one.yml index 1b33edacc..9588d5f32 100644 --- a/config/graph.arbitrum-one.yml +++ b/config/graph.arbitrum-one.yml @@ -55,7 +55,7 @@ contracts: L2GraphToken: proxy: true init: - governor: "${{Env.deployer}}" + owner: "${{Env.deployer}}" calls: - fn: "addMinter" minter: "${{RewardsManager.address}}" From 80ef55a578c33161a8d54394b13d56962e9d356d Mon Sep 17 00:00:00 2001 From: Pablo Carranza Velez Date: Fri, 23 Sep 2022 13:26:53 -0300 Subject: [PATCH 4/4] fix: no minters for L2GraphToken yet --- config/graph.arbitrum-goerli.yml | 2 -- config/graph.arbitrum-localhost.yml | 2 -- config/graph.arbitrum-one.yml | 2 -- 3 files changed, 6 deletions(-) diff --git a/config/graph.arbitrum-goerli.yml b/config/graph.arbitrum-goerli.yml index 68a656a31..fa1a66ad3 100644 --- a/config/graph.arbitrum-goerli.yml +++ b/config/graph.arbitrum-goerli.yml @@ -57,8 +57,6 @@ contracts: init: owner: "${{Env.deployer}}" calls: - - fn: "addMinter" - minter: "${{RewardsManager.address}}" - fn: "renounceMinter" - fn: "transferOwnership" owner: *governor diff --git a/config/graph.arbitrum-localhost.yml b/config/graph.arbitrum-localhost.yml index c58aabf44..1061044be 100644 --- a/config/graph.arbitrum-localhost.yml +++ b/config/graph.arbitrum-localhost.yml @@ -57,8 +57,6 @@ contracts: init: owner: "${{Env.deployer}}" calls: - - fn: "addMinter" - minter: "${{RewardsManager.address}}" - fn: "renounceMinter" - fn: "transferOwnership" owner: *governor diff --git a/config/graph.arbitrum-one.yml b/config/graph.arbitrum-one.yml index 9588d5f32..e68d67521 100644 --- a/config/graph.arbitrum-one.yml +++ b/config/graph.arbitrum-one.yml @@ -57,8 +57,6 @@ contracts: init: owner: "${{Env.deployer}}" calls: - - fn: "addMinter" - minter: "${{RewardsManager.address}}" - fn: "renounceMinter" - fn: "transferOwnership" owner: *governor