forked from FuelLabs/fuels-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:FuelLabs/fuels-ts
- Loading branch information
Showing
12 changed files
with
49 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@fuel-ts/predicate": minor | ||
--- | ||
|
||
exporting getPredicateRoot from the predicate package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
node_modules | ||
src/contract-types | ||
src/predicate-types | ||
src/script-types | ||
src/*-types | ||
|
||
# Forc | ||
**/out/debug/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
"packageManager": "[email protected]", | ||
"scripts": { | ||
"dev": "nodemon --config nodemon.config.json -x 'pnpm build:packages'", | ||
"build": "turbo run build", | ||
"build": "turbo run build --cache-dir=.turbo", | ||
"build:packages": "turbo run build --filter=!docs", | ||
"ci:test": "./scripts/tests-ci.sh", | ||
"pretest": "turbo run pretest", | ||
|
@@ -23,7 +23,7 @@ | |
"test:validate": "./scripts/tests-validate.sh", | ||
"test:e2e": "vitest --run --config vite.node.config.mts $(scripts/tests-find.sh --e2e)", | ||
"lint": "run-s lint:check prettier:check", | ||
"lint:check": "eslint . --ext .ts", | ||
"lint:check": "eslint . --ext .ts --max-warnings 0", | ||
"lint:fix": "pnpm lint:check --fix", | ||
"lint:md-links": "tsx ./scripts/lint-md-links", | ||
"lint:package-jsons": "tsx ./scripts/lint-package-jsons", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './predicate'; | ||
export * from './utils/getPredicateRoot'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { getBytesCopy } from 'ethers'; | ||
|
||
import { getPredicateRoot } from './getPredicateRoot'; | ||
|
||
describe('getPredicateRoot', () => { | ||
it('should return the correct predicate root', () => { | ||
const predicateBytes = getBytesCopy( | ||
'0x740000034700000000000000000000805dfcc00110fff3001aec5000910000207144000361491200764800026141120c74000007724c0002134924c05a492001764800026141124a74000001240000005c450000504900085c43f0001341044076400001740000055d43f005104103007244002028ed0440a1412ee0244000000a0000000000000038966262edb5997574be45f94c665aedb41a1663f5b0528e765f355086eebf960000000000000088' | ||
); | ||
|
||
const predicateRoot = getPredicateRoot(predicateBytes); | ||
|
||
const expectedPredicateRoot = | ||
'0xd8fe10a7e398a8af7235e0a7d43388179d89c59d521dcf314e7ee407af8cddce'; | ||
|
||
expect(predicateRoot).toEqual(expectedPredicateRoot); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters