Skip to content

Conversation

pyAndr3w
Copy link
Contributor

Closes #3395

@pyAndr3w pyAndr3w requested a review from a team as a code owner June 25, 2025 12:51
@skywardboundd
Copy link
Contributor

Waiting for tests and then approve

@pyAndr3w pyAndr3w requested a review from Kaladin13 July 9, 2025 12:44
Copy link
Contributor

@skywardboundd skywardboundd left a comment

Choose a reason for hiding this comment

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

Good job! Solid PR overall. Just a few small comments. One thing: there are quite a few magic numbers in the tests - please consider replacing them with named constants or removing unnecessary ones.

I’d also suggest adding more comments to the Tact code so that people looking at it for examples can better understand what’s going on

codeSizeResults: CodeSizeResult,
fromInit: FromInitHighloadWalletV3,
) {
let blockchain: Blockchain;
Copy link
Contributor

Choose a reason for hiding this comment

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

setup() instead of global vars


// after commit, check the message to prevent an error in the action phase

let messageSlice = msgInner.messageToSend.beginParse();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use structs instead of manual parsing?

Copy link
Contributor

@Kaladin13 Kaladin13 left a comment

Choose a reason for hiding this comment

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

Good job on Tact code! A couple of notes about ts


const justTestFlow = async (kind: "external" | "internal") => {
const testReceiver = receiver.address;
const forwardToSelfValue = toNano(0.17239);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this const?


let step: Step;

const justTestFlow = async (kind: "external" | "internal") => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's rename it to something meaningful

message: internalMessage,
mode: SendMode.PAY_GAS_SEPARATELY,
queryId,
createdAt: ~~(Date.now() / 1000),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
createdAt: ~~(Date.now() / 1000),
createdAt: (Date.now() / 1000),

Copy link
Contributor

Choose a reason for hiding this comment

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

No, just Math.floor() is needed here, not ~~

"cells": "17",
"bits": "4373"
},
"pr": "https://github.com/ton-blockchain/highload-wallet-contract-v3"
Copy link
Contributor

Choose a reason for hiding this comment

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

Permalink to commit

.endCell();
}

*generateBadMsg() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why *?

"externalTransfer": "6200",
"internalTransfer": "2065"
},
"pr": "https://github.com/ton-blockchain/highload-wallet-contract-v3"
Copy link
Contributor

Choose a reason for hiding this comment

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

permlink too

message: internalMessage,
mode: SendMode.PAY_GAS_SEPARATELY,
queryId,
createdAt: ~~(Date.now() / 1000),
Copy link
Contributor

Choose a reason for hiding this comment

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

No, just Math.floor() is needed here, not ~~

export const SUBWALLET_ID = 0;

const getRandom = (min: number, max: number) => {
return Math.random() * (max - min) + min;
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe

import { randomInt } from 'crypto'

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port Highload Wallet V3 to Tact and benchmark
4 participants