Open turadg opened 3 months ago
Good idea @turadg Let's start by talking about what is needed to exist in, (or not exist) orca.flows.js
:
https://github.com/Agoric/dapp-orchestration-basics/blob/main/contract/src/orca.flows.js
Should have a empty offer handler that has everything ready for the dev to start?
I think regarding "levels of scaffolding", what do we think about having different branches for the level of scaffolding?
Another note on this that was on my todo.
In our tests, you see here, I have my own mocks: https://github.com/Agoric/dapp-orchestration-basics/blob/b71ad31d32d87314aea508e68478b0a256ce43d9/contract/test/orca-contract.test.js#L39
Next, I wanted to replace these mocks, with the mocks used in multichain-testing
:
https://github.com/Agoric/agoric-sdk/blob/dfc7a48cc490097b2bb01262435f4806266b9ee8/multichain-testing/test/basic-flows.test.ts#L8
You mentioned more test support, etc
Also, I suggest the issue title can be more specific. The repo is indeed clonable, so not sure this term captures the true intent here. "Making it clonable", assumes its not clonable?
Developers should be able to clone the repo and begin adapting it to their use cases.
Cloning should work, but the pattern from our getting started docs is to use yarn create
with --dapp-template dapp-orchestration-basics
.
I just checked that it works, at least up thru running the contract unit tests:
$ cd /tmp
$ yarn create @agoric/dapp --dapp-template dapp-orchestration-basics orch-fun
...
$ cd orch-fun/
$ yarn
...
$ cd contract/
$ yarn test
...
12 tests passed
1 known failure
This repo should serve as a clear example of how to write Orchestration contracts.
Developers should be able to clone the repo and begin adapting it to their use cases.
It should provide testing supports that cover how they may extend the contracts.
It should scaffold enough to help them without creating introducing too many opinions that might get in their way.
We may have it designed around levels of scaffolding. Like a mode for getting familiar and then ejecting for customization.