deploy test
This commit is contained in:
22
scripts/deploy.ts
Normal file
22
scripts/deploy.ts
Normal 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
16
scripts/send.ts
Normal 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")
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user