Skip to content

Deployment error #3

@mcnckc

Description

@mcnckc

I'm trying to deploy contract following provided example

I installed ton.js with yarn add @ton/ton @ton/crypto @ton/core buffer.

Running

import { Cell } from 'ton';

const vanityCode = Cell.fromBoc(
  Buffer.from('te6ccgEBAgEAMgABFP8A9KQT9LzyyAsBAEbT7UTQddch+kCDB9ch0QLQ0wMx+kAwWMcF8ojU1NEB+wTtVA==')
)[0];

with node main.js

results in error:

node_modules\ton-core\dist\boc\cell\serialization.js:160
        throw Error('Invalid magic');
              ^

Error: Invalid magic
    at parseBoc (node_modules\ton-core\dist\boc\cell\serialization.js:160:15)
    at deserializeBoc (node_modules\ton-core\dist\boc\cell\serialization.js:168:15)
    at Cell.fromBoc (node_modules\ton-core\dist\boc\Cell.js:34:51)
    at main.js:3:25

Node.js version: v20.17.0
Yarn version: 1.22.22

How could this be fixed, or how else to achieve succesful deployment?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions