Skip to content

Commit

Permalink
Merge pull request #2 from arjanjohan/big-cleanup
Browse files Browse the repository at this point in the history
Big cleanup
  • Loading branch information
arjanjohan authored Jul 8, 2024
2 parents 8353df5 + 32975d3 commit 97b6830
Show file tree
Hide file tree
Showing 64 changed files with 430 additions and 2,469 deletions.
39 changes: 26 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
⚙️ Built using NextJS, RainbowKit and Typescript.

-**Contract Hot Reload**: Your frontend auto-adapts to your smart contract as you edit it.
- 🪝 **[Custom hooks](https://docs.scaffoldeth.io/hooks/)**: Collection of React hooks wrapper around [wagmi](https://wagmi.sh/) to simplify interactions with smart contracts with typescript autocompletion.
- 🪝 **[Custom hooks](https://docs.scaffoldeth.io/hooks/)**: Collection of React hooks to simplify interactions with smart contracts.
- 🧱 [**Components**](https://docs.scaffoldeth.io/components/): Collection of common web3 components to quickly build your frontend.
- 🔥 **Burner Wallet & Local Faucet**: Quickly test your application with a burner wallet and local faucet.
- 🔐 **Integration with Wallet Providers**: Connect to different wallet providers and interact with the Ethereum network.
- 🔐 **Integration with Wallet Providers**: Connect your Petra Wallet and interact with the Aptos or Movement M1 network.

![Debug Contracts tab](https://github.com/scaffold-eth/scaffold-eth-2/assets/55535804/b237af0c-5027-4849-a5c1-2e31495cccb1)

Expand All @@ -32,8 +31,8 @@ To get started with Scaffold-Move, follow the steps below:
1. Clone this repo & install dependencies

```
git clone https://github.com/scaffold-eth/scaffold-eth-2.git
cd scaffold-eth-2
git clone https://github.com/arjanjohan/scaffold-move.git
cd scaffold-move
yarn install
```

Expand All @@ -43,15 +42,26 @@ yarn install
yarn chain
```

This command starts a local Ethereum network using Hardhat. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in `hardhat.config.ts`.
This command starts a local Ethereum network using Hardhat. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in `hardhat.config.ts`.
// TODO: rewrite this for Movement

3. On a second terminal, deploy the test contract:
3. On a second terminal, initialize a new account.

TODO: create yarn script for this.

```
movement aptos init
```

Choose custom and enter `https://devnet.m1.movementlabs.xyz/` as rest and faucet endpoints.

3a. Deploy the test contract:

```
yarn deploy
```

This command deploys a test smart contract to the local network. The contract is located in `packages/hardhat/contracts` and can be modified to suit your needs. The `yarn deploy` command uses the deploy script located in `packages/hardhat/deploy` to deploy the contract to the network. You can also customize the deploy script.
This command deploys a test smart contract to the local network. The contract is located in `packages/hardhat/contracts` and can be modified to suit your needs. The `yarn deploy` command uses `movement aptos move publish` to publish the contract to the network. After this is executes the script located in `scripts/loadContracts.js` to make the new contracts available in the nextjs frontend.

4. On a third terminal, start your NextJS app:

Expand All @@ -67,16 +77,19 @@ Visit your app on: `http://localhost:3000`. You can interact with your smart con
- Edit your frontend homepage at `packages/nextjs/app/page.tsx`. For guidance on [routing](https://nextjs.org/docs/app/building-your-application/routing/defining-routes) and configuring [pages/layouts](https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts) checkout the Next.js documentation.
<!-- - Edit your smart contract test in: `packages/hardhat/test`. To run test use `yarn hardhat:test` -->

## TODO:
## Next steps

For this hackathon I kept the scope small due to the time constraints. I build only the most essential and useful features, so that developers can start using Scaffold Move right away. However, there is much more that I want to add to this project after the hackathon. If you have any ideas or suggestions, please reach out and I will add it to this list.

- Styling wallet connect button
- Store network data in scaffold-config
- Debug page
- Display Resources?
- Read and write functionality
- Make Move hooks for ScaffoldReadContract and ScaffoldWriteContract
- Display Resources as well?
- Msg for no result on view methods
- Add `aptos init` script that runs `aptos init` and then copies the new address to the `move.toml` file.
- Hot contract reload: Add `aptos move deploy` script that copies the address to the frontend file `addresses.ts`.
- Fix colors for dark mode
- Ensure export default deployedContracts satisfies GenericContractsDeclaration
- Add block explorer page

## Links

Expand Down
27 changes: 0 additions & 27 deletions packages/nextjs/app/blockexplorer/_components/AddressCodeTab.tsx

This file was deleted.

35 changes: 0 additions & 35 deletions packages/nextjs/app/blockexplorer/_components/AddressComponent.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions packages/nextjs/app/blockexplorer/_components/AddressLogsTab.tsx

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions packages/nextjs/app/blockexplorer/_components/BackButton.tsx

This file was deleted.

92 changes: 0 additions & 92 deletions packages/nextjs/app/blockexplorer/_components/ContractTabs.tsx

This file was deleted.

39 changes: 0 additions & 39 deletions packages/nextjs/app/blockexplorer/_components/PaginationButton.tsx

This file was deleted.

Loading

0 comments on commit 97b6830

Please sign in to comment.