Skip to content

Commit

Permalink
update readme and deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
rise1507 committed Jul 4, 2024
1 parent 0ed97d4 commit 2f2eaca
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
# 🔥W5: wallet v5 standard
# W5: wallet smart contract v5

This is an extensible wallet specification aimed at replacing V4 and allowing arbitrary extensions.
New version of wallet smart contract, the previous one was [v4r2](https://github.com/ton-blockchain/wallet-contract).

W5 has **25% lower fees**, supports **gasless transactions** (via third party relayers) and implements a **flexible extension mechanism**.
The entire concept is proposed by the [Tonkeeper team](https://tonkeeper.com/).

New Features:

- Send up to 255 messages at once;

- Signed actions can be sent not only by external message, but also by internal messages (can be used for gasless transactions);

- Unlimited extensions;

- Extension can prohibit signed actions in the wallet (can be used for 2fa or key recovery);

- Optimizations to reduce network fees;

- Better foolproofing safety - reply-protection for external messages, wallet id rethinking;

## Project structure

Expand All @@ -13,25 +27,17 @@ W5 has **25% lower fees**, supports **gasless transactions** (via third party re
- `scripts` - scripts used by the project, mainly the deployment scripts, additionally contains utilities for gas optimisation.
- `fift` - contains standard Fift v0.4.4 library including the assembler and disassembler for gas optimisation utilities.

### Additional documentation

- [Gas improvements](Improvements.rst) - a log of improvements, detailed by primary code paths, global gas counters per commit.
- [Contest](Contest.md) - a note showing some information about interesting improvements during the optimisation contest.

## How to use

### Build

`npm run build:v5`
`npm run build`

### Test

`npm run test`

### Deployment
1. Deploy library: `npm run deploy-library`
2. Deploy wallet: `npm run deploy-wallet`

### Get wallet compiled code
Deploy wallet: `npm run deploy-wallet`

`npm run print-wallet-code`
4 changes: 1 addition & 3 deletions Specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ This is an extensible wallet specification aimed at replacing V4 and allowing ar
* [Features](#features)
* [Overview](#overview)
* [Discussion](#discussion)
* [Wallet ID](#wallet-id)
* [Packed address](#packed-address)
* [TL-B definitions](#tl-b-definitions)
* [Source code](#source-code)

Expand All @@ -30,7 +28,7 @@ Thanks to [Skydev](https://github.com/Skydev0h) for optimization and preparing t
* Extensions can perform the same operations as the signer: emit arbitrary messages on behalf of the owner, add and remove extensions.
* Signed requests can be delivered via internal message to allow 3rd party pay for gas.
* For consistency and ease of indexing, external messages also receive a 32-bit opcode.
* To lay foundation for support of scenarios like 2FA or access recovery it is possible to disable signature authentication.
* To lay foundation for support of scenarios like 2FA or access recovery it is possible to disable signature authentication by extension.

## Overview

Expand Down
2 changes: 1 addition & 1 deletion scripts/deployLibrary.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { toNano } from 'ton-core';
import { compile, NetworkProvider } from '@ton-community/blueprint';
import { compile, NetworkProvider } from '@ton/blueprint';
import 'dotenv/config';
import { LibraryDeployer } from '../wrappers/library-deployer';

Expand Down
6 changes: 3 additions & 3 deletions scripts/deployWalletV5.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Dictionary, toNano } from 'ton-core';
import { WalletId, WalletV5 } from '../wrappers/wallet-v5';
import { compile, NetworkProvider } from '@ton-community/blueprint';
import { compile, NetworkProvider } from '@ton/blueprint';
import { LibraryDeployer } from '../wrappers/library-deployer';
import { getSecureRandomBytes, keyPairFromSeed } from 'ton-crypto';

Expand All @@ -15,11 +15,11 @@ export async function run(provider: NetworkProvider) {
const walletV5 = provider.open(
WalletV5.createFromConfig(
{
signature_auth_disabled: false,
signatureAllowed: true,
seqno: 0,
walletId: new WalletId({ networkGlobalId: -3 }).serialized, // testnet
publicKey: keypair.publicKey,
extensions: Dictionary.empty()
extensions: Dictionary.empty() as any
},
LibraryDeployer.exportLibCode(await compile('wallet_v5'))
)
Expand Down

1 comment on commit 2f2eaca

@Elikamart
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.