Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove method that's same as base method #1445

Merged
2 changes: 2 additions & 0 deletions .changeset/late-mugs-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
28 changes: 1 addition & 27 deletions packages/script/src/script-invocation-scope.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { FuelError } from '@fuel-ts/errors';
import type { AbstractScript } from '@fuel-ts/interfaces';
import {
ScriptRequest,
assert,
FunctionInvocationScope,
FunctionInvocationResult,
} from '@fuel-ts/program';
import type { InvocationScopeLike } from '@fuel-ts/program';
import { ScriptRequest, FunctionInvocationScope } from '@fuel-ts/program';
import type { Provider } from '@fuel-ts/providers';
import { ByteArrayCoder } from '@fuel-ts/transactions';

Expand Down Expand Up @@ -49,24 +43,4 @@ export class ScriptInvocationScope<
() => [] as unknown as TReturn
);
}

/**
* Submits a script transaction to the blockchain.
*/
async call<T = TReturn>(): Promise<FunctionInvocationResult<T>> {
assert(this.program.account, 'Provider is required!');

const transactionRequest = await this.getTransactionRequest();
const { maxFee } = await this.getTransactionCost();
await this.fundWithRequiredCoins(maxFee);

const response = await this.program.account.sendTransaction(transactionRequest);

return FunctionInvocationResult.build<T>(
this as unknown as InvocationScopeLike,
arboleya marked this conversation as resolved.
Show resolved Hide resolved
response,
false,
this.program
);
}
nedsalk marked this conversation as resolved.
Show resolved Hide resolved
}
Loading