Skip to content

Eth sender receiver#127

Merged
aelmanaa merged 4 commits intomainfrom
eth-sender-receiver
Nov 7, 2025
Merged

Eth sender receiver#127
aelmanaa merged 4 commits intomainfrom
eth-sender-receiver

Conversation

@aelmanaa
Copy link
Contributor

@aelmanaa aelmanaa commented Oct 29, 2025

This pull request adds new Hardhat tasks and supporting code for deploying and interacting with the EtherSenderReceiver contract, enabling cross-chain native token transfers using Chainlink's CCIP. The main changes include registering the new contract type, adding deployment and utility tasks, and updating the build configuration to include the new contract.

Support for EtherSenderReceiver contract and native token CCIP transfers:

  • Added EtherSenderReceiver to the CCIPContractName enum, allowing it to be referenced throughout the codebase.
  • Updated the list of contracts to build (npmFilesToBuild) to include EtherSenderReceiver.sol.

New Hardhat tasks for native gas transfers:

  • Implemented deployTokenSenderReceiver task to deploy and optionally verify the EtherSenderReceiver contract, with detailed logging and error handling.
  • Added estimateFee task to estimate CCIP fees for cross-chain native token transfers, including parameter validation, fee calculation, and wallet balance checks.
  • Registered the new tasks (deployTokenSenderReceiver, sendTokens, and estimateFee) in the Hardhat task index, making them available for use. [1] [2]
  • Created an export barrel (native-gas-sender-receiver/index.ts) for all native gas sender/receiver tasks, types, and utilities for easier imports and code organization.

Below is a summarization created by an LLM (gpt-4-turbo-2024-04-09). Be mindful of hallucinations and verify accuracy.

Why

This pull request introduces the EtherSenderReceiver contract and associated tasks to facilitate cross-chain native token transfers using the Chainlink CCIP protocol. This enhancement addresses the need for efficient and secure bridging of native tokens like ETH, AVAX, and MATIC across different blockchain networks, improving interoperability and user experience in decentralized applications.

What

This PR integrates a new contract and task suite for handling cross-chain native token transfers.

  • New Contract and Enum Addition

    • Added EtherSenderReceiver to CCIPContractName enum for easy reference.
    • Deployed new EtherSenderReceiver contract for cross-chain transfers.
  • Task Enhancements and Additions

    • Introduced tasks for deploying and interacting with the EtherSenderReceiver contract.
    • Added deployTokenSenderReceiver, sendTokens, and estimateFee tasks to facilitate operations.
  • Documentation and Setup

    • Created a comprehensive README in the native-gas-sender-receiver directory detailing setup, usage, and testing.
    • Provided detailed examples and explanations for environment setup and task execution.
  • Testing and Security

    • Included instructions for secure handling of environment variables and private keys.
    • Emphasized the use of professional RPC providers for reliable transaction processing.
  • Error Handling and Validation

    • Implemented custom error handling for network, contract, and validation errors to improve debugging and user feedback.
    • Added robust input validation across tasks to ensure reliability and correctness of operations.
  • Utility Functions and Types

    • Developed utility functions for fee estimation, address validation, and balance checks to support the new tasks.
    • Defined TypeScript types and interfaces for structured data handling and error management.

This update aims to enhance the blockchain developer toolkit with robust tools for cross-chain interactions, fostering a more interconnected and efficient ecosystem.

@aelmanaa aelmanaa requested a review from a team as a code owner October 29, 2025 00:36
@github-actions
Copy link

👋 aelmanaa, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@aelmanaa aelmanaa marked this pull request as draft October 29, 2025 00:36
@aelmanaa aelmanaa force-pushed the eth-sender-receiver branch from 94f9a5e to fd19909 Compare November 6, 2025 23:49
@aelmanaa aelmanaa marked this pull request as ready for review November 7, 2025 16:25
@aelmanaa aelmanaa merged commit 1d9f559 into main Nov 7, 2025
10 checks passed
@aelmanaa aelmanaa deleted the eth-sender-receiver branch November 7, 2025 16:42
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