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

Func-js cannot compile #pragma version =0.2.0 contracts #29

Open
m0leynik opened this issue Nov 13, 2024 · 0 comments
Open

Func-js cannot compile #pragma version =0.2.0 contracts #29

m0leynik opened this issue Nov 13, 2024 · 0 comments

Comments

@m0leynik
Copy link

m0leynik commented Nov 13, 2024

🐞 Description
An attempt to compile TON wallet example contract (the first one mentioned in Docs) leads to the error:

Func compilation error: wallet-v4-code.fc:1:1: error: FunC version 0.4.5 does not satisfy condition =0.2.0
  #pragma version =0.2.0;

According to func-js sources seems like there's no way to specify FunC version to compile this type of contracts.
Expected result is succeeded compilation.

💻 Environment
npm module
"@ton-community/func-js": "^0.8.0"

🔢 Code to reproduce bug

const walletContractPath = 'path-to/wallet-contract/func/wallet-v4-code.fc'
const stdlibContractPath = 'path-to/wallet-contract/func/stdlib.fc'
let walletCode = readFileSync(walletContractPath, 'utf-8')
let stdlibCode = readFileSync(stdlibContractPath, 'utf-8')

const compiledResult = await func.compileFunc({
    targets: ["wallet-v4-code.fc"],
    sources: {
        "wallet-v4-code.fc": walletCode,
        "stdlib.fc": stdlibCode,
    }
});

📝 Detail
Not sure should it be bug or feature request. So thanks in advance, any advises are appreciated

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