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

ton sandbox #58

Closed
wants to merge 2 commits into from
Closed

ton sandbox #58

wants to merge 2 commits into from

Conversation

fadeev
Copy link
Member

@fadeev fadeev commented Nov 1, 2024

No description provided.

@fadeev fadeev changed the base branch from main to localnet-authenticated-call November 1, 2024 08:34
const buffer = Buffer.from(TonGatewayCompiled.hex, "hex");

const cell = Cell.fromBoc(buffer)[0];
const gateway = blockchain.openContract(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swift1337 I'm following your example in protocol-contracts-ton, but it's throwing an error:

/Users/fadeev/github.com/zeta-chain/protocol-contracts-ton/node_modules/@ton/core/dist/boc/BitBuilder.js:256
        throw Error(`Invalid address. Got ${address}`);
              ^
Error: Invalid address. Got EQBGhqLAZseEqRXz4ByFPTGV7SVMlI4hrbs-Sps_Xzx01x8G
    at BitBuilder.writeAddress (/Users/fadeev/github.com/zeta-chain/protocol-contracts-ton/node_modules/@ton/core/dist/boc/BitBuilder.js:256:15)
    at Builder.storeAddress (/Users/fadeev/github.com/zeta-chain/protocol-contracts-ton/node_modules/@ton/core/dist/boc/Builder.js:237:20)
    at gatewayConfigToCell (/Users/fadeev/github.com/zeta-chain/protocol-contracts-ton/wrappers/Gateway.ts:63:10)
    at Function.createFromConfig (/Users/fadeev/github.com/zeta-chain/protocol-contracts-ton/wrappers/Gateway.ts:78:22)
    at prepareTon (/Users/fadeev/github.com/zeta-chain/localnet/packages/localnet/src/index.ts:278:16)

Have you seen this error before?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I haven't 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the problem is rooted not in the address, but rather in how I get the contract code.

  const buffer = Buffer.from(TonGatewayCompiled.hex, "hex");

  const cell = Cell.fromBoc(buffer)[0];

Is this how one gets the contract code from the compiled artifact?

@fadeev
Copy link
Member Author

fadeev commented Nov 5, 2024

Sandbox is not sufficient for our needs, #61

@fadeev fadeev closed this Nov 5, 2024
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

Successfully merging this pull request may close these issues.

2 participants