Skip to content

add ccip tooling for talos - #186

Merged
johnny-emp merged 4 commits into
mainfrom
feat/chainlink-bridging
Sep 23, 2025
Merged

add ccip tooling for talos#186
johnny-emp merged 4 commits into
mainfrom
feat/chainlink-bridging

Conversation

@johnny-emp

@johnny-emp johnny-emp commented Sep 12, 2025

Copy link
Copy Markdown
Collaborator

adds CCIP support, and utilities for polling current progress of a bridge transaction, ie

import os

from eth_rpc import PrivateKeyWallet
from eth_rpc.networks import Arbitrum, Ethereum
from eth_rpc.types import primitives

from talos.contracts.ccip import CCIPMessageResponse, CCIPRouter, CCIPRouterAddress


async def main() -> CCIPMessageResponse:
    # create a wallet for signing the transaction
    wallet = PrivateKeyWallet(private_key=os.environ.get("PRIVATE_KEY"))

    # creates a CCIP router instance
    ccip_router = CCIPRouter[Arbitrum](address=CCIPRouterAddress.ARBITRUM)

    # sends a CCIP bridge transaction and returns tx_hash
    tx_hash = await ccip_router.bridge_native(
        amount=primitives.uint256(int(1e15)),
        wallet=wallet,
        from_network=Arbitrum,
        to_network=Ethereum,
        wrap=False,
    )

    # looks up the message id of the completed transaction
    message_id = await ccip_router.find_message_id(tx_hash)

    # gets the current status from Chainlink for the bridge transaction
    status = await ccip_router.check_status(message_id)

    print(status)

    return status

@johnny-emp
johnny-emp merged commit 7c1959a into main Sep 23, 2025
1 check failed
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.

1 participant