Skip to content

Commit

Permalink
update subcribe rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
jiguantong committed Nov 27, 2024
1 parent 73cb625 commit 90c58a7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/commands/oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default class Oracle extends Command {
const signcribeClient = new RelayEVMClient({
chainId: 46,
chainName: 'darwinia',
endpoint: 'http://c1.darwinia-rpc.itering.io:9944/',
endpoint: 'http://g1.darwinia2.darwinia.network:9944',
signer: config.signcribeSigner,
});
const sourceIndex = new OrmpipeIndexer({
Expand Down
24 changes: 14 additions & 10 deletions packages/relay-oracle/src/client/contract_signcribe.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ContractConfig, TransactionResponse} from "@darwinia/ormpipe-common";
import {ethers} from "ethers";
import { ContractConfig, TransactionResponse } from "@darwinia/ormpipe-common";
import { ethers } from "ethers";

const abi = require("../abis/v2/SubAPISignaturePub.json");

Expand Down Expand Up @@ -33,14 +33,18 @@ export class SigncribeContractClient {
}

public async submit(options: SubmitSignscribeOptions): Promise<TransactionResponse | undefined> {
const tx = await this.contract['submit'](
options.chainId,
options.channel,
options.msgIndex,
options.signature,
options.data,
)
return await tx.wait();
try {
const tx = await this.contract['submit'](
options.chainId,
options.channel,
options.msgIndex,
options.signature,
options.data,
)
return await tx.wait();
} catch (error) {
console.error("submit error", error);
}
}

}

0 comments on commit 90c58a7

Please sign in to comment.