Coder Social home page Coder Social logo

Comments (2)

BeepboyAlgo avatar BeepboyAlgo commented on June 16, 2024 1

Was a problem with python. Thank you.

from algo-builder.

BeepboyAlgo avatar BeepboyAlgo commented on June 16, 2024

On the line 62 from the class CompileOp the ensurePyTEALCompiled function is returning me null.

class CompileOp {
    constructor(algocl) {
        this.cacheAssured = false;
        this.algocl = algocl;
        this.pyCompile = new runtime_1.PyCompileOp();
    }
    /** Gets the TEAL compiled result from artifacts cache and compiles the code if necessary.
     * Will throw an exception if the source file doesn't exists.
     * @param filename: name of the TEAL code in `/assets` directory.
     *   (Examples: `mysc.teal, security/rbac.teal`)
     *   MUST have a .teal, .lsig or .py extension
     * @param force: if true it will force recompilation even if the cache is up to date.
     * @param scTmplParams: Smart contract template parameters (used only when compiling PyTEAL to TEAL)
     */
    async ensureCompiled(filename, force, scTmplParams) {
        const filePath = (0, runtime_1.getPathFromDirRecursive)(project_structure_1.ASSETS_DIR, filename);
        if (force === undefined) {
            force = false;
        }
        if (!filename.endsWith(exports.tealExt) && !filename.endsWith(exports.lsigExt) && !filename.endsWith(exports.pyExt)) {
            throw new Error(`filename "${filename}" must end with "${exports.tealExt}" or "${exports.lsigExt}" or "${exports.pyExt}"`); // TODO: convert to buildererror
        }
        let teal;
        let thash;
        if (filename.endsWith(exports.pyExt)) {
            const content = this.pyCompile.ensurePyTEALCompiled(filename, scTmplParams);
            console.log(content)
            [teal, thash] = [content, murmurhash.v3(content)];
        }
        else {
            [teal, thash] = this.readTealAndHash(filePath);
        }

from algo-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.