Skip to content

Commit 8d92009

Browse files
committed
fix(sdk): add gasLimit margin in allocateFrom
1 parent d06050c commit 8d92009

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/contracts/e2e/scenarios/open-allocations.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('Open allocations', () => {
3535
})
3636

3737
describe('Allocations', () => {
38-
it(`allocatons should be open`, async function () {
38+
it(`allocations should be open`, async function () {
3939
const allocations = indexerFixtures.map((i) => i.allocations).flat()
4040
for (const allocation of allocations) {
4141
const state = await Staking.getAllocationState(allocation.signer.address)

packages/sdk/src/deployments/network/actions/staking.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,18 @@ export const allocateFrom: GraphNetworkAction<{
4848
const metadata = ethers.constants.HashZero
4949

5050
console.log(`\nAllocating ${amount} tokens on ${allocationId}...`)
51+
let extraArgs: ethers.Overrides = {}
52+
if (process.env.CI) {
53+
extraArgs.gasLimit = BigNumber.from('400000')
54+
}
5155
const tx = await contracts.Staking.connect(indexer).allocateFrom(
5256
indexer.address,
5357
subgraphDeploymentID,
5458
amount,
5559
allocationId,
5660
metadata,
5761
proof,
62+
extraArgs
5863
)
5964
await tx.wait()
6065
}

0 commit comments

Comments
 (0)