Skip to content

docs: orchestration contract package skeleton #11323

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

Draft
wants to merge 48 commits into
base: master
Choose a base branch
from
Draft

Conversation

dckc
Copy link
Member

@dckc dckc commented Apr 23, 2025

Description

Intended for use as the basis of SPIKE projects. Do not merge.


To develop an orchestration contract:

  1. make a rough sequence diagram - test/my-orch-sequence.mmd
  2. refine the sequence diagram to @agoric/orchestration objects and messages
  3. prototype each of the objects in the sequence diagram and make a test to exercise them - test/my-orch-seq-sim.test.ts
  4. refine the prototype into a contract (src/my.contract.ts) with flows (my.flows.ts) and make a test for it (test/my-orch-contract.test.ts)

Template orchestration contract package, extracted from fast-usdc-contract and some earlier teaching materials. Written in typescript.

Further refinements should add a orch-skel-deploy package and perhaps separate an orch-skel-contract package from the orch-skel API package.

Security / Scaling / Upgrade Considerations

N/A

Testing Considerations

Includes a couple very basic tests.

dckc added 30 commits April 23, 2025 16:27
 - fix liquid staking / forwarding logic
 - StrideAccount is not ICA
 - make a stride account for strideAddr
 - punt resolve; it's just promise resolution
@dckc dckc requested a review from a team as a code owner April 23, 2025 22:49
Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems useful but I have reservations about adding it to agoric-sdk. Since it's meant to be a template, why not have it in a new repo? Easy to clone and begin working.

@dckc
Copy link
Member Author

dckc commented Apr 23, 2025

... why not have it in a new repo?

I'll give it a quick try...

"@agoric/fast-usdc": "^0.1.0",
"@agoric/internal": "^0.3.2",
"@agoric/swingset-liveslots": "^0.10.2",
"@agoric/vow": "^0.1.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@turadg when I use a new repository, I get a bunch of...

? Please choose a version of "@agoric/vow" from this list: 0.2.0-upgrade-20-dev-ef71
cfd.0

I guess I could use dev packages. But then it's another independent set of dependencies to track. hm.

"test:c8": "c8 --all $C8_OPTIONS ava",
"test:xs": "exit 0",
"lint-fix": "yarn lint:eslint --fix",
"lint": "run-s --continue-on-error lint:*",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in a new repo, yarn lint says /bin/sh: 1: run-s: not found

],
"scripts": {
"build": "exit 0",
"test": "ava",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in a new repo, yarn test says:

  Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/connolly/projects/orch-skel/node_modules/@agoric/orchestration/test/network-fakes.ts' imported from /home/connolly/projects/orch-skel/test/supports.ts

@dckc dckc marked this pull request as draft April 23, 2025 23:06
@dckc
Copy link
Member Author

dckc commented Apr 25, 2025

Copy link

cloudflare-workers-and-pages bot commented Apr 25, 2025

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 674bbf0
Status: ✅  Deploy successful!
Preview URL: https://025f308d.agoric-sdk.pages.dev
Branch Preview URL: https://dc-orch-template.agoric-sdk.pages.dev

View logs

@dckc
Copy link
Member Author

dckc commented Apr 25, 2025

@dtribble also asked whether the skeleton here is transactional or portfolio; implicitly that suggests adding a portfolio example.

Meanwhile, we do have other portfolio example materials:

  • orca contract in dapp-orch-basics
  • orchestration/src/examples/auto-stake-it

@dckc dckc force-pushed the dc-orch-template branch 2 times, most recently from ffa30d9 to 674bbf0 Compare May 5, 2025 04:51
@mergify mergify bot mentioned this pull request May 5, 2025
1 task
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