Skip to content

Conversation

@premiumjibles
Copy link

@premiumjibles premiumjibles commented Dec 19, 2025

Summary

This fixes the near intents and portals ailiate revenue tracker. The implementation is a bit of a best effort hack until we get a proper API from butter. It just queries the approximate block at the start and end of your time period, looks at total affiliate fees and takes the diff.

Testing

  • Make sure unchained ain't dead

If you want to properly test this locally:

  1. Install dependencies (from repo root)
    cd /home/sean/Repos/shapeshift-unchained
    yarn install

  2. Copy and configure env
    cp node/proxy/sample.env node/proxy/.env
    // Edit node/proxy/.env with real API keys (BEBOP_API_KEY, ZRX_API_KEY, etc.)

  3. Start reverse proxy (from repo root)
    docker-compose up -d reverse-proxy

  4. Start proxy API
    cd node/proxy
    docker-compose up

  5. Test endpoint (in another terminal)

curl "http://api.proxy.localhost/api/v1/affiliate/revenue?startTimestamp=1764547200&endTimestamp=1767225600"

Screenshots

image

@premiumjibles premiumjibles requested a review from a team as a code owner December 19, 2025 09:17
@coderabbitai
Copy link

coderabbitai bot commented Dec 19, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 11439_cowswap_tracker

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@premiumjibles premiumjibles force-pushed the 11439_cowswap_tracker branch 6 times, most recently from ce1aac0 to 2639f55 Compare December 22, 2025 02:49
@premiumjibles premiumjibles changed the title feat: add cowswap affiliate tracking feat: finalise near intents and portals affiliate tracking Dec 22, 2025
@premiumjibles premiumjibles force-pushed the 11439_cowswap_tracker branch 2 times, most recently from b34fb46 to 8c16347 Compare December 22, 2025 07:59
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.

2 participants