Skip to content

Comments

Refactorization to manage multiple contracts#4

Open
tillkolter wants to merge 6 commits intookwme:masterfrom
tillkolter:master
Open

Refactorization to manage multiple contracts#4
tillkolter wants to merge 6 commits intookwme:masterfrom
tillkolter:master

Conversation

@tillkolter
Copy link

During the playground phase of my contribution for the Aeternity hackathon, I found myself with two contracts soon. I realised, that the current CLI only generated a javascript contract wrapper at a time, overwriting the last generation.

This could be easily fixed by removing the line in DappScratch.writeWrapper which deleted the old dapp-scratch-wrapper folder, but I also found, that having more than one contract, the initialisation part for web3 and the account initialisation should not be part of the contract wrapper class in a scenario that manages more than one contract, so I separated the contracts from the initialisation part and introduced a manager class, that manages the account related initialisation and instantiates the contracts.

@okwme
Copy link
Owner

okwme commented Dec 19, 2017

@tillkolter is the identity observer just for the Haello app?

@tillkolter
Copy link
Author

@okwme well, I needed it for my scenario, because I wanted to be informed when the account is "identified" to query more identity specific details from the contract. I thought this kind of pattern might be helpful for others as well.

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

Successfully merging this pull request may close these issues.

2 participants