Change function argument types from string to ClarityValue in Tx.contractCall
As an app developer using stacks.js, I use ClarityValues to provide function arguments. It would be nice if I could use the same arguments in clarinet tests.
E.g.
tupleCV({
version: bufferCV(Buffer.from('01000000', 'hex')),
ins: listCV([uintCV(1)])})
vs.
types.tuple({
version: "0x01000000",
ins: types.list([types.uint(1)])})
@friedger I believe right now @stacks/transactions is not fully compatible with Deno due to smart-buffer dependency, therefore we can't use it "just like that".
We can either write custom implementation coupled with Clarinet or try make stacks.js compatible with Deno.
We could also introduce a light compatibility layer in deno/index.ts that exposes the same API.
export const uintCV(uint: number) => types.uint(uint);
Thoughts?
We could also introduce a light compatibility layer in
deno/index.tsthat exposes the same API.
Actually that could be a good first step in making unified API.
Another approach that I think we could look at is denoifying stacks.js
In progress as part of #1065. Super happy to be able to revive old issue like this one 🙌 I'll close as duplicated since it's now part of a bigger initiative