![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@consensys/linea-ccip-gateway
Advanced tools
Adapted from [EVM gateway](https://github.com/ensdomains/evmgateway) for fetching data on Linea along with Sparse Merkle Proofs and return it to the L1 callback function.
Adapted from EVM gateway for fetching data on Linea along with Sparse Merkle Proofs and return it to the L1 callback function.
cp .env.example .env
pnpm i
pnpm build
pnpm start
pnpm build
pnpm i
pnpm compile
pnpm test
This example demonstrates how to use CCIP-Read using EtherJs to call a contract that implements the protocol.
TestL1
Contract Using CCIP-ReadTo interact with the TestL1
contract using the CCIP-Read protocol, follow these steps:
Before running the script, ensure that you have the necessary environment variables set up in your .env
file:
INFURA_API_KEY
: Your Infura project ID, which allows you to connect to the Ethereum network via Infura.Create a new script file in your project directory at scripts/testL1.ts
and add the following code:
import { ethers } from "ethers";
import "dotenv/config";
// Define the ABI for the getLatest function
const getLatestABI = [
{
inputs: [],
name: "getLatest",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
];
async function main() {
/*
Address of the deployed TestL1 contract on the Sepolia testnet.
You can view the contract on Etherscan using the following link:
https://sepolia.etherscan.io/address/0xb12038acce44e39dd5b2f59f0f68bbfaac35dd16
*/
const testL1Address = "0xB12038acCE44e39dd5B2f59F0f68bbfAaC35dd16";
const provider = new ethers.JsonRpcProvider(
`https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`
);
const testL1Contract = new ethers.Contract(
testL1Address,
getLatestABI,
provider
);
try {
// Call the getLatest function with CCIP read enabled
const result = await testL1Contract.getLatest({ enableCcipRead: true });
console.log({ result });
} catch (error) {
console.error({ error });
}
}
main().catch((error) => {
console.error("Error in main execution:", error);
process.exitCode = 1;
});
This script connects to the Sepolia testnet and calls the getLatest
function of the TestL1
contract, demonstrating how to enable and use the CCIP-Read functionality.
To execute the script, follow these steps:
Open a terminal and navigate to the root directory of your project.
Run the script using Hardhat with the following command:
npx hardhat run scripts/testL1.ts --network sepolia
testL1.ts
script, which interacts with the TestL1
contract deployed on the Sepolia network.getLatest
function on the TestL1
contract, showcasing how to enable and leverage CCIP-Read capabilities.This example provides a practical demonstration of how to set up and utilize the CCIP-Read protocol within a dApp, highlighting the benefits of off-chain data fetching and proof verification.
FAQs
Adapted from [EVM gateway](https://github.com/ensdomains/evmgateway) for fetching data on Linea along with Sparse Merkle Proofs and return it to the L1 callback function.
The npm package @consensys/linea-ccip-gateway receives a total of 0 weekly downloads. As such, @consensys/linea-ccip-gateway popularity was classified as not popular.
We found that @consensys/linea-ccip-gateway demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.