Skip to content

Commit 25624e0

Browse files
committed
chore: roll back fn name change encode to generate
Signed-off-by: Tomás Migone <[email protected]>
1 parent 88b0527 commit 25624e0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/horizon/tasks/test/seed.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { encodeLegacyAllocationProof, randomAllocationMetadata } from '@graphprotocol/toolshed'
1+
import { generateLegacyAllocationProof, randomAllocationMetadata } from '@graphprotocol/toolshed'
22
import { requireLocalNetwork, setGRTBalance } from '@graphprotocol/toolshed/hardhat'
33
import { delegators } from './fixtures/delegators'
44
import { indexers } from './fixtures/indexers'
@@ -73,7 +73,7 @@ task('test:seed', 'Sets up some protocol state for testing')
7373
allocation.tokens,
7474
allocation.allocationID,
7575
randomAllocationMetadata(),
76-
await encodeLegacyAllocationProof(indexer.address, allocation.allocationPrivateKey),
76+
await generateLegacyAllocationProof(indexer.address, allocation.allocationPrivateKey),
7777
)
7878
}
7979
}

packages/toolshed/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The package is organized into several modules that can be imported separately:
2121

2222
```typescript
2323
// Import core functionality
24-
import { encodeAllocationProof } from '@graphprotocol/toolshed';
24+
import { generateAllocationProof } from '@graphprotocol/toolshed';
2525

2626
// Import deployment
2727
import { loadGraphHorizon } from '@graphprotocol/toolshed/deployments/horizon';

packages/toolshed/src/core/allocation.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ethers, id } from 'ethers'
22
import { randomHexBytes } from '../lib/bytes'
33

44
// For legacy allocations in the staking contract
5-
export async function encodeLegacyAllocationProof(indexerAddress: string, allocationPrivateKey: string) {
5+
export async function generateLegacyAllocationProof(indexerAddress: string, allocationPrivateKey: string) {
66
const wallet = new ethers.Wallet(allocationPrivateKey)
77
const messageHash = ethers.solidityPackedKeccak256(
88
['address', 'address'],
@@ -22,7 +22,7 @@ export const EIP712_ALLOCATION_ID_PROOF_TYPES = {
2222
}
2323

2424
// For new allocations in the subgraph service
25-
export async function encodeAllocationProof(
25+
export async function generateAllocationProof(
2626
indexerAddress: string,
2727
allocationPrivateKey: string,
2828
subgraphServiceAddress: string,

0 commit comments

Comments
 (0)