Skip to content
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

feat: create initial skeleton for dapp-agoric-basics #1

Closed
wants to merge 10 commits into from

Conversation

LuqiPan
Copy link
Collaborator

@LuqiPan LuqiPan commented Jan 30, 2024

references: Agoric/documentation#938

Summary

This PR creates the minimal skeleton for dapp-agoric-basics, including rudimentary CI.

This PR does not contain any UI code as I'm planning to use ui-kit and hoping to follow docs produced as part of Agoric/documentation#922

Testing

On my local machine:

  • yarn lint
yarn lint
yarn run v1.22.21
$ yarn workspaces run lint

> agoric-basics-contract
$ eslint '**/*.js'
✨  Done in 1.27s.
  • yarn test
yarn test
yarn run v1.22.21
$ yarn workspaces run test

> agoric-basics-contract
$ ava --verbose

  ✔ contract greets by name
  ─

  1 test passed
✨  Done in 0.65s.

import '@endo/init';
import { E } from '@endo/far';
// eslint-disable-next-line import/no-unresolved -- https://github.com/avajs/ava/issues/2951
import test from 'ava';
Copy link
Member

Choose a reason for hiding this comment

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

I think we might need to do import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js';... but I am not up to date on latest best practices here and could use a 2nd opinion.

Copy link
Member

Choose a reason for hiding this comment

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

Comment on lines +64 to +72
"eslintConfig": {
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2021
},
"extends": [
"@agoric"
]
},
Copy link
Member

Choose a reason for hiding this comment

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

This looks good. As a heads up, dapp-offer-up has a backlog item to expand this configuration to include type checking, and no-void + no-floating-promises rules: Agoric/dapp-offer-up#35 (comment)

This has been blocked by lack of type support in the current releases, which prevents us from checking this sort of thing into CI: Agoric/dapp-offer-up#31 (This assumption may need to be revisited, as the two eslint rules seem separate from typechecking)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Got it, created #2 to track this

"useWorkspaces": true,
"workspaces": [
"contract"
],
Copy link
Member

Choose a reason for hiding this comment

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

Hm. no endo resolutions to work around Agoric/agoric-sdk#8621

I was expecting something started with yarn create @agoric/dapp --dapp-template dapp-offer-up with support for starting the chain in docker, deploying the contract, testing that it's not >1MB compressed, etc.

Copy link
Member

Choose a reason for hiding this comment

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

@dckc dckc mentioned this pull request Jan 31, 2024
10 tasks
@LuqiPan
Copy link
Collaborator Author

LuqiPan commented Feb 7, 2024

Closing this as we decided to use dapp-offer-up as the baseline

@LuqiPan LuqiPan closed this Feb 7, 2024
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.

3 participants