-
Notifications
You must be signed in to change notification settings - Fork 7
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
Cleanup DApp - Remove Unused Stuff, Reorganize Rest #88
Conversation
505ea34
to
83e9cf2
Compare
ae90c94
to
73bbd40
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff. And this is a good start. It cleans up the major, glaring unused stuff and I'm happy with this. Left a couple minor comments. We can do follow-up cleanups along the way when incorporating other contracts
"start:ui": "cd ui && yarn dev", | ||
"format": "yarn prettier --write .github contract ui", | ||
"lint:format": "yarn prettier --check .github contract ui", | ||
"lint": "yarn lint:format && yarn workspaces foreach --all run lint", | ||
"lint:fix": "yarn format && yarn workspaces foreach --all run lint:fix", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we need to keep this
"test": "yarn workspaces foreach --all run test", | ||
"build": "yarn workspaces foreach --all run build", | ||
"postinstall": "npx patch-package" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if there are any repercussions for removing this. Will let @Jovonni confirm this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mujahidkay brought them back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please capture the relevant GH issue in PR description before merging (and after @Jovonni 's signoff/approval)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
various suggestions...
"start:docker": "docker compose up -d", | ||
"docker:logs": "docker compose logs --tail 200 -f", | ||
"docker:bash": "docker compose exec agd bash", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this start:docker
and docker:logs
are our getting started docs, I suggest that yarn start:docker
and the like should give a diagnostic about what to do instead. (Be sure to give a failing exit code.)
Or... if it's easy enough to just make docker:logs
work (i.e. show the agd logs) then we should do that. (likewise docker:bash
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
start:docker
now points to readme inmultichain-testing
to setup envdocker:logs
now shows agd logsdocker:bash
now opensagoriclocal-genesis-0
shell
"docker:bash": "docker compose exec agd bash", | ||
"docker:make": "docker compose exec agd make -C /workspace/contract", | ||
"make:help": "make list", | ||
"start": "make clean start", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likewise yarn start
should give a clue about what to do instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn start
now deploys contract on chain, i.e., make e2e
Updated the rest same as above.
ui/package.json
Outdated
@@ -9,9 +9,7 @@ | |||
"build": "tsc && NODE_OPTIONS=--max-old-space-size=4096 vite build", | |||
"lint": "yarn tsc && eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | |||
"lint:fix": "yarn lint --fix", | |||
"preview": "vite preview", | |||
"test": "exit 0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn test
seems like it should stay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
|
||
PROVISION_POOL_ADDR=agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346 | ||
ADDR := $(shell kubectl exec -i agoriclocal-genesis-0 -c validator -- sh -c '\ | ||
if ! agd keys show $(USERNAME) >/dev/null 2>&1; then \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there some reason we don't use a fixed mnemonic and address for user1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plan to work on this in a subsequent PR unless someone else gets to it before me.
contract/Makefile
Outdated
@@ -163,12 +50,9 @@ fund: fund-provision-pool check-balance | |||
fund-osmo: | |||
kubectl exec -i osmosislocal-genesis-0 -c validator -- osmosisd tx bank send faucet ${CLIENT_OSMO_ADDR} 9870000000uosmo --fees 1000uosmo -y; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest factoring out EXEC_AGD
and EXEC_OSMO
like...
EXEC_AG0=kubectl exec -i agoriclocal-genesis-0 -c validator -- |
Then the k8s stuff doesn't get in the way when reading stuff like...
dapp-orchestration-basics/e2e-testing/Makefile
Lines 92 to 93 in c4ea224
provision-smart-wallet: | |
$(EXEC_AG0) agd tx swingset provision-one wallet $(ADDR) SMART_WALLET --from $(ADDR) -y -b block |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
contract/tools/explode-bundle.sh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tools
is usually js code. Maybe scripts
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless there is a known purpose for this script, I am removing it.
* @param {string} name | ||
* @param {boolean | 'verbose'} enable | ||
*/ | ||
export const makeTracer = (name, enable = true) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we getting makeTracer
from somewhere else?
If we're just not using it currently, I suggest keeping it around for occasional usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This a duplicate file - there is already another one in use.
@@ -6,6 +6,7 @@ | |||
"type": "module", | |||
"scripts": { | |||
"test": "ava", | |||
"build:deployer": "rollup -c rollup.config.mjs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this project still using rollup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it does not but there some tests still using it. Maybe we can clean that later.
contract/scripts/init-orca.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a reference to this file from deployment code that needs to be updated, I'm pretty sure.
ok... looks like it was fixed in a later commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we keeping contract/src/platform-goals/start-contract.js
? Then the README helps a little.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README is back - although it does not say anything useful AFAICT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comments have been addressed; thanks.
As I wasn't at the Nov 4 meeting, I don't think I'm in a good position to approve this.
As discussed in the Nov 4, 2024, Team-Devrel sync, here is a proposed cleanup of a few things before we add more contracts.
The changes in this pull request are:
Updated build step name from "Build dapp-agoric-basics" to "Build dapp-orchestration-basics"
Changed logging steps and verification step names to be more descriptive
Added contract/bundles and new entries for e2e-testing files
Updated and removed unused targets
Removed unused scripts.
Ref(s):