Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment error #3

Open
mcnckc opened this issue Sep 30, 2024 · 0 comments
Open

Deployment error #3

mcnckc opened this issue Sep 30, 2024 · 0 comments

Comments

@mcnckc
Copy link

mcnckc commented Sep 30, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant