MCPcopy
hub / github.com/subquery/subql / checkTransactionSuccess

Function checkTransactionSuccess

packages/cli/src/controller/network/constants.ts:154–160  ·  view source on GitHub ↗
(transaction: ContractTransaction)

Source from the content-addressed store, hash-verified

152export type DeploymentMetadata = z.infer<typeof deploymentMetadataSchema>;
153
154export async function checkTransactionSuccess(transaction: ContractTransaction): Promise<ContractReceipt> {
155 const receipt = await transaction.wait();
156 if (receipt.status) {
157 return receipt;
158 }
159 throw new Error(`Transaction failed. Hash="${transaction.hash}"`);
160}
161
162export function formatSQT(amount: BigNumberish, places = SQT_DECIMAL, symbol = 'SQT'): string {
163 return `${formatUnits(amount, places).slice(0, 10)} ${symbol}`;

Callers 6

createProjectAdapterFunction · 0.90
createFlexPlanAdapterFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected