Skip to content

Commit 1b47e88

Browse files
committed
fix: run scenario1 scripts with increased gasLimit to avoid OOG revert
Signed-off-by: Tomás Migone <[email protected]>
1 parent 04f4b23 commit 1b47e88

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

e2e/scenarios/lib/accounts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const setupAccounts = async (
1313
console.log('Setting up:')
1414
fixture.indexers.map((indexer, i) => console.log(`- indexer${i}: ${indexer.signer.address}`))
1515
console.log(`- subgraphOwner: ${fixture.subgraphOwner.address}`)
16-
fixture.curators.map((curator, i) => console.log(`- indexer${i}: ${curator.signer.address}`))
16+
fixture.curators.map((curator, i) => console.log(`- curator${i}: ${curator.signer.address}`))
1717
console.log('\n')
1818

1919
const beneficiaries: string[] = [

e2e/scenarios/lib/curation.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ export const signal = async (
1515

1616
// Add signal
1717
console.log(`\nAdd ${amount} in signal to subgraphId ${subgraphId}..`)
18-
await sendTransaction(curator, contracts.GNS, 'mintSignal', [subgraphId, amount, 0])
18+
await sendTransaction(curator, contracts.GNS, 'mintSignal', [subgraphId, amount, 0], {
19+
gasLimit: 2000000,
20+
})
1921
}

e2e/scenarios/lib/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const ensureGRTAllowance = async (
1818

1919
if (allowTokens.gt(0)) {
2020
console.log(`\nApproving ${allowTokens} tokens...`)
21-
await sendTransaction(signer, contracts.GraphToken, 'approve', [spender, allowTokens])
21+
await sendTransaction(signer, contracts.GraphToken, 'approve', [spender, amount])
2222
}
2323
}
2424

e2e/scenarios/lib/staking.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ export const allocateFrom = async (
3434
const metadata = ethers.constants.HashZero
3535

3636
console.log(`\nAllocating ${amount} tokens on ${allocationId}...`)
37-
await sendTransaction(indexer, contracts.Staking, 'allocateFrom', [
38-
indexer.address,
39-
subgraphDeploymentID,
40-
amount,
41-
allocationId,
42-
metadata,
43-
proof,
44-
])
37+
await sendTransaction(
38+
indexer,
39+
contracts.Staking,
40+
'allocateFrom',
41+
[indexer.address, subgraphDeploymentID, amount, allocationId, metadata, proof],
42+
{
43+
gasLimit: 2000000,
44+
},
45+
)
4546
}
4647

4748
export const closeAllocation = async (

e2e/scenarios/scenario1.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ async function main() {
5050
for (const curator of fixture.curators) {
5151
for (const subgraph of curator.subgraphs) {
5252
const subgraphData = fixture.subgraphs.find((s) => s.deploymentId === subgraph.deploymentId)
53-
await signal(graph.contracts, curator.signer, subgraphData.subgraphId, subgraph.signal)
53+
if (subgraphData)
54+
await signal(graph.contracts, curator.signer, subgraphData.subgraphId, subgraph.signal)
5455
}
5556
}
5657

0 commit comments

Comments
 (0)