Coder Social home page Coder Social logo

Comments (5)

mauricewbr avatar mauricewbr commented on May 24, 2024 1

Some further test revealed that I can reproduce this without a struct, just passing a vec results in a completely unpredictable value inside the script. Here is the script and script call:

The script

script; 

fn main(
    some_vec: Vec<u64>
) {
    log(some_vec.get(0).unwrap());
    require(some_vec.get(0).unwrap() == 1, "wtf is going on");
}

The script call

async function simpleScript(wallet: WalletUnlocked) {
    const scriptBin = readFileSync(
        join(__dirname, '../../../scripts/simple-script/out/debug/simple-script.bin')
    );

    const scriptInstance = new Script<Number[][], any>(scriptBin, simpleScriptAbi, wallet);

    const vec: Number[] = [1];

    const request = await scriptInstance.functions.main(vec).txParams({ gasPrice: 1 }).call();

    console.log(request);
}

from fuels-ts.

camsjams avatar camsjams commented on May 24, 2024 1

Yes we are in progress on Vec improvements across the board and should all be unblocked soon

from fuels-ts.

arboleya avatar arboleya commented on May 24, 2024

@mauricewbr Thank you for the concise reproduction.

I believe the full support for Vectors is ongoing via:

Although the issue above is about Vector output, these may be intertwined.

@camsjams Could you kindly confirm if that's the case?

from fuels-ts.

mauricewbr avatar mauricewbr commented on May 24, 2024

Hey @arboleya, Thank you for your swift comment.
Usually, when we discover that something is not yet supported, we search and find workarounds to go ahead with our DEX. This time however, I'm afraid that we will not be able to move forward without our scripts. Would you be able to estimate when these features are shipped? Thank you very much.

from fuels-ts.

mauricewbr avatar mauricewbr commented on May 24, 2024

Any updates on this? @arboleya @camsjams

from fuels-ts.

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.