Remove gas payments from kathy (#840)

pull/842/head
Asa Oines 2 years ago committed by GitHub
parent a4e7cb1d43
commit b33870cfac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      typescript/helloworld/src/app/app.ts
  2. 10
      typescript/infra/scripts/helloworld/kathy.ts

@ -1,4 +1,4 @@
import { BigNumber, ethers } from 'ethers'; import { ethers } from 'ethers';
import { TypedListener } from '@abacus-network/core/dist/common'; import { TypedListener } from '@abacus-network/core/dist/common';
import { import {
@ -19,7 +19,6 @@ export class HelloWorldApp<
from: From, from: From,
to: Remotes<Chain, From>, to: Remotes<Chain, From>,
message: string, message: string,
value: BigNumber,
receiveHandler?: TypedListener<ReceivedHelloWorldEvent>, receiveHandler?: TypedListener<ReceivedHelloWorldEvent>,
): Promise<ethers.ContractReceipt> { ): Promise<ethers.ContractReceipt> {
const sender = this.getContracts(from).router; const sender = this.getContracts(from).router;
@ -37,7 +36,6 @@ export class HelloWorldApp<
const tx = await sender.sendHelloWorld(toDomain, message, { const tx = await sender.sendHelloWorld(toDomain, message, {
...chainConnection.overrides, ...chainConnection.overrides,
gasLimit, gasLimit,
value,
}); });
const receipt = await tx.wait(chainConnection.confirmations); const receipt = await tx.wait(chainConnection.confirmations);

@ -106,16 +106,8 @@ async function sendMessage(
gasCalc: InterchainGasCalculator<any>, gasCalc: InterchainGasCalculator<any>,
) { ) {
const msg = 'Hello!'; const msg = 'Hello!';
const expected = {
origin,
destination,
sender: app.getContracts(origin).router.address,
recipient: app.getContracts(destination).router.address,
body: msg,
};
const value = await gasCalc.estimatePaymentForMessage(expected);
console.log(`Sending message from ${origin} to ${destination}`); console.log(`Sending message from ${origin} to ${destination}`);
const receipt = await app.sendHelloWorld(origin, destination, msg, value); const receipt = await app.sendHelloWorld(origin, destination, msg);
console.log(JSON.stringify(receipt.events || receipt.logs)); console.log(JSON.stringify(receipt.events || receipt.logs));
} }

Loading…
Cancel
Save