Closed jordipainan closed 9 months ago
CodeRabbit
This pull request introduces support for Farcaster tokens in the census creation process, adds new SQL queries and tables for user management and fid-appkey mappings, and modifies existing providers to include a CensusKeys
method. It also includes necessary configuration changes and database updates to accommodate these new features.
Files | Summary |
---|---|
api/api.go, api/censuses.go | Added support for farcaster tokens in the census creation process, including logging, field updates, and a new transformCensus method. |
cmd/census3/main.go, contracts/bindContract.sh, example.env | Enabled farcaster support in the codebase, added new ABI declarations, commented out previous ABIs, and introduced a new configuration variable CENSUS3_FARCASTER . |
db/* | Ensured non-empty database name before initialization, added 'farcaster' token type, introduced new SQL query StrategyTokensContainsType , added last_block column to tokens table, updated version information in generated code comments, and modified insert tokens query. |
scanner/providers/farcaster/* | Introduced a new farcaster package with database connections, initialization functions, methods to update user data, SQL statements for users and fid_appkeys tables, SQL queries for user management and fid-appkey mappings, struct definitions, and new SQL queries for interacting with users and fid_appkeys tables. |
scanner/providers/gitcoin/gitcoin_provider.go, scanner/providers/holders_provider.go, scanner/providers/poap/poap_provider.go, scanner/providers/web3/erc20_provider.go, scanner/providers/web3/erc721_provider.go, scanner/providers/web3/erc777_provider.go | Added a new CensusKeys method to various provider structs that returns data as is without transformation. |
scanner/providers/types.go, scanner/providers/web3/const.go, scanner/providers/web3/web3_provider.go | Added a new contract type "FARCASTER", new log topics related to farcaster functionality, and a new field DB *db.Database in the Web3ProviderConfig struct. |
🐇💻
In the land of code where the shadows lie, A rabbit hopped forth under the cloudless sky. With each line written, each test case passed, The software grew stronger, its foundations vast. Farcaster tokens now join the fray, As we celebrate this coding day! 🎉
Uplevel your code reviews with CodeRabbit Pro
### CodeRabbit Pro If you like this project, please support us by purchasing the [Pro version](https://coderabbit.ai). The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.
squash commits please
Summary by CodeRabbit
farcaster
in the configuration struct to enable Farcaster functionality.farcaster
package with database operations and user management functions.CensusKeys
method to various provider structs to transform data based on the provider's strategy.