https://github.com/bh2smith/eth-diesel
Native Ethereum Types for Diesel Engine
https://github.com/bh2smith/eth-diesel
Last synced: about 1 year ago
JSON representation
Native Ethereum Types for Diesel Engine
- Host: GitHub
- URL: https://github.com/bh2smith/eth-diesel
- Owner: bh2smith
- License: mit
- Created: 2023-11-23T12:56:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-23T21:19:50.000Z (over 2 years ago)
- Last Synced: 2025-02-17T10:47:59.475Z (over 1 year ago)
- Language: Rust
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eth-diesel
Native Ethereum Types for Diesel Engine
The goal is to be able to use hex strings (Addresses, etc in Table Models --- since the integer type U256 seems fine).
The reason is for JSON serialization of table models not to return byte arrays, but rather hex strings.
```sh
# Create Env
echo DATABASE_URL=postgres://postgres:password@localhost/diesel_demo > .env
# Run Empty postgres database
docker run --name diesel_demo -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres:latest
# Run Migration (to create types table and insert one record).
diesel migration run
```
### Check
```sh
cargo fmt && cargo check && cargo clippy --all-targets
```
### Test
```sh
cargo test
```