Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ import {
TxnBuilderTypes,
Types,
} from "aptos";
import { MoveStructTag, EntryFunctionId } from "aptos/src/generated";
import { MoveStructTag, EntryFunctionId, PendingTransaction } from "aptos/src/generated";
import Big from "big.js";
import { OracleJob } from "@switchboard-xyz/common";
import BN from "bn.js";
import * as SHA3 from "js-sha3";

export { OracleJob, IOracleJob } from "@switchboard-xyz/common";


export const SWITCHBOARD_TESTNET_ADDRESS = `0xb27f7bbf7caf2368b08032d005e8beab151a885054cdca55c4cc644f0a308d2b`;

export class AptosDecimal {
Expand Down Expand Up @@ -371,7 +372,7 @@ export async function sendRawAptosTx(
raw_args: Array<any>,
raw_type_args: BCS.Seq<TxnBuilderTypes.TypeTag> = [],
retryCount = 2
): Promise<string> {
): Promise<PendingTransaction> {
// We need to pass a token type to the `transfer` function.

const methodInfo = method.split("::");
Expand Down Expand Up @@ -422,7 +423,7 @@ export async function sendRawAptosTx(

const transactionRes = await client.submitSignedBCSTransaction(bcsTxn);
await client.waitForTransaction(transactionRes.hash);
return transactionRes.hash;
return transactionRes;
}

/**
Expand Down Expand Up @@ -675,7 +676,7 @@ export class AggregatorAccount {
async saveResult(
account: AptosAccount,
params: AggregatorSaveResultParams
): Promise<string> {
): Promise<PendingTransaction> {
const {
mantissa: valueMantissa,
scale: valueScale,
Expand Down