Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .yarn/patches/starknet-npm-7.0.1-89bc8c73a3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
diff --git a/dist/index.global.js b/dist/index.global.js
index ba6de970f1397b589a1746e751a3ef1e86c91072..314e9b624569fe58eb56790429118f679c4f36ae 100644
--- a/dist/index.global.js
+++ b/dist/index.global.js
@@ -11622,7 +11622,8 @@ ${indent}}` : "}";
const maxUnitPrice = toHex(addPercent(estimate.gas_price, overhead.l1_gas.max_price_per_unit));
return {
l2_gas: { max_amount: "0x0", max_price_per_unit: "0x0" },
- l1_gas: { max_amount: maxUnits, max_price_per_unit: maxUnitPrice }
+ l1_gas: { max_amount: maxUnits, max_price_per_unit: maxUnitPrice },
+ l1_data_gas: { max_amount: "0x0", max_price_per_unit: "0x0" }
};
}

@@ -11734,9 +11735,7 @@ ${indent}}` : "}";
return {
l2_gas: { max_amount: "0x0", max_price_per_unit: "0x0" },
l1_gas: { max_amount: "0x0", max_price_per_unit: "0x0" },
- ...specVersion === "0.8" && {
- l1_data_gas: { max_amount: "0x0", max_price_per_unit: "0x0" }
- }
+ l1_data_gas: { max_amount: "0x0", max_price_per_unit: "0x0" }
};
}
if (isRPC08_FeeEstimate(estimate)) {
diff --git a/dist/index.js b/dist/index.js
index b0240d473fb715b40959ab02bb7c381cec6ba91f..759cbc966d743ea2cf41c58b18827ed9d312a042 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -3563,7 +3563,8 @@ function estimateFeeToBounds(estimate, overhead) {
const maxUnitPrice = toHex(addPercent(estimate.gas_price, overhead.l1_gas.max_price_per_unit));
return {
l2_gas: { max_amount: "0x0", max_price_per_unit: "0x0" },
- l1_gas: { max_amount: maxUnits, max_price_per_unit: maxUnitPrice }
+ l1_gas: { max_amount: maxUnits, max_price_per_unit: maxUnitPrice },
+ l1_data_gas: { max_amount: "0x0", max_price_per_unit: "0x0" }
};
}

@@ -3675,9 +3676,7 @@ function estimateFeeToBounds3(estimate, overhead = config.get("feeMarginPercenta
return {
l2_gas: { max_amount: "0x0", max_price_per_unit: "0x0" },
l1_gas: { max_amount: "0x0", max_price_per_unit: "0x0" },
- ...specVersion === "0.8" && {
- l1_data_gas: { max_amount: "0x0", max_price_per_unit: "0x0" }
- }
+ l1_data_gas: { max_amount: "0x0", max_price_per_unit: "0x0" }
};
}
if (isRPC08_FeeEstimate(estimate)) {
diff --git a/dist/index.mjs b/dist/index.mjs
index fa15ab8be19e4e0e121ba459c3d558e2eb701ee3..ba2e934c464127070261786b11e951f429d62380 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -3433,7 +3433,8 @@ function estimateFeeToBounds(estimate, overhead) {
const maxUnitPrice = toHex(addPercent(estimate.gas_price, overhead.l1_gas.max_price_per_unit));
return {
l2_gas: { max_amount: "0x0", max_price_per_unit: "0x0" },
- l1_gas: { max_amount: maxUnits, max_price_per_unit: maxUnitPrice }
+ l1_gas: { max_amount: maxUnits, max_price_per_unit: maxUnitPrice },
+ l1_data_gas: { max_amount: "0x0", max_price_per_unit: "0x0" }
};
}

@@ -3545,9 +3546,7 @@ function estimateFeeToBounds3(estimate, overhead = config.get("feeMarginPercenta
return {
l2_gas: { max_amount: "0x0", max_price_per_unit: "0x0" },
l1_gas: { max_amount: "0x0", max_price_per_unit: "0x0" },
- ...specVersion === "0.8" && {
- l1_data_gas: { max_amount: "0x0", max_price_per_unit: "0x0" }
- }
+ l1_data_gas: { max_amount: "0x0", max_price_per_unit: "0x0" }
};
}
if (isRPC08_FeeEstimate(estimate)) {
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
"test:coverage": "yarn test --collectCoverage",
"test:ci": "yarn test --ci",
"eslint": "eslint -f json -o eslint-report.json ./packages-ts || true",
"lint": "tsc -b ./tsconfig.json",
"lint": "node ./node_modules/typescript/bin/tsc -b ./tsconfig.json",
"format": "yarn prettier --write .",
"format:check": "yarn prettier --check .",
"clean": "tsc -b --clean ./tsconfig.json",
"build": "yarn clean && tsc -b ./tsconfig.json",
"clean": "node ./node_modules/typescript/bin/tsc -b --clean ./tsconfig.json",
"postinstall": "bash scripts/postinstall.sh",
"build": "yarn clean && node ./node_modules/typescript/bin/tsc -b ./tsconfig.json",
"bundle": "yarn build && pkg . --no-native-build",
"release": "yarn changeset publish"
},
Expand Down Expand Up @@ -58,11 +59,12 @@
"typescript": "^5.4.5"
},
"dependencies": {
"starknet": "7.0.1"
"starknet": "patch:starknet@npm%3A7.0.1#./.yarn/patches/starknet-npm-7.0.1-89bc8c73a3.patch"
},
"resolutions": {
"protobufjs": "6.11.4",
"elliptic": "6.6.1"
"elliptic": "6.6.1",
"starknet": "patch:starknet@npm%3A7.0.1#./.yarn/patches/starknet-npm-7.0.1-89bc8c73a3.patch"
},
"packageManager": "yarn@4.5.3"
}
4 changes: 2 additions & 2 deletions packages-ts/starknet-gauntlet-argent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
],
"scripts": {
"gauntlet": "ts-node ./src/index.ts",
"lint": "tsc",
"lint": "node ../../node_modules/typescript/bin/tsc",
"test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-argent --passWithNoTests",
"test:coverage": "yarn test --collectCoverage",
"test:ci": "yarn test --ci",
"format": "yarn prettier --write ./src",
"format:check": "yarn prettier --check ./src",
"clean": "rm -rf ./dist/ ./bin/",
"build": "yarn clean && tsc -b",
"build": "yarn clean && node ../../node_modules/typescript/bin/tsc -b",
"bundle": "yarn build && pkg ."
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages-ts/starknet-gauntlet-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
],
"scripts": {
"gauntlet": "ts-node ./src/index.ts",
"lint": "tsc",
"lint": "node ../../node_modules/typescript/bin/tsc",
"format": "yarn prettier --write ./src",
"format:check": "yarn prettier --check ./src",
"clean": "rm -rf ./dist/ ./bin/",
"build": "yarn clean && tsc -b",
"build": "yarn clean && node ../../node_modules/typescript/bin/tsc -b",
"bundle": "yarn build && pkg ."
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ACCOUNT=0x078527b03dde3ad0c1f350bb8370294cc265ab850e818a7a55250a14ab987103
LINK=0x68391c23f879505a07d4860eafc23461c4e815e48016f325a2fc0ed1906d2dc
MULTISIG=0x2a14fe941828a2c71b5d7e3ed8263066210160e7b436905005ab202388db2f1
BILLING_ACCESS_CONTROLLER=0x1b91eb863272e93b8e115fecf56dcd87ffd5fdfbc2a0bf803d620984b7df2b0
SECRET="gauntletocr museum cycle hawk exhibit school scan weekend accident kangaroo soccer asset dose"
RANDOM_SECRET="gauntletocr museum cycle hawk exhibit school scan weekend accident kangaroo soccer asset dose"
GAUNTLET_SECRET="paper train boat link doge bitcoin yellow green blue red okay engops"
NODE_URL=https://rpcs.cldev.sh/starknet/mainnet
4 changes: 2 additions & 2 deletions packages-ts/starknet-gauntlet-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
],
"scripts": {
"gauntlet": "ts-node ./src/index.ts",
"lint": "tsc",
"lint": "node ../../node_modules/typescript/bin/tsc",
"test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-cli --passWithNoTests",
"test:coverage": "yarn test --collectCoverage",
"test:ci": "yarn test --ci",
"format": "yarn prettier --write ./src",
"format:check": "yarn prettier --check ./src",
"clean": "rm -rf ./dist/ ./bin/",
"build": "yarn clean && tsc -b",
"build": "yarn clean && node ../../node_modules/typescript/bin/tsc -b ../../tsconfig.json",
"bundle": "yarn build && pkg ."
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
],
"scripts": {
"gauntlet": "ts-node ./src/index.ts",
"lint": "tsc",
"lint": "node ../../node_modules/typescript/bin/tsc",
"test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-emergency-protocol --passWithNoTests",
"test:coverage": "yarn test --collectCoverage",
"test:ci": "yarn test --ci",
"lint:format": "yarn prettier --check ./src",
"format": "yarn prettier --write ./src",
"clean": "rm -rf ./dist/ ./bin/",
"build": "yarn clean && tsc -b",
"build": "yarn clean && node ../../node_modules/typescript/bin/tsc -b",
"bundle": "yarn build && pkg ."
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages-ts/starknet-gauntlet-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
],
"scripts": {
"gauntlet": "ts-node ./src/index.ts",
"lint": "tsc",
"lint": "node ../../node_modules/typescript/bin/tsc",
"test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-example --passWithNoTests",
"test:coverage": "yarn test --collectCoverage",
"test:ci": "yarn test --ci",
"format": "yarn prettier --write ./src",
"format:check": "yarn prettier --check ./src",
"clean": "rm -rf ./dist/ ./bin/",
"build": "yarn clean && tsc -b",
"build": "yarn clean && node ../../node_modules/typescript/bin/tsc -b",
"bundle": "yarn build && pkg ."
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages-ts/starknet-gauntlet-ledger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"!dist/**/*.test.js"
],
"scripts": {
"lint": "tsc",
"lint": "node ../../node_modules/typescript/bin/tsc",
"test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-ledger --passWithNoTests",
"test:ci": "yarn test --ci",
"format": "yarn prettier --write ./src",
"format:check": "yarn prettier --check ./src",
"clean": "rm -rf ./dist/ ./bin/",
"build": "yarn clean && tsc -b",
"build": "yarn clean && node ../../node_modules/typescript/bin/tsc -b",
"bundle": "yarn build && pkg ."
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages-ts/starknet-gauntlet-multisig/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
],
"scripts": {
"gauntlet": "ts-node ./src/index.ts",
"lint": "tsc",
"lint": "node ../../node_modules/typescript/bin/tsc",
"test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-multisig --passWithNoTests",
"test:coverage": "yarn test --collectCoverage",
"test:ci": "yarn test --ci",
"format": "yarn prettier --write ./src",
"format:check": "yarn prettier --check ./src",
"clean": "rm -rf ./dist/ ./bin/",
"build": "yarn clean && tsc -b",
"build": "yarn clean && node ../../node_modules/typescript/bin/tsc -b",
"bundle": "yarn build && pkg ."
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages-ts/starknet-gauntlet-ocr2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
],
"scripts": {
"gauntlet": "ts-node ./src/index.ts",
"lint": "tsc",
"lint": "node ../../node_modules/typescript/bin/tsc",
"test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-ocr2 --passWithNoTests",
"test:coverage": "yarn test --collectCoverage",
"test:ci": "yarn test --ci",
"format": "yarn prettier --write ./src",
"format:check": "yarn prettier --check ./src",
"clean": "rm -rf ./dist/ ./bin/",
"build": "yarn clean && tsc -b",
"build": "yarn clean && node ../../node_modules/typescript/bin/tsc -b",
"bundle": "yarn build && pkg ."
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages-ts/starknet-gauntlet-oz/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
],
"scripts": {
"gauntlet": "ts-node ./src/index.ts",
"lint": "tsc",
"lint": "node ../../node_modules/typescript/bin/tsc",
"test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-oz --passWithNoTests",
"test:coverage": "yarn test --collectCoverage",
"test:ci": "yarn test --ci",
"format": "yarn prettier --write ./src",
"format:check": "yarn prettier --check ./src",
"clean": "rm -rf ./dist/ ./bin/",
"build": "yarn clean && tsc -b",
"build": "yarn clean && node ../../node_modules/typescript/bin/tsc -b",
"bundle": "yarn build && pkg ."
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages-ts/starknet-gauntlet-token/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
],
"scripts": {
"gauntlet": "ts-node ./src/index.ts",
"lint": "tsc",
"lint": "node ../../node_modules/typescript/bin/tsc",
"test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-token --passWithNoTests",
"test:coverage": "yarn test --collectCoverage",
"test:ci": "yarn test --ci",
"format": "yarn prettier --write ./src",
"format:check": "yarn prettier --check ./src",
"clean": "rm -rf ./dist/ ./bin/",
"build": "yarn clean && tsc -b",
"build": "yarn clean && node ../../node_modules/typescript/bin/tsc -b",
"bundle": "yarn build && pkg ."
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages-ts/starknet-gauntlet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
],
"scripts": {
"gauntlet": "ts-node ./src/index.ts",
"lint": "tsc",
"lint": "node ../../node_modules/typescript/bin/tsc",
"test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet --passWithNoTests",
"test:coverage": "yarn test --collectCoverage",
"test:ci": "yarn test --ci",
"format": "yarn prettier --write ./src",
"format:check": "yarn prettier --check ./src",
"clean": "rm -rf ./dist/ ./bin/",
"build": "yarn clean && tsc -b",
"build": "yarn clean && node ../../node_modules/typescript/bin/tsc -b",
"bundle": "yarn build && pkg ."
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages-ts/starknet-gauntlet/src/provider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class Provider implements IStarknetProvider {
account: Account

constructor(nodeUrl: string, wallet?: IStarknetWallet) {
this.provider = new StarknetProvider({ nodeUrl })
this.provider = new StarknetProvider({ nodeUrl, specVersion: '0.7' })
if (wallet) {
this.account = new Account(
this.provider,
Expand Down
19 changes: 19 additions & 0 deletions scripts/postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Patches @chainlink/gauntlet-core to handle starknet.js RpcError which has
# a getter-only .code property. Without this, the catch block in cli.js throws
# "TypeError: Cannot set property code of Error which has only a getter"
# and masks the real underlying error.

TARGET="node_modules/@chainlink/gauntlet-core/dist/cli.js"

if [ -f "$TARGET" ]; then
if grep -q 'e.code = Error_1.GauntletError.GauntletErrorCode.UNKNOWN;' "$TARGET"; then
sed -i.bak 's/e\.code = Error_1\.GauntletError\.GauntletErrorCode\.UNKNOWN;/try { e.code = Error_1.GauntletError.GauntletErrorCode.UNKNOWN; } catch (_) {}/' "$TARGET"
rm -f "${TARGET}.bak"
echo "postinstall: patched gauntlet-core cli.js (.code assignment)"
else
echo "postinstall: gauntlet-core cli.js already patched or changed"
fi
else
echo "postinstall: gauntlet-core cli.js not found, skipping patch"
fi
22 changes: 21 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3819,7 +3819,7 @@ __metadata:
jest: "npm:^30.0.0"
pkg: "npm:^5.2.1"
prettier: "npm:2.1.1"
starknet: "npm:7.0.1"
starknet: "patch:starknet@npm%3A7.0.1#./.yarn/patches/starknet-npm-7.0.1-89bc8c73a3.patch"
ts-jest: "npm:^29.0.0"
ts-node: "npm:^10.8.0"
typescript: "npm:^5.4.5"
Expand Down Expand Up @@ -8356,6 +8356,26 @@ __metadata:
languageName: node
linkType: hard

"starknet@patch:starknet@npm%3A7.0.1#./.yarn/patches/starknet-npm-7.0.1-89bc8c73a3.patch::locator=chainlink-starknet%40workspace%3A.":
version: 7.0.1
resolution: "starknet@patch:starknet@npm%3A7.0.1#./.yarn/patches/starknet-npm-7.0.1-89bc8c73a3.patch::version=7.0.1&hash=6f2c0f&locator=chainlink-starknet%40workspace%3A."
dependencies:
"@noble/curves": "npm:1.7.0"
"@noble/hashes": "npm:1.6.0"
"@scure/base": "npm:1.2.1"
"@scure/starknet": "npm:1.1.0"
abi-wan-kanabi: "npm:2.2.4"
isows: "npm:^1.0.6"
lossless-json: "npm:^4.0.1"
pako: "npm:^2.0.4"
starknet-types-07: "npm:@starknet-io/types-js@^0.7.10"
starknet-types-08: "npm:@starknet-io/types-js@0.8.0-beta.10"
ts-mixer: "npm:^6.0.3"
ws: "npm:^8.18.0"
checksum: 10c0/d50f060b64099a05aaf2fc33c77ccac00c25570f6329d07b628d88d5ceda7ae76d2244e2067052d82c8054b4ab5b75bbc9400a6cb087811c2aab340190cf5728
languageName: node
linkType: hard

"statuses@npm:~2.0.2":
version: 2.0.2
resolution: "statuses@npm:2.0.2"
Expand Down
Loading