Address, not String
This commit is contained in:
parent
d82fae161f
commit
8ebe7000ad
1
TODO.md
1
TODO.md
|
@ -88,6 +88,7 @@
|
||||||
- [x] send getTransaction rpc requests to the private rpc tier
|
- [x] send getTransaction rpc requests to the private rpc tier
|
||||||
- [x] I'm hitting infura rate limits very quickly. I feel like that means something is very inefficient
|
- [x] I'm hitting infura rate limits very quickly. I feel like that means something is very inefficient
|
||||||
- whenever blocks were slow, we started checking as fast as possible
|
- whenever blocks were slow, we started checking as fast as possible
|
||||||
|
- [x] create user script should allow setting requests per minute
|
||||||
- [-] basic request method stats (using the user_id and other fields that are in the tracing frame)
|
- [-] basic request method stats (using the user_id and other fields that are in the tracing frame)
|
||||||
- [ ] use siwe messages and signatures for sign up and login
|
- [ ] use siwe messages and signatures for sign up and login
|
||||||
- [ ] "chain is forked" message is wrong. it includes nodes just being on different heights of the same chain. need a smarter check
|
- [ ] "chain is forked" message is wrong. it includes nodes just being on different heights of the same chain. need a smarter check
|
||||||
|
|
|
@ -17,7 +17,7 @@ fn default_rpm() -> u32 {
|
||||||
pub struct CreateUserSubCommand {
|
pub struct CreateUserSubCommand {
|
||||||
#[argh(option)]
|
#[argh(option)]
|
||||||
/// the user's ethereum address
|
/// the user's ethereum address
|
||||||
address: String,
|
address: Address,
|
||||||
|
|
||||||
#[argh(option)]
|
#[argh(option)]
|
||||||
/// the user's optional email
|
/// the user's optional email
|
||||||
|
@ -38,12 +38,8 @@ impl CreateUserSubCommand {
|
||||||
let txn = db.begin().await?;
|
let txn = db.begin().await?;
|
||||||
|
|
||||||
// TODO: would be nice to use the fixed array instead of a Vec in the entities
|
// TODO: would be nice to use the fixed array instead of a Vec in the entities
|
||||||
let address = self
|
// TODO: how can we use custom types with
|
||||||
.address
|
let address = self.address.to_fixed_bytes().into();
|
||||||
.parse::<Address>()
|
|
||||||
.context("Failed parsing new user address")?
|
|
||||||
.to_fixed_bytes()
|
|
||||||
.into();
|
|
||||||
|
|
||||||
let u = user::ActiveModel {
|
let u = user::ActiveModel {
|
||||||
address: sea_orm::Set(address),
|
address: sea_orm::Set(address),
|
||||||
|
|
Loading…
Reference in New Issue