Agoric / dapp-agoric-basics

This is a simple app for the Agoric smart contract platform.
0 stars 3 forks source link

feat: initial 3 exercises #5

Closed LuqiPan closed 4 months ago

LuqiPan commented 5 months ago

This PR consists of the agoric exercises I demo'd last Friday inspired by https://rustlings.cool

This diff is agains agoric-exercises instead of main branch for now.

Meta questions:

  1. should we create a new, separate repo for dapp-agoric-exercises or should we put it in dapp-agoric-basics(this repo)?
  2. how do we do tests/CI for agoric-exercises? The tests will fail if we don't put the answers in, however, if the answers are already in that defeats the purpose of teaching developers.
  3. how do we organize exercises? Right now there are a lot of duplicate code(see comments below), how do we avoid that while making these tests work?

More exercises ideas:

  1. create a purse for Alice and deposit money in it to teach the concepts of mint, purse, payment, etc
  2. an exercise around proposalShape, pattern
  3. an exercise around failing a join request if checks in joinHandler don't pass
  4. more to be added
dckc commented 5 months ago

Meta questions:

  1. should we create a new, separate repo for dapp-agoric-exercises or should we put it in dapp-agoric-basics(this repo)?

Please not more repos :)

  1. how do we do tests/CI for agoric-exercises? The tests will fail if we don't put the answers in, however, if the answers are already in that defeats the purpose of teaching developers.

put answer-patches somewhere?

  1. how do we organize exercises? Right now there are a lot of duplicate code(see comments below), how do we avoid that while making these tests work?

maybe successive versions / branches?

0xpatrickdev commented 5 months ago

how do we organize exercises? Right now there are a lot of duplicate code(see comments below), how do we avoid that while making these tests work? maybe successive versions / branches?

I'm in favor of successive versions. If there's multiple lessons, we could use numbered folders. We could also use something like .final. to denote the completed versions.

/01-getting-started
  getting-started.js
  getting-started.test.js
  getting-started.final.js # if different from original
  getting-started.test.final.js

how do we do tests/CI for agoric-exercises? The tests will fail if we don't put the answers in, however, if the answers are already in that defeats the purpose of teaching developers.

Ava has test.failing(...) and test.skip(...) modifiers we can leverage.

dckc commented 5 months ago

converting to draft to reduce review expectations based on recent prioritization discussion

LuqiPan commented 4 months ago

Closing as we don't have plan to merge this into main as of now