Skip to content

Conversation

@mkysel
Copy link
Collaborator

@mkysel mkysel commented May 27, 2025

Update contract addresses and Docker images to use v0.4.0 contracts with new ABI

Updates all contract addresses across configuration files and test utilities to point to new v0.4.0 contract deployments. The changes include:

• Updates Docker image references from commit hash sha-73fd9e9 to versioned release v0.4.0 in dev/docker/docker-compose.yml and pkg/testutils/anvil/anvil.go
• Updates all Settlement Chain and Application Chain contract addresses in dev/local.env
• Updates contract address constants in pkg/testutils/config.go and adds three new contract constants: PAYER_REGISTRY_ADDRESS, PAYER_REPORT_MANAGER_ADDRESS, and DISTRIBUTION_MANAGER_ADDRESS

📍Where to Start

Start with the contract address updates in dev/local.env to understand the scope of contract changes, then review the corresponding test configuration updates in pkg/testutils/config.go.


Macroscope summarized 55078e1.

Summary by CodeRabbit

  • Chores
    • Updated Docker image versions to use the latest tagged release.
    • Refreshed contract addresses for both settlement and application chains in environment configuration.
    • Updated and expanded blockchain contract address constants to reflect new deployments.

@mkysel mkysel requested a review from a team as a code owner May 27, 2025 16:26
@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 27, 2025

Walkthrough

The changes update contract addresses and Docker image tags to use new versions across configuration files and test utilities. New contract address constants are added and grouped in the test configuration. No changes to application logic or exported function signatures are present.

Changes

File(s) Change Summary
dev/docker/docker-compose.yml, pkg/testutils/anvil/anvil.go Updated Docker image tag for the chain service and test container from a commit SHA to version v0.4.0.
dev/local.env Updated environment variable values for several contract addresses on both settlement and application chains.
pkg/testutils/config.go Updated contract address constants, added new addresses, and regrouped related constants.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant Docker Compose
    participant TestUtils
    participant Blockchain

    Developer->>Docker Compose: Start chain service (v0.4.0)
    Docker Compose->>Blockchain: Deploy contracts with new addresses

    Developer->>TestUtils: Run tests
    TestUtils->>Blockchain: Interact using updated contract addresses
Loading

Possibly related PRs

Suggested reviewers

  • neekolas

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (1.64.8)

Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2
Failed executing command with error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 92b270d and 55078e1.

📒 Files selected for processing (4)
  • dev/docker/docker-compose.yml (1 hunks)
  • dev/local.env (1 hunks)
  • pkg/testutils/anvil/anvil.go (1 hunks)
  • pkg/testutils/config.go (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test (Node)
🔇 Additional comments (5)
pkg/testutils/anvil/anvil.go (1)

74-74:

Details

✅ Verification successful

Ensure Docker image version consistency across environments

The image tag has been updated from the commit SHA to v0.4.0, aligning with your other Docker configurations. Great catch!
Let's verify there are no lingering references to the old image tag.


🏁 Script executed:

#!/bin/bash
# Search for any remaining references to the old contract image tag
rg -n 'xmtp/contracts:sha-73fd9e9'

Length of output: 34


🏁 Script executed:

#!/bin/bash
# Search for the exact old image tag
rg -n 'xmtp/contracts:sha-73fd9e9'

# Search broadly for the SHA fragment across the repository
rg -n 'sha-73fd9e9'

Length of output: 54


All references to old xmtp/contracts image removed
Verified there are no lingering sha-73fd9e9 references in the codebase. The update in pkg/testutils/anvil/anvil.go:74 to ghcr.io/xmtp/contracts:v0.4.0 is consistent across environments. Approved.

dev/local.env (2)

27-28: Update application chain broadcast addresses

The application chain broadcast variables have been updated correctly to the new deployment on v0.4.0.


19-24:

Details

❓ Verification inconclusive

Update settlement chain contract addresses

The settlement chain environment variables have been updated to the new v0.4.0 deployment addresses. They match the constants in pkg/testutils/config.go—ensuring consistency is vital.


🏁 Script executed:

#!/bin/bash
# Compare settlement chain addresses between env and config.go
awk -F= '/XMTPD_SETTLEMENT_CHAIN_.*_ADDRESS/ {gsub(/"| /, "", $2); print $2}' dev/local.env | sort > /tmp/env.txt
grep -E 'NODE_REGISTRY_ADDRESS|RATE_REGISTRY_ADDRESS|PAYER_REGISTRY_ADDRESS|PAYER_REPORT_MANAGER_ADDRESS|DISTRIBUTION_MANAGER_ADDRESS|PARAMETER_REGISTRY_ADDRESS' pkg/testutils/config.go | awk -F'"' '{print $2}' | sort > /tmp/go.txt
diff -u /tmp/env.txt /tmp/go.txt

Length of output: 614


🏁 Script executed:

#!/bin/bash
grep -R "SETTLEMENT_CHAIN" -n pkg/testutils/config.go

Length of output: 53


Verify settlement chain addresses alignment

I wasn’t able to automatically locate or match all six v0.4.0 addresses between dev/local.env and pkg/testutils/config.go. Please manually confirm that the following environment variables in dev/local.env exactly match the corresponding constants in pkg/testutils/config.go:

  • XMTPD_SETTLEMENT_CHAIN_NODE_REGISTRY_ADDRESS
  • XMTPD_SETTLEMENT_CHAIN_RATE_REGISTRY_ADDRESS
  • XMTPD_SETTLEMENT_CHAIN_PAYER_REGISTRY_ADDRESS
  • XMTPD_SETTLEMENT_CHAIN_PAYER_REPORT_MANAGER_ADDRESS
  • XMTPD_SETTLEMENT_CHAIN_DISTRIBUTION_MANAGER_ADDRESS
  • XMTPD_SETTLEMENT_CHAIN_PARAMETER_REGISTRY_ADDRESS

Ensuring these are in sync is critical for consistent behavior in tests and local deployments.

pkg/testutils/config.go (2)

17-23: Update settlement chain address constants

The constants for node registry, rate registry, payer registry, report manager, and distribution manager now reflect the v0.4.0 contract addresses, matching your environment settings.


24-25: Update application chain broadcast address constants

The group message and identity update broadcast addresses have been updated to the new v0.4.0 addresses. This keeps your test configurations in sync.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@graphite-app
Copy link

graphite-app bot commented May 27, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • Queue - adds this PR to the back of the merge queue
  • Hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@mkysel mkysel enabled auto-merge (squash) May 27, 2025 16:29
@mkysel mkysel merged commit 728e3a6 into main May 27, 2025
10 checks passed
@mkysel mkysel deleted the mkysel/040-contracts branch May 27, 2025 16:41
@coderabbitai coderabbitai bot mentioned this pull request Jun 3, 2025
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