use-ink / ink-examples

A set of examples for ink! smart contract language. Happy hacking!
https://use.ink
The Unlicense
104 stars 54 forks source link

Add different implementation of delegator example and dao contract #14

Closed Daanvdplas closed 1 year ago

Daanvdplas commented 1 year ago

I wrote a different implementation of the delegator example where in stead of instantiating all the contracts when instantiating the delegator contract, the delegator contract is instantiated with already instantiated contracts.

It shows a more extended example of using the build_call in a contract message, as well as how to e2e-test it.

I'm curious to hear whether it could be useful. If I need to make some changes or thoughts for improvement I'd love to hear (e.g. perhaps a better name)!

Daanvdplas commented 1 year ago

Added a DAO smart contract.

Commented out emit_event() logic which is not possible at the moment, due to cross contract implementation (issue), but is good to include in the future.

Would love to get feedback :)

cmichi commented 1 year ago

Heya @Daanvdplas, thanks for the example! Could you close this PR and recreate it for the ink repo into the integration-tests folder there?