Skip to content
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

Open
ethers opened this issue Jul 23, 2016 · 6 comments
Open

Contract deployment documented and verifiable #14

ethers opened this issue Jul 23, 2016 · 6 comments

Comments

@ethers
Copy link
Collaborator

ethers commented Jul 23, 2016

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

@Georgi87
Copy link
Contributor

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?

@ethers
Copy link
Collaborator Author

ethers commented Jul 25, 2016

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.

@ethers ethers changed the title setup() should either be in constructor or fixed and renamed if invokable multiple times Contract deployment documented and verifiable Jul 25, 2016
@Georgi87
Copy link
Contributor

Georgi87 commented Aug 2, 2016

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.

@ethers
Copy link
Collaborator Author

ethers commented Aug 4, 2016

Yes, that's a good idea.

@Georgi87
Copy link
Contributor

Georgi87 commented Aug 5, 2016

@ethers
Copy link
Collaborator Author

ethers commented Aug 10, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants