Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tonkeeper Update #162

Open
wants to merge 242 commits into
base: feature/tests
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
242 commits
Select commit Hold shift + click to select a range
1b679f4
file names
oleganza Aug 29, 2023
acf3489
fixed compilation issues
oleganza Aug 29, 2023
3b02e09
wip on v5r3
oleganza Sep 2, 2023
a09206e
version with wc comparison
oleganza Sep 2, 2023
cf81439
wip on v5r3
oleganza Sep 2, 2023
c3963e5
typo
oleganza Sep 2, 2023
da0ba48
remove extra wc check: we already rely on collision resistance of pac…
oleganza Sep 2, 2023
489c688
update readme
oleganza Sep 2, 2023
d8d5df2
bump subwalletid when breaking layout/compat
oleganza Sep 2, 2023
4d2575c
improved faq
oleganza Sep 4, 2023
e98a6fa
fix: code formatted & basic tests added
siandreev Sep 12, 2023
b4ab3e2
fix(contract): get_plugins renamed to get_extensions; white spaces re…
siandreev Sep 12, 2023
c089d1c
feat: send msg test added
siandreev Sep 12, 2023
91b348d
fix: typo with `op` bitlength
siandreev Sep 13, 2023
461710d
feat: add_extension action test added
siandreev Sep 13, 2023
633b32a
feat: actions list packing added
siandreev Sep 14, 2023
03975e3
feat: add extension and do a transfer test added
siandreev Sep 14, 2023
5595547
feat: new tests added
siandreev Sep 14, 2023
0ef72d1
fix: tlb extended actions list refs order changed
siandreev Sep 15, 2023
9e64879
feat: extension and internal auth tests added
siandreev Sep 15, 2023
1832971
feat: files renamed
siandreev Sep 15, 2023
ba05ea9
fix: external send tests added. Deployment script fixed
siandreev Sep 15, 2023
fd7da27
feat: ci added
siandreev Sep 15, 2023
ca38993
fix: ci config
siandreev Sep 15, 2023
ffc03d4
fix: rename ci pipeline
siandreev Sep 15, 2023
13e7321
fix: subwallet id replaced with wallet id
siandreev Sep 19, 2023
d1901e0
fix: uint replaced for int for wc
siandreev Sep 19, 2023
56ca085
fix: `#` replaced with `## 32`
siandreev Sep 19, 2023
bcf55b7
Merge pull request #2 from tonkeeper/fix/update-wallet_id
siandreev Sep 19, 2023
42a41ca
Fix link to source code
oleganza Sep 26, 2023
ccba7a4
With libs wallet v5 is 93% smaller than v4
oleganza Sep 26, 2023
1748d80
Actual code size reduction
oleganza Sep 26, 2023
13d1e72
feat: lib deployment scripts added
siandreev Sep 27, 2023
7356c23
fix: contract gas optimisation
siandreev Sep 27, 2023
550894f
fix: library deployer improvement
siandreev Sep 27, 2023
b1a9af8
fix: deployment scripts fixes
siandreev Sep 27, 2023
924e3c6
fix: specification updated
siandreev Sep 27, 2023
cd4f684
fix: lib code added to the tests
siandreev Sep 28, 2023
b882bf7
fix: added another single transfer test
siandreev Sep 28, 2023
d399976
Optimized unneccessary cell loads and operations
Skydev0h Oct 2, 2023
c35b90b
Recorded failed attempt at defragmenting storage
Skydev0h Oct 2, 2023
fcc45d6
Removed unneccessary always true check
Skydev0h Oct 2, 2023
7ff7d07
Unrolled the common internal handler code
Skydev0h Oct 2, 2023
01cf03d
Implicitly return from the external handler
Skydev0h Oct 2, 2023
557c0d7
Reaped benefits of separated internal loaders
Skydev0h Oct 2, 2023
a8ee4c0
Discarded unneccessary slice remains in dispatcher
Skydev0h Oct 2, 2023
5e65d1c
Loaded auth_kind optionally using LDUQ instruction
Skydev0h Oct 3, 2023
44345e4
Is ifnot a joke for you? (emits less instructions)
Skydev0h Oct 3, 2023
bacb468
Localize extensions in loop and short-circ simple
Skydev0h Oct 3, 2023
46033e9
Reordering int msg handlers somehow saves 10 gas
Skydev0h Oct 3, 2023
57d1a9f
Moving signature check higher saves some gas
Skydev0h Oct 3, 2023
ff9a1b2
Reordering checks somehow sames some more gas
Skydev0h Oct 3, 2023
3601ebe
Removing end_parse is -gas and +reliability
Skydev0h Oct 3, 2023
eaf48f7
Keep your functions close and vars even closer
Skydev0h Oct 3, 2023
15f3dc6
OK, can remove end_parse, will write rationale later
Skydev0h Oct 3, 2023
ea38004
Add global gas counters to keep an eye on non-contest paths
Skydev0h Oct 9, 2023
f245407
Recalculated GGC for every commit to find a tradeoff
Skydev0h Oct 9, 2023
99cd428
Refactored internal message flows, good GGC value
Skydev0h Oct 9, 2023
48f8868
Github-friendly RST improvements page
Skydev0h Oct 9, 2023
9ecfb79
Reorganized inlining point for extension message flow
Skydev0h Oct 9, 2023
fe7f68e
Fix improvements table width for commit name
Skydev0h Oct 9, 2023
50ccdc0
[Internal] Fix ext-storer bug (negligible GGC gas impact)
Skydev0h Oct 9, 2023
a4890b2
Do not carry around params not needed (ext opt)
Skydev0h Oct 9, 2023
75c5bac
Add failed rewrite attempt (signed processing)
Skydev0h Oct 9, 2023
c45523e
Optimize argument order to match stack
Skydev0h Oct 9, 2023
fc3bc96
More reliable tail processing at cost of very small GGC increase
Skydev0h Oct 9, 2023
79ab86d
Swapping extn and sign order back saves some net gas
Skydev0h Oct 9, 2023
4f0cea7
Substantial code rewrite to make it more readable
Skydev0h Oct 10, 2023
4c6ee62
Record failed attempt to cache one ext w/o dict (increased gas)
Skydev0h Oct 10, 2023
1a08eae
Short-circuit optimization of LDUQ with IFNOTRET
Skydev0h Oct 10, 2023
3c26248
Short-circuited some returns with asm
Skydev0h Oct 10, 2023
7adaf5f
ASM-optimized simple action cases
Skydev0h Oct 10, 2023
bd454a7
Created scalpel tool for TVM delidding and analyzing under microscope
Skydev0h Oct 10, 2023
d8cd02d
Optimized out more unneeded instructions if may RET
Skydev0h Oct 10, 2023
204dddd
Removed another unneccessary DROP with preload uint
Skydev0h Oct 10, 2023
d19f689
Reordered argument order to optimize stack operations
Skydev0h Oct 10, 2023
ba29b84
Rewritten RETALT to IFNOTJMP - less gas, more reliable
Skydev0h Oct 10, 2023
8e5696b
Another argument stack optimization (psr -> dr call)
Skydev0h Oct 10, 2023
f77dded
Black magic route optimization (drop some result later)
Skydev0h Oct 10, 2023
4192634
Supercharged scalpel
Skydev0h Oct 10, 2023
542b241
This quite did not worked out. git good.
Skydev0h Oct 11, 2023
f461946
Another black magic optimization (drop auth_kind later)
Skydev0h Oct 11, 2023
e62691e
WIP: Documentation on optimizations
Skydev0h Oct 11, 2023
272892e
Update README.md
Skydev0h Oct 11, 2023
be920b8
Center contest logo
Skydev0h Oct 11, 2023
870e9ff
Fix centering
Skydev0h Oct 11, 2023
2ddb845
Update README
Skydev0h Oct 11, 2023
18a3e62
I have not noticed this achievement earlier!
Skydev0h Oct 11, 2023
15b4d6c
Revised code, started researching gas under microscope
Skydev0h Oct 12, 2023
653fa9d
Add tools to inspect generated code cell tree
Skydev0h Oct 12, 2023
8bdcf47
fift stuff
Skydev0h Oct 12, 2023
5e9bfa0
Prepare ground for radical optimizations
Skydev0h Oct 12, 2023
c11545f
Allow to turn on and off detailed gas tracing of main cases in tests
Skydev0h Oct 12, 2023
0794b7d
More preparations for radical optimization
Skydev0h Oct 12, 2023
8041686
Backport some tooling from entrypoint branch
Skydev0h Oct 13, 2023
886b9fe
Backported FunC optimizations from entrypoint branch
Skydev0h Oct 13, 2023
fcdb880
Use SDBEGINS to enforce "sign" prefix in external message
Skydev0h Oct 13, 2023
07b73f2
Use SDBEGINSQ to check internal message prefixes
Skydev0h Oct 13, 2023
4f2cf58
Backported some opts, organized code and docs
Skydev0h Oct 13, 2023
22a2f68
Finally written documentation about improvements
Skydev0h Oct 15, 2023
e104fda
Optimized instructions order for extension and fix args
Skydev0h Oct 15, 2023
17337eb
Clean up failed optimization attempts
Skydev0h Nov 2, 2023
33c4e87
Cleaned up unused code
Skydev0h Nov 2, 2023
5709f2a
Fixed calculations in table (type in origin amount)
Skydev0h Nov 2, 2023
b475fda
Fixed more calculations in improvements file
Skydev0h Nov 2, 2023
af93f0a
Update README.md
siandreev Nov 11, 2023
b1878cc
Update Specification.md
siandreev Nov 11, 2023
ea879ad
Merge pull request #3 from Skydev0h/main
siandreev Nov 20, 2023
88ba4f6
chore: build script
siandreev Nov 20, 2023
dbb7292
Merge remote-tracking branch 'origin/main'
siandreev Nov 20, 2023
0b95549
chore: ci updated
siandreev Nov 21, 2023
6145f6b
Merge branch 'main' into feature/optimisation
Skydev0h Jan 23, 2024
6a245a2
Added root cell repacking algorithm with enforced Asm version
Skydev0h Jan 24, 2024
e70ff08
Added size constants and changed stored seqno type from ui32 to i33
Skydev0h Jan 24, 2024
194f803
Changed sign op for internal messages to sint to avoid replay attacks
Skydev0h Jan 24, 2024
04a363d
Removed set_data and temporarily disabled the relevant tests
Skydev0h Jan 24, 2024
3222372
Added actions checking (send_msg w/ mode 2 enforced) and set pk enabled
Skydev0h Jan 24, 2024
54a28d3
Add guidelines and code to be able to make unsafe version
Skydev0h Jan 24, 2024
7abb84d
Optimized verify_actions by rearranging loop and conditions
Skydev0h Jan 24, 2024
12b6e05
Added more info about sequence and fixed some cases in getters
Skydev0h Jan 24, 2024
c5c65d1
Adjusted comments to be more correct and precise
Skydev0h Jan 24, 2024
0c9fa87
Removed unneccessary noop middleware and renamed method to classic name
Skydev0h Jan 24, 2024
74cc7f6
Removed throwif from the comment about seqno
Skydev0h Jan 24, 2024
4217b8a
Made internal messages bounce-safe (replaced throws with soft checks)
Skydev0h Jan 24, 2024
dc6b4e9
Added quick return for empty internal messages
Skydev0h Jan 24, 2024
3ad3a7a
[Docs] Moved contest note to separate file and tidied up README a bit
Skydev0h Jan 24, 2024
0d9ffef
[Docs] Slight readme tidy-up
Skydev0h Jan 24, 2024
507b821
[Docs] Updated specification in accordance with new contract features
Skydev0h Jan 24, 2024
b5bdf24
[Docs] Update types.tlb
Skydev0h Jan 24, 2024
f2601ae
[Docs] Add use cases for disabling public key
Skydev0h Jan 27, 2024
9545120
Updated actions, allow naming, empty ref check, docs, actions wrapper
Skydev0h Jan 27, 2024
c7bd87a
Added gas tests for incoming messages
Skydev0h Jan 28, 2024
916ed76
Removed fift optimizations that might create problems for tooling
Skydev0h Jan 28, 2024
43eba0d
Flattened and split some asm functions for understanding and toolings
Skydev0h Jan 28, 2024
167347a
Add external message bit to signed message part
Skydev0h Jan 30, 2024
e580224
Changed signed message prefix from 1 bit to 32-bit message tag
Skydev0h Feb 3, 2024
41f3063
Moved signature to the end of the message (includes opcode)
Skydev0h Feb 9, 2024
033b63e
Adjusted TLB definitions to match signature at the end
Skydev0h Feb 9, 2024
34a8556
Adjusted all tests to match new signature place (in end)
Skydev0h Feb 9, 2024
c724855
Fixed accounting for seqno twice on signature disabling
Skydev0h Feb 12, 2024
4bf0feb
Added throw for unknown ext-act, setcode/data neg tests, test-only acts
Skydev0h Feb 15, 2024
3f76dbb
Added tests for signature disallow cases, incorrect allow act now throws
Skydev0h Feb 15, 2024
7f786ea
Added a test for separate auth disable by extension
Skydev0h Feb 15, 2024
a840198
Merge pull request #13 from Skydev0h/feature/optimisation
oleganza Feb 19, 2024
7739099
improved overview wording
oleganza Feb 20, 2024
c2734f0
Bounce internal signed messages to protect relayer against abuse
oleganza Feb 20, 2024
b233fb7
fix throw argument
oleganza Feb 20, 2024
55a383d
Merge pull request #14 from tonkeeper/oleganza/sint-bounce
oleganza Feb 20, 2024
4cd9181
Fixed failing tests after adding back throw (bounce) for sint after sig
Skydev0h Feb 20, 2024
53cf00c
Merge pull request #15 from Skydev0h/skydev/fix-bouncing-tests
oleganza Feb 20, 2024
8661ce2
Added safeguard against deleting last ext with disabled key (need tests)
Skydev0h Feb 21, 2024
4458be0
Fix prefix clashing bug and adjust code style (reported by @behrang)
Skydev0h Feb 23, 2024
51358ad
Fixed tests and added cases for deleting last ext with disallowed pubkey
Skydev0h Feb 23, 2024
fa1b372
Merge pull request #16 from Skydev0h/skydev/del-ext-safeguard
oleganza Feb 23, 2024
d373fb0
Introduction improvements
oleganza Jun 13, 2024
92471dd
Some improvements and changes to the contract
Skydev0h Jun 14, 2024
7d1d144
Plugins now bound to same workchain as the wallet, no packing (6)
Skydev0h Jun 14, 2024
1f9b0a3
Moved signature_auth_disable to separate variable from seq_no sign (3)
Skydev0h Jun 14, 2024
a210caa
Fix `getExtensionsArray()` method when address hash starts with `00`
Skydev0h Jun 14, 2024
ba7e312
add builds to git
rise1507 Jun 21, 2024
1d44704
cosmetic: rename constants (no changes in compiled code)
rise1507 Jun 21, 2024
99493bc
cosmetic: types (no changes in compiled code)
rise1507 Jun 21, 2024
0d5cc02
cosmetic: rename vars, avoid abbreviations (no changes in compiled code)
rise1507 Jun 21, 2024
ce56813
cosmetic: remove comments about optimizations (no changes in compiled…
rise1507 Jun 21, 2024
b58bbb9
cosmetic: add additional consts for sizes (no changes in compiled code)
rise1507 Jun 21, 2024
f1f4cb4
cosmetic: add error const (no changes in compiled code)
rise1507 Jun 21, 2024
0537f52
cosmetic: subwallet_id->wallet_id in comments (no changes in compiled…
rise1507 Jun 21, 2024
0574f37
don't store workchain in extensions dict values
rise1507 Jun 21, 2024
2f20a49
remove unnecessary micro-optimiazations
rise1507 Jun 21, 2024
edef797
simplify
rise1507 Jun 21, 2024
4f77395
refactor signature_allowed
rise1507 Jun 21, 2024
9869fef
preload_dict
rise1507 Jun 21, 2024
5a21842
get-methods cosmetic
rise1507 Jun 21, 2024
ad1d90b
simplify
rise1507 Jun 21, 2024
2e31a01
simplify
rise1507 Jun 21, 2024
5424092
c5 comments
rise1507 Jun 21, 2024
b3d712d
fix size check
rise1507 Jun 21, 2024
520dec7
fix error naming
rise1507 Jun 21, 2024
243d7d2
simplify
rise1507 Jun 21, 2024
a39b7b0
simplify
rise1507 Jun 21, 2024
fe128dd
cosmetic-optimization
rise1507 Jun 21, 2024
ab0233d
explicit () in binary operations
rise1507 Jun 22, 2024
477bf6d
cosmetic
rise1507 Jun 22, 2024
029e60a
fix return
rise1507 Jun 22, 2024
5910896
simplify
rise1507 Jun 22, 2024
2ba7fda
commit only for external
rise1507 Jun 22, 2024
c10105a
xctos comment
rise1507 Jun 22, 2024
1f3c177
update stdlib from stablecoin-contract
rise1507 Jun 22, 2024
464e68d
rename get_is_signature_auth_allowed -> is_signature_allowed
rise1507 Jun 22, 2024
d5ea381
comments
rise1507 Jun 24, 2024
816e446
add query_id to extension request so that the extension can recognise…
rise1507 Jun 24, 2024
43fabdf
action prefix 8bit
rise1507 Jun 25, 2024
68a0866
wallet_id 32bit
rise1507 Jun 25, 2024
21f229a
change refs in message (tests not synced yet)
rise1507 Jun 25, 2024
0a40931
only extension can change signature mode (tests not synced yet)
rise1507 Jun 25, 2024
3d822d9
allow work with (~ is_signature_allowed) and empty extensions
rise1507 Jun 25, 2024
c5dc057
refactor errors - only only_extension_can_change_signature_mode numbe…
rise1507 Jun 26, 2024
c678610
refactor errors naming
rise1507 Jun 26, 2024
aff9c49
refactor errors
rise1507 Jun 26, 2024
e4b8c5b
cosmetic (bytecode not changed)
rise1507 Jun 26, 2024
dd9ff28
cosmetic comment (bytecode not changed)
rise1507 Jun 26, 2024
b7b8fd8
simplify
rise1507 Jun 26, 2024
3dc030e
fix mistake
rise1507 Jun 26, 2024
e6ef9e4
receive tons
rise1507 Jun 26, 2024
39d0feb
get_wallet_id -> get_subwallet_id, same with v4
rise1507 Jun 26, 2024
444ddde
return_unless not work
rise1507 Jun 26, 2024
3bd769e
update wrappers and tests
rise1507 Jun 26, 2024
38f7e3a
fix typo
rise1507 Jun 27, 2024
64cff84
change error codes to avoid collision with tvm-exit-codes
rise1507 Jun 28, 2024
6e81ad3
remove return_if, return_unless because its dangerous
rise1507 Jun 28, 2024
facbfcf
additional checks for c5
rise1507 Jul 1, 2024
84eaf15
fix numbers
rise1507 Jul 1, 2024
ee52524
Upgrade packages
Jul 2, 2024
047852a
Migrate to @ton packages
Jul 2, 2024
982f304
Minor fix
Jul 2, 2024
ff8cd74
Extra moar utils for the utils god
Jul 2, 2024
d349886
Test wrapper and constants
Jul 2, 2024
57e37aa
W5 wallet tests
Jul 2, 2024
e805cde
Merge pull request #1 from Trinketer22/w5_tests
tolya-yanot Jul 3, 2024
6220bd6
rebuild
rise1507 Jul 3, 2024
2f962c3
optimize bounced check
rise1507 Jul 3, 2024
b66b103
more accurate check
rise1507 Jul 3, 2024
62bfd99
delete unused code
rise1507 Jul 3, 2024
0bfb383
update tlb
rise1507 Jul 3, 2024
2c1b964
update tlb
rise1507 Jul 3, 2024
e02e43c
delete v4
rise1507 Jul 3, 2024
26ab229
update Specification.md
rise1507 Jul 3, 2024
230e48b
simplify
rise1507 Jul 3, 2024
5e711b2
strict func version
rise1507 Jul 3, 2024
5962103
update tlb
rise1507 Jul 3, 2024
c5465be
Merge pull request #28 from tolya-yanot/main
KuznetsovNikita Jul 3, 2024
d5f0a0d
add additional comments to the smart contract code
rise1507 Jul 4, 2024
badcbfb
delete docs about optimization contest
rise1507 Jul 4, 2024
0ed97d4
delete docs about optimization contest
rise1507 Jul 4, 2024
2f2eaca
update readme and deploy script
rise1507 Jul 4, 2024
4fab977
add more info to README
rise1507 Jul 4, 2024
88557eb
fix comment
rise1507 Jul 21, 2024
2b7d3b5
Update README.md yalan2
yalan2ny Jan 2, 2025
1afdcf6
Create webpack.yml-yalan2ny
yalan2ny Jan 2, 2025
77aa5a5
Bump braces in the npm_and_yarn group across 1 directory
dependabot[bot] Jan 6, 2025
645be34
Merge pull request #2 from yalan2ny/patch-5/yalan2ny
yalan2ny Jan 26, 2025
1bdd9f1
Merge pull request #1 from yalan2ny/dependabot/npm_and_yarn/npm_and_y…
yalan2ny Jan 27, 2025
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
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
WALLET_MNEMONIC=

# v4
WALLET_VERSION=
91 changes: 91 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
module.exports = {
root: true,
ignorePatterns: ['**/*.js'],
overrides: [
{
files: ['tests/**/*.ts', 'wrappers/**/*.ts', 'scripts/**/*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
createDefaultProgram: true
},
plugins: [
'@typescript-eslint',
'unused-imports',
'import'
],
extends: [
'airbnb-typescript/base',
'plugin:prettier/recommended',
'prettier'
],
rules: {
'import/extensions': [
'error',
'ignorePackages',
{
js: "never",
jsx: "never",
ts: "never",
tsx: "never"
}
],
'import/prefer-default-export': 'off',
'@typescript-eslint/no-useless-constructor': 'off',
'no-plusplus': 'off',
'class-method-use-this': 'off',
'no-underscore-dangle': 'off',
'no-inferrable-types': 'off',
'@typescript-eslint/no-explicit-any': 2,
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'error',
{
vars: 'all',
args: 'all',
ignoreRestSiblings: false,
argsIgnorePattern: '^_'
}
],
'@typescript-eslint/no-inferrable-types': 'off',
'class-methods-use-this': 'off',
complexity: ['error', 20],
eqeqeq: ['error', 'smart'],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'enumMember',
format: ['UPPER_CASE']
}
],
'no-empty': ['error', { 'allowEmptyCatch': true }],

'array-bracket-spacing': ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
indent: 'off',
'comma-dangle': 'off',
'@typescript-eslint/comma-dangle': ['error', 'never'],
'import/no-extraneous-dependencies': 'off',
'@typescript-eslint/dot-notation': 'off',
'no-restricted-globals': 'off',
'@typescript-eslint/no-empty-function': 'off',
'no-param-reassign': 'off',
'max-classes-per-file': 'off',
radix: ['warn', 'as-needed'],
'no-prototype-builtins': 'off',
'no-return-assign': 'off',
'no-restricted-syntax': [
'error',
'LabeledStatement',
'WithStatement'
],
'no-console': 'off',
'import/export': 0,
'@typescript-eslint/no-shadow': 'off',
'@typescript-eslint/return-await': 'off'
}
}
]
}
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run tests

on:
push:
branches: [ "main", "feature/optimisation" ]
pull_request:
branches: [ "main", "feature/optimisation" ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Read .nvmrc
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '${{ env.NVMRC }}'

- name: Set up dependencies
run: npm ci

- name: Test
run: npm run test
28 changes: 28 additions & 0 deletions .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
tabname: NodeJS with Webpack

esc on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
tab runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Build
run: |
npm install
npx webpack
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
temp
build
.idea
.env
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.17.1
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build
contracts
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

13 changes: 13 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"arrowParens": "avoid",
"bracketSpacing": true,
"printWidth": 100,
"proseWrap": "always",
"quoteProps": "as-needed",
"semi": true,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "none",
"useTabs": false
}
Loading