diff --git a/package.json b/package.json index daba304..9fce28b 100644 --- a/package.json +++ b/package.json @@ -6,16 +6,16 @@ "test": "jest" }, "devDependencies": { - "@ton-community/blueprint": "^0.0.2", - "@ton-community/sandbox": "^0.2.0", - "@ton-community/test-utils": "^0.0.2", + "@ton/blueprint": "^0.24.0", + "@ton/sandbox": "^0.22.0", + "@ton/test-utils": "^0.4.2", + "@ton/core": "^0.59.0", + "@ton/crypto": "^3.3.0", + "@ton/ton": "^15.0.0", "@types/jest": "^29.2.6", "@types/node": "^18.11.18", "jest": "^29.3.1", "prettier": "^2.8.3", - "ton": "^13.3.0", - "ton-core": "^0.46.0", - "ton-crypto": "^3.2.0", "ts-jest": "^29.0.5", "ts-node": "^10.9.1", "typescript": "^4.9.4" diff --git a/scripts/deployDistributor.ts b/scripts/deployDistributor.ts index 9de4088..79400af 100644 --- a/scripts/deployDistributor.ts +++ b/scripts/deployDistributor.ts @@ -1,6 +1,6 @@ -import {Address, toNano} from 'ton-core' +import {Address, toNano} from '@ton/core' import {Distributor} from '../wrappers/Distributor' -import {compile, NetworkProvider} from '@ton-community/blueprint' +import {compile, NetworkProvider} from '@ton/blueprint' export async function run(provider: NetworkProvider) { let myAddress = Address.parse('EQBhoQiXKyy4iFcbVHZ1s2YcdiuSEfwNdemBtm7eBNet4-in') diff --git a/tests/Distributor.spec.ts b/tests/Distributor.spec.ts index b0bb3fe..b8ae448 100644 --- a/tests/Distributor.spec.ts +++ b/tests/Distributor.spec.ts @@ -1,9 +1,9 @@ -import {Blockchain} from '@ton-community/sandbox' -import {beginCell, Cell, SendMode, toNano} from 'ton-core' +import {Blockchain} from '@ton/sandbox' +import {beginCell, Cell, SendMode, toNano} from '@ton/core' import {Distributor} from '../wrappers/Distributor' -import '@ton-community/test-utils' -import {compile} from '@ton-community/blueprint' -import {randomAddress} from "@ton-community/test-utils"; +import '@ton/test-utils' +import {compile} from '@ton/blueprint' +import {randomAddress} from "@ton/test-utils"; function commentBody(comment: string) { return beginCell() @@ -74,21 +74,21 @@ describe('Distributor', () => { const result = await sender.send({ to: distributor.address, value: toNano('1'), - sendMode: SendMode.PAY_GAS_SEPARATLY, + sendMode: SendMode.PAY_GAS_SEPARATELY, }) expect(result.transactions).toHaveTransaction({ from: distributor.address, to: firstShareAddress, value: (v) => v !== undefined && v > toNano('1') / 2n - toNano('0.01'), - body: (body) => body.equals(commentBody('first half')) + body: (body:any) => body.equals(commentBody('first half')) }) expect(result.transactions).toHaveTransaction({ from: distributor.address, to: secondShareAddress, value: (v) => v !== undefined && v > toNano('1') / 2n - toNano('0.01'), - body: (body) => body.equals(commentBody('second half')) + body: (body:any) => body.equals(commentBody('second half')) }) }) diff --git a/wrappers/Distributor.compile.ts b/wrappers/Distributor.compile.ts index cfc833b..3eee50f 100644 --- a/wrappers/Distributor.compile.ts +++ b/wrappers/Distributor.compile.ts @@ -1,4 +1,4 @@ -import {CompilerConfig} from '@ton-community/blueprint' +import {CompilerConfig} from '@ton/blueprint' export const compile: CompilerConfig = { targets: ['contracts/distributor.fc'], diff --git a/wrappers/Distributor.ts b/wrappers/Distributor.ts index 3ac0a75..edd5ebe 100644 --- a/wrappers/Distributor.ts +++ b/wrappers/Distributor.ts @@ -8,7 +8,7 @@ import { DictionaryValue, Sender, SendMode, toNano -} from "ton-core"; +} from "@ton/core"; import {crc32, crc32str} from "../utils/crc32"; export type DistributorShare = { @@ -94,7 +94,7 @@ export class Distributor implements Contract { async sendDeploy(provider: ContractProvider, via: Sender, value: bigint) { await provider.internal(via, { value, - sendMode: SendMode.PAY_GAS_SEPARATLY, + sendMode: SendMode.PAY_GAS_SEPARATELY, body: beginCell().endCell(), }) } @@ -102,7 +102,7 @@ export class Distributor implements Contract { async sendUpdateData(provider: ContractProvider, via: Sender, newData: Cell) { await provider.internal(via, { value: toNano('0.05'), - sendMode: SendMode.PAY_GAS_SEPARATLY, + sendMode: SendMode.PAY_GAS_SEPARATELY, body: beginCell().storeUint(crc32str('op::update_data'), 32).storeRef(newData).endCell(), }) } @@ -110,7 +110,7 @@ export class Distributor implements Contract { async sendUpdateCode(provider: ContractProvider, via: Sender, newCode: Cell) { await provider.internal(via, { value: toNano('0.05'), - sendMode: SendMode.PAY_GAS_SEPARATLY, + sendMode: SendMode.PAY_GAS_SEPARATELY, body: beginCell().storeUint(crc32str("op::update_code"), 32).storeRef(newCode).endCell(), }) } @@ -118,7 +118,7 @@ export class Distributor implements Contract { async sendTopup(provider: ContractProvider, via: Sender, value: bigint) { await provider.internal(via, { value, - sendMode: SendMode.PAY_GAS_SEPARATLY, + sendMode: SendMode.PAY_GAS_SEPARATELY, body: beginCell().storeUint(crc32str("op::topup"), 32).endCell(), }) }