tact icon indicating copy to clipboard operation
tact copied to clipboard

The version 1.4.1 cannot deploy contracts properly.

Open lanlingxiawu opened this issue 1 year ago • 2 comments

The version 1.4.1 cannot deploy contracts properly. tact.config.json { "name": "ExampleJettonMaster", "path": "./src/contracts/jetton_example.tact", "output": "./src/output", "mode": "fullWithDecompilation", "options":{ } },

deploy ts code:

let packed_msg2 = beginCell()
.store(
    storeJettonMint({
        $$type: "JettonMint",
        origin: deployer_wallet_contract.address,
        receiver: deployer_wallet_contract.address,
        amount: supply,
        custom_payload: beginCell().endCell(),
        forward_ton_amount: 0n,
        forward_payload: beginCell().endCell().asSlice(),
    })
)
.endCell();

await deployer_wallet_contract.sendTransfer({
    seqno,
    secretKey,
    messages: [
        internal({
            to: jettonMaster,
            value: deployAmount,
            init: {
                code: init.code,
                data: init.data,
            },
            body: packed_msg2,
        }),
    ],
});

It runs properly in versions below 1.4.0.

lanlingxiawu avatar Aug 09 '24 07:08 lanlingxiawu

Thank you for reporting.

  • Could you please clarify what "versions below 1.4.0" means? Does it include 1.4.0 or not?

  • What exact error message do you see?

  • Please link a repository with a reproducible example, so we could try running something like npx blueprint deploy to see the issue.

anton-trunov avatar Aug 09 '24 08:08 anton-trunov

Thank you for reporting.

  • Could you please clarify what "versions below 1.4.0" means? Does it include 1.4.0 or not?
  • What exact error message do you see?
  • Please link a repository with a reproducible example, so we could try running something like npx blueprint deploy to see the issue.

Could you please clarify what "versions below 1.4.0" means? Does it include 1.4.0 or not?

I used the following code to deploy the contract. It could be deployed successfully in versions below 1.4.0. In version 1.4.0, adding the "mode": "fullWithDecompilation" property allows it to deploy successfully. However, in version 1.4.1, it fails to deploy.

https://github.com/howardpen9/jetton-implementation-in-tact

lanlingxiawu avatar Aug 09 '24 08:08 lanlingxiawu

@lanlingxiawu We just released a dev version of Tact (next tag on NPM) that is supposed to fix this issue. Could you please try it and check it does indeed resolve your issue? https://www.npmjs.com/package/@tact-lang/compiler/v/1.4.1-dev.20240813

Here are some instructions on how to use the next version of Tact: https://github.com/tact-lang/tact/wiki/Using-unreleased-versions-of-tools-early#dev-versions-of-tact-with-blueprint

anton-trunov avatar Aug 13 '24 02:08 anton-trunov

actually, it's easier to install that Tact version like so:

yarn add @tact-lang/[email protected]

anton-trunov avatar Aug 13 '24 03:08 anton-trunov

Thank you, using the development version did indeed allow the contract to be successfully deployed.

lanlingxiawu avatar Aug 13 '24 15:08 lanlingxiawu

Perfect! Thank you so much for trying it out and closing the issue, really appreciate it

anton-trunov avatar Aug 13 '24 16:08 anton-trunov

@lanlingxiawu Btw, we just release Tact v1.4.2 with that fix and even more.

anton-trunov avatar Aug 13 '24 16:08 anton-trunov