Skip to content

Conversation

@AyveeBera
Copy link
Collaborator

@AyveeBera AyveeBera commented Nov 5, 2025

Add comprehensive vault image generation system including:

  • Token image downloading from external sources
  • LP token fetching from blockchain
  • Image merging for multi-asset vaults
  • Metadata updates with generated images
  • Cloudinary upload integration
  • Environment configuration example

Test dry run:

pnpm generate:vault-images --vault-address=0xFB657cd154E661dDF3E229529D92545640b19292 --dry-run --chain=mainnet --save-local

Add comprehensive vault image generation system including:
- Token image downloading from external sources
- LP token fetching from blockchain
- Image merging for multi-asset vaults
- Metadata updates with generated images
- Cloudinary upload integration
- Environment configuration example
…red backgrounds

- Change image output format from PNG to JPG in all merge functions
- Set background color to match border/brand color instead of white
- Update file extension from .png to .jpg in local save path
- Update Kodiak brand color to #A1623D

This ensures generated vault images have consistent branding with the border color applied throughout the entire image.
…ed styling

- Add BrandColor type to support both solid colors and linear gradients
- Update protocol brand colors with new values and gradient support for Infrared Finance
- Refactor mergeImages to properly handle gradients using SVG definitions
- Improve circular masking and background composition for JPEG output
- Add owner and action fields to Vault type
- Simplify brand color logic to only use owner field (not protocol fallback)
- Import BrandColor type from _constants
- Add proper type annotation to brandColor variable
- Update console log to display 'gradient' for gradient objects instead of stringifying
@AyveeBera AyveeBera self-assigned this Nov 5, 2025
Comment on lines 208 to 215
const uploadResult = await uploadVaultImage(mergedImage, vaultAddress);

if (!uploadResult.success) {
console.error(
chalk.red(` Error: Upload failed - ${uploadResult.error}`),
);
return false;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be very hesitant with this as it could potentially overwrite existing images in place if the name is the same. We sort of avoid this to start because there was a possibility that direct uploads to Cloudinary could have potential issues with changing protocols and validators images without even the PR getting merged.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

maybe we could create a new folder and upload them there and not override existing uploads (also note this would only affect vaults with LP based underlying tokens, not validator images or non-lp vaults), the script aims to not only create images for new vaults but also old vaults with redundant images like the ones below:

Screenshot 2568-11-06 at 21 51 48 Screenshot 2568-11-06 at 21 51 58 Screenshot 2568-11-06 at 21 52 22 Screenshot 2568-11-06 at 21 57 28

here's an example of a generated image from the script, the border and divider would be the color of the owner of the protocol, with this on all LP vaults it'll be more clean and consistent across the hub ui:
Screenshot 2568-11-06 at 21 53 01

AyveeBera and others added 2 commits November 21, 2025 22:58
Add BakderDAO brand color (#CE7E02) to PROTOCOL_BRAND_COLORS constant.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…age generator

Remove --all flag functionality and Cloudinary upload integration to simplify
the vault image generation script. The script now only supports generating
images for a single vault at a time and saves them locally.

Changes:
- Remove Cloudinary import and upload functionality
- Remove --all and --force flags
- Simplify to single vault processing only
- Remove batch processing loop and summary statistics
- Update usage instructions and validation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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