Skip to content

Commit

Permalink
fix(boc): tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dvlkv committed Feb 27, 2024
1 parent 56686a6 commit c4d3bd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/tuple/tuple.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('tuple', () => {
});

it('should serialize slices', () => {
const golden = 'te6ccgEBAwEAHwACDwAAAQQAB0AgAgEAHeBhIIRGeIhda/QFs8ibOAAA';
const golden = 'te6ccgEBAwEAHwACDwAAAQQAB0AgAQIAAAAd4GEghEZ4iF1r9AWzyJs4';
let serialized = serializeTuple([
{
"type": "slice", "cell": beginCell().storeCoins(BigInt("123123123123123234211234123123123")).endCell()
Expand All @@ -52,7 +52,7 @@ describe('tuple', () => {
});

it('should serialize address', () => {
const golden = 'te6ccgEBAwEAMgACDwAAAQQAELAgAgEAQ5_5N0I0swMbwhQMZdlgFyGLyjnRvwQ_TZTRvL8db8NQtNAAAA';
const golden = 'te6ccgEBAwEAMgACDwAAAQQAELAgAQIAAABDn_k3QjSzAxvCFAxl2WAXIYvKOdG_BD9NlNG8vx1vw1C00A';
let serialized = serializeTuple([
{
"type": "slice", "cell": beginCell().storeAddress(Address.parse('kf_JuhGlmBjeEKBjLssAuQxeUc6N-CH6bKaN5fjrfhqFpqVQ')).endCell()
Expand All @@ -72,7 +72,7 @@ describe('tuple', () => {
});

it('should serialize tuples', () => {
let golden = 'te6ccgEBEAEAjgADDAAABwcABAkDAQEGBwABAgEJBAAHQCAFAgAGBAECAwUAHeBhIIRGeIhda/QFs8ibOAIACAcAEgEAAAAAAAHimQASAQAAAAAAAAB7ARIB//////////8KARIBAAAAAAAAAAMLARIBAAAAAAAAAAIMARIBAAAAAAAAAAENAQIADgESAQAAAAAAAAABDwAA';
let golden = 'te6ccgEBEAEAjgADDAAABwcABAEIDQESAf//////////AgESAQAAAAAAAAADAwESAQAAAAAAAAACBAESAQAAAAAAAAABBQECAAYBEgEAAAAAAAAAAQcAAAIACQwCAAoLABIBAAAAAAAAAHsAEgEAAAAAAAHimQECAw8BBgcAAQ4BCQQAB0AgDwAd4GEghEZ4iF1r9AWzyJs4';
const st = parseTuple(Cell.fromBoc(Buffer.from(golden, 'base64'))[0]);
let gs = serializeTuple(st);
// console.warn(inspect(parseStack(gs), false, null, true));
Expand Down
2 changes: 1 addition & 1 deletion src/types/StateInit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('StateInit', () => {
}))
.endCell()
.toBoc({ idx: false, crc32: true });
expect(boc.toString('base64')).toEqual('te6cckEBAwEACwACATQCAQACAgACAX/38hg=')
expect(boc.toString('base64')).toEqual('te6cckEBAwEACwACATQBAgACAQACAoN/wQo=')

// Parse
let parsed = loadStateInit(Cell.fromBoc(boc)[0].beginParse());
Expand Down

0 comments on commit c4d3bd7

Please sign in to comment.