Skip to content

Commit

Permalink
few small fixes and remove .prettierrc
Browse files Browse the repository at this point in the history
  • Loading branch information
fabcotech committed Jul 10, 2024
1 parent 2d85bf4 commit e3db172
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 36 deletions.
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

26 changes: 4 additions & 22 deletions tests/OneThousandTokenTransfers.spec.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
import { Blockchain, SandboxContract, TreasuryContract, internal } from '@ton/sandbox';
import { Cell, toNano, beginCell, Address } from '@ton/core';
import { Blockchain, SandboxContract, TreasuryContract } from '@ton/sandbox';
import { Cell, toNano, Address } from '@ton/core';
import { JettonWallet } from '../wrappers/JettonWallet';
import { JettonMinter, jettonContentToCell } from '../wrappers/JettonMinter';
import '@ton/test-utils';
import { compile } from '@ton/blueprint';

/*
These tests check compliance with the TEP-74 and TEP-89,
but also checks some implementation details.
If you want to keep only TEP-74 and TEP-89 compliance tests,
you need to remove/modify the following tests:
mint tests (since minting is not covered by standard)
exit_codes
prove pathway
*/

//jetton params

const fwd_fee = 1804014n,
gas_consumption = 15000000n,
min_tons_for_storage = 10000000n;
//let fwd_fee = 1804014n, gas_consumption = 14000000n, min_tons_for_storage = 10000000n;

describe('[One thousand token transfers]', () => {
let jwallet_code = new Cell();
let minter_code = new Cell();
Expand Down Expand Up @@ -96,8 +79,7 @@ describe('[One thousand token transfers]', () => {
it('[One thousand token transfers] mints initial 100B supply', async () => {
const initialTotalSupply = await jettonMinter.getTotalSupply();
expect(initialTotalSupply).toBe(BigInt('0'));
const user1JettonWallet = await userWallet(user1.address);
const mintResult = await jettonMinter.sendMint(
await jettonMinter.sendMint(
user1.getSender(),
user1.address,
BigInt('100000000000'),
Expand Down Expand Up @@ -135,7 +117,7 @@ describe('[One thousand token transfers]', () => {
expect(await user3JettonWallet.getJettonBalance()).toEqual(BigInt('33000000000'));
});

it('[One thousand token transfers] do the 10.000 transfers', async () => {
it('[One thousand token transfers] do the 1.000 transfers', async () => {
let i = 1;
for (const transfer of transfers) {
const senderJettonWallet = await userWallet(transfer.sender.address);
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const parseBurnNotification = (body: Cell) => {
};

const testPartial = (cmp: any, match: any) => {
for (let key in match) {
for (const key in match) {
if (!(key in cmp)) {
throw Error(`Unknown key ${key} in ${cmp}`);
}
Expand Down
2 changes: 0 additions & 2 deletions wrappers/JettonMinter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import {
Sender,
SendMode,
toNano,
internal as internal_relaxed,
storeMessageRelaxed,
} from '@ton/core';

import { Op } from './JettonConstants';
Expand Down
7 changes: 3 additions & 4 deletions wrappers/JettonWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ import {
toNano,
} from '@ton/core';

export type JettonWalletConfig = {};

export function jettonWalletConfigToCell(config: JettonWalletConfig): Cell {
export function jettonWalletConfigToCell(): Cell {
return beginCell().endCell();
}

Expand All @@ -26,8 +25,8 @@ export class JettonWallet implements Contract {
return new JettonWallet(address);
}

static createFromConfig(config: JettonWalletConfig, code: Cell, workchain = 0) {
const data = jettonWalletConfigToCell(config);
static createFromConfig(config: object, code: Cell, workchain = 0) {
const data = jettonWalletConfigToCell();
const init = { code, data };
return new JettonWallet(contractAddress(workchain, init), init);
}
Expand Down

0 comments on commit e3db172

Please sign in to comment.