Skip to content

Commit

Permalink
Merge pull request #910 from graphprotocol/pcv/graphgovernance-cleanup
Browse files Browse the repository at this point in the history
fix: remove remaining usage of the removed GraphGovernance contract
  • Loading branch information
pcarranzav authored Jan 11, 2024
2 parents 23ad89c + 8d92009 commit 4827631
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 129 deletions.
121 changes: 0 additions & 121 deletions packages/contracts/cli/commands/contracts/governance.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/contracts/cli/commands/contracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { gnsCommand } from './gns'
import { graphTokenCommand } from './graphToken'
import { stakingCommand } from './staking'
import { anyCommand } from './any'
import { governanceCommand } from './governance'

import { disputeManagerCommand } from './disputeManager'

Expand All @@ -24,7 +23,6 @@ export const contractsCommand = {
.command(stakingCommand)
.command(anyCommand)
.command(disputeManagerCommand)
.command(governanceCommand)
},
handler: (): void => {
yargs.showHelp()
Expand Down
2 changes: 0 additions & 2 deletions packages/contracts/cli/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { GraphToken } from '../build/types/GraphToken'
import { Controller } from '../build/types/Controller'
import { BancorFormula } from '../build/types/BancorFormula'
import { IENS } from '../build/types/IENS'
import { GraphGovernance } from '../build/types/GraphGovernance'
import { AllocationExchange } from '../build/types/AllocationExchange'
import { SubgraphNFT } from '../build/types/SubgraphNFT'
import { GraphCurationToken } from '../build/types/GraphCurationToken'
Expand Down Expand Up @@ -60,7 +59,6 @@ export interface NetworkContracts {
Controller: Controller
BancorFormula: BancorFormula
IENS: IENS
GraphGovernance: GraphGovernance
AllocationExchange: AllocationExchange
SubgraphNFT: SubgraphNFT
SubgraphNFTDescriptor: SubgraphNFTDescriptor
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/e2e/scenarios/open-allocations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Open allocations', () => {
})

describe('Allocations', () => {
it(`allocatons should be open`, async function () {
it(`allocations should be open`, async function () {
const allocations = indexerFixtures.map((i) => i.allocations).flat()
for (const allocation of allocations) {
const state = await Staking.getAllocationState(allocation.signer.address)
Expand Down
3 changes: 1 addition & 2 deletions packages/contracts/scripts/clean
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ echo "Cleaning flattened contracts..."

FLATTENED_FILES=(
"$OUT_DIR/Controller.sol"
"$OUT_DIR/GraphGovernance.sol"
"$OUT_DIR/GNS.sol"
"$OUT_DIR/ServiceRegistry.sol"
"$OUT_DIR/Curation.sol"
Expand All @@ -27,4 +26,4 @@ for path in ${FLATTENED_FILES[@]}; do
-e "s|// SPDX-License-Identifier:.*||g" \
-e 's|pragma abicoder v2;|//pragma abicoder v2;|g' \
-e '1s|^|pragma abicoder v2;\n|' $path
done
done
1 change: 0 additions & 1 deletion packages/contracts/scripts/flatten
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ echo "Flattening contracts..."

FILES=(
"contracts/governance/Controller.sol"
"contracts/governance/GraphGovernance.sol"
"contracts/discovery/GNS.sol"
"contracts/discovery/ServiceRegistry.sol"
"contracts/curation/Curation.sol"
Expand Down
5 changes: 5 additions & 0 deletions packages/sdk/src/deployments/network/actions/staking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,18 @@ export const allocateFrom: GraphNetworkAction<{
const metadata = ethers.constants.HashZero

console.log(`\nAllocating ${amount} tokens on ${allocationId}...`)
let extraArgs: ethers.Overrides = {}
if (process.env.CI) {
extraArgs.gasLimit = BigNumber.from('400000')
}
const tx = await contracts.Staking.connect(indexer).allocateFrom(
indexer.address,
subgraphDeploymentID,
amount,
allocationId,
metadata,
proof,
extraArgs
)
await tx.wait()
}
Expand Down

0 comments on commit 4827631

Please sign in to comment.