-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-chain, multi-denom support for drip #2917
base: main
Are you sure you want to change the base?
Conversation
cor
commented
Sep 5, 2024
- docs(drip): example usage
- refactor(drip): basis for multi-chain multi-denom faucet
- refactor(drip): one thread per chain, prepare for multi-denom
- feat(drip): aggregated multi-denom multisend
- feat(drip): better multi-denom batches
- fix(drip): refactor bugs
- feat(drip): working multidrip
- feat(drip): multi-chain config
- docs(drip): cleanup examples
✅ Deploy Preview for unionlabs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
receiver, | ||
denom, | ||
amount: coin.amount, | ||
}); //todo fix amount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix?
let (tm_client, driver) = WebSocketClient::builder(ws_url) | ||
impl ChainClient { | ||
pub async fn new(chain: &Chain) -> Self { | ||
let (tm_client, driver) = WebSocketClient::builder(chain.ws_url.clone()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Migrate to our cometbft-rpc
// fn gas_config(&self) -> &GasConfig { | ||
// &self.gas_config | ||
// } | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
) -> Result<String> { | ||
let secret = ctx.data::<Option<CaptchaSecret>>().unwrap(); | ||
let bypass_secret = ctx.data::<Option<CaptchaBypassSecret>>().unwrap(); | ||
let max_request_polls = ctx.data::<MaxRequestPolls>().unwrap(); | ||
let bech32_prefix = ctx.data::<Bech32Prefix>().unwrap(); | ||
// let bech32_prefix = ctx.data::<Bech32Prefix>().unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
receiver, | ||
denom, | ||
amount: coin.amount, | ||
}); //todo fix amount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo?
} | ||
// fn tm_client(&self) -> &WebSocketClient { | ||
// &self.tm_client | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete comments
@@ -67,7 +76,9 @@ async fn main() { | |||
pool.conn(|conn| { | |||
conn.execute( | |||
"CREATE TABLE IF NOT EXISTS requests ( | |||
id INTEGER PRIMARY KEY AUTOINCREMENT, | |||
id INTEGER PRIMARY KEY AUTOINCREMENT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to support existing drip?
let pool = pool.clone(); | ||
tokio::spawn(async move { | ||
loop { | ||
let config = config.clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused^3
@@ -1,9 +1,17 @@ | |||
use std::{ffi::OsString, fmt, fs::read_to_string, time::Duration}; | |||
use std::{ | |||
borrow::{Borrow, BorrowMut}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
|
||
info!("spawning worker thread"); | ||
let chain = chain.clone(); | ||
let handle = tokio::spawn(async move { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
considered using spans instead of passing the chain_id in log records?
"SELECT id, denom, address FROM requests | ||
WHERE tx_hash IS NULL AND chain_id IS ?1 LIMIT ?2", | ||
) | ||
.expect("???"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??? 🤡