Hey guys
I have a question about testing Smart Contracts written in Tact!
consider this deploy message:
const deployResult = await testContract.send(
deployer.getSender(),
{
value: toNano('1'),
},
{
$$type: 'Deploy',
queryId: 0n,
}
);
What is the value for? Is it going to be used as commission? I tried to get balance of both deployer and the testContract after deployment but the no matter what the deploy value is, there is not much change in their balances.
Nov 7, 2023, 9:18 AM
value is the tonCoin value you want to pay for this "Sending Tx"
Nov 7, 2023, 10:06 AM
Would this value be added to contract's balance?
I checked the contract's balance after sending the deploy message but the value is not adding up to it's balance
Nov 7, 2023, 10:07 AM
And what is its balance then?
Nov 7, 2023, 10:07 AM
0n
I use this snippet to get my contract's balance
console.log((await blockchain.getContract(testContract.address)).balance);
console.log((await blockchain.getContract(testContract.address)).balance);
Nov 7, 2023, 10:09 AM