Skip to content

Commit

Permalink
fix : remove burn changes
Browse files Browse the repository at this point in the history
  • Loading branch information
plouis01 authored and peterjah committed Jun 8, 2023
1 parent b5c3b55 commit 3de80db
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions smart-contracts/assembly/contracts/FT/__tests__/ft-burn.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,10 @@ describe('Burn ERC20 to U1', () => {
u64ToBytes(TOTAL_SUPPLY - burnAmount),
);
});
test('Should burn all ERC20 of U1', () => {
const balanceU1 = bytesToU64(
balanceOf(new Args().add(user1Address.toString()).serialize()),
);
burn(new Args().add(U64.MAX_VALUE).serialize());

// check balance of U1
expect(
bytesToU64(
balanceOf(new Args().add(user1Address.toString()).serialize()),
),
).toBe(0);
});

// check totalSupply update
expect(totalSupply([])).toStrictEqual(
u64ToBytes(TOTAL_SUPPLY - balanceU1 - burnAmount),
);
});
describe('Fails burn ERC20', () => {
throws('Fails to burn because of underflow ', () =>
burn(new Args().add(U64.MAX_VALUE).serialize()),
);
});

0 comments on commit 3de80db

Please sign in to comment.