Skip to content

Commit

Permalink
Merge branch 'db/chore/implement-rc-workflow' of https://github.com/F…
Browse files Browse the repository at this point in the history
…uelLabs/fuels-ts into db/chore/implement-rc-workflow
  • Loading branch information
danielbate committed Dec 15, 2023
2 parents aa93de7 + 02a6120 commit fdb9e68
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .changeset/funny-dolls-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
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,
response,
false,
this.program
);
}
}
7 changes: 4 additions & 3 deletions scripts/release-unpublish.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const exec = require('child_process');
const { compare } = require('compare-versions');
const { readFileSync, readdirSync } = require('fs');
const { join } = require('path');
const { readFileSync, readdirSync } = require('node:fs');
const { join } = require('node:path');
const util = require('node:util');
const exec = util.promisify(require('node:child_process').exec);

const DELETE_TAGS = /next|pr/;
const { version: CURRENT_VERSION } = require('../packages/fuels/package.json');
Expand Down

0 comments on commit fdb9e68

Please sign in to comment.