Skip to content

Commit 1309b17

Browse files
authored
refactor(docs): change variable declarations from let to const in deployment examples (#3319)
1 parent e8758e2 commit 1309b17

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

docs/src/content/docs/book/deploy.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ import { SampleTactContract } from "./output/sample_SampleTactContract";
3535
import { prepareTactDeployment } from "@tact-lang/deployer";
3636

3737
// Parameters
38-
let testnet = true; // Flag for testnet or mainnet
39-
let packageName = 'sample_SampleTactContract.pkg'; // Name of your package to deploy
40-
let outputPath = path.resolve(__dirname, 'output'); // Path to output directory
41-
let owner = Address.parse('<put_address_here>'); // Our sample contract has an owner
42-
let init = await SampleTactContract.init(owner); // Create initial data for our contract
38+
const testnet = true; // Flag for testnet or mainnet
39+
const packageName = 'sample_SampleTactContract.pkg'; // Name of your package to deploy
40+
const outputPath = path.resolve(__dirname, 'output'); // Path to output directory
41+
const owner = Address.parse('<put_address_here>'); // Our sample contract has an owner
42+
const init = await SampleTactContract.init(owner); // Create initial data for our contract
4343

4444
// Calculations
45-
let address = contractAddress(0, init); // Calculate contract address. MUST match the address in the verifier
46-
let data = init.data.toBoc(); // Create init data
47-
let pkg = fs.readFileSync( // Read package file
45+
const address = contractAddress(0, init); // Calculate contract address. MUST match the address in the verifier
46+
const data = init.data.toBoc(); // Create init data
47+
const pkg = fs.readFileSync( // Read package file
4848
path.resolve(outputPath, packageName)
4949
);
5050

5151
// Prepare deployment
52-
let link = await prepareTactDeployment({ pkg, data, testnet });
52+
const link = await prepareTactDeployment({ pkg, data, testnet });
5353

5454
// Present a deployment link and contract address
5555
console.log('Address: ' + address.toString({ testOnly: testnet }));

docs/src/content/docs/zh-cn/book/deploy.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@ import { SampleTactContract } from "./output/sample_SampleTactContract";
3232
import { prepareTactDeployment } from "@tact-lang/deployer";
3333

3434
// Parameters
35-
let testnet = true; // Flag for testnet or mainnet
36-
let packageName = 'sample_SampleTactContract.pkg'; // Name of your package to deploy
37-
let outputPath = path.resolve(__dirname, 'output'); // Path to output directory
38-
let owner = Address.parse('<put_address_here>'); // Our sample contract has an owner
39-
let init = await SampleTactContract.init(owner); // Create initial data for our contract
35+
const testnet = true; // Flag for testnet or mainnet
36+
const packageName = 'sample_SampleTactContract.pkg'; // Name of your package to deploy
37+
const outputPath = path.resolve(__dirname, 'output'); // Path to output directory
38+
const owner = Address.parse('<put_address_here>'); // Our sample contract has an owner
39+
const init = await SampleTactContract.init(owner); // Create initial data for our contract
4040

4141
// Calculations
42-
let address = contractAddress(0, init); // Calculate contract address. MUST match with the address in the verifier
43-
let data = init.data.toBoc(); // Create init data
44-
let pkg = fs.readFileSync( // Read package file
42+
const address = contractAddress(0, init); // Calculate contract address. MUST match with the address in the verifier
43+
const data = init.data.toBoc(); // Create init data
44+
const pkg = fs.readFileSync( // Read package file
4545
path.resolve(outputPath, packageName)
4646
);
4747

4848
// Prepare deploy
49-
let link = await prepareTactDeployment({ pkg, data, testnet });
49+
const link = await prepareTactDeployment({ pkg, data, testnet });
5050

5151
// Present a deployment link and contract address
5252
console.log('Address: ' + address.toString({ testOnly: testnet }));

0 commit comments

Comments
 (0)