5
votes
Accepted
Call method taking unit type as parameter from JavaScript
You express the Unit in JavaScript by calling the method like this
contract_instance.method([["unit"]]);
4
votes
Accepted
Get number of entries in bigmap
This is not something you will be able to achieve with Taquito (at least not for now, that will change in the future) and you have to use an indexer API. I recommend Better Call Dev API, you can ...
2
votes
Accepted
How do I call the FA2 balance_of endpoint through Truffle?
As far as I know, you cannot check if the entrypoint returns the balance with JavaScript, because the entrypoint doesn't return a value but emits a transaction. I didn't try it for a FA2 token ...
2
votes
How do I change the originating address in truffle?
I haven't found a solution myself using what is provided by Truffle to do what you want, so here is what I do. I guess you must be using Taquito. In this case, you can use this function to change the ...
2
votes
Accepted
Passing parameters in truffle tests
The correct syntax for the parameter is the following: "remove", [account1, account2] (2 different parameters, no object).
I built a simple contract to emulate your case, deployed it and ...
1
vote
"Invalid bytes error" on migration of PascalLigo contract
It worked as soon as I provided the HEX of the addressSet[] values.
Maybe someone can explain why this is the case. I stumbled upon this solution after trying out for hours by accident.
1
vote
Passing parameters in truffle tests
I believe the error is that you pass the 2 parameters (add and remove), but you should only pass the chosen one.
I suggest you try : { add: [account1, account2] }
1
vote
Accepted
Call method taking timestamp as parameter from JavaScript
For some reason you need to represent the timestamp as a string. So contract_instance.test("1"); will work.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
truffle × 11smart-contracts × 3
michelson × 3
ligo × 3
javascript × 3
testing × 3
taquito × 2
tezos-client × 1
key × 1
bigmap × 1
fa2 × 1
timestamp × 1
compile × 1