rps-project/scripts/3.changeOwnerAddress.ts

16 lines
695 B
TypeScript
Raw Normal View History

2024-09-10 11:46:05 +03:00
import { Address, 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(`prev owner address: ${await mainBalance.getOwnerAddress()}`);
await mainBalance.sendChangeOwnerAddress(provider.sender(), Address.parse(contractConfig.script.newOwnerAddress));
ui.write(`current owner address: ${contractConfig.script.newOwnerAddress}`);
}