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
11 changes: 11 additions & 0 deletions standard/wallets/comparison/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules/
dist/
build/
*.tsbuildinfo
.env
.env.local
coverage/
*.log
.DS_Store
temp/

8 changes: 8 additions & 0 deletions standard/wallets/comparison/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"arrowParens": "always"
}
17 changes: 17 additions & 0 deletions standard/wallets/comparison/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Wallet Fee Comparison

This workspace provides a reproducible test harness for benchmarking transaction fees across several TON wallet implementations. The suite focuses on measuring gas usage, total fees, and per-message costs for different payload sizes and batch configurations.

## Layout

- `tests/WalletFeeComparison.spec.ts` — main Jest suite that orchestrates the fee measurements and outputs markdown reports.
- `tests/utils` — helper utilities for fee extraction and TON gas calculations.
- `wrappers/` — contract wrappers required to deploy and interact with wallets inside the sandbox.
- `build/` — precompiled wallet artifacts referenced by the wrappers.

## Getting Started

1. Install dependencies: `yarn install`
2. Run the benchmark suite: `yarn test`

The tests spawn sandbox blockchains locally, so no external network access is required. Results are written to `tests/results/wallet-fee-comparison.md`.
13 changes: 13 additions & 0 deletions standard/wallets/comparison/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
collectCoverage: false,
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
transform: {
'^.+\\.ts$': 'ts-jest',
},
testMatch: ['**/tests/**/*.spec.ts'],
};
28 changes: 28 additions & 0 deletions standard/wallets/comparison/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "example",
"version": "0.0.1",
"description": "Automated fee comparison tests for multiple TON wallet implementations",
"scripts": {
"build": "tsc",
"test": "jest",
"deploy": "ts-node scripts/deploy.ts",
"lint": "prettier --check .",
"format": "prettier --write ."
},
"devDependencies": {
"@ton/blueprint": "^0.40.0",
"@ton/core": "^0.62.0",
"@ton/crypto": "^3.2.0",
"@ton/sandbox": "^0.37.2",
"@ton/test-utils": "^0.12.0",
"@ton/ton": "^15.3.1",
"@types/jest": "^29.5.0",
"@types/node": "^20.2.5",
"jest": "^29.5.0",
"prettier": "^3.6.2",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"typescript": "^5.3.2"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
Loading