-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unused code and clear TODOs (#115)
## Description Removed unused code and addressed outdated/irrelevant todos
- Loading branch information
1 parent
83356a1
commit 65fd2dc
Showing
66 changed files
with
91 additions
and
2,024 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,41 @@ | ||
# Kread | ||
|
||
TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project. | ||
KREAd is a decentralized application deployed on Agoric, an open-source development company launching an interoperable Proof-of-Stake chain and economy. The dApp is imagined, built, and designed by Kryha. The SAGES art and comic is created by Enmanuel Heredia. | ||
|
||
## Getting Started | ||
|
||
TODO: Guide users through getting your code up and running on their own system. In this section you can talk about: | ||
The KREAd application consists of a set of smart contracts deployed on Agoric and a frontend application to interact with them. The frontend can be accessed at [kread.app](http://kread.app/) and includes a network selector on the bottom left of the landing page to connect to different networks: | ||
|
||
1. Installation process | ||
2. Software dependencies | ||
3. Latest releases | ||
4. API references | ||
1. Mainnet: hosts the official KREAd application, you can use it to mint, customize, and view your character as well as sell and buy using the KREAd marketplace. IST is used for payments and transaction fees can be paid in BLD or IST. | ||
2. Emerynet: this network is meant for testing purposes and can be used to try out the application without spending real funds. The functionality is identical to Mainnet although the content may vary. You can use the [emerynet faucet](https://emerynet.faucet.agoric.net/) to get fake IST which can be used to interact with the KREAd contract. | ||
3. Local: the KREAd frontend can also be connected to an Agoric chain running locally, this gives you full control by allowing changes to KREAd's source code. You can find instructions on how run KREAd locally [here](./agoric/README.md) | ||
|
||
## Build and Test | ||
## Build and Test Locally | ||
|
||
TODO: Describe and show how to build your code and run the tests. | ||
Ensure you are in the agoric folder (`KREAd/agoric/`) otherwise `cd agoric` | ||
|
||
## Contribute | ||
|
||
TODO: Explain how other users and developers can contribute to make your code better. | ||
|
||
If you want to learn more about creating good readme files then refer the following [guidelines](https://docs.microsoft.com/en-us/azure/devops/repos/git/create-a-readme?view=azure-devops). You can also seek inspiration from the below readme files: | ||
|
||
- [ASP.NET Core](https://github.com/aspnet/Home) | ||
- [Visual Studio Code](https://github.com/Microsoft/vscode) | ||
- [Chakra Core](https://github.com/Microsoft/ChakraCore) | ||
|
||
## To Run a local AG-Solo + Wallet + frontend | ||
|
||
### Terminal 1 - agoric | ||
1. Start the chain | ||
1. `make local-testnet` | ||
2. make the committee | ||
1. `make kread-committee` | ||
3. provision the fee collector wallet | ||
1. `make provision-fee-collector` | ||
4. start the KREAd contract | ||
1. `make clean start-kread` | ||
5. start frontend locally | ||
1. `cd ../frontend` | ||
2. `yarn & yarn dev` | ||
3. open http://localhost:5173/ | ||
|
||
To confirm the contract was deployed successfully: | ||
|
||
1. `agoric start -v --reset` | ||
- in chain log you should see "CONTRACT INIT SUCCESS" | ||
- after that `agd query vstorage children published` should include "kread" | ||
|
||
### Terminal 2 - agoric | ||
If you encounter `Request would exceed mint limit` try `make fund-account` | ||
If you are running a local testnet make sure you select "Local" on the frontend's network selector (shown on the bottom right of the landing & connect-wallet pages) | ||
|
||
1. `agoric deploy contract/kread-deploy-contract.js api/kread-deploy-api.js` | ||
2. `agoric open --repl` | ||
|
||
### Terminal 3 - frontend | ||
|
||
1. Remove `type: module` from `package.json` | ||
2. yarn start | ||
3. Remember to put back the `type: module` before commiting your changes | ||
|
||
## Run multiuser | ||
|
||
To run the application for more than one user follow these steps: | ||
## Contribute | ||
|
||
0. Install GO! | ||
1. `brew install go` | ||
1. Run Make in your local agoric-sdk directory | ||
1. `cd <local-sdk-path>/packages/cosmic-swingset` | ||
2. `make` | ||
2. Run the chain: | ||
1. Open a new terminal window | ||
2. `cd agoric/` | ||
3. `make chain-reset` and wait until it starts validating blocks | ||
3. Run ag-solo for the first user: | ||
1. Open a new terminal window | ||
2. `cd agoric/` | ||
3. `make solo0-reset` and wait until it prints "Deployed wallet!" | ||
4. Run ag-solo for the second user: | ||
1. Open a new terminal window | ||
2. `cd agoric/` | ||
3. `make solo1-reset` and wait until it prints "Deployed wallet!" | ||
5. Configure wallet and localStorage for the first user: | ||
1. Open a new terminal window | ||
2. `cd agoric/` | ||
3. `make wallet0` and open the url in a new browser tab | ||
6. Configure wallet and localStorage for the second user: | ||
1. Open a new browser or a new session | ||
2. `make wallet1` and open the url in the new session or browser | ||
7. Deploy contract and api: | ||
1. Open `frontend/package.json` and add `"type": "module"` to the configuration | ||
2. From `agoric/` directory run `make deploy` | ||
3. After everything is deployed, remove the line you added to `frontend/package.json` | ||
8. On the session with the wallet listening to port 8001: | ||
1. Navigate to `local.agoric.com` | ||
2. In the text field type `https://localhost:8001/#accessToken=<access_token_value>` where `access_token_value` is the value you get when executing `make wallet1` | ||
3. Click `save`, then click `open` | ||
4. Navigate to `local.agoric.com` | ||
5. In the text field type `https://localhost:8001/` | ||
6. Click `save`, then click `open` | ||
9. Run frontend: | ||
1. Open a new terminal window | ||
2. `cd frontend/` | ||
3. `yarn start` | ||
4. Navigate to `localhost:3000` on each session and approve the app in both wallets | ||
10. Enjoy! | ||
Refer to [Contributing](./CONTRIBUTING.md) for guidelines | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.