TransWikia.com

Call method taking unit type as parameter from JavaScript

Tezos Asked on August 19, 2021

I have a Truffle instance of the contract and I call the method like this

contract_instance.method();

This gives me this error message:

method Received 0 arguments while expecting on of the follow signatures ([["unit"]])

How do I express the Unit value in JS?

One Answer

You express the Unit in JavaScript by calling the method like this

contract_instance.method([["unit"]]);

Correct answer by Thorkil Værge on August 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP