|
|
@ -24,11 +24,19 @@ export class HelloWorldApp< |
|
|
|
const sender = this.getContracts(from).router; |
|
|
|
const sender = this.getContracts(from).router; |
|
|
|
const toDomain = ChainNameToDomainId[to]; |
|
|
|
const toDomain = ChainNameToDomainId[to]; |
|
|
|
const chainConnection = this.multiProvider.getChainConnection(from); |
|
|
|
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, |
|
|
|
toDomain, |
|
|
|
message, |
|
|
|
message, |
|
|
|
chainConnection.overrides, |
|
|
|
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); |
|
|
|
const receipt = await tx.wait(chainConnection.confirmations); |
|
|
|
|
|
|
|
|
|
|
|
if (receiveHandler) { |
|
|
|
if (receiveHandler) { |
|
|
|