Skip to content

Commit

Permalink
Revert "Merge branch 'master' of https://github.com/FuelLabs/fuels-ts
Browse files Browse the repository at this point in the history
…into db/test/refactor-predicate-tests"

This reverts commit ac4271e, reversing
changes made to 09433b7.
  • Loading branch information
danielbate committed Jun 30, 2023
1 parent 73afd55 commit 859e960
Show file tree
Hide file tree
Showing 84 changed files with 377 additions and 1,025 deletions.
11 changes: 0 additions & 11 deletions .changeset/afraid-dodos-protect.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/lucky-ties-dress.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/shy-cooks-yell.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
run: |
pnpm changeset version
echo "BUILD_VERSION=$(sed -nE 's/^\s*"version": "(.*?)",$/\1/p' packages/fuels/package.json)" >> $GITHUB_ENV
echo "FORC_VERSION=$(sed 's/.*"forcVersion": "\(.*\)".*/\1/;t;d' ./packages/forc-bin/package.json)" >> $GITHUB_ENV
echo "FUEL_CORE_VERSION=$(sed 's/.*fuel-core:v\(.*\).*/\1/;t;d' ./.docker/fuel-core/Dockerfile)" >> $GITHUB_ENV
echo "FORC_VERSION=$(cat ./packages/forc/VERSION)" >> $GITHUB_ENV
git reset --hard
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions apps/demo-typegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"author": "Fuel Labs <contact@fuel.sh> (https://fuel.network/)",
"scripts": {
"build": "run-s build:forc build:types",
"build:forc": "pnpm fuels-forc build -p contract",
"build:forc": "pnpm forc build -p contract",
"build:types": "pnpm fuels typegen -i contract/out/debug/demo-contract-abi.json -o src/generated-types"
},
"license": "Apache-2.0",
"dependencies": {
"fuels": "workspace:*"
},
"devDependencies": {
"@fuel-ts/forc": "workspace:*",
"forc-bin": "workspace:*",
"@fuel-ts/wallet": "workspace:*"
},
"version": null
Expand Down
2 changes: 1 addition & 1 deletion apps/docs-snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"private": true,
"scripts": {
"build": "pnpm fuels-forc build -p projects"
"build": "pnpm forc build -p projects"
},
"devDependencies": {
"fuels": "workspace:*",
Expand Down
1 change: 0 additions & 1 deletion apps/docs-snippets/projects/Forc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ members = [
"echo-employee-data-vector",
"whitelisted-address-predicate",
"echo-evm-address",
"script-transfer-to-contract"
]
1 change: 0 additions & 1 deletion apps/docs-snippets/projects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export enum SnippetProjectEnum {
ECHO_EMPLOYEE_DATA_VECTOR = 'echo-employee-data-vector',
WHITELISTED_ADDRESS_PREDICATE = 'whitelisted-address-predicate',
ECHO_EVM_ADDRESS = 'echo-evm-address',
SCRIPT_TRANSFER_TO_CONTRACT = 'script-transfer-to-contract',
}

export const getSnippetProjectArtifacts = (project: SnippetProjectEnum) =>
Expand Down

This file was deleted.

This file was deleted.

106 changes: 0 additions & 106 deletions apps/docs-snippets/src/guide/scripts/script-custom-transaction.test.ts

This file was deleted.

11 changes: 3 additions & 8 deletions apps/docs-snippets/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import {
import type { SnippetProjectEnum } from '../projects';
import { getSnippetProjectArtifacts } from '../projects';

export const getTestWallet = async (seedQuantities?: CoinQuantityLike[]) => {
export const getTestWallet = async () => {
// create a provider using the Fuel network URL
const provider = new Provider(FUEL_NETWORK_URL);

// instantiate the genesis wallet with its secret key
const genesisWallet = new WalletUnlocked(process.env.GENESIS_SECRET || '0x01', provider);

// define the quantity of assets to transfer to the test wallet
const quantities: CoinQuantityLike[] = seedQuantities || [
const quantities: CoinQuantityLike[] = [
{
amount: 1_000_000,
assetId: NativeAssetId,
Expand All @@ -41,7 +41,7 @@ export const getTestWallet = async (seedQuantities?: CoinQuantityLike[]) => {
});

// add the UTXO inputs to the transaction request
request.addResourceInputsAndOutputs(resources);
request.addResources(resources);

// add the transaction outputs (coins to be sent to the test wallet)
quantities
Expand All @@ -68,8 +68,3 @@ export const createAndDeployContractFromProject = async (

return contractFactory.deployContract();
};

export const defaultTxParams = {
gasLimit: 10000,
gasPrice: 1,
};
4 changes: 0 additions & 4 deletions apps/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,6 @@ export default defineConfig({
link: '/guide/cookbook/',
collapsed: true,
items: [
{
text: 'Custom Transactions',
link: '/guide/cookbook/custom-transactions',
},
{
text: 'Deposit And Withdraw',
link: '/guide/cookbook/deposit-and-withdraw',
Expand Down
11 changes: 0 additions & 11 deletions apps/docs/src/guide/cookbook/custom-transactions.md

This file was deleted.

13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,18 @@
"@changesets/cli": "^2.25.0",
"@changesets/get-github-info": "^0.5.2",
"@ethersproject/bytes": "^5.7.0",
"@fuel-ts/forc": "workspace:*",
"@fuel-ts/fuel-core": "workspace:*",
"@internal/tsup": "workspace:*",
"@jest/types": "^29.5.0",
"@types/jest": "^29.5.0",
"@types/node-fetch": "^2.6.2",
"@types/node": "18.15.3",
"@types/node-fetch": "^2.6.2",
"@types/shelljs": "^0.8.11",
"@types/web": "^0.0.65",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"conventional-changelog-angular": "^5.0.13",
"dotenv": "^9.0.2",
"eslint": "^8.26.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^16.2.0",
"eslint-config-prettier": "^8.5.0",
Expand All @@ -74,22 +73,22 @@
"eslint-plugin-jsdoc": "^37.9.7",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint": "^8.26.0",
"ethers": "^5.7.2",
"forc-bin": "workspace:*",
"glob": "^10.2.6",
"husky": "^8.0.3",
"jest-text-transformer": "^1.0.4",
"jest": "^29.5.0",
"jest-text-transformer": "^1.0.4",
"nodemon": "^2.0.22",
"npm-run-all": "^4.1.5",
"open": "^8.4.0",
"prettier": "^2.8.8",
"shelljs": "^0.8.5",
"textlint-rule-no-dead-link": "^5.1.2",
"textlint": "^13.3.2",
"textlint-rule-no-dead-link": "^5.1.2",
"ts-generator": "^0.1.1",
"ts-jest": "^29.0.3",
"tsup": "^6.7.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/abi-typegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"dist"
],
"scripts": {
"pretest": "pnpm fuels-forc build -p test/fixtures/forc-projects",
"pretest": "pnpm forc build -p test/fixtures/forc-projects",
"build": "tsup",
"postbuild": "tsx ../../scripts/postbuild.ts"
},
Expand All @@ -62,6 +62,6 @@
"@types/lodash.upperfirst": "^4.3.7",
"@types/mkdirp": "^1.0.2",
"@types/rimraf": "^3.0.2",
"@fuel-ts/forc": "workspace:*"
"forc-bin": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/contract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"@fuel-ts/wallet": "workspace:*"
},
"devDependencies": {
"@fuel-ts/forc": "workspace:*"
"forc-bin": "workspace:*"
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

### Patch Changes

- [#597](https://github.com/FuelLabs/fuels-ts/pull/597) [`f65e79a`](https://github.com/FuelLabs/fuels-ts/commit/f65e79af3f68bd02159c3fe47ab5acf1f680196a) Thanks [@arboleya](https://github.com/arboleya)! - Removing residual trailing coma from `forc` shared script
- [#597](https://github.com/FuelLabs/fuels-ts/pull/597) [`f65e79a`](https://github.com/FuelLabs/fuels-ts/commit/f65e79af3f68bd02159c3fe47ab5acf1f680196a) Thanks [@arboleya](https://github.com/arboleya)! - Removing residual trailing coma from `forc-bin` shared script

## 0.26.2

Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions packages/forc-bin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# forc-bin

> Binary wrapper for [Forc](https://github.com/FuelLabs/sway)
File renamed without changes.
Binary file removed packages/forc-bin/forc-binaries/forc
Binary file not shown.
Binary file removed packages/forc-bin/forc-binaries/forc-deploy
Binary file not shown.
Binary file removed packages/forc-bin/forc-binaries/forc-doc
Binary file not shown.
Binary file removed packages/forc-bin/forc-binaries/forc-fmt
Binary file not shown.
Binary file removed packages/forc-bin/forc-binaries/forc-lsp
Binary file not shown.
Binary file removed packages/forc-bin/forc-binaries/forc-run
Binary file not shown.
Binary file removed packages/forc-bin/forc-binaries/forc-submit
Binary file not shown.
Binary file removed packages/forc-bin/forc-binaries/forc-tx
Binary file not shown.
File renamed without changes.
5 changes: 3 additions & 2 deletions packages/forc/package.json → packages/forc-bin/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@fuel-ts/forc",
"private": true,
"name": "forc-bin",
"version": "0.31.0",
"description": "",
"author": "Fuel Labs <contact@fuel.sh> (https://fuel.network/)",
Expand All @@ -15,7 +16,7 @@
"update": "node ./dist/update.js && node ./dist/install.js"
},
"bin": {
"fuels-forc": "./forc.js"
"forc": "./forc.js"
},
"dependencies": {
"node-fetch": "^2.6.7",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 3 additions & 10 deletions packages/forc/src/shared.ts → packages/forc-bin/src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,9 @@ const swayRepoUrl = 'https://github.com/fuellabs/sway.git';
export const buildFromGitBranch = (branchName: string) => {
sh.exec('rm -rf sway-repo');
sh.exec('rm -rf forc-binaries');
sh.exec(`git clone --branch ${branchName} ${swayRepoUrl} sway-repo`);
sh.exec(`cd sway-repo && cargo build`);
sh.exec(`git clone --branch ${branchName} ${swayRepoUrl} sway-repo`, { silent: true });
sh.exec(`cd sway-repo && cargo build`, { silent: true });
sh.exec('mkdir forc-binaries');
sh.exec('cp sway-repo/target/debug/forc forc-binaries/');
sh.exec('cp sway-repo/target/debug/forc-deploy forc-binaries/');
sh.exec('cp sway-repo/target/debug/forc-doc forc-binaries/');
sh.exec('cp sway-repo/target/debug/forc-fmt forc-binaries/');
sh.exec('cp sway-repo/target/debug/forc-lsp forc-binaries/');
sh.exec('cp sway-repo/target/debug/forc-run forc-binaries/');
sh.exec('cp sway-repo/target/debug/forc-submit forc-binaries/');
sh.exec('cp sway-repo/target/debug/forc-tx forc-binaries/');
sh.exec('cp sway-repo/target/debug/forc forc-binaries/forc');
sh.exec(`rm -rf sway-repo`);
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 859e960

Please sign in to comment.