-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contract deployment documented and verifiable #14
Comments
Because contracts reference each other mutually, at least one cannot use the constructor function. It can only be changed when no address has been set yet, or one is == 0. What is the best practice to solve mutual dependencies? |
I see. I'll rename this issue. Example: Basically, we don't want the Guard to set the address for the Fund, and then when it sets the Token, it "sneakily" changes the address of the Fund. |
What do you think about solving circular dependencies by having a reference contract, which has all contract addresses and is used by all other contracts to get references? All contracts would set the reference contract address in their constructor and there would be only one setup in reference contract to set the addresses once. |
Yes, that's a good idea. |
Deployment instructions can be found here: https://github.com/ConsenSys/singulardtv-contracts/blob/master/README.md Based on deploy.json https://github.com/ConsenSys/singulardtv-contracts/blob/master/deploy.json |
After seeing the deploy.json, it doesn't seem that a reference contract is needed (the overhead doesn't seem worth it). Keeping this issue open because there still needs to instructions on how anyone can verify that the deployed contracts match the Github source code. |
setup() should either be invokable only one time, and if so the code should just be in the constructor.
or if it's invokable multiple times by the owner/guard, this logic appears to break that and this function should also then be renamed to something like
reconfigure
for clarity.example:
https://github.com/ConsenSys/singulardtv-contracts/blob/740b3ef30b61044071d1b5e4b1f42d967df047c8/contracts/SingularDTVCrowdfunding.sol#L193-L194
The text was updated successfully, but these errors were encountered: