Comments (5)
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.
Yes we are in progress on Vec improvements across the board and should all be unblocked soon
from fuels-ts.
@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.
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.
Any updates on this? @arboleya @camsjams
from fuels-ts.
Related Issues (20)
- Inform users if their `fuels` version is outdated
- Upgrade to `[email protected]`
- Avoid Re-Adding Resources When Estimate TX At `Account.getTransactionCost`
- Re-evaluate usage of `Buffer` in bytecode compression HOT 1
- Error message when building types via `create-fuels` HOT 1
- Published integration tests failing silently
- Using `create-fuels` with `npm` gives outdated `fuels` version HOT 10
- Ensure support for all connectors in `create fuels` template
- Integrate embedded testnet faucet via iframe in `create fuels` template
- Upgrade to `[email protected]`
- Ensure `create-fuels` template app is mobile-friendly
- Remove the custom burner wallet from `create fuels` template HOT 1
- `fuels dev` does not watch after finishing execution HOT 3
- Document hidden transaction summary methods
- Make `vite` the default template for `create fuels`
- Upgrade connectors in `apps` and `template` to `0.25.0`
- Reduce required polyfills HOT 1
- Unused `OperationName` Enum Entries in the SDK HOT 1
- Transaction Failure Due to Non-Existent UTXO After Retry Attempt
- Fix integration / UI tests for `create-fuels` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuels-ts.