Deploy contract with constructor


I’m trying to deploy a contract that receives two arguments in the constructor like bellow:

When I try to deploy using the REST API I receive the following message:
“no arguments provided to function.”

If I try to deploy using the dashboard, I receive an alert saying:
“argument names don’t match: (_nf, _weight)()”

How can I provide these arguments using the REST API?

Thank you.

Marcos Roberto Silva


Hi @marcos.silva3 - make sure to provide arguments to the constructor function when you upload the contract. The request body should contain (1) your password, (2) the contract source, and (3) the constructor arguments.

Try uploading the contract again with an args parameter (e.g. nf: nf, custodian: custodian, weight: weight).


Hi Eli.
It worked!

Thank you.

Marcos Roberto Silva