Skip to content
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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Multi-chain, multi-denom support for drip #2917

wants to merge 12 commits into from

Conversation

cor
Copy link
Contributor

@cor 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

Copy link

netlify bot commented Sep 5, 2024

Deploy Preview for unionlabs ready!

Name Link
🔨 Latest commit d2aa920
🔍 Latest deploy log https://app.netlify.com/sites/unionlabs/deploys/66d9d5be7dc40b000833e26c
😎 Deploy Preview https://deploy-preview-2917--unionlabs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 40 (🔴 down 2 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 93 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

vercel bot commented Oct 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
site ⬜️ Ignored (Inspect) Visit Preview Oct 18, 2024 1:06pm

receiver,
denom,
amount: coin.amount,
}); //todo fix amount
Copy link
Contributor

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())
Copy link
Contributor

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
// }
// }
Copy link
Contributor

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();
Copy link
Contributor

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
Copy link
Contributor

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
// }
Copy link
Contributor

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,
Copy link
Contributor

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();
Copy link
Contributor

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},
Copy link
Contributor

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 {
Copy link
Contributor

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("???");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??? 🤡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants