Skip to content

Commit

Permalink
fix(sdk): add gasLimit margin in allocateFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
pcarranzav committed Jan 11, 2024
1 parent d06050c commit 8d92009
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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
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 8d92009

Please sign in to comment.