In solidity, I can pick the deployment parameters of my smart contract using the constructor keyword.

constructor( /* params here */) {...}

What is the rust/stylus equivalent of that?

1 Answer 1


There is currently no support for constructors in Stylus. The suggested approach is to call an init function after deployment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.