Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tr1sm0s1n/rust-dapp-example
DApp example of deploying and interacting with Solidity smart contract using Rust.
https://github.com/tr1sm0s1n/rust-dapp-example
alloy api axum dapp ethereum foundry rust smart-contracts solidity
Last synced: about 1 month ago
JSON representation
DApp example of deploying and interacting with Solidity smart contract using Rust.
- Host: GitHub
- URL: https://github.com/tr1sm0s1n/rust-dapp-example
- Owner: tr1sm0s1n
- License: mit
- Created: 2024-06-04T04:54:58.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-12-07T06:40:24.000Z (about 2 months ago)
- Last Synced: 2024-12-07T07:25:13.186Z (about 2 months ago)
- Topics: alloy, api, axum, dapp, ethereum, foundry, rust, smart-contracts, solidity
- Language: Rust
- Homepage:
- Size: 73.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Rust-DApp-Example
DApp example of deploying and interacting with Solidity smart contract using Rust.
## 🛠 Built With
[![Rust Badge](https://img.shields.io/badge/Rust-000?logo=rust&logoColor=fff&style=for-the-badge)](https://www.rust-lang.org/)
[![Solidity Badge](https://img.shields.io/badge/Solidity-363636?logo=solidity&logoColor=fff&style=for-the-badge)](https://soliditylang.org/)
[![Foundry Badge](https://img.shields.io/badge/Foundry-3C3C3D?logo=ethereum&logoColor=fff&style=for-the-badge)](https://book.getfoundry.sh/)
[![Alloy Badge](https://img.shields.io/badge/Alloy-3C3C3D?logo=ethereum&logoColor=fff&style=for-the-badge)](https://alloy.rs/)
[![Axum Badge](https://img.shields.io/badge/Axum-000?logo=rust&logoColor=fff&style=for-the-badge)](https://docs.rs/axum/latest/axum/)## ⚙️ Run Locally
Clone the project.
```bash
git clone https://github.com/tr1sm0s1n/rust-dapp-example.git
cd rust-dapp-example
```Install Rust.
```bash
make install-rust
```Install Foundry.
```bash
make install-foundry
```Test smart contract.
```bash
make test
```Run Anvil.
```bash
make anvil
```Compile smart contract.
```bash
make compile
```Deploy smart contract.
```bash
make deploy
```Run the application.
```bash
make run
```Listen for events (new terminal).
```bash
make listen
```Issue a certificate (new terminal).
```bash
curl -X POST http://localhost:3000/issue -H "Content-Type: application/json" -d '{"id": "101", "name": "Keith", "course": "ETH-Rust", "grade": "A", "date": "06-06-24"}'
```Fetch a certificate.
```bash
curl http://localhost:3000/fetch/101
```## 📜 License
Click [here](./LICENSE.md).
## 🎗️ Contributing
Click [here](./CONTRIBUTING.md).
## ⚖️ Code of Conduct
Click [here](./CODE_OF_CONDUCT.md).