internal tooling @ Bloom
empowering young builders @ Bagel Fund
building @ ๐คซ
๐ A fast & easy way to interface w/ Farcaster.xyz via Rust ๐ฆ
Home Page: https://crates.io/crates/farcaster_rs
License: MIT License
internal tooling @ Bloom
empowering young builders @ Bagel Fund
building @ ๐คซ
Just pushed a major FIR/FNR Registry refactor - everything from file structure to interface.
ABI, JSON, logs etc. were all over the place. Now the only interface is via Registry struct !
This is first commit and not everything is implemented yet, some things have rough edges, barely any optimizations etc. Even though it appears to work it surely needs more work (like implementing FIR sync).
Registry struct implements incremental updates of FIR/FNR via sync(). Everything else that is implemented as public interface replaces/merges previous code and simplifies it.
Functions like get_address_by_username() make it very easy - both for ourselves and crate users. Check get_user_by_username() in src/users/get_user.rs to see how it simpified things :)
Registry is created alongside Farcaster and encapsulated publicly. It's available to our code as self.registry
.
Crate users can access it easily as well:
let farcaster = Farcaster::new(...).await?;
let address = farcaster.registry.get_address_by_username("mistapproach");
println!("{:#?}", address);
Registry can also by instantiated on its own if desired:
use farcaster_rs::Registry;
let registry = Registry::new(ethereum_provider).await?;
let address = registry.get_address_by_username("mistapproach");
println!("{:#?}", address);
If Registry is created as mutable it can be later used to do incremental update of FIR/FNR state by simply calling registry.sync().await
(needs more testing though).
The downsides:
For it to make sense i had to declare Farcaster::new() and Registry::new() as async with Result. Other than that there is a little more mutability around that i would like. I'm sure we can achieve more streamlined integration over time.
Files added:
Files moved:
Files removed:
After working on this i have some ideas on how to better integrate FarcasterAccount.
How do we want to split up/manage migration from V1 -> V2 endpoints & authentication? open to any ideas, just excited to be able to build out fc-rs and add fulll features :D
From my experience it slows down work considerably as i switch from one task to another. Besides my local repo is a mess.
Could we possibly accept PRs in a more traditional way?
I don't have the time atm to look at this but the package just... doesnt work
" Compiling ethers-etherscan v1.0.0
error[E0004]: non-exhaustive patterns: ethers_core::types::Chain::Chiado
not covered"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.