From 0be192aebc12ea30fd82f3f393e25bd777d0f15d Mon Sep 17 00:00:00 2001 From: skywardboundd Date: Fri, 30 May 2025 03:21:25 +0300 Subject: [PATCH 1/7] refactor: move cashback call --- sources/contract.spec.ts | 2 +- sources/contract.tact | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sources/contract.spec.ts b/sources/contract.spec.ts index 9619669..82d0861 100644 --- a/sources/contract.spec.ts +++ b/sources/contract.spec.ts @@ -16,7 +16,7 @@ describe("contract", () => { to: contract.address, deploy: true, success: true, - }); + });  // Check counter expect(await contract.getCounter()).toEqual(0n); diff --git a/sources/contract.tact b/sources/contract.tact index 170b6a9..793092c 100644 --- a/sources/contract.tact +++ b/sources/contract.tact @@ -12,17 +12,21 @@ contract SampleTactContract( owner: Address, counter: Int as uint32, ) with Ownable { - // empty receiver for deployment - receive() { - cashback(sender()); - } + // empty receiver for deployment and receiving funds + receive() { } receive(_: Increment) { self.add(1); + + // return the amount to the sender + cashback(sender()); } receive(msg: Add) { self.add(msg.amount); + + // return the amount to the sender + cashback(sender()); } fun add(v: Int) { From da0515e3c7e76a6a2cec3cae79911e3fb68bc47b Mon Sep 17 00:00:00 2001 From: skywardboundd Date: Fri, 30 May 2025 03:21:42 +0300 Subject: [PATCH 2/7] fmt --- sources/contract.tact | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/contract.tact b/sources/contract.tact index 793092c..5ed96d6 100644 --- a/sources/contract.tact +++ b/sources/contract.tact @@ -13,7 +13,7 @@ contract SampleTactContract( counter: Int as uint32, ) with Ownable { // empty receiver for deployment and receiving funds - receive() { } + receive() {} receive(_: Increment) { self.add(1); From 0a605b6d91b83b35c6a1e5f51b429f306f424dd4 Mon Sep 17 00:00:00 2001 From: skywardboundd Date: Fri, 30 May 2025 15:25:48 +0300 Subject: [PATCH 3/7] add back cashback in receive () --- sources/contract.tact | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/contract.tact b/sources/contract.tact index 5ed96d6..4a6c6b7 100644 --- a/sources/contract.tact +++ b/sources/contract.tact @@ -13,7 +13,10 @@ contract SampleTactContract( counter: Int as uint32, ) with Ownable { // empty receiver for deployment and receiving funds - receive() {} + receive() { + // return the amount to the sender + cashback(sender()); + } receive(_: Increment) { self.add(1); From 3f5746cf5fc777ff8ac9600377c8bd1a6c9dcee8 Mon Sep 17 00:00:00 2001 From: skywardboundd Date: Fri, 30 May 2025 15:33:03 +0300 Subject: [PATCH 4/7] use fmt --- .github/workflows/ci.yml | 86 ++++++++++++------------- .prettierrc.json | 2 +- .vscode/extensions.json | 8 +-- eslint.config.ts | 84 ++++++++++++------------- jest.config.ts | 14 ++--- jest.setup.ts | 2 +- jest.teardown.ts | 2 +- package.json | 80 ++++++++++++------------ sources/contract.read.ts | 2 +- sources/contract.spec.ts | 5 +- tact.config.json | 29 ++++----- tsconfig.json | 132 +++++++++++++++++++-------------------- 12 files changed, 220 insertions(+), 226 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58c5635..fc18b22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,48 +1,48 @@ name: CI on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - workflow_dispatch: + push: + branches: ["main"] + pull_request: + branches: ["main"] + workflow_dispatch: jobs: - test: - strategy: - fail-fast: false - matrix: - node-version: [22] - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - steps: - - name: Checkout code - uses: actions/checkout@v2 - - # - name: Install Soufflé on Ubuntu - # if: matrix.os == 'ubuntu-latest' - # run: | - # sudo wget https://souffle-lang.github.io/ppa/souffle-key.public -O /usr/share/keyrings/souffle-archive-keyring.gpg - # echo "deb [signed-by=/usr/share/keyrings/souffle-archive-keyring.gpg] https://souffle-lang.github.io/ppa/ubuntu/ stable main" | sudo tee /etc/apt/sources.list.d/souffle.list - # sudo apt update - # sudo apt install souffle - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Install dependencies - run: yarn install - - - name: Build - run: yarn build - - - name: Run Tact formatter - run: yarn tact-fmt --check ./sources - - - name: Run Misti - run: yarn misti --min-severity medium ./tact.config.json - - - name: Run tests - run: yarn test + test: + strategy: + fail-fast: false + matrix: + node-version: [22] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + + # - name: Install Soufflé on Ubuntu + # if: matrix.os == 'ubuntu-latest' + # run: | + # sudo wget https://souffle-lang.github.io/ppa/souffle-key.public -O /usr/share/keyrings/souffle-archive-keyring.gpg + # echo "deb [signed-by=/usr/share/keyrings/souffle-archive-keyring.gpg] https://souffle-lang.github.io/ppa/ubuntu/ stable main" | sudo tee /etc/apt/sources.list.d/souffle.list + # sudo apt update + # sudo apt install souffle + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: yarn install + + - name: Build + run: yarn build + + - name: Run Tact formatter + run: yarn tact-fmt --check ./sources + + - name: Run Misti + run: yarn misti --min-severity medium ./tact.config.json + + - name: Run tests + run: yarn test diff --git a/.prettierrc.json b/.prettierrc.json index 080166e..611ddf9 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -2,4 +2,4 @@ "printWidth": 120, "tabWidth": 4, "useTabs": false -} \ No newline at end of file +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 05bd6bc..8759306 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,7 +1,3 @@ { - "recommendations": [ - "tonstudio.vscode-tact", - "tonwhales.func-vscode", - "dbaeumer.vscode-eslint" - ] - } \ No newline at end of file + "recommendations": ["tonstudio.vscode-tact", "tonwhales.func-vscode", "dbaeumer.vscode-eslint"] +} diff --git a/eslint.config.ts b/eslint.config.ts index 8c31c5c..695651a 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -3,46 +3,46 @@ import tsParser from "@typescript-eslint/parser"; import tsPlugin from "@typescript-eslint/eslint-plugin"; export default [ - js.configs.recommended, - { - files: ["sources/**/*.ts"], - ignores: ["sources/output/**/*"], - languageOptions: { - parser: tsParser, - parserOptions: { - project: "./tsconfig.json" - }, - globals: { - console: true, - __dirname: true, - jest: true, - node: true, - describe: true, - it: true, - expect: true, - beforeEach: true, - afterEach: true, - beforeAll: true, - afterAll: true - } + js.configs.recommended, + { + files: ["sources/**/*.ts"], + ignores: ["sources/output/**/*"], + languageOptions: { + parser: tsParser, + parserOptions: { + project: "./tsconfig.json", + }, + globals: { + console: true, + __dirname: true, + jest: true, + node: true, + describe: true, + it: true, + expect: true, + beforeEach: true, + afterEach: true, + beforeAll: true, + afterAll: true, + }, + }, + plugins: { + "@typescript-eslint": tsPlugin, + }, + rules: { + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/explicit-function-return-type": "error", + "@typescript-eslint/no-unsafe-assignment": "error", + "@typescript-eslint/no-unsafe-member-access": "error", + "@typescript-eslint/no-unsafe-call": "error", + "@typescript-eslint/no-unsafe-return": "error", + "no-restricted-imports": [ + "error", + { + paths: ["@ton/blueprint"], + patterns: ["@ton/blueprint/*"], + }, + ], + }, }, - plugins: { - "@typescript-eslint": tsPlugin - }, - rules: { - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/explicit-function-return-type": "error", - "@typescript-eslint/no-unsafe-assignment": "error", - "@typescript-eslint/no-unsafe-member-access": "error", - "@typescript-eslint/no-unsafe-call": "error", - "@typescript-eslint/no-unsafe-return": "error", - "no-restricted-imports": [ - "error", - { - "paths": ["@ton/blueprint"], - "patterns": ["@ton/blueprint/*"] - } - ] - } - } -]; \ No newline at end of file +]; diff --git a/jest.config.ts b/jest.config.ts index 98e282d..51a3afb 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -1,8 +1,8 @@ export default { - preset: 'ts-jest', - testEnvironment: 'node', - testPathIgnorePatterns: ["/node_modules/", "/dist/"], - snapshotSerializers: ["@tact-lang/ton-jest/serializers"], - globalSetup: './jest.setup.ts', - globalTeardown: './jest.teardown.ts', -}; \ No newline at end of file + preset: "ts-jest", + testEnvironment: "node", + testPathIgnorePatterns: ["/node_modules/", "/dist/"], + snapshotSerializers: ["@tact-lang/ton-jest/serializers"], + globalSetup: "./jest.setup.ts", + globalTeardown: "./jest.teardown.ts", +}; diff --git a/jest.setup.ts b/jest.setup.ts index 92f574c..18554e8 100644 --- a/jest.setup.ts +++ b/jest.setup.ts @@ -1 +1 @@ -export default async () => { }; +export default async () => {}; diff --git a/jest.teardown.ts b/jest.teardown.ts index 92f574c..18554e8 100644 --- a/jest.teardown.ts +++ b/jest.teardown.ts @@ -1 +1 @@ -export default async () => { }; +export default async () => {}; diff --git a/package.json b/package.json index 8698f90..26174e4 100644 --- a/package.json +++ b/package.json @@ -1,42 +1,42 @@ { - "private": true, - "scripts": { - "build": "tact --config ./tact.config.json", - "fmt": "tact-fmt --write ./sources", - "lint": "tact-fmt --check ./sources && yarn misti ./tact.config.json", - "test": "yarn build && jest", - "deploy": "yarn test && ts-node ./sources/contract.deploy.ts", - "read": "ts-node ./sources/contract.read.ts" - }, - "dependencies": { - "@nowarp/misti": "~0.8.0", - "@tact-lang/compiler": "^1.6.13", - "@tact-lang/deployer": "^0.2.0", - "@tact-lang/ton-abi": "^0.0.3", - "@tact-lang/ton-jest": "^0.0.4", - "@ton/core": "^0.60.1", - "@ton/crypto": "^3.2.0", - "@ton/sandbox": "^0.27.0", - "@ton/test-utils": "^0.4.2", - "@ton/ton": "^13.9.0", - "@types/jest": "^29.2.4", - "@types/node": "^18.11.14", - "@types/qs": "^6.9.7", - "base64url": "^3.0.1", - "enquirer": "^2.3.6", - "jest": "^29.3.1", - "open": "^8.4.0", - "prando": "^6.0.1", - "prettier": "^2.5.1", - "qs": "^6.11.0", - "ts-jest": "^29.0.3", - "ts-node": "^10.9.1", - "typescript": "^4.9.4" - }, - "devDependencies": { - "eslint": "^9.19.0", - "globals": "^13.24.0", - "typescript-eslint": "^8.22.0" - }, - "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" + "private": true, + "scripts": { + "build": "tact --config ./tact.config.json", + "fmt": "tact-fmt --write ./sources", + "lint": "tact-fmt --check ./sources && yarn misti ./tact.config.json", + "test": "yarn build && jest", + "deploy": "yarn test && ts-node ./sources/contract.deploy.ts", + "read": "ts-node ./sources/contract.read.ts" + }, + "dependencies": { + "@nowarp/misti": "~0.8.0", + "@tact-lang/compiler": "^1.6.13", + "@tact-lang/deployer": "^0.2.0", + "@tact-lang/ton-abi": "^0.0.3", + "@tact-lang/ton-jest": "^0.0.4", + "@ton/core": "^0.60.1", + "@ton/crypto": "^3.2.0", + "@ton/sandbox": "^0.27.0", + "@ton/test-utils": "^0.4.2", + "@ton/ton": "^13.9.0", + "@types/jest": "^29.2.4", + "@types/node": "^18.11.14", + "@types/qs": "^6.9.7", + "base64url": "^3.0.1", + "enquirer": "^2.3.6", + "jest": "^29.3.1", + "open": "^8.4.0", + "prando": "^6.0.1", + "prettier": "^2.5.1", + "qs": "^6.11.0", + "ts-jest": "^29.0.3", + "ts-node": "^10.9.1", + "typescript": "^4.9.4" + }, + "devDependencies": { + "eslint": "^9.19.0", + "globals": "^13.24.0", + "typescript-eslint": "^8.22.0" + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/sources/contract.read.ts b/sources/contract.read.ts index f0532ea..3d9e3da 100644 --- a/sources/contract.read.ts +++ b/sources/contract.read.ts @@ -1,4 +1,4 @@ -import { Address, contractAddress} from "@ton/core"; +import { Address, contractAddress } from "@ton/core"; import { TonClient4 } from "@ton/ton"; import { SampleTactContract } from "./output/sample_SampleTactContract"; diff --git a/sources/contract.spec.ts b/sources/contract.spec.ts index 82d0861..59a0b32 100644 --- a/sources/contract.spec.ts +++ b/sources/contract.spec.ts @@ -16,8 +16,7 @@ describe("contract", () => { to: contract.address, deploy: true, success: true, - });  - + }); // Check counter expect(await contract.getCounter()).toEqual(0n); @@ -34,7 +33,7 @@ describe("contract", () => { from: nonOwner.address, to: contract.address, success: false, - exitCode: accessDeniedExitCode + exitCode: accessDeniedExitCode, }); }); }); diff --git a/tact.config.json b/tact.config.json index 57b5084..e81d185 100644 --- a/tact.config.json +++ b/tact.config.json @@ -1,18 +1,19 @@ { - "projects": [{ - "name": "sample", - "path": "./sources/contract.tact", - "output": "./sources/output", - "mode": "full", - "options": { - "external": false, - "debug": false, - "ipfsAbiGetter": false, - "interfacesGetter": false, - "experimental": { - "inline": false + "projects": [ + { + "name": "sample", + "path": "./sources/contract.tact", + "output": "./sources/output", + "mode": "full", + "options": { + "external": false, + "debug": false, + "ipfsAbiGetter": false, + "interfacesGetter": false, + "experimental": { + "inline": false + } } } - }] + ] } - diff --git a/tsconfig.json b/tsconfig.json index efcfe9c..df8384c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,69 +1,67 @@ { - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "./dist", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": false, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */ - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - "types": ["jest"], /* Type declaration files to be included in compilation. */ - "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, - "resolveJsonModule": true - }, - "include": [ - "sources/**/*" - ] + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */, + "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */ + "declaration": true /* Generates corresponding '.d.ts' file. */, + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + "outDir": "./dist" /* Redirect output structure to the directory. */, + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": false, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + "downlevelIteration": true /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */, + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + /* Strict Type-Checking Options */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */ + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + "types": ["jest"] /* Type declaration files to be included in compilation. */, + "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + /* Source Map Options */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + /* Advanced Options */ + "skipLibCheck": true /* Skip type checking of declaration files. */, + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, + "resolveJsonModule": true + }, + "include": ["sources/**/*"] } From c05b8e3c06790ad4dd7403985c2e271a6070573c Mon Sep 17 00:00:00 2001 From: skywardboundd Date: Fri, 30 May 2025 15:49:39 +0300 Subject: [PATCH 5/7] add prettier to fmt --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 26174e4..0abcabe 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "private": true, "scripts": { "build": "tact --config ./tact.config.json", - "fmt": "tact-fmt --write ./sources", - "lint": "tact-fmt --check ./sources && yarn misti ./tact.config.json", + "fmt": "prettier --write ./sources && tact-fmt --write ./sources", + "lint": "prettier --check ./sources && tact-fmt --check ./sources && yarn misti ./tact.config.json", "test": "yarn build && jest", "deploy": "yarn test && ts-node ./sources/contract.deploy.ts", "read": "ts-node ./sources/contract.read.ts" From 9a1ec4f1cd8521a68b22eb301eea13225b90bb25 Mon Sep 17 00:00:00 2001 From: skywardboundd Date: Fri, 30 May 2025 15:55:01 +0300 Subject: [PATCH 6/7] upd --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc18b22..323e6ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,8 +38,8 @@ jobs: - name: Build run: yarn build - - name: Run Tact formatter - run: yarn tact-fmt --check ./sources + - name: Run Lint + run: yarn lint - name: Run Misti run: yarn misti --min-severity medium ./tact.config.json From 1d12f23e9b2e36be99ac23138e76917d697a9cb2 Mon Sep 17 00:00:00 2001 From: skywardboundd Date: Fri, 30 May 2025 15:56:42 +0300 Subject: [PATCH 7/7] reorder --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 323e6ed..a20d61b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,12 +35,12 @@ jobs: - name: Install dependencies run: yarn install - - name: Build - run: yarn build - - name: Run Lint run: yarn lint + - name: Build + run: yarn build + - name: Run Misti run: yarn misti --min-severity medium ./tact.config.json