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

local e2e demo with contract error propagation updates #6

Merged
merged 28 commits into from
Jul 1, 2024

Conversation

whalelephant
Copy link
Contributor

  • contracts/* - allow the return of VerifyResult so that caller can handle appropriately but also easier to show error
  • avida-ts/docker - docker setup for local testnets with hermes relayer
  • avida-ts - e2e demo using cosmes to interact with neutron and sd-jwt-js to issue / create presentation for avida-example contract

Copy link
Contributor

@lampkin-diet lampkin-diet left a comment

Choose a reason for hiding this comment

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

Hey! Great job and typescript skills 👍
I just raised some minor things. Let's chat if you have some questions

cheqd-resource-uploader:
image: ghcr.io/nymlab/cheqd-node:v2.0.1-arm64
ports:
- target: 26656
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't need to expose ports here cause we do not run the node inside the container.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated in 7ce3c18

depends_on:
- neutron-node
ports:
- target: 26656
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume here the same thing with exposing ports

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated in 7ce3c18

"ci:check": "pnpm --recursive run check",
"setup": "pnpm run reset && pnpm install",
"reset": "pnpm dlx rimraf --glob ./**/node_modules",
"build": "NODE_ENV=production pnpm run --recursive --stream build",
Copy link
Contributor

Choose a reason for hiding this comment

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

Usually, if there are some jobs like build:txutils or others it's assumed that build action combines all the things together, like:

"build": "pnpm run build:txutils && pnpm run build:types && ..."

I think it worth to change build job into something like build:production or other thing which points to exact action.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixedin 7ce3c18

},
};

export async function get_sdjwt(privatePEM: string): Promise<SDJwtVcInstance> {
Copy link
Contributor

Choose a reason for hiding this comment

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

let's keep the same style, camelCase for functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in 7ce3c18

memo,
};

let fee = await deployer.estimateFee(storeTx);
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any possible errors here could happen? Internet issues or others.
I think it worth at least to use try-catch construction.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in 7ce3c18

@@ -0,0 +1,2 @@
// @see https://www.totaltypescript.com/ts-reset -- do not add any other lines of code to this file
Copy link
Contributor

Choose a reason for hiding this comment

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

As I remember, .d.ts files are results of generating from .ts files and they should not be placed in the repo cause build artifacts. Also, is it used somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is used in reset, admittedly not used too much in this code.

@@ -0,0 +1,75 @@
// @ts-check
Copy link
Contributor

Choose a reason for hiding this comment

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

The same issue here. Is it generated file and should it be placed in the repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually I am struggling with @ts-check for the avida-common-types at the moment in scripts/local-e2e-demo.mjs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

checks work in 7ce3c18

@@ -0,0 +1,37 @@
# Typescript library for AVIDA
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add building contract and schemas stages to doc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added doc in 7ce3c18

@whalelephant whalelephant force-pushed the feat/docker branch 3 times, most recently from ca9f87d to ea61dd1 Compare June 26, 2024 15:43
@whalelephant whalelephant merged commit 3ad7e78 into feat/mvp Jul 1, 2024
3 checks passed
@whalelephant whalelephant deleted the feat/docker branch July 1, 2024 09:02
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