Skip to content

Commit

Permalink
fix: wait for receipt during setup
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasbrugneaux committed Jul 24, 2024
1 parent 75f107a commit 1085fb2
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions packages/dev-utils/src/chain-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ export async function setCommissionUpdateDelay(
withImpersonatedAccount(web3, DEFAULT_OWNER_ADDRESS, async () => {
const validators = newValidators(web3, validatorsContractAddress)

await validators.methods.setCommissionUpdateDelay(delayInBlocks).send({
from: DEFAULT_OWNER_ADDRESS,
})
const { transactionHash } = await validators.methods
.setCommissionUpdateDelay(delayInBlocks)
.send({
from: DEFAULT_OWNER_ADDRESS,
})
await web3.eth.getTransactionReceipt(transactionHash)
})
}

Expand All @@ -26,9 +29,10 @@ export async function setDequeueFrequency(
withImpersonatedAccount(web3, DEFAULT_OWNER_ADDRESS, async () => {
const governance = newGovernance(web3, governanceContractAddress)

await governance.methods.setDequeueFrequency(frequency).send({
const { transactionHash } = await governance.methods.setDequeueFrequency(frequency).send({
from: DEFAULT_OWNER_ADDRESS,
})
await web3.eth.getTransactionReceipt(transactionHash)
})
}

Expand All @@ -40,8 +44,9 @@ export async function setReferendumStageDuration(
withImpersonatedAccount(web3, DEFAULT_OWNER_ADDRESS, async () => {
const governance = newGovernance(web3, governanceContractAddress)

await governance.methods.setReferendumStageDuration(duration).send({
const { transactionHash } = await governance.methods.setReferendumStageDuration(duration).send({
from: DEFAULT_OWNER_ADDRESS,
})
await web3.eth.getTransactionReceipt(transactionHash)
})
}

0 comments on commit 1085fb2

Please sign in to comment.