diff --git a/typescript/helloworld/src/app/app.ts b/typescript/helloworld/src/app/app.ts index 8833370a7..cec079b31 100644 --- a/typescript/helloworld/src/app/app.ts +++ b/typescript/helloworld/src/app/app.ts @@ -24,11 +24,19 @@ export class HelloWorldApp< const sender = this.getContracts(from).router; const toDomain = ChainNameToDomainId[to]; const chainConnection = this.multiProvider.getChainConnection(from); - const tx = await sender.sendHelloWorld( + + // apply gas buffer due to https://github.com/abacus-network/abacus-monorepo/issues/634 + const estimated = await sender.estimateGas.sendHelloWorld( toDomain, message, chainConnection.overrides, ); + const gasLimit = estimated.mul(1.1).toNumber(); + + const tx = await sender.sendHelloWorld(toDomain, message, { + ...chainConnection.overrides, + gasLimit, + }); const receipt = await tx.wait(chainConnection.confirmations); if (receiveHandler) {