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)
- in Wallet project, pnpm build:all is broken when using local linked sdk HOT 1
- TS SDK bytecode root function gives different result as Rust SDK / Sway functions HOT 1
- Improve `changelog` template HOT 4
- Introduce a TS SDK testing standard and approach HOT 6
- Read transaction parameters from chain and not hardcoded values HOT 7
- Add to Docs More Detailed Guidance on Customizable Transactions
- Implement Method to Transfer Assets to a Contract
- `tsup --dts` error when building. `The inferred type of 'X' cannot be named without a reference to '...node_modules/...'. This is likely not portable. A type annotation is necessary`
- RFC: Fuel ASM Developer Experience HOT 4
- Update the `Receipt` with new variant `Mint` and `Burn`
- Remove the usage of the old ABI format from the code
- Retry mechanism HOT 5
- Improve Predicate Vector input support HOT 1
- Add missing fields to getMessageProof
- `pnpm node:run` still uses the previous `fuel-core` version when the version is changed
- fuel-ts UX Assesment HOT 2
- Update pnpm run dev to not build sway projects
- Remove `pnpm lint` from pre-push script
- Lack of Explanation for fuel-gauge in README
- Missing README for fuels Package HOT 1
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.