tr1sm0s1n / rust-dapp-example

DApp example of deploying and interacting with Solidity smart contract using Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rust-DApp-Example

DApp example of deploying and interacting with Solidity smart contract using Rust.

๐Ÿ›  Built With

Rust Badge Solidity Badge Foundry Badge Alloy Badge Axum Badge

โš™๏ธ Run Locally

Clone the project.

git clone https://github.com/tr1sm0s1n/rust-dapp-example.git
cd rust-dapp-example

Install Rust.

make install-rust

Install Foundry.

make install-foundry

Test smart contract.

make test

Run Anvil.

make anvil

Compile smart contract.

make compile

Deploy smart contract.

make deploy

Run the application.

make run

Listen for events (new terminal).

make listen

Issue a certificate (new terminal).

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.

curl http://localhost:3000/fetch/101

๐Ÿ“œ License

Click here.

๐ŸŽ—๏ธ Contributing

Click here.

โš–๏ธ Code of Conduct

Click here.

About

DApp example of deploying and interacting with Solidity smart contract using Rust.

License:MIT License


Languages

Language:Rust 55.1%Language:Solidity 28.0%Language:Makefile 16.8%