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

Adding auto-stake-it contract to dapp --WIP-- #91

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f6720a5
chore: remove unused scripts from package.json
amessbee Nov 12, 2024
4388e69
chore: remove unused startup files
amessbee Nov 12, 2024
eecdb19
chore: clean contract/Makefile
amessbee Nov 12, 2024
15ff112
chore: relocate unused utility script
amessbee Nov 12, 2024
6411fe3
chore: update gitignore, delete duplicate copies of scripts
amessbee Nov 12, 2024
7d2a6c9
chore: relocate init script - update paths
amessbee Nov 12, 2024
1fcb5e0
chore: deleting (PROBABLY) unused files
amessbee Nov 12, 2024
35e7d93
chore: remove unused scripts
amessbee Nov 12, 2024
f2e6eaf
chore: files needed for integration
amessbee Nov 13, 2024
0443e6b
fixup! addition to package scripts
amessbee Nov 15, 2024
47fd183
chore: convert contract/flows js to ts
amessbee Nov 18, 2024
7199164
chore: add deps for auto-stake-it
amessbee Nov 19, 2024
11ea364
chore: fixing unit tests for auto-stake-it
amessbee Nov 20, 2024
d7091c9
fixup! files relocation
amessbee Nov 20, 2024
4ee7e70
fixup! removing duplicate files
amessbee Nov 20, 2024
62c7c54
fixup! removed exos and utils dir
amessbee Nov 20, 2024
6fa7d51
fixup! format
amessbee Nov 20, 2024
6dbc2d3
chore: factor out EXEC_AGD and EXEC_OSMO
amessbee Nov 21, 2024
3b12483
chore: update package.json
amessbee Nov 21, 2024
0688d41
Merge pull request #88 from Agoric/ms/cleanup
amessbee Dec 6, 2024
0520f10
chore: adding proposal and init files for auto-stake-it
amessbee Dec 6, 2024
505f80f
chore: convert contract/flows js to ts
amessbee Nov 18, 2024
831f234
chore: add deps for auto-stake-it
amessbee Nov 19, 2024
22d8b24
chore: fixing unit tests for auto-stake-it
amessbee Nov 20, 2024
ec7c4c5
fixup! files relocation
amessbee Nov 20, 2024
8278b41
fixup! removing duplicate files
amessbee Nov 20, 2024
c5ff488
fixup! removed exos and utils dir
amessbee Nov 20, 2024
d7cb2d9
fixup! format
amessbee Nov 20, 2024
86d41c2
chore: adding proposal and init files for auto-stake-it
amessbee Dec 6, 2024
0e1a3be
chore: autoStakeIt is deployable
amessbee Dec 9, 2024
de1c7dc
Merge branch 'adding-auto-stake' of https://github.com/Agoric/dapp-or…
amessbee Dec 9, 2024
ae22f12
feat: Basic UI for Autostake
amessbee Dec 11, 2024
f075662
chore: Updates to UI
amessbee Dec 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
yarn link-cli
echo "$HOME/bin" >> $GITHUB_PATH

- name: Build dapp-agoric-basics
- name: Build dapp-orchestration-basics
run: yarn build

- name: Setup Starship Infrastructure
Expand Down Expand Up @@ -86,10 +86,10 @@ jobs:
if: always()
run: kubectl logs hermes-agoric-osmosis-0 --container=relayer || true

- name: Capture and print agoric-cosmos relayer logs
- name: Capture and print agoric-gaia relayer logs
if: always()
run: kubectl logs hermes-agoric-gaia-0 --container=relayer || true

- name: verify contracts started onchain
- name: verify contract(s) started onchain
run: |
curl http://localhost:1317/agoric/vstorage/data/published.agoricNames.instance | grep orca
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
contract/startOrcaContract-permit.json
contract/startOrcaContract-plan.json
contract/startOrcaContract.js

contract/bundles

# Logs
logs
Expand Down Expand Up @@ -37,3 +37,10 @@ dist-ssr
!.yarn/releases
!.yarn/sdks
!.yarn/versions

e2e-testing/revise-chain-info-permit.json
e2e-testing/revise-chain-info-plan.json
e2e-testing/revise-chain-info.js
e2e-testing/starship-chain-info.js
contract/startAutoStakeItContract.js
contract/startAutoStakeItContract-plan.json
24 changes: 0 additions & 24 deletions Makefile

This file was deleted.

21 changes: 0 additions & 21 deletions README-local-chain.md

This file was deleted.

35 changes: 26 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,83 +6,102 @@

The Orchestration Basics dApp showcases various features of the orchestration API running inside of an end-to-end environment, and a user interface:


## Set up the local environment

- Follow the instructions in `agoric-sdk/multichain-testing/README.md` to setup local multi-chain environment needed to run and test dApp. You can run `agd status` to check if this was successful.

- Run the following in the top level directory of `dapp-orchestration-basics` to run `hermes update` in the background:

```sh
make hermes-update &
make hermes-update &
```

## Fund the account

- Run the following in the `contract/` directory of `dapp-orchestration-basics`:

```
make fund
```

This will fund `ADDR`, `CLIENTADDR`, and `CLIENT_OSMO_ADDR` as defined in `contract/Makefile`.

## Build & Deploy the dapp

- From the `contract/` directory of `dapp-orchestration-basics`, run:

```
make e2e
```

Wait for this step to complete (this could take a while!) before you start UI in the next.

## Start UI

- Run the following inside of the `ui/` directory of `dapp-orchestration-basics`:

```sh
yarn dev
```

<img src="./images/ui.png" width="100%" />

---
---

# Tests

From top-level directory:

```
make test-orca
```

# tests from root directory

```
yarn cache clean; yarn; yarn workspace dapp-agoric-orca-contract test ; rm -rf -v yarn.lock package-lock.json node_modules contract/node_modules; yarn; yarn workspace dapp-agoric-orca-contract test
```

without clean:

```
yarn workspace dapp-agoric-orca-contract deploy
```

# deploy from root directory
# deploy from root directory

```
yarn cache clean; yarn; yarn workspace dapp-agoric-orca-contract test ; rm -rf -v yarn.lock package-lock.json node_modules contract/node_modules; yarn; yarn workspace dapp-agoric-orca contract:deploy
```

without clean:

```
yarn workspace dapp-agoric-orca-contract deploy
```

# e2e build/deploy

```
yarn workspace dapp-agoric-orca-contract deployc
```

# e2e environment using `multichain-testing`

using starship

```
make teardown ; make stop; make stop-forward; make clean; make; make port-forward
```

# e2e workspaces

```
yarn workspace dapp-agoric-orca-contract build; yarn workspace dapp-agoric-orca-contract e2e
```

# note

Troubleshooting remote calls

If an ordinary synchronous call (obj.method()) fails because the method doesn't exist, the obj may be remote, in which case E(obj).method() might work.
Expand All @@ -95,21 +114,19 @@ make override-chain-registry
```

# funding on osmosis

```console
osmosisd tx bank send faucet osmo1dw3nep8yqy5szzxn6hmma6j2z77vp4wz8tkh0w3gyrruwny0w03s070kaa 299999999uosmo --chain-id osmosislocal --gas-adjustment 2 --gas auto --from faucet --gas-prices 0.0025uosmo
```

example rpc for balances:

```
http://127.0.0.1:26657/abci_query?path=%22/cosmos.bank.v1beta1.Query/AllBalances%22&data=%22%5Cn-agoric12j5kzvrwunqvrga5vm4zpy3mkeh3lvyld0amz5%22
```

# tmp fund ica

```console
agd tx bank send keplr1 agoric15ch7da0d8nvqc8hk6dguq4ext0lvskpjcwm3patf8sygm63chmpqjlzt74 1000uist -y --chain-id agoriclocal
```

# Interface
you can run `yarn dev` inside of the `ui` folder.

<img src="./images/ui.png" width="100%" />
Loading
Loading