Skip to content

Commit

Permalink
chore: update forc 0.24.3 (#511)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuinnLee committed Sep 15, 2022
1 parent 3665f1f commit 69a102d
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 19 deletions.
8 changes: 8 additions & 0 deletions .changeset/neat-singers-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@fuel-ts/contract": minor
"@fuel-ts/example-contract": minor
"@fuel-ts/predicate": minor
"@fuel-ts/script": minor
---

Update to forc v 0.24.3
12 changes: 6 additions & 6 deletions packages/contract/scripts/build-forc-projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
set -euo pipefail

# scripts/build-multicall.sh
pnpm forc build -p src/__test__/storage-test-contract
pnpm forc build -p src/__test__/call-test-contract
pnpm forc build -p src/__test__/token-test-contract/token_abi
pnpm forc build -p src/__test__/token-test-contract/token_contract
pnpm forc build -p src/__test__/generic-types-contract
pnpm forc build -p src/__test__/coverage-contract
pnpm forc build -p src/__test__/storage-test-contract --generate-logged-types
pnpm forc build -p src/__test__/call-test-contract --generate-logged-types
pnpm forc build -p src/__test__/token-test-contract/token_abi --generate-logged-types
pnpm forc build -p src/__test__/token-test-contract/token_contract --generate-logged-types
pnpm forc build -p src/__test__/generic-types-contract --generate-logged-types
pnpm forc build -p src/__test__/coverage-contract --generate-logged-types
2 changes: 1 addition & 1 deletion packages/contract/scripts/build-multicall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FUELS_DEBUG=${FUELS_DEBUG:-}
SCRIPT_DIR="src/contracts/multicall"
BIN_DIR="$SCRIPT_DIR/out/debug"

pnpm forc build -p $SCRIPT_DIR --print-finalized-asm
pnpm forc build -p $SCRIPT_DIR --print-finalized-asm --generate-logged-types
pnpm exec ts-node scripts/process-multicall.ts
if [[ -n "$FUELS_DEBUG" ]]; then
pnpm forc parse-bytecode "$BIN_DIR/multicall.bin" > "$BIN_DIR/multicall.txt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { join } from 'path';

import { createSetupConfig } from '../test-utils';

import abiJSON from './out/debug/call-test-flat-abi.json';
import abiJSON from './out/debug/call-test-abi.json';

const contractBytecode = readFileSync(join(__dirname, './out/debug/call-test.bin'));

Expand Down
2 changes: 1 addition & 1 deletion packages/contract/src/__test__/contract-factory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('Contract Factory', () => {
);
const abi = JSON.parse(
readFileSync(
join(__dirname, './storage-test-contract/out/debug/storage-test-flat-abi.json')
join(__dirname, './storage-test-contract/out/debug/storage-test-abi.json')
).toString()
);
const factory = new ContractFactory(bytecode, abi, wallet);
Expand Down
2 changes: 1 addition & 1 deletion packages/contract/src/__test__/contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { join } from 'path';

import Contract from '../contracts/contract';

import abiJSON from './call-test-contract/out/debug/call-test-flat-abi.json';
import abiJSON from './call-test-contract/out/debug/call-test-abi.json';
import { createSetupConfig } from './test-utils';

const contractBytecode = readFileSync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { join } from 'path';
import type Contract from '../../contracts/contract';
import ContractFactory from '../../contracts/contract-factory';

import abi from './out/debug/coverage-contract-flat-abi.json';
import abi from './out/debug/coverage-contract-abi.json';

const RUST_U8_MAX = 255;
const RUST_U16_MAX = 65535;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { join } from 'path';

import { setup } from '../test-utils';

import abiJSON from './out/debug/generic-types-contract-flat-abi.json';
import abiJSON from './out/debug/generic-types-contract-abi.json';

const contractBytecode = readFileSync(join(__dirname, './out/debug/generic-types-contract.bin'));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { join } from 'path';
import Contract from '../../contracts/contract';
import ContractFactory from '../../contracts/contract-factory';

import abi from './out/debug/storage-test-flat-abi.json';
import abi from './out/debug/storage-test-abi.json';
import storageSlots from './out/debug/storage-test-storage_slots.json';

const setup = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { join } from 'path';

import ContractFactory from '../../contracts/contract-factory';

import abi from './token_contract/out/debug/token_contract-flat-abi.json';
import abi from './token_contract/out/debug/token_contract-abi.json';

const provider = new Provider('http://127.0.0.1:4000/graphql');

Expand Down
4 changes: 2 additions & 2 deletions packages/example-contract/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ set -euo pipefail
# We run install again to make sure fuelchain CLI is correct setup
# this issue ocorrus becuase the CLI tool is under the same monorepo
pnpm install
pnpm forc build
pnpm exec fuelchain --target=../typechain-target-fuels --out-dir=src/example-contract-types out/debug/example-contract-flat-abi.json
pnpm forc build --generate-logged-types
pnpm exec fuelchain --target=../typechain-target-fuels --out-dir=src/example-contract-types out/debug/example-contract-abi.json
2 changes: 1 addition & 1 deletion packages/forc-bin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "forc-bin",
"version": "0.22.1",
"version": "0.24.3",
"description": "",
"author": "Fuel Labs <contact@fuel.sh> (https://fuel.network/)",
"typedocMain": "src/index.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/predicate/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ do
SCRIPT_DIR="src/$i"
BIN_DIR="$SCRIPT_DIR/out/debug"

forc build -p $SCRIPT_DIR --print-finalized-asm
forc build -p $SCRIPT_DIR --print-finalized-asm --generate-logged-types
pnpm exec ts-node scripts/process.ts $i
if [[ -n "$FUELS_DEBUG" ]]; then
forc parse-bytecode "$BIN_DIR/$i.bin" > "$BIN_DIR/$i.txt"
Expand Down
2 changes: 1 addition & 1 deletion packages/script/scripts/build-call-test-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FUELS_DEBUG=${FUELS_DEBUG:-}
SCRIPT_DIR="src/call-test-script"
BIN_DIR="$SCRIPT_DIR/out/debug"

pnpm forc build -p $SCRIPT_DIR --print-finalized-asm
pnpm forc build -p $SCRIPT_DIR --print-finalized-asm --generate-logged-types
if [[ -n "$FUELS_DEBUG" ]]; then
pnpm forc parse-bytecode "$BIN_DIR/call-test-script.bin" > "$BIN_DIR/call-test-script.txt"
fi

1 comment on commit 69a102d

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 90.01% 3299/3665
🟡 Branches 70.66% 614/869
🟢 Functions 86.93% 665/765
🟢 Lines 89.85% 3161/3518

Test suite run success

503 tests passing in 44 suites.

Report generated by 🧪jest coverage report action from 69a102d

Please sign in to comment.