2

Suppose I have a contract with some parameters that can be passed in the constructor, how am I suppose to pass them within the framework ?

I tried to search the docs at the deploy part but can't find the answer there.

I see that git pull that seems to be kind of what I want, but I fail at knowing how practically I can pass them.

1 Answer 1

2

The current best way to do this is to include a contract with the parameters hard coded like the following.

contract HasParameters {
    function A(uint value) {
    }
}

contract HardCodedParameters is HasParameters(12345) {
    function HardCodedParameters() {}
}

This will allow you to run populus deploy HardCodedParameters and have the contract deployed with the provided constructor parameters.

I Understand this workaround isn't ideal and won't work for all situations. It is not entirely clear to me the best way to implement this in a generic way so that it can be done entirely from the command line. I'm very open to discussion on this github issue if you have opinions on how this should work.

1
  • waiting for the json ;)
    – euri10
    Commented Apr 14, 2016 at 4:52

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.