deploy test

This commit is contained in:
2026-03-07 20:59:13 +03:00
parent 45d84d94cb
commit 4ae2cb19d8
4 changed files with 280 additions and 64 deletions

22
scripts/deploy.ts Normal file
View File

@@ -0,0 +1,22 @@
import { toNano, Address } from '@ton/core';
import { Gift } from '../build/Gift/Gift_Gift';
import { NetworkProvider } from '@ton/blueprint';
import { mnemonicToPrivateKey } from '@ton/crypto';
import { WalletContractV4 } from '@ton/ton';
import { encryptMessage, getRecipientPublicKey } from './crypto/crypto';
export async function run(provider: NetworkProvider) {
const ui = provider.ui();
let gift = provider.open(await Gift.fromInit());
await gift.send(provider.sender(),
{
value: toNano("0.05"),
bounce: null
},
null
)
await provider.waitForDeploy(gift.address);
}

16
scripts/send.ts Normal file
View File

@@ -0,0 +1,16 @@
import { toNano, Address } from '@ton/core';
import { Gift } from '../build/Gift/Gift_Gift';
import { NetworkProvider } from '@ton/blueprint';
import { mnemonicToPrivateKey } from '@ton/crypto';
import { WalletContractV4 } from '@ton/ton';
import { encryptMessage, getRecipientPublicKey } from './crypto/crypto';
export async function run(provider: NetworkProvider) {
const ui = provider.ui();
let receiver = await ui.inputAddress("receiver");
await provider.sender().send({
to: receiver,
value: toNano("1")
})
}