rps-project/scripts/2.depositToMainBalance.ts
2024-09-10 11:46:05 +03:00

15 lines
697 B
TypeScript

import { toNano } from '@ton/core';
import { MainBalance } from '../wrappers/MainBalance';
import { compile, NetworkProvider } from '@ton/blueprint';
import contractConfig from '../config/contract.config';
import { getMainBalanceContract } from './utils';
export async function run(provider: NetworkProvider) {
const ui = provider.ui();
const mainBalance = await getMainBalanceContract(provider);
ui.write(`Current contract balance: ${await mainBalance.getBalance()}`);
await mainBalance.sendDeploy(provider.sender(), toNano(contractConfig.script.depositAmount));
ui.write(`${contractConfig.script.depositAmount} TON has been sent to smc address: ${mainBalance.address}`);
}