<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mohamad Hammoud on Medium]]></title>
        <description><![CDATA[Stories by Mohamad Hammoud on Medium]]></description>
        <link>https://medium.com/@mohamad.hammoudk?source=rss-b3e20c9a462d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6rR6agtduJvuoUK5ei7RQw.jpeg</url>
            <title>Stories by Mohamad Hammoud on Medium</title>
            <link>https://medium.com/@mohamad.hammoudk?source=rss-b3e20c9a462d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 07:59:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mohamad.hammoudk/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Implementing Cross-Chain Token Transfers with Chainlink CCIP and Foundry]]></title>
            <link>https://medium.com/@mohamad.hammoudk/implementing-cross-chain-token-transfers-with-chainlink-ccip-and-foundry-3e03be927da0?source=rss-b3e20c9a462d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e03be927da0</guid>
            <category><![CDATA[bridge]]></category>
            <category><![CDATA[crosschain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[chainlink-ccip]]></category>
            <category><![CDATA[chain-link]]></category>
            <dc:creator><![CDATA[Mohamad Hammoud]]></dc:creator>
            <pubDate>Thu, 29 May 2025 12:04:00 GMT</pubDate>
            <atom:updated>2025-05-29T12:04:00.792Z</atom:updated>
            <content:encoded><![CDATA[<p>Implementing Cross-Chain Token Transfers with Chainlink CCIP and Foundry</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2LODzVmOMq6zGER2jUzEEQ.png" /></figure><p>Cross-chain interoperability is revolutionizing the decentralized ecosystem by enabling seamless token transfers and interactions across multiple blockchains. In this article, we’ll walk you through implementing a cross-chain ERC-20 token using Chainlink’s Cross-Chain Interoperability Protocol (CCIP) with the Foundry smart contract framework. By the end of this guide, you’ll have a functional token deployed on both Ethereum Sepolia and Base Sepolia testnets, capable of synchronized transfers across these chains.</p><h3>Table of Contents</h3><ol><li><strong>Introduction</strong></li><li><strong>Prerequisites</strong></li><li><strong>Step 1:</strong> Setting Up the Environment</li><li><strong>Step 2:</strong> Forking the CCIP Starter Kit Repository</li><li><strong>Step 3:</strong> Developing the CrossChainToken Smart Contract</li><li><strong>Step 4:</strong> Creating the Deployment Script</li><li><strong>Step 5:</strong> Configuring Environment Variables</li><li><strong>Step 6:</strong> Deploying the Contracts</li><li><strong>Step 7:</strong> Verifying the Contracts on Etherscan</li><li><strong>Step 8:</strong> Setting Parallel Token Addresses</li><li><strong>Step 9:</strong> Performing Cross-Chain Token Transfers</li><li><strong>Conclusion</strong></li></ol><h3>Introduction</h3><h3>Cross-Chain Interoperability</h3><p>As the blockchain ecosystem grows, the ability to transfer assets and data seamlessly across different blockchains becomes increasingly crucial. Cross-chain interoperability facilitates decentralized applications (dApps) to interact with multiple blockchains, enhancing their functionality and user reach.</p><h3>Chainlink CCIP</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fFXYPKtimekb-ZdxOweSMQ.png" /></figure><p>Chainlink’s Cross-Chain Interoperability Protocol (CCIP) is a robust solution designed to enable secure, scalable, and decentralized cross-chain communication. CCIP provides a universal standard for cross-chain messaging, making it easier to build interoperable smart contracts.</p><h3>Foundry Framework</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X5JnJUzf0bkUAxxkB0MZ6g.png" /></figure><p>Foundry is a blazing-fast, portable, and modular toolkit for Ethereum application development. It streamlines the process of writing, testing, and deploying smart contracts, making it an excellent choice for implementing complex protocols like CCIP.</p><h3>Objective</h3><p><strong>In this tutorial, you will:</strong></p><ul><li>Install and set up Foundry.</li><li>Fork and clone the Chainlink CCIP Starter Kit repository.</li><li>Develop a cross-chain ERC-20 token smart contract.</li><li>Deploy the contract on Ethereum Sepolia and Base Sepolia testnets.</li><li>Verify the contracts on Etherscan.</li><li>Perform cross-chain token transfers using CCIP.</li></ul><h3>Prerequisites</h3><p>Before diving into the implementation, ensure you have the following:</p><ul><li><strong>Basic Knowledge of Solidity:</strong> Familiarity with writing smart contracts.</li><li><strong>Node.js and npm:</strong> Installed on your machine.</li><li><strong>Git:</strong> For cloning repositories.</li><li><strong>Foundry:</strong> Installed for smart contract development.</li><li><strong>Etherscan API Key:</strong> For contract verification.</li><li><strong>Private Keys:</strong> For deploying contracts on testnets.</li><li><strong>Testnet LINK Tokens:</strong> For paying Chainlink fees.</li><li><strong>Environment Variables Setup:</strong> For managing sensitive data.</li></ul><h3>Step 1: Setting Up the Environment</h3><h3>Installing Foundry</h3><p>Foundry is a powerful toolkit for Ethereum development. Install it by running the following commands in your terminal:</p><pre>curl -L https://foundry.paradigm.xyz | bash<br>foundryup</pre><p>This script installs Foundry and updates it to the latest version. Verify the installation by checking the Foundry version:</p><pre>foundry --version</pre><p>You should see output similar to:</p><pre>foundryup 0.2.3</pre><h3>Installing Other Dependencies</h3><p>Ensure you have Node.js and Git installed. If not, download them from <a href="https://nodejs.org/">Node.js</a> and <a href="https://git-scm.com/">Git</a>.</p><h3>Step 2: Forking the CCIP Starter Kit Repository</h3><p>Chainlink provides a starter kit for CCIP integration using Foundry. Fork and clone this repository to your local machine.</p><h3>Fork the Repository</h3><ol><li>Navigate to the <a href="https://github.com/smartcontractkit/ccip-starter-kit-foundry">Chainlink CCIP Starter Kit Foundry</a> GitHub repository.</li><li>Click on the <strong>Fork</strong> button at the top right to create a personal copy of the repository under your GitHub account.</li></ol><h3>Clone the Forked Repository</h3><p>Replace YOUR_GITHUB_USERNAME with your actual GitHub username.</p><pre>git clone https://github.com/YOUR_GITHUB_USERNAME/ccip-starter-kit-foundry.git<br>cd ccip-starter-kit-foundry</pre><p>This command clones the repository and navigates into its directory.</p><h3>Step 3: Developing the CrossChainToken Smart Contract</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4BS2qL1IQyN7ua-CIn6Qsg.gif" /></figure><p>Create a new smart contract named CrossChainToken.sol that extends the ERC-20 standard and integrates Chainlink CCIP for cross-chain functionality.</p><h3>Creating the Smart Contract</h3><p>Navigate to the src directory and create the CrossChainToken.sol file:</p><pre>cd src<br>mkdir cross-chain-erc20<br>cd cross-chain-erc20<br>touch CrossChainToken.sol</pre><h3>Implementing the Contract</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5QP3X5O5sAp6ySbrDDuHSg.gif" /></figure><p>Open CrossChainToken.sol in your preferred code editor and paste the following code:</p><pre>// SPDX-License-Identifier: MIT<br>pragma solidity ^0.8.19;<br><br>/**<br> * @title CrossChainToken<br> * @dev An ERC20 token that supports cross-chain transfers using Chainlink CCIP.<br> */<br>import &quot;@openzeppelin/contracts/token/ERC20/ERC20.sol&quot;;<br>import {CCIPReceiver} from &quot;@chainlink/contracts-ccip/src/v0.8/ccip/applications/CCIPReceiver.sol&quot;;<br>import {Client} from &quot;@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol&quot;;<br>import {IRouterClient} from &quot;@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol&quot;;<br>import {Ownable} from &quot;@openzeppelin/contracts/access/Ownable.sol&quot;;<br>import {LinkTokenInterface} from &quot;@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol&quot;;<br><br>contract CrossChainToken is ERC20, CCIPReceiver, Ownable {<br>    /// @notice Mapping to track locked tokens on the source chain<br>    mapping(address =&gt; uint256) public lockedBalances;<br><br>    /// @notice Mapping to store the parallel token contract addresses on multiple chains<br>    mapping(uint64 =&gt; address) public parallelTokenAddresses;<br><br>    /// @notice Link token interface to handle LINK token interactions<br>    LinkTokenInterface public linkToken;<br><br>    /// @notice Emitted when a cross-chain transfer is initiated<br>    /// @param sender The address initiating the transfer<br>    /// @param destinationChain The chain ID of the destination chain<br>    /// @param amount The amount of tokens being transferred<br>    event CrossChainTransfer(<br>        address indexed sender,<br>        uint64 destinationChain,<br>        uint256 amount<br>    );<br><br>    /// @notice Emitted when a parallel token address is set for a chain<br>    /// @param chainId The chain ID for which the parallel token address is set<br>    /// @param newParallelTokenAddress The address of the parallel token contract on the specified chain<br>    event ParallelTokenAddressSet(<br>        uint64 indexed chainId,<br>        address indexed newParallelTokenAddress<br>    );<br><br>    /**<br>     * @notice Constructor for the CrossChainToken<br>     * @param initialSupply The initial supply of tokens to mint to the deployer<br>     * @param router The address of the Chainlink CCIP Router contract<br>     * @param link The address of the LINK token contract<br>     */<br>    constructor(<br>        uint256 initialSupply,<br>        address router,<br>        address link<br>    ) ERC20(&quot;CrossChain Token&quot;, &quot;CCT&quot;) CCIPReceiver(router) {<br>        _mint(msg.sender, initialSupply);<br>        linkToken = LinkTokenInterface(link);<br>    }<br><br>    /**<br>     * @notice Sets the parallel token contract address for a specific chain<br>     * @param chainId The chain ID of the target chain<br>     * @param _parallelTokenAddress The address of the parallel token contract on the target chain<br>     */<br>    function setParallelTokenAddress(<br>        uint64 chainId,<br>        address _parallelTokenAddress<br>    ) external onlyOwner {<br>        parallelTokenAddresses[chainId] = _parallelTokenAddress;<br>        emit ParallelTokenAddressSet(chainId, _parallelTokenAddress);<br>    }<br><br>    /**<br>     * @notice Locks tokens and initiates a cross-chain transfer to the destination chain<br>     * @param destinationChain The chain ID of the destination chain<br>     * @param amount The amount of tokens to transfer<br>     */<br>    function lockTokens(uint64 destinationChain, uint256 amount) external {<br>        require(balanceOf(msg.sender) &gt;= amount, &quot;Not enough tokens&quot;);<br>        require(<br>            parallelTokenAddresses[destinationChain] != address(0),<br>            &quot;Parallel token address not set for destination chain&quot;<br>        );<br><br>        // Lock tokens<br>        _transfer(msg.sender, address(this), amount);<br>        lockedBalances[msg.sender] += amount;<br><br>        // Send cross-chain message<br>        _sendCrossChainMessage(destinationChain, amount);<br>        emit CrossChainTransfer(msg.sender, destinationChain, amount);<br>    }<br><br>    /**<br>     * @notice Burns tokens on the destination chain to unlock tokens on the source chain<br>     * @param amount The amount of tokens to burn<br>     * @param sourceChain The chain ID of the source chain where tokens will be unlocked<br>     */<br>    function burnTokens(uint256 amount, uint64 sourceChain) external {<br>        require(balanceOf(msg.sender) &gt;= amount, &quot;Not enough tokens&quot;);<br>        require(<br>            parallelTokenAddresses[sourceChain] != address(0),<br>            &quot;Parallel token address not set for source chain&quot;<br>        );<br><br>        // Burn tokens<br>        _burn(msg.sender, amount);<br><br>        // Send cross-chain message to unlock tokens on the source chain<br>        _sendCrossChainMessage(sourceChain, amount);<br>    }<br><br>    /**<br>     * @notice External getter function to retrieve the locked balance of an address<br>     * @param account The address for which to retrieve the locked balance<br>     * @return The amount of tokens locked for the given address<br>     */<br>    function getLockedBalance(address account) external view returns (uint256) {<br>        return lockedBalances[account];<br>    }<br><br>    /**<br>     * @notice External getter function to retrieve the parallel token address for a chain<br>     * @param chainId The chain ID for which to retrieve the parallel token address<br>     * @return The address of the parallel token contract on the specified chain<br>     */<br>    function getParallelTokenAddress(<br>        uint64 chainId<br>    ) external view returns (address) {<br>        return parallelTokenAddresses[chainId];<br>    }<br><br>    /**<br>     * @notice Internal function to send a cross-chain message via Chainlink CCIP<br>     * @param destinationChain The chain ID of the destination chain<br>     * @param amount The amount of tokens being transferred<br>     */<br>    function _sendCrossChainMessage(<br>        uint64 destinationChain,<br>        uint256 amount<br>    ) internal {<br>        // Prepare the cross-chain message<br>        Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({<br>            receiver: abi.encode(parallelTokenAddresses[destinationChain]),<br>            data: abi.encode(msg.sender, amount),<br>            tokenAmounts: new Client.EVMTokenAmount[](0),<br>            extraArgs: &quot;&quot;,<br>            feeToken: address(linkToken)<br>        });<br><br>        IRouterClient router = IRouterClient(getRouter());<br>        uint256 fees = router.getFee(destinationChain, message);<br><br>        // Approve the Router to spend LINK tokens for the fee<br>        linkToken.approve(address(router), fees);<br><br>        // Send the cross-chain message<br>        router.ccipSend(destinationChain, message);<br>    }<br><br>    /**<br>     * @notice Internal function called by the CCIP Router to handle incoming cross-chain messages<br>     * @param any2EvmMessage The incoming cross-chain message<br>     */<br>    function _ccipReceive(<br>        Client.Any2EVMMessage memory any2EvmMessage<br>    ) internal override {<br>        (address sender, uint256 amount) = abi.decode(<br>            any2EvmMessage.data,<br>            (address, uint256)<br>        );<br><br>        _mint(sender, amount);<br>    }<br><br>    /**<br>     * @notice Withdraws LINK tokens (used for paying CCIP fees) to the contract owner<br>     * @param amount The amount of LINK tokens to withdraw<br>     */<br>    function withdrawLink(uint256 amount) external onlyOwner {<br>        require(<br>            linkToken.balanceOf(address(this)) &gt;= amount,<br>            &quot;Not enough LINK tokens&quot;<br>        );<br>        linkToken.transfer(msg.sender, amount);<br>    }<br><br>    /**<br>     * @notice Retrieves the required LINK fee for a cross-chain message<br>     * @param destinationChain The chain ID of the destination chain<br>     * @param amount The amount of tokens to transfer<br>     * @return fees The amount of LINK tokens required as a fee<br>     */<br>    function getRequiredFee(<br>        uint64 destinationChain,<br>        uint256 amount<br>    ) external view returns (uint256 fees) {<br>        Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({<br>            receiver: abi.encode(parallelTokenAddresses[destinationChain]),<br>            data: abi.encode(msg.sender, amount),<br>            tokenAmounts: new Client.EVMTokenAmount[](0),<br>            extraArgs: &quot;&quot;,<br>            feeToken: address(linkToken)<br>        });<br><br>        IRouterClient router = IRouterClient(getRouter());<br>        fees = router.getFee(destinationChain, message);<br>    }<br>}</pre><h3>Contract Explanation</h3><ul><li><strong>Inheritance:</strong></li><li>ERC20: Standard ERC-20 token functionalities.</li><li>CCIPReceiver: Integrates CCIP for receiving cross-chain messages.</li><li>Ownable: Access control, restricting certain functions to the contract owner.</li><li><strong>State Variables:</strong></li><li>lockedBalances: Tracks tokens locked during cross-chain transfers.</li><li>parallelTokenAddresses: Stores addresses of the token contracts on different chains.</li><li>linkToken: Interface to interact with the LINK token for paying CCIP fees.</li></ul><p><strong>Events:</strong></p><ul><li>CrossChainTransfer: Emitted when a cross-chain transfer is initiated.</li><li>ParallelTokenAddressSet: Emitted when a parallel token address is set for a specific chain.</li></ul><p><strong>Key Functions:</strong></p><ul><li>setParallelTokenAddress: Sets the address of the token on the target chain.</li><li>lockTokens: Locks tokens on the source chain and initiates a cross-chain transfer.</li><li>burnTokens: Burns tokens on the destination chain to unlock tokens on the source chain.</li><li>_sendCrossChainMessage: Internal function to send messages via CCIP.</li><li>_ccipReceive: Handles incoming cross-chain messages to mint tokens.</li><li>withdrawLink: Allows the owner to withdraw LINK tokens.</li><li>getRequiredFee: Retrieves the required LINK fee for a cross-chain message.</li></ul><h3>Step 4: Creating the Deployment Script</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*anLL4wQYLRR4vEu6N7vgSA.png" /></figure><p>To automate the deployment process, create a deployment script using Foundry’s scripting capabilities.</p><h3>Creating the Deployment Script</h3><p>Navigate to the script directory and create DeployCrossChainToken.sol:</p><pre>cd ../../<br>cd script<br>touch DeployCrossChainToken.sol</pre><h3>Implementing the Deployment Script</h3><p>Open DeployCrossChainToken.sol and add the following code:</p><pre>// SPDX-License-Identifier: MIT<br>pragma solidity ^0.8.19;<br>import &quot;forge-std/Script.sol&quot;;<br>import &quot;../src/cross-chain-erc20/CrossChainToken.sol&quot;;<br>contract DeployCrossChainToken is Script {<br>    function run() external {<br>        // Load environment variables<br>        string memory privateKey = vm.envString(&quot;PRIVATE_KEY&quot;);<br><br>        // Convert private key string to uint256<br>        uint256 pk = vm.parseUint(privateKey);<br><br>        // Set the deployer&#39;s private key<br>        vm.startBroadcast(pk);<br><br>        // Define constructor parameters, Do use those parameters at Ethereum Seploia&#39;s deployment<br>        // uint256 initialSupply = 1_000_000_000 * 10**18;<br>        // address router = 0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59; // Router address for Ethereum Sepolia<br>        // address link = 0x779877A7B0D9E8603169DdbD7836e478b4624789; // LINK token address for Ethereum Sepolia<br><br>        // Define constructor parameters, Do use those parameters at Base Seploia&#39;s deployment<br>        // uint256 initialSupply = 0;<br>        // address router = 0xD3b06cEbF099CE7DA4AcCf578aaebFDBd6e88a93; // Router address for Base Sepolia<br>        // address link = 0xE4aB69C077896252FAFBD49EFD26B5D171A32410; // LINK token address<br>      <br>        // Deploy the CrossChainToken contract<br>        CrossChainToken token = new CrossChainToken(<br>            initialSupply,<br>            router,<br>            link<br>        );<br><br>        vm.stopBroadcast();<br>        // Output the deployed contract address<br>        console.log(&quot;CrossChainToken deployed at:&quot;, address(token));<br>        console.log(<br>            &quot;My balance is:&quot;,<br>            token.balanceOf(0x85dA99c8a7C2C95964c8EfD687E95E632Fc533D6)<br>        );<br>    }<br>}</pre><h3>Script Explanation</h3><p><strong>Environment Variables:</strong></p><ul><li>PRIVATE_KEY: The deployer’s private key, stored securely in environment variables.</li></ul><p><strong>Constructor Parameters:</strong></p><ul><li>initialSupply: The initial token supply.</li><li>router: The address of the Chainlink CCIP Router contract.</li><li>link: The address of the LINK token contract.</li></ul><p><strong>Deployment Process:</strong></p><ul><li>Starts broadcasting transactions using the provided private key.</li><li>Deploys the CrossChainToken contract with specified parameters.</li><li>Stops broadcasting and logs the deployed contract address and token balance.</li></ul><h3>Step 5: Configuring Environment Variables</h3><p>To manage sensitive data like private keys and RPC URLs securely, use environment variables. Create a .env file in the root directory of your project.</p><h3>Creating the .env File</h3><p>In the root of your project, create a .env file:</p><pre>cd ..<br>touch .env</pre><h3>Populating the .env File</h3><p>Open .env and add the following variables:</p><pre># Private key for deploying contracts (DO NOT share this key)<br>PRIVATE_KEY=your_private_key_here<br><br># RPC URLs for testnets<br>ETHEREUM_SEPOLIA_RPC_URL=https://sepolia.infura.io/v3/YOUR_INFURA_PROJECT_ID<br>BASE_SEPOLIA_RPC_URL=https://base-sepolia.example.rpc.url<br><br># Etherscan API keys for contract verification<br>ETHERSCAN_API_KEY=your_etherscan_api_key_here<br></pre><p><strong>Important:</strong></p><ul><li>Replace your_private_key_here with your actual private key.</li><li>Replace YOUR_INFURA_PROJECT_ID with your Infura project ID or use another RPC provider.</li><li>Replace your_etherscan_api_key_here and your_base_sepolia_etherscan_api_key_here with your Etherscan API keys.</li></ul><h3>Loading Environment Variables</h3><p>Ensure that Foundry can access these environment variables. Foundry automatically loads variables from the .env file when using forge commands.</p><h3>Step 6: Deploying the Contracts</h3><p>With the environment set up and the smart contracts ready, proceed to deploy the CrossChainToken on both Ethereum Sepolia and Base Sepolia testnets.</p><h3>Deploying to Ethereum Sepolia</h3><ol><li><strong>Define Deployment Parameters:</strong></li><li>Uncomment and adjust the constructor parameters in DeployCrossChainToken.sol for Ethereum Sepolia:</li></ol><pre>forge script script/DeployCrossChainToken.sol --rpc-url $ETHEREUM_SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --broadcast</pre><ol><li><strong>Deployment Output:</strong></li><li>After successful deployment, you should see output similar to:</li></ol><pre>✅  [Success] Hash: 0x06ed99a8beb6d38ff862294c64de092079d8bd8ec130ba9e0d9ac924a5a0e919 <br>Contract Address: 0xBD1e6CB60c174d69cAAC4Be32CeC3CbCBFd80F16 <br>Block: 6733498 <br>Paid: 0.037717886021221278 ETH (1688553 gas * 22.337401326 gwei)</pre><h3>Deploying to Base Sepolia</h3><ol><li><strong>Adjust Deployment Parameters:</strong></li><li>Modify the constructor parameters in DeployCrossChainToken.sol for Base Sepolia</li><li>Run the deployment script for Base Sepolia:</li></ol><pre>forge script script/DeployCrossChainToken.sol --rpc-url $BASE_SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --broadcast</pre><ol><li><strong>Deployment Output:</strong></li><li>Successful deployment will yield:</li></ol><pre>✅  [Success] Hash: 0xa39568d1ee91455c20bdea262b6f4330b815607ddb6ddd1142d31db7a13d0f17 <br>Contract Address: 0x6FdA56C57B0Acadb96Ed5624aC500C0429d59429<br>Block: 15581090<br>Paid: 0.00000164907035041 ETH (1648645 gas * 0.001000258 gwei)</pre><h3>Flattening the Contract (Optional)</h3><p>Flattening combines all Solidity files into a single file, which is often required for contract verification.</p><pre>forge flatten src/cross-chain-erc20/CrossChainToken.sol --output flattened/CrossChainToken.sol</pre><p><strong>Note:</strong> If you’re using the same contract across multiple deployments, flatten it once and reuse the flattened file for verification.</p><h3>Step 7: Verifying the Contracts on Etherscan</h3><p>Contract verification enhances transparency, allowing users to view the source code on Etherscan.</p><h3>Preparing Constructor Arguments</h3><p>To verify the contract, you need to provide the constructor arguments used during deployment.</p><h4>Ethereum Sepolia Constructor Arguments:</h4><pre>cast abi-encode &quot;constructor(uint256,address,address)&quot; 1000000000000000000000000000 &quot;0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59&quot; &quot;0x779877A7B0D9E8603169DdbD7836e478b4624789&quot;</pre><p><strong>Output:</strong></p><pre>0x0000000000000000000000000000000000000000033b2e3c9fd0803ce80000000000000000000000000000000bf3de8c5d3e8a2b34d2beeb17abfcebaf363a59000000000000000000000000779877a7b0d9e8603169ddbd7836e478b4624789</pre><h4>Base Sepolia Constructor Arguments:</h4><pre>cast abi-encode &quot;constructor(uint256,address,address)&quot; 0 &quot;0xD3b06cEbF099CE7DA4AcCf578aaebFDBd6e88a93&quot; &quot;0xE4aB69C077896252FAFBD49EFD26B5D171A32410&quot;</pre><p><strong>Output:</strong></p><pre>0x0000000000000000000000000000000000000000000000000000000000000000d3b06cebf099ce7da4accf578aaebfdbd6e88a93000000000000000000000000e4ab69c077896252fafbd49efd26b5d171a32410</pre><h3>Verifying on Etherscan</h3><p>Use Foundry’s verification command to verify the deployed contracts.</p><h4>Ethereum Sepolia Verification:</h4><pre>forge verify-contract \<br>  --chain-id 11155111 \<br>  --num-of-optimizations 200 \<br>  --compiler-version v0.8.19 \<br>  --watch \<br>  &quot;0xBD1e6CB60c174d69cAAC4Be32CeC3CbCBFd80F16&quot; \<br>  &quot;src/cross-chain-erc20/CrossChainToken.sol:CrossChainToken&quot; \<br>  --etherscan-api-key &quot;$ETHERSCAN_API_KEY&quot; \<br>  --constructor-args 0x0000000000000000000000000000000000000000033b2e3c9fd0803ce80000000000000000000000000000000bf3de8c5d3e8a2b34d2beeb17abfcebaf363a59000000000000000000000000779877a7b0d9e8603169ddbd7836e478b4624789</pre><h4>Base Sepolia Verification:</h4><pre>forge verify-contract \<br>  --chain-id YOUR_BASE_SEPOLIA_CHAIN_ID \<br>  --num-of-optimizations 200 \<br>  --compiler-version v0.8.19 \<br>  --watch \<br>  &quot;0x6FdA56C57B0Acadb96Ed5624aC500C0429d59429&quot; \<br>  &quot;src/cross-chain-erc20/CrossChainToken.sol:CrossChainToken&quot; \<br>  --etherscan-api-key &quot;$BASE_SEPOLIA_ETHERSCAN_API_KEY&quot; \<br>  --constructor-args 0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d3b06cebf099ce7da4accf578aaebfdbd6e88a93000000000000000000000000e4ab69c077896252fafbd49efd26b5d171a32410</pre><p><strong>Replace </strong>YOUR_BASE_SEPOLIA_CHAIN_ID<strong> with the actual chain ID for Base Sepolia.</strong></p><p>Upon successful verification, the contract source code will be available on Etherscan, enhancing trust and transparency.</p><h3>Step 8: Setting Parallel Token Addresses</h3><p>After deploying the contracts on both chains, you need to link them by setting each other’s addresses in their respective parallelTokenAddresses mappings.</p><h3>Using Etherscan to Set Parallel Addresses</h3><p><strong>Navigate to Etherscan:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*UYPlmWKyR1TrAcwnBe30DA.png" /></figure><ul><li><strong>For Ethereum Sepolia:</strong> Sepolia Etherscan</li><li><strong>For Base Sepolia:</strong> Base Sepolia Etherscan <em>(Ensure you have the correct explorer URL)</em></li></ul><p><strong>Interact with the Contract:</strong></p><ul><li>Go to the <strong>Contracts</strong> tab.</li><li>Select <strong>Write Contract</strong>.</li><li>Connect your wallet.</li></ul><p><strong>Set Parallel Token Address on Ethereum Sepolia:</strong></p><ul><li><strong>Function:</strong> setParallelTokenAddress</li><li><strong>Parameters:</strong></li><li>chainId: 10344971235874465080 <em>(Base Sepolia Chain ID)</em></li><li>_parallelTokenAddress: 0x6Fd...429 <em>(Base Sepolia Token Address)</em></li></ul><pre>setParallelTokenAddress(10344971235874465080, 0x6FdA56C57B0Acadb96Ed5624aC500C0429d59429)</pre><ol><li><strong>Set Parallel Token Address on Base Sepolia:</strong></li></ol><ul><li><strong>Function:</strong> setParallelTokenAddress</li><li><strong>Parameters:</strong></li><li>chainId: 11155111 <em>(Ethereum Sepolia Chain ID)</em></li><li>_parallelTokenAddress: 0xBD1...F16 <em>(Ethereum Sepolia Token Address)</em></li></ul><pre>setParallelTokenAddress(11155111, 0xBD1e6CB60c174d69cAAC4Be32CeC3CbCBFd80F16)</pre><p><strong>Note:</strong> Ensure that you replace the chainId values with the accurate IDs as per <a href="https://docs.chain.link/ccip/supported-networks/v1_2_0/testnet#ethereum-sepolia-base-sepolia">Chainlink’s Supported Networks</a>.</p><h3>Step 9: Performing Cross-Chain Token Transfers</h3><p>With both contracts deployed and linked, you can now perform cross-chain token transfers.</p><h3>Funding the Contract with LINK</h3><p>Before initiating transfers, ensure that your smart contract has sufficient LINK tokens to pay for CCIP fees.</p><ol><li><strong>Obtain LINK Tokens:</strong></li></ol><ul><li>Use a LINK faucet for Ethereum Sepolia: <a href="https://docs.chain.link/resources/link-token-contracts">LINK Token Faucet</a></li><li>Transfer LINK tokens to the deployed contract address (0xBD1e6CB60c174d69cAAC4Be32CeC3CbCBFd80F16).</li></ul><ol><li><strong>Verify LINK Balance:</strong></li><li>You can verify the LINK balance by interacting with the contract or using a block explorer:</li></ol><pre>token.balanceOf(address(this))</pre><p>Ensure the contract holds enough LINK to cover transaction fees.</p><h3>Initiating a Cross-Chain Transfer</h3><ol><li><strong>Lock Tokens on Ethereum Sepolia:</strong></li></ol><ul><li><strong>Function:</strong> lockTokens</li><li><strong>Parameters:</strong></li><li>destinationChain: 10344971235874465080 <em>(Base Sepolia Chain ID)</em></li><li>amount: 1000000000000000000000 <em>(1,000 CCT)</em></li></ul><pre>lockTokens(10344971235874465080, 1000000000000000000000)</pre><ol><li>This action locks 1,000 CCT on Ethereum Sepolia and sends a cross-chain message to Base Sepolia.</li><li><strong>Wait for Confirmation:</strong></li></ol><ul><li>The cross-chain message is processed via CCIP.</li><li>After confirmation, 1,000 CCT will be minted on Base Sepolia and available in your wallet.</li></ul><ol><li><strong>Verify Token Balance on Base Sepolia:</strong></li></ol><pre>token.balanceOf(your_address_on_base_sepolia)</pre><p>Your token balance should reflect the transferred amount.</p><h3>Unlocking Tokens on the Source Chain</h3><p>If you wish to transfer tokens back:</p><ol><li><strong>Burn Tokens on Base Sepolia:</strong></li></ol><ul><li><strong>Function:</strong> burnTokens</li><li><strong>Parameters:</strong></li><li>amount: 1000000000000000000000 <em>(1,000 CCT)</em></li><li>sourceChain: 11155111 <em>(Ethereum Sepolia Chain ID)</em></li></ul><pre>burnTokens(1000000000000000000000, 11155111)</pre><ol><li>This action burns 1,000 CCT on Base Sepolia and sends a cross-chain message to unlock tokens on Ethereum Sepolia.</li><li><strong>Wait for Confirmation:</strong></li></ol><ul><li>After confirmation, 1,000 CCT will be unlocked and available on Ethereum Sepolia.</li></ul><ol><li><strong>Verify Token Balance on Ethereum Sepolia:</strong></li></ol><pre>token.balanceOf(your_address_on_ethereum_sepolia)</pre><p><em>Your token balance should reflect the unlocked amount.</em></p><h3>Conclusion</h3><p>Implementing cross-chain token transfers enhances the versatility and reach of your decentralized applications. By leveraging Chainlink’s CCIP and the Foundry framework, you can create secure and efficient cross-chain ERC-20 tokens. This guide provided a comprehensive walkthrough, from setting up your environment to deploying and verifying contracts on multiple testnets. As cross-chain technology continues to evolve, mastering these tools will position you at the forefront of blockchain interoperability.</p><p><strong>Next Steps:</strong></p><ul><li><strong>Explore Advanced Features:</strong> Integrate additional functionalities like automated fee management or multi-chain governance.</li><li><strong>Deploy on Mainnets:</strong> After thorough testing on testnets, consider deploying your contracts on Ethereum and Base mainnets.</li><li><strong>Monitor and Optimize:</strong> Use Chainlink’s monitoring tools to track cross-chain messages and optimize gas usage for cost-efficiency.</li></ul><p>Stay tuned for more tutorials on advanced blockchain development and cross-chain integrations!</p><p><strong>Disclaimer:</strong> This article is for educational purposes. Always conduct thorough testing and security audits before deploying smart contracts to production environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e03be927da0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring ERC-1400: The Standard for Security Tokens]]></title>
            <link>https://medium.com/@mohamad.hammoudk/exploring-erc-1400-the-standard-for-security-tokens-87a5f791f2c0?source=rss-b3e20c9a462d------2</link>
            <guid isPermaLink="false">https://medium.com/p/87a5f791f2c0</guid>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[erc1400]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[defi]]></category>
            <dc:creator><![CDATA[Mohamad Hammoud]]></dc:creator>
            <pubDate>Tue, 28 May 2024 15:48:32 GMT</pubDate>
            <atom:updated>2024-05-28T15:48:32.235Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v7zVQSNX8W6ZLyhja9l9qw.png" /></figure><h3>The Need for ERC-1400</h3><p>Before ERC-1400, there was no uniform approach for security tokens, making it hard for platforms to support them without custom solutions.</p><p>Security tokens need to meet strict legal requirements. Existing standards like ERC-20 lacked mechanisms for compliance, such as trading restrictions and identity checks.</p><p>Financial securities vary widely. A single standard that could accommodate various types of securities within one framework was needed to manage these differences effectively.</p><p>The absence of a standardized protocol led to inefficiencies in issuing and managing security tokens. ERC-1400 addresses these issues by providing a clear, unified framework for these tokens.</p><h3>ERC-1400 Definition</h3><p>The ERC-1400 is a sophisticated standard for security tokens on the Ethereum blockchain.</p><p>It extends the basic functionalities of ERC20 tokens by introducing concepts such as</p><ol><li>Partitions</li><li>Document management</li><li>Controller operations</li><li>Compliance with regulations.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HYpSSKbVra6TLfDNxMYoug.png" /></figure><p>This standard is especially designed to meet the regulatory requirements often associated with securities trading and ownership.</p><h4>Partitions</h4><p>Partitions are essentially sub-categories or classes of tokens within a single token contract. Each partition can represent a specific tranche of tokens that may have unique characteristics or rights attached to them.</p><p>For example, a company might issue tokens where some tokens represent equity, others represent voting rights, and yet others might offer dividends.</p><p>Partitions allow these different classes of tokens to be managed under the same smart contract but accounted for separately.</p><p>Example Usage of Partitions:</p><ul><li>A company issues 1,000 tokens in total.</li><li>300 tokens are in the “EquityClass” partition (giving holders equity).</li><li>200 tokens are in the “VotingClass” partition (giving holders voting rights).</li><li>500 tokens are in the “DividendClass” partition (giving holders rights to dividends).</li></ul><h4>Document Management</h4><p>It manages token-related documents, which could be compliance documentation, terms and conditions of the token sale, or other legal documents that need to be associated with the token.</p><h4>Controller Operations</h4><p>Controller Operations manage operators who are authorized to operate on the entire supply of tokens on behalf of others. This is useful for automated financial management systems or exchanges which need to operate tokens for trading or management purposes without taking custody.</p><h4>Compliance and Regulatory Hooks</h4><p>These hooks are used for compliance checks before transfers are executed. It allows the integration of regulatory compliance checks into the token logic.</p><h3>Token Identification</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I6R3PpjhhMPnNIUXanGmjg.png" /></figure><h4>_name:</h4><ul><li>Purpose: Stores the official name of the token, which can be displayed in user interfaces and wallets.</li><li>Example: “Soli Chain Security Token”.</li></ul><h4>_symbol:</h4><ul><li>Purpose: Holds the token’s symbol, a shorter way to represent the token name.</li><li>Example: “SCST”.</li></ul><h3>Token Characteristics</h3><h4>_granularity:</h4><ul><li>Purpose: Determines the smallest unit into which a token can be divided, reflecting the token’s divisibility.</li><li>Example: If set to 1, the token cannot be divided into smaller parts than one whole token.</li></ul><h4>_totalSupply:</h4><ul><li>Purpose: Represents the total number of tokens currently in circulation.</li><li>Example: 100,000 tokens might represent 100,000 shares of a company.</li></ul><h4>_migrated:</h4><ul><li>Purpose: Indicates whether the token has been migrated to a new contract, usually set during upgrades to disable the old contract.</li><li>Example: true if the token functionalities have been moved to a new contract address.</li></ul><h3>Control Features</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yc-MwgILceHsp4ICzCXNcw.png" /></figure><h4>_isControllable:</h4><ul><li>Purpose: A flag to check if the token can still be controlled by designated operators or if it has become fully decentralized.</li><li>Example: true allows for administrative control, such as forced transfers or burns.</li></ul><h4>_isIssuable:</h4><ul><li>Purpose: Determines whether more tokens can be issued in the future or if the supply is now fixed.</li><li>Example: false after the final issuance to cap the total supply permanently.</li></ul><h3>Balance and Allowances</h3><h4>_balances:</h4><ul><li>Purpose: Maps each holder’s address to the quantity of tokens they own, facilitating balance checks and transfers.</li><li>Example: Tracks that a user owns 500 tokens.</li></ul><h4>_allowed:</h4><ul><li>Purpose: Maps each token holder to another address with the amount of tokens they are allowed to use on the holder’s behalf, supporting the approve and transferFrom functionalities.</li><li>Example: User A allows User B to transfer up to 100 of their tokens.</li></ul><h3>Document Management</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q_eE3fSsr_VS0NM8HsSqpg.png" /></figure><h4>_documents:</h4><ul><li>Purpose: Associates documents with the token, identified by a name hash, to store compliance documents or other relevant information.</li><li>Example: Linking a “Prospectus” document showing investment details.</li></ul><h3>Partitions Management</h3><h4>_totalSupplyByPartition:</h4><ul><li>Purpose: Maps each partition to its specific supply of tokens, allowing for partition-specific tracking.</li><li>Example: 30,000 tokens in the “Voting Rights” partition.</li></ul><h4>_balanceOfByPartition:</h4><ul><li>Purpose: Maps each token holder’s address and partition to the number of tokens they own within that specific partition.</li><li>Example: User C owns 200 tokens in the “Dividend” partition.</li></ul><h3>Operator Permissions</h3><h4>_authorizedOperator:</h4><ul><li>Purpose: Maps operators who are allowed to manage all tokens on behalf of other users.</li><li>Example: A wallet service has control rights over its users’ tokens for easier management.</li></ul><h4>_authorizedOperatorByPartition:</h4><ul><li>Purpose: Similar to _authorizedOperator, but specific to partitions, allowing more granular control.</li><li>Example: A financial advisor has rights only to manage tokens in the “Investment” partition.</li></ul><h3>Compliance and Control</h3><h4>_controllers and _controllersByPartition:</h4><ul><li>Purpose: Lists addresses that can perform high-level control actions such as minting new tokens or burning existing ones, both globally and for specific partitions.</li><li>Example: A regulatory authority might be able to control token movements in critical scenarios.</li></ul><h3>Technical Breakdown of ERC-1400</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zndizrJ1Ra3rQQv8zluvIg.png" /></figure><h4>Interface and Extension Constants</h4><p>In ERC-1400, several constants are defined to identify and register the various interfaces and extensions. These constants play a crucial role in ensuring that the contract can interact with other contracts and applications seamlessly. Let’s delve into each of these constants:</p><h4>Token Interface Names</h4><pre>string constant internal ERC1400_INTERFACE_NAME = &quot;ERC1400Token&quot;;<br>string constant internal ERC20_INTERFACE_NAME = &quot;ERC20Token&quot;;</pre><ul><li><strong>ERC1400_INTERFACE_NAME:</strong> This represents the interface name for ERC-1400 tokens. By registering this name in the ERC1820 registry, the contract ensures that it can be recognized as an ERC-1400 compliant token. This allows other contracts and applications to interact with it using the ERC-1400 standard.</li><li><strong>ERC20_INTERFACE_NAME:</strong> This represents the interface name for ERC-20 tokens. Since ERC-1400 is designed to be backward compatible with ERC-20, registering this interface ensures that the token can be used wherever ERC-20 tokens are accepted.</li></ul><h4>Token Extensions</h4><pre>string constant internal ERC1400_TOKENS_CHECKER = &quot;ERC1400TokensChecker&quot;;<br>string constant internal ERC1400_TOKENS_VALIDATOR = &quot;ERC1400TokensValidator&quot;;</pre><ul><li><strong>ERC1400_TOKENS_CHECKER:</strong> This constant represents the interface name for the ERC1400TokensChecker extension. This extension is responsible for performing compliance checks before any token transfer. It validates that the transfer adheres to the rules and regulations set by the token issuer.</li><li><strong>ERC1400_TOKENS_VALIDATOR:</strong> This constant represents the interface name for the ERC1400TokensValidator extension. This extension is called during token transfers to perform additional validations, ensuring that all transfers comply with regulatory requirements and the issuer’s rules.</li></ul><h4>User Extensions</h4><pre>string constant internal ERC1400_TOKENS_SENDER = &quot;ERC1400TokensSender&quot;;<br>string constant internal ERC1400_TOKENS_RECIPIENT = &quot;ERC1400TokensRecipient&quot;;</pre><ul><li><strong>ERC1400_TOKENS_SENDER:</strong> This constant represents the interface name for the ERC1400TokensSender extension. This extension is invoked before a token transfer is executed, allowing the sender to implement custom logic or checks specific to their needs.</li><li><strong>ERC1400_TOKENS_RECIPIENT:</strong> This constant represents the interface name for the ERC1400TokensRecipient extension. This extension is invoked after a token transfer is executed, allowing the recipient to implement custom logic or checks specific to their requirements.</li></ul><h3>Purpose of Interface Names and Extensions</h3><p>These constants serve as identifiers for the various components and extensions within the ERC-1400 standard. By registering these interfaces in the ERC1820 registry, the contract can be dynamically discovered and interacted with by other contracts and applications on the Ethereum network. This modular approach provides flexibility and extensibility, enabling token issuers to enforce specific rules and compliance checks as needed.</p><h3>Example Usage</h3><p>During the deployment and initialization of an ERC-1400 contract, these interface names and extensions are used to set up and register the contract with the ERC1820 registry. Here’s an example:</p><pre>constructor(<br>    string memory tokenName,<br>    string memory tokenSymbol,<br>    uint256 tokenGranularity,<br>    address[] memory initialControllers,<br>    bytes32[] memory defaultPartitions<br>) {<br>    _name = tokenName;<br>    _symbol = tokenSymbol;<br>    _totalSupply = 0;<br><br>    require(tokenGranularity &gt;= 1);<br><br>    _granularity = tokenGranularity;<br><br>    _setControllers(initialControllers);<br><br>    _defaultPartitions = defaultPartitions;<br>    _isControllable = true;<br>    _isIssuable = true;<br><br>    // Register contract in ERC1820 registry<br>    ERC1820Client.setInterfaceImplementation(ERC1400_INTERFACE_NAME, address(this));<br>    ERC1820Client.setInterfaceImplementation(ERC20_INTERFACE_NAME, address(this));<br>    <br>    // Indicate token verifies ERC1400 and ERC20 interfaces<br>    ERC1820Implementer._setInterface(ERC1400_INTERFACE_NAME);<br>    ERC1820Implementer._setInterface(ERC20_INTERFACE_NAME);<br>}</pre><p>In this constructor, the token is initialized with its name, symbol, granularity, initial controllers, and default partitions.</p><p>The contract is then registered with the ERC1820 registry using the predefined interface names, ensuring it is recognized as both an ERC-1400 and ERC-20 token.</p><h3>Partitions Mappings</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_OXr0k_llLRTMZv7JC50bA.png" /></figure><h4>List of Partitions</h4><pre>bytes32[] internal _totalPartitions;</pre><ul><li><strong>Description:</strong> This array keeps a list of all the partitions that exist for the token. Each partition can represent a different class or tranche of tokens.</li><li><strong>Purpose:</strong> It allows the contract to keep track of all the different partitions that have been created, making it possible to manage and iterate over them when necessary.</li><li><strong>Example Usage:</strong> If a token issuer wants to create multiple tranches of security tokens, such as equity, voting rights, and dividends, each of these tranches would be represented as a separate partition and added to this array.</li></ul><h4>Mapping from Partition to Their Index</h4><pre>mapping (bytes32 =&gt; uint256) internal _indexOfTotalPartitions;</pre><ul><li><strong>Description:</strong> This mapping associates each partition with its index in the _totalPartitions array.</li><li><strong>Purpose:</strong> It provides a quick lookup to find the position of a partition within the _totalPartitions array. This is useful for efficient management and operations on partitions.</li><li><strong>Example Usage: </strong>When a new partition is added, its index in _totalPartitions is stored in this mapping. This allows for efficient removal or querying of partitions by their identifier.</li></ul><h4>Mapping from Partition to Global Balance of Corresponding Partition</h4><pre>mapping (bytes32 =&gt; uint256) internal _totalSupplyByPartition;</pre><ul><li><strong>Description:</strong> This mapping keeps track of the total supply of tokens for each partition.</li><li><strong>Purpose:</strong> It allows the contract to manage the total amount of tokens that exist within each partition, facilitating operations like transfers and balance checks.</li><li><strong>Example Usage:</strong> If a partition represents a specific class of equity, this mapping would track the total number of tokens issued under that class.</li></ul><h4>Mapping from TokenHolder to Their Partitions</h4><pre>mapping (address =&gt; bytes32[]) internal _partitionsOf;</pre><ul><li><strong>Description:</strong> This mapping links each token holder to an array of partitions they own tokens in.</li><li><strong>Purpose:</strong> It enables the contract to keep track of which partitions a specific token holder has tokens in, allowing for detailed balance queries and operations specific to a token holder’s partitions.</li><li><strong>Example Usage:</strong> If a token holder owns tokens in both the “EquityClass” and “DividendClass” partitions, this mapping would store those partitions for that token holder.</li></ul><h4>Mapping from (TokenHolder, Partition) to Their Index</h4><pre>mapping (address =&gt; mapping (bytes32 =&gt; uint256)) internal _indexOfPartitionsOf;</pre><ul><li><strong>Description:</strong> This mapping associates a specific token holder and partition with the index of that partition in the token holder’s _partitionsOf array.</li><li><strong>Purpose:</strong> It provides an efficient way to find the position of a partition in a specific token holder’s list of partitions.</li><li><strong>Example Usage:</strong> When querying or updating the partitions a token holder owns, this mapping allows for efficient lookups and modifications.</li></ul><h4>Mapping from (TokenHolder, Partition) to Balance of Corresponding Partition</h4><pre>mapping (address =&gt; mapping (bytes32 =&gt; uint256)) internal _balanceOfByPartition;</pre><ul><li><strong>Description:</strong> This mapping keeps track of the balance of tokens for each token holder within a specific partition.</li><li><strong>Purpose:</strong> It allows the contract to manage and query the amount of tokens a token holder owns in each partition.</li><li><strong>Example Usage:</strong> If a token holder has 100 tokens in the “VotingClass” partition and 200 tokens in the “DividendClass” partition, this mapping would store those balances.</li></ul><h4>List of Token Default Partitions (for ERC20 Compatibility)</h4><pre>bytes32[] internal _defaultPartitions;</pre><ul><li><strong>Description:</strong> This array holds the list of default partitions used for ERC-20 compatibility. When partition is not specified, the default partition(s) are used.</li><li><strong>Purpose:</strong> It provides a mechanism to ensure backward compatibility with ERC-20 by specifying which partitions should be used for standard ERC-20 operations.</li><li><strong>Example Usage:</strong> When a standard ERC-20 transfer is initiated without specifying a partition, the contract can default to using the partitions listed in this array.</li></ul><h3>Global Operators Mappings</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*__bVbPwuZ4XrtLZVhDehUw.png" /></figure><p>The global operators mappings in the ERC-1400 contract define the relationships and permissions of various operators who have specific rights over the tokens. These mappings and arrays manage operator authorizations and controller roles, ensuring proper access control and management capabilities within the token contract.</p><h4>Mapping from (Operator, TokenHolder) to Authorized Status</h4><pre>mapping(address =&gt; mapping(address =&gt; bool)) internal _authorizedOperator;</pre><ul><li><strong>Description:</strong> This mapping tracks whether a specific operator is authorized to manage the tokens of a particular token holder.</li><li><strong>Purpose:</strong> It allows individual token holders to delegate management rights over their tokens to other addresses. This can include transferring tokens on their behalf or performing other actions that require the holder’s authorization.</li><li><strong>Example Usage:</strong> If Alice wants Bob to manage her tokens, she can authorize Bob as an operator. This mapping would then have an entry like _authorizedOperator[BobsAddress][AlicesAddress] = true.</li></ul><h4>Array of Controllers</h4><pre>address[] internal _controllers;</pre><ul><li><strong>Description:</strong> This array holds the addresses of the global controllers. These controllers have broad management rights over the entire token supply and are not specific to individual token holders.</li><li><strong>Purpose:</strong> Controllers can perform high-level operations such as minting new tokens, burning tokens, and enforcing compliance rules. These roles are usually assigned to trusted entities like regulatory bodies, financial institutions, or the token issuer itself.</li><li><strong>Example Usage:</strong> If the token issuer and a regulatory authority are both controllers, their addresses would be included in this array. They can then use their special rights to manage the token supply and ensure compliance with relevant regulations.</li></ul><h4>Mapping from Operator to Controller Status</h4><pre>mapping(address =&gt; bool) internal _isController;</pre><ul><li><strong>Description:</strong> This mapping keeps track of which addresses are recognized as global controllers.</li><li><strong>Purpose:</strong> It provides a quick way to check if a specific address has global control rights over the token contract. This ensures that only designated controllers can perform certain high-level operations.</li><li><strong>Example Usage:</strong> When a new controller is added, their address is set to true in this mapping. For example, _isController[IssuerAddress] = true indicates that the issuer is a global controller.</li></ul><h4>Purpose and Benefits</h4><p>These mappings and arrays ensure a robust and flexible access control mechanism within the ERC-1400 contract:</p><ul><li><strong>Delegated Management:</strong> Token holders can delegate token management to trusted operators, making it easier to manage their holdings.</li><li><strong>Centralized Control:</strong> Trusted entities like issuers and regulators can perform high-level operations, ensuring compliance with laws and regulations.</li><li><strong>Security and Flexibility:</strong> By separating operator and controller roles, the contract ensures that different entities can have different levels of access and control, enhancing both security and operational flexibility.</li></ul><h3>Partition Operators Mappings</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U5IVFc2qJfXnxOBIZCRQVQ.png" /></figure><p>Partition operators mappings in the ERC-1400 contract manage permissions and authorizations related to specific partitions of tokens. These mappings facilitate granular control over token operations within different partitions, enabling more detailed and specific management of tokenized securities.</p><h4>Mapping from (Partition, TokenHolder, Spender) to Allowed Value</h4><pre>mapping(bytes32 =&gt; mapping (address =&gt; mapping (address =&gt; uint256))) internal _allowedByPartition;</pre><ul><li><strong>Description:</strong> This mapping tracks the amount of tokens that a spender is allowed to transfer on behalf of a token holder within a specific partition.</li><li><strong>Purpose:</strong> It supports partition-specific allowances, enabling token holders to grant permissions to spenders for specific partitions, similar to how allowances work in ERC-20 but with partition granularity.</li><li><strong>Example Usage:</strong> If Alice wants Bob to be able to spend 100 tokens on her behalf within the “DividendClass” partition, this mapping would have an entry like _allowedByPartition[&quot;DividendClass&quot;][AlicesAddress][BobsAddress] = 100.</li></ul><h4>Mapping from (TokenHolder, Partition, Operator) to ‘Approved for Partition’ Status</h4><pre>mapping (address =&gt; mapping (bytes32 =&gt; mapping (address =&gt; bool))) internal _authorizedOperatorByPartition;</pre><ul><li><strong>Description:</strong> This mapping indicates whether a specific operator is authorized to manage tokens of a token holder within a particular partition.</li><li><strong>Purpose:</strong> It allows token holders to authorize operators for specific partitions, providing more granular control over token management.</li><li><strong>Example Usage:</strong> If Alice authorizes Bob to manage her tokens within the “VotingClass” partition, this mapping would have an entry like _authorizedOperatorByPartition[AlicesAddress][&quot;VotingClass&quot;][BobsAddress] = true.</li></ul><h4>Mapping from Partition to Controllers for the Partition</h4><pre>mapping (bytes32 =&gt; address[]) internal _controllersByPartition;</pre><ul><li><strong>Description:</strong> This mapping holds an array of addresses that are designated as controllers for each partition.</li><li><strong>Purpose:</strong> It allows specific controllers to have management rights over certain partitions, enabling partition-specific control by trusted entities.</li><li><strong>Example Usage:</strong> If the regulatory authority needs control over the “EquityClass” partition, their address would be included in the array _controllersByPartition[&quot;EquityClass&quot;].</li></ul><h4>Mapping from (Partition, Operator) to PartitionController Status</h4><pre>mapping (bytes32 =&gt; mapping (address =&gt; bool)) internal _isControllerByPartition;</pre><ul><li><strong>Description:</strong> This mapping indicates whether an address is recognized as a controller for a specific partition.</li><li><strong>Purpose:</strong> It provides a quick way to check if an address has control rights over a particular partition, ensuring that only authorized controllers can perform certain operations.</li><li><strong>Example Usage:</strong> When a new controller is added for the “DividendClass” partition, their address is set to true in this mapping. For example, _isControllerByPartition[&quot;DividendClass&quot;][RegulatoryAuthorityAddress] = true.</li></ul><h3>ERC1820Client and IERC1820Registry</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hAASvxFxLoW1fp-5ekYOkw.png" /></figure><p>The ERC1820 standard provides a universal registry smart contract where any address (contract or regular address) can register which interface it implements and at which address. This is particularly useful for dynamically discovering contract functionalities and ensuring compatibility with different standards.</p><p>In the context of ERC-1400, the ERC1820 registry is used to register the ERC-1400 contract itself as well as various extensions and roles, such as token validators and checkers.</p><h3>ERC1820Client</h3><p>The ERC1820Client is a utility contract that provides functions to interact with the ERC1820 registry. It simplifies the process of registering interfaces and querying the registry for interface implementations.</p><h3>IERC1820Registry</h3><p>The IERC1820Registry is an interface for the ERC1820 registry contract. It defines the standard functions for registering and querying interface implementations.</p><h3>How the ERC-1400 Contract is Registered</h3><p>During the deployment of an ERC-1400 contract, it registers itself with the ERC1820 registry using the ERC1820Client. This registration ensures that the contract can be discovered and interacted with using the ERC-1400 standard.</p><h4>Registration Code in the Constructor</h4><p>Here’s an example of how the ERC-1400 contract registers itself:</p><pre>constructor(<br>    string memory tokenName,<br>    string memory tokenSymbol,<br>    uint256 tokenGranularity,<br>    address[] memory initialControllers,<br>    bytes32[] memory defaultPartitions<br>) {<br>    _name = tokenName;<br>    _symbol = tokenSymbol;<br>    _totalSupply = 0;<br>    require(tokenGranularity &gt;= 1);<br>    _granularity = tokenGranularity;</pre><pre>    _setControllers(initialControllers);<br>    _defaultPartitions = defaultPartitions;<br>    _isControllable = true;<br>    _isIssuable = true;</pre><pre>    // Register contract in ERC1820 registry<br>    ERC1820Client.setInterfaceImplementation(ERC1400_INTERFACE_NAME, address(this));<br>    ERC1820Client.setInterfaceImplementation(ERC20_INTERFACE_NAME, address(this));</pre><pre>    // Indicate token verifies ERC1400 and ERC20 interfaces<br>    ERC1820Implementer._setInterface(ERC1400_INTERFACE_NAME);<br>    ERC1820Implementer._setInterface(ERC20_INTERFACE_NAME);<br>}</pre><p>In this constructor:</p><ul><li>The ERC1820Client.setInterfaceImplementation function is called twice to register the ERC-1400 contract as both an ERC1400Token and an ERC20Token.</li><li>The ERC1820Implementer._setInterface function is called to mark the contract as implementing these interfaces.</li></ul><h3>How to Register Other Extensions</h3><p>Other extensions, such as token validators and checkers, can be registered in a similar manner. The ERC-1400 contract includes a function _setTokenExtension to facilitate this process.</p><h4>Function to Set Token Extensions</h4><p>Here is an example of how extensions can be registered:</p><pre>function _setTokenExtension(<br>    address extension,<br>    string memory interfaceLabel,<br>    bool removeOldExtensionRoles,<br>    bool addMinterRoleForExtension,<br>    bool addControllerRoleForExtension<br>) internal {<br>    address oldExtension = interfaceAddr(address(this), interfaceLabel);</pre><pre>    if (oldExtension != address(0) &amp;&amp; removeOldExtensionRoles) {<br>        if(isMinter(oldExtension)) {<br>            _removeMinter(oldExtension);<br>        }<br>        _isController[oldExtension] = false;<br>    }</pre><pre>    ERC1820Client.setInterfaceImplementation(interfaceLabel, extension);<br>    if(addMinterRoleForExtension &amp;&amp; !isMinter(extension)) {<br>        _addMinter(extension);<br>    }<br>    if (addControllerRoleForExtension) {<br>        _isController[extension] = true;<br>    }<br>}</pre><p>In this function:</p><ul><li>The interfaceAddr function is used to check if there is an existing extension registered for the given interfaceLabel.</li><li>If an old extension exists and removeOldExtensionRoles is true, the roles of the old extension (like minter or controller) are removed.</li><li>The new extension is registered using ERC1820Client.setInterfaceImplementation.</li><li>The new extension can be granted minter and controller roles if specified.</li></ul><h3>Example Usage of _setTokenExtension</h3><p>Suppose you want to register a new token validator extension:</p><pre>function registerTokenValidator(address validator) external onlyOwner {<br>    _setTokenExtension(<br>        validator,<br>        ERC1400_TOKENS_VALIDATOR,<br>        true,  // Remove roles from old extension<br>        false, // Do not add minter role for the new extension<br>        true   // Add controller role for the new extension<br>    );<br>}</pre><p>This function would:</p><ul><li>Remove the roles of any existing validator extension.</li><li>Register the new validator extension.</li><li>Assign the controller role to the new validator extension.</li></ul><h3>Conclusion</h3><p>The ERC-1400 standard is a powerful and flexible framework for creating security tokens on the Ethereum blockchain. It enhances the basic ERC-20 functionalities by adding support for partitions, document management, controller operations, and regulatory compliance.</p><p>By utilizing the ERC1820 registry, ERC-1400 ensures dynamic discovery and interaction with different token components and extensions. This makes it easier to manage and customize tokens according to specific needs and regulatory requirements.</p><p>For more details and to see the implementation, you can refer to the <a href="https://github.com/Consensys/UniversalToken/blob/master/contracts/ERC1400.sol">ERC-1400 contract repository</a> by ConsenSys.</p><h3>Personal Thoughts on ERC-1400</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zIcw1vtg4TON2eAqXCH_pw.png" /></figure><p>While ERC-1400 offers advanced features for security tokens, it’s important to note that it is not officially included in the Ethereum ERC standards. Despite this, some communities still use it.</p><h4>My Concerns</h4><p>Complexity and Stability:</p><ul><li>ERC-1400 is very complex and can be unstable.</li><li>You can issue (“mint”) tokens without assigning them to a partition, which can lead to mismanagement of tokens.</li></ul><p>Incompatibility with ERC-20:</p><ul><li>ERC-1400 is not compatible with the ERC-20 standard.</li><li>This incompatibility means it doesn’t work with most DeFi apps.</li></ul><p>As Mohamad, I believe ERC-1400’s complexity and lack of compatibility with ERC-20 make it less practical for many users and developers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87a5f791f2c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Account Abstraction (ERC-4337): A Technical Exploration]]></title>
            <link>https://blog.solichain.com/account-abstraction-erc-4337-a-technical-exploration-34d4c9f3f0ab?source=rss-b3e20c9a462d------2</link>
            <guid isPermaLink="false">https://medium.com/p/34d4c9f3f0ab</guid>
            <category><![CDATA[wallet]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[account-abstraction]]></category>
            <dc:creator><![CDATA[Mohamad Hammoud]]></dc:creator>
            <pubDate>Tue, 16 Jan 2024 16:48:36 GMT</pubDate>
            <atom:updated>2024-01-17T14:38:38.800Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iNdHBXpag-IpJ1AZ9I4zgw.png" /></figure><p>Understanding technical topics such as <strong>Account Abstraction 4337 </strong>can be hard 😕. Many guides and explanations are too long, confusing, and hard to follow 📚.</p><p>In this article, I’ll show you how I made sense of it in an easy way 👍. Let’s go through this topic together, making it simple and clear for everyone 🌟.</p><h3>Deep Dive Preparation🚀</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MLoj4jMXmCljJnRXW5DvDg.png" /></figure><p>Before we get into the details of <strong>Account Abstraction 4337</strong>, there’s a really helpful series you should read. Check out this from Alchemy: <a href="https://alchemy.com/blog/account-abstraction"><strong>Alchemy’s Account Abstraction Series</strong></a> 📖. It’s full of good info to help you understand what we’ll talk about.</p><p><em>I recommend reading it a few times to get the basics down 🤓. It’s a great first step and will make our deep dive easier to follow. Once you’ve got that, you’ll be all set to jump into the more technical stuff with me 🌊👨‍💻.</em></p><h3>Let’s Get Technical! 🔧</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ny8SngG8o4mCROo42w5HAQ.png" /></figure><p>When I started looking into <strong>Account Abstraction 4337</strong>, I checked out a lot of code from big web3 companies 🌐. But I found out something important:</p><p><strong>Too Complex:</strong> These codes had a lot of extra stuff in them. They weren’t just about <strong>Account Abstraction 4337</strong>. They had their own special parts and business ideas, which made them really hard to understand for beginners 🤯.</p><p>What we really need is something much simpler ✨. A basic, easy-to-understand code that’s all about <strong>Account Abstraction 4337</strong>. This way, we can learn the basics without getting confused by the extra complicated parts.</p><p>But don’t worry! I found a much simpler repo that’s perfect for us: <a href="https://github.com/mohamadhammoud/account-abstraction/tree/refactor/test-organization"><strong>Mohamad Hammoud’s Account Abstraction Repo</strong></a> 🌟. It’s clear and focused just on <strong>Account Abstraction 4337</strong>. This is where we’ll start our deep dive. It’s a great place to learn the basics without all the confusing extras.</p><p><strong><em>A Quick Heads-Up:</em></strong><em> Before we begin, it’s important to have some familiarity with Solidity and the Hardhat development framework. This knowledge will help you understand the repo and what we’re going to cover much better 🧠💻.</em></p><p>Ready to dive in? Let’s explore this repo together and make sense of <strong>Account Abstraction 4337</strong> step by step! 🏊‍♂️📘</p><h4>First Step: Jump into the ‘Test’ Folder 🚀</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F5GC26ZJzB3mKITLK-LyUA.png" /></figure><p>Let’s start our adventure in the <strong>‘test’</strong> folder. Look for the <strong>‘helpers’</strong> folder there. 📁</p><p>In <strong>‘helpers’</strong>, you’ll find files that show us how to <strong>sign, fill, and pack users operations</strong>. It’s like learning the basics first!</p><p>👓 If we see a file about a smart contract in <strong>‘helpers’</strong> let’s just take a quick look at it. No need to understand everything yet, just a little peek!</p><p>Understanding <strong>‘helpers’</strong> is our first big step. It helps us get ready for everything else in <strong>Account Abstraction 4337!</strong></p><h3><strong>Second Step: Let’s Check Out ‘entrypoint.’ 🧐</strong></h3><p>Next, in the <strong>‘test’</strong> folder, we’re going to look at a file named entrypoint.test.ts.</p><h4>Easy Steps to Follow:</h4><ol><li><strong>Read Every Part:</strong> Go through entrypoint.test.ts slowly, looking at each line and each function. It’s like following a simple trail.</li><li><strong>Follow the Functions:</strong> When you see a function, go see what it does. If that function talks about other functions, go check those out too! It’s like following clues in a game.</li><li><strong>Connect with Solidity:</strong> If you see that the code is using a method from the entry point in Solidity, go look at that Solidity code too. And there, do the same thing — follow each function one by one. It’s like putting together pieces of a story.</li></ol><p>This is a fun way to see how everything in <strong>Account Abstraction 4337</strong> is linked together, like a chain of clues in a mystery story.</p><h3>Third Step: Exploring More Files Just Like Before 🗺️</h3><p>Now, after entrypoint.test.ts, we&#39;ll do the same thing with some other files in the &#39;test&#39; folder. It&#39;s like using the same map to explore new places!</p><h4><strong>Here are the files we’ll check out:</strong></h4><ol><li>simple-wallet.test.ts</li><li>deposit-paymaster.test.ts</li><li>paymaster.test.ts</li></ol><h4>How to Explore:</h4><ul><li><strong>Read and Follow:</strong> Start with simple-wallet.test.ts. Read each line and function, just like we did before. Remember, it&#39;s like following a story.</li><li><strong>Function to Function:</strong> If a function takes you to another function, keep going. Follow each part of the code like clues in a detective story.</li><li><strong>Solidity Side Trips:</strong> If any code in these files links to a Solidity file, take a quick trip there. Follow the story in the Solidity code, and then come back to where you were in the test file.</li></ul><p>After these files, feel free to explore any other file that catches your interest. The key thing is to keep following this pattern. It’s like sticking to a winning strategy in a game.</p><h3>Conclusion🌟</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mSZNvcCZHDBIzKZGfqzHWg.png" /></figure><p>What a journey it’s been diving into <strong>Account Abstraction 4337!</strong> We started with the <strong>‘helpers’</strong> folder and then ventured through various test files like entrypoint.test.ts and simple-wallet.test.ts. Here&#39;s a good way to make the most of what we&#39;ve learned:</p><h4>A Day-by-Day Approach:</h4><ol><li><strong>Day 1: Focus on ‘Helpers’:</strong> Take your entire first day to explore the ‘<strong>helpers’ </strong>folder. No rush, just take it in at your own pace.</li><li><strong>Day 2: Recap ‘Helpers’ and Introduce ‘Entrypoint’:</strong> Start with a quick review of <strong>‘helpers’</strong>, then move on to entrypoint.test.ts. This way, you&#39;re building on what you learned the day before.</li><li><strong>Day 3: Combine ‘Helpers’, ‘Entrypoint’, and ‘Simple Wallet’:</strong> Go over <strong>‘helpers’ </strong>and entrypoint.test.ts again, and then add simple-wallet.test.ts into the mix. Each day, you&#39;re adding a little more to your knowledge.</li></ol><p>📚 Taking your time and spreading out your learning over several days helps everything sink in better. It’s like letting each piece of knowledge settle before adding more.</p><p>I hope this method helps make everything clearer and easier to understand. Remember, the best way to learn is at your own pace, one step at a time.</p><p>Thanks for being a part of this learning adventure. Keep exploring, and enjoy every step of your journey in tech! 🚀💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34d4c9f3f0ab" width="1" height="1" alt=""><hr><p><a href="https://blog.solichain.com/account-abstraction-erc-4337-a-technical-exploration-34d4c9f3f0ab">Account Abstraction (ERC-4337): A Technical Exploration</a> was originally published in <a href="https://blog.solichain.com/">Solichain Web3 Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clear Communication: A Guide to Naming Branches and Commits in Business]]></title>
            <link>https://medium.com/@mohamad.hammoudk/clear-communication-a-guide-to-naming-branches-and-commits-in-business-68147eefe4f0?source=rss-b3e20c9a462d------2</link>
            <guid isPermaLink="false">https://medium.com/p/68147eefe4f0</guid>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Mohamad Hammoud]]></dc:creator>
            <pubDate>Fri, 13 Oct 2023 07:08:40 GMT</pubDate>
            <atom:updated>2023-10-13T07:08:40.331Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1MakSFtNShJ7yBQRJNnHaQ.png" /></figure><h3>Branching</h3><p>Branching is a fundamental concept in <strong>Git</strong>. The golden rule is that the <strong>master</strong> branch should always be deployable. When you want to work on a new idea, fix an issue, or enhance a feature, you create a new branch. This approach provides a safe space to make changes without impacting the <strong>main</strong> branch.</p><p>In most organizations, the <strong>GitHub flow</strong> is the go-to choice. It’s a lightweight, branch-based workflow that encourages teams to experiment and deploy frequently. <strong>GitHub flow</strong> can be broken down into these steps:</p><ol><li>Create a new branch from the master branch.</li><li>Make your changes and add commits.</li><li>Push the new branch.</li><li>Open a Pull Request.</li><li>Review the changes.</li><li>Approve Pull Request.</li><li>Merge.</li><li>Deploy.</li></ol><h4><strong>Branch Naming Convention</strong></h4><p>When creating a branch you need to consider the following:</p><ol><li>The Issue Type: <strong>bugfix </strong>or <strong>feature.</strong></li><li>The <strong>Issue Id </strong>for the ticket that you are working on.</li><li>The <strong>Issue Title</strong> for the ticket.</li></ol><p>The branch name goes like this:</p><p><strong>Issue Type / Issue Id- Issue Title</strong></p><p>You can get this info from your <strong>Jira </strong>or<strong> Github </strong>ticket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F1GlqwxL4zpHt7_ErIBXgw.png" /></figure><p>For example, here your branch name will be <strong>bugfix/NFTM-297</strong></p><pre>git checkout -b bugfix/NFTM-297-backend-localnode-integration</pre><p><strong>Please make sure that you are creating a branch from the master branch.</strong></p><h4><strong>Why are we doing this naming convention?</strong></h4><p>This will help us link our branch with the <strong>Jira </strong>ticket that we are working on like so:</p><h4><strong>Commits</strong></h4><p>The <strong>“<em>commit</em>” </strong>command is used to save your changes to the local repository.</p><p>When creating a commit you need to consider the following:</p><ol><li>Add your <strong>Issue Id</strong> first.</li><li>Add your <strong>Issue Type</strong></li><li>Add a detailed description of what you’ve done</li></ol><pre>git commit -m &quot;NFTM-297 bugfix for your detailed description&quot;</pre><p>For each new branch, you typically make several commits. It’s a common practice to prefix each commit with the issue ID and a brief title, such as “NFTM-297 bugfix.”</p><p>This helps keep your commits organized and tied to the specific issue they address.</p><h4><strong>Testing on development</strong></h4><p>In order to test your changes on development environment you need to merge your branch into the <strong>dev branch, </strong>to do so you need to do the following:</p><ol><li>Checkout the <strong>dev branch “</strong>If you don’t have one<strong>”.</strong></li><li>Make sure to pull the latest changes for the <strong>dev branch.</strong></li><li>Merge dev branch into the <strong>your branch.</strong></li></ol><h4><strong>What if i have a Merging Conflict?</strong></h4><p>When merging into <strong>dev branch </strong>there could be some conflicts because of changes that other developers have made to the <strong>dev branch</strong>.</p><p>For this you need to resolve the conflicts on <strong>your branch </strong>by merging the <strong>dev branch</strong> locally into <strong>your branch</strong> itself, and push those changes <strong>ONLY </strong>from <strong>your branch </strong>not your <strong>dev branch </strong>since the conflicts are on <strong>your branch</strong>.</p><pre>git merge dev</pre><h4><strong>Creating a Pull Request</strong></h4><p>A <strong>pull request </strong>— also referred to as a merge request — is an event that takes place in software development when a <strong>contributor/developer </strong>is ready to begin the process of merging new code changes with the main branch.</p><p>Also check Library Versioning which will help you test Calo Libraries in other services.</p><p>For the <strong>PR Title </strong>it’s almost the same structure as we did in the <strong>commit </strong>section:</p><p><strong>(Issue-id) (Issue-Type) YOUR TITLE HERE</strong></p><p>For example:</p><p><strong>NFTM-297 bugfix for your description</strong></p><p>Before creating a pull request, you need to make sure your branch has the latest changes from the dev branch, as someone could’ve pushed new changes to the dev branch while you were working on yours.</p><p>Once you create your <strong>PR</strong>, you will then need to tag a reviewers to check your changes, and when they approve your changes, you can merge them with the <strong>dev </strong>branch.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68147eefe4f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Account Abstraction (ERC-4337): Scenarios and Possibilities]]></title>
            <link>https://medium.com/@mohamad.hammoudk/account-abstraction-erc-4337-scenarios-and-possibilities-ff8e6dfd9b56?source=rss-b3e20c9a462d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff8e6dfd9b56</guid>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[account-abstraction]]></category>
            <category><![CDATA[wallet-development]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[evm]]></category>
            <dc:creator><![CDATA[Mohamad Hammoud]]></dc:creator>
            <pubDate>Sun, 01 Oct 2023 13:20:46 GMT</pubDate>
            <atom:updated>2023-10-04T22:19:46.385Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qBryBhCmJerXQBbjG_9YjA.png" /></figure><p>Ethereum is changing the game with something called <strong>ERC-4337</strong>.</p><p><strong>ERC-4337 </strong>won’t replace the way accounts currently work with Externally Owned Accounts (EOA), but it’s bringing something new.</p><p>In this article, we’ll explain it in easy terms and explore how it’s changing things in the world of blockchain.</p><h3>What’s new?</h3><ol><li>Account changes</li><li>Extend paymaster</li><li>Support signature aggregation</li><li>Relaxed storage rules</li><li>Staking, reputaion for all entities</li><li>RPC API</li></ol><p><strong>Note:</strong> In this article, “Account Contract” means the same thing as “Smart Contract Wallet” or “Smart Account.” They all refer to a special kind of Ethereum smart contract that handles an account’s balance.</p><h3>Transaction Submission with Account Contract</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L2P4zj5rDxXPagSnqV6L8A.png" /></figure><ol><li>Starting with creating or signing a <strong>“User Operation”</strong>.</li></ol><h4>What is User Operation ?</h4><p>All components of ERC-4337 revolve around a pseudo-transaction object called a UserOperation which is used to execute actions through a smart contract account.</p><p><strong>User Operation </strong>is ABI encoded structure.</p><p><strong>User Operation </strong>is not allowed to access any information that alter like block time, number or hash.</p><p><strong>User Operation </strong>is allowed to access data related to the sender’s address.</p><h4>User Operation Fields</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R1tK4rlcgbzLYN70hcc2Wg.png" /></figure><p>2. Using RPC API, user sends <strong>User Operation </strong>to the<strong> Bundler</strong></p><p>3. Bundler is a block builder, considered as a node that collects user operations and put them into the mempool to later put them into a transaction.</p><p>Bundler will trace call <strong>Entry Point</strong> Contract.</p><p>4. Entry Point: This is the main contract handles the validation and execution of <strong>User Operations</strong>.</p><p>5. Contract Account will send the fee to the Entry Point contract.</p><p>6. Bundler will perform the transaction.</p><p>7. Send the transaction to mempool.</p><p><strong>Note:</strong></p><ol><li>Not all nodes act as <strong>bundler</strong>.</li><li>Trace call considered as <strong>view</strong> call.</li></ol><h3>Transaction Submission without Contract Account</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7RrnhyVunSqLDqH2gfvRcw.png" /></figure><p>The Entry Point contract checks if an account contract exists. If it doesn’t, the Entry Point contract creates one using the initial code provided to the Factory contract.</p><p>After returning the new contract, we will proceed with the same scenario of <strong>User Operations</strong> validation</p><h3>What if we want to use another smart contract for payment ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*81k9e1_zs-qn26VMzFrMJQ.png" /></figure><p>One of the main reasons why the user experience of using EOAs is so difficult is because the wallet owner needs to find a way to get some ETH before they can perform any actions on-chain.</p><p>With paymasters, ERC-4337 allows abstracting gas payments altogether, meaning ​​someone other than the wallet owner can pay for the gas instead.</p><h3>Using Paymaster Contract for Payment, but Without having Account Contract: What to Do?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fRQRBrJdQveWZQ0KGdDmdA.png" /></figure><p>In this scenario, we bring together all components, both essential and non-essential. If no account contract exists, the factory creates one using the user’s provided initial code. Additionally, the paymaster facilitates transaction sponsorship.</p><p>Essential components: User, Bundler, Entry Point, Account Contract.</p><p>Non-essential components: Factory Contract, Paymaster</p><h3>Create Transactions</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QOF3e-vhcUeW4Sn0OjIKpg.png" /></figure><p>In all the scenarios we’ve explored, we’ve conducted off-chain validations to determine if they are suitable for bundling.</p><p>Once bundled, we create a single transaction containing all user actions and send it to the Entry Point. Then, the ‘handle Operations’ method double-checks and executes each user action one by one.</p><h3>Conclusion</h3><p>In summary, <strong>ERC-4337</strong> is a game-changer for Ethereum. It’s like a big software update that’s going to make Ethereum accounts work in a whole new way.</p><p>This article has explained it in simple terms, showing how it can bring exciting new possibilities to the world of blockchain. So, get ready for some cool changes in the world of digital currencies and smart contracts!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff8e6dfd9b56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Vulnerabilities Found in Smart Contract]]></title>
            <link>https://medium.com/@mohamad.hammoudk/10-vulnerabilities-found-in-smart-contract-1c63c7d31bf2?source=rss-b3e20c9a462d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c63c7d31bf2</guid>
            <category><![CDATA[ethereum-blockchain]]></category>
            <category><![CDATA[smart-contract-auditing]]></category>
            <category><![CDATA[solidity]]></category>
            <dc:creator><![CDATA[Mohamad Hammoud]]></dc:creator>
            <pubDate>Sun, 24 Sep 2023 10:23:08 GMT</pubDate>
            <atom:updated>2023-09-24T10:23:08.831Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S86LHPsgkNO9zLcR4VoqKg.png" /></figure><p>Smart contracts are like the building blocks of blockchain apps, but they can have problems. In this article, I’ll share 100 issues in smart contracts.</p><h4><strong>Reentrancy</strong></h4><p>Reentrancy occurs when a contract’s function is called again before the first call is finished, potentially causing unexpected behaviour. To avoid reentrancy issues, use the ‘checks-effects-interactions’ pattern and leverage the mutex (mutual exclusion) concept to lock contract functions during execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*Vxmx2Sg95tOGO8h02QHpDw.png" /></figure><p>Contract Bank does have a bug in the withdraw method. Withdraw method transfers an amount on ether before changing the balance.</p><p>After sending the ether, the receiver would have a receive method as fallback that will call the withdraw function again recursively.</p><p>However the withdraw will react as it is like the first time called.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*7kB3lCnzmR3oOjb-7yCgMQ.png" /></figure><p>Check this <a href="https://redfoxsec.com/blog/reentrancy-attacks-in-smart-contracts/">blog</a> for more info.</p><h4><strong>Integer Overflow and Underflow</strong></h4><p>Integer overflow and underflow can occur when a variable exceeds its maximum or minimum storage capacity, causing the value to wrap around.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*v2zWaAWp5OzjZ3_XfQ6HXw.png" /></figure><p>This is a simple contract that stores a balance of using uint8 values (where the maximum value it can store is 28 - 1 = 255). If a user executes the function with an input that increases the balance to <strong>256</strong>, the calculation wraps around and reverts the next lowest value possible <strong>(0)</strong> in Solidity (pre-version 8.0).</p><p>Check:</p><ul><li><a href="https://medium.com/block6/solidity-hacking-integer-overflow-and-underflow-293a0fe04756">Solidity Hacking: Integer Overflow and Underflow</a></li><li><a href="https://www.halborn.com/blog/post/arithmetic-underflow-and-overflow-vulnerabilities-in-solidity">Arithmetic Underflow and Overflow Vulnerabilities In Solidity</a></li></ul><h4><strong>Unchecked External Calls</strong></h4><p>Untrusted contracts might manipulate the state of the calling contract. To mitigate this risk, use the try-catch mechanism to handle external calls and always check the return value for success or failure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*QATreU3Arm-sn84soxgRpQ.png" /></figure><p>Check:</p><p><a href="https://sm4rty.medium.com/unchecked-call-return-value-solidity-security-1-fe794a7cdb6f">https://sm4rty.medium.com/unchecked-call-return-value-solidity-security-1-fe794a7cdb6f</a></p><h4>Denial of Service (DoS)</h4><p>A DoS attack can be carried out by exploiting gas costs or blocking certain operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bN2uZOROpSaE1--l14hgMQ.png" /></figure><p>check:</p><p><a href="https://medium.com/@Knownsec_Blockchain_Lab/in-depth-understanding-of-denial-of-service-vulnerabilities-dd437b1d7a1c">https://medium.com/@Knownsec_Blockchain_Lab/in-depth-understanding-of-denial-of-service-vulnerabilities-dd437b1d7a1c</a></p><h4>Timestamp Dependency</h4><p>Relying on block.timestamp can introduce vulnerabilities due to its manipulability by miners. Instead, use block.number of measuring time or implement a commit-reveal scheme with a time delay to prevent manipulation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*vfgt6VEypm0VOz2SIjNEPw.png" /></figure><p>Check this <a href="https://zuhaibmd.medium.com/block-timestamp-manipulation-hack-solidity-11-224a8b48cf3f">blog</a></p><h4>Short Address Attack</h4><p>A short address attack occurs when an attacker sends fewer bytes than expected to a contract, causing the contract to misinterpret the input. To prevent this attack, use the require function to validate input length and ensure it meets the required standard.</p><p>Check:</p><p><a href="https://medium.com/coinmonks/understanding-and-preventing-short-address-attacks-in-solidity-smart-contracts-3d46a4af9a15">https://medium.com/coinmonks/understanding-and-preventing-short-address-attacks-in-solidity-smart-contracts-3d46a4af9a15</a></p><p><a href="https://natachi.hashnode.dev/attack-vectors-in-solidity-10-short-address-attack">https://natachi.hashnode.dev/attack-vectors-in-solidity-10-short-address-attack</a></p><h4>Front-running</h4><p>Front-running happens when an attacker exploits the public nature of transactions to gain an unfair advantage. Use off-chain signing, leverage layer 2 solutions, or implement a commit-reveal scheme to mitigate front-running risks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*VJIyA-f-1pbD3rWvpzCjFg.png" /></figure><p>Check:</p><p><a href="https://nazariyv.medium.com/crypto-front-running-for-dummies-bed2d4682db0">Crypto Front Running for Dummies</a></p><h4>Insufficient Gas Griefing</h4><p>An attacker might intentionally cause a contract function to run out of gas, leading to incomplete execution. To address this, utilize the require function to specify a minimum gas limit or design your contract to resist gas exhaustion by implementing gas-efficient code.</p><p>Check:</p><p><a href="https://www.getsecureworld.com/blog/smart-contract-gas-griefing-attack-the-hidden-danger/">https://www.getsecureworld.com/blog/smart-contract-gas-griefing-attack-the-hidden-danger/</a></p><h4>Unprotected Functions</h4><p>Malicious actors can exploit unprotected functions if they are not adequately secured. Implement access control mechanisms, like the Ownable pattern, to restrict access to sensitive functions.</p><pre>// Example of Private Function to Protect against Unauthorized Access or Modification<br>pragma solidity ^0.8.0;contract MyContract {<br>    uint256 private myVar;<br>function setMyVar(uint256 _value) private {<br>        myVar = _value;<br>    }<br>}</pre><p>Check:</p><p><a href="https://medium.com/@solidity101/solidity-security-pitfalls-best-practices-101-a9a64010310e">https://medium.com/@solidity101/solidity-security-pitfalls-best-practices-101-a9a64010310e</a></p><h4>Storage Collisions</h4><p>Storage collisions occur when two distinct storage slots have the same hash, leading to unintentional data overwriting. To avoid storage collisions, use the mapping keyword to create a unique storage location for each variable.</p><p>Understanding and addressing common Solidity vulnerabilities is critical to developing secure smart contracts. By following best practices and staying informed about potential threats, developers can minimize risks and create more robust, reliable dApps on the Ethereum platform.</p><p><strong>For example:</strong> Your Proxy contract has the address of the Implementation/Logic contract. And that address is written inside Proxy contract&#39;s storage.</p><p>However, what happens if one of the functions in your Implementation/Logic contracts overwrites that memory slot? Suddenly your Proxy contract can&#39;t call the Implementation contract because he lost the address.</p><p>That is an example of <strong>memory collision</strong>.</p><p>I advise you to watch this tutorial that showcases the memory collision to understand it better: <a href="https://www.youtube.com/watch?v=xluCHy_HB-4&amp;t=378s&amp;ab_channel=SmartContractProgrammer">Link to video</a></p><h4>Conclusion:</h4><p>Building a Safer Blockchain Ecosystem with Ekolance.</p><p>We want to give a shout-out to the Ekolance community for their dedication to making blockchain safer for everyone. Consider joining such communities to learn more and contribute to a secure blockchain future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c63c7d31bf2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Drive for Account Abstraction]]></title>
            <link>https://medium.com/@mohamad.hammoudk/the-drive-for-account-abstraction-c44058cbdce0?source=rss-b3e20c9a462d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c44058cbdce0</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[ethereum-wallet-security]]></category>
            <category><![CDATA[account-abstraction-layer]]></category>
            <category><![CDATA[account-abstraction]]></category>
            <dc:creator><![CDATA[Mohamad Hammoud]]></dc:creator>
            <pubDate>Sat, 23 Sep 2023 13:48:07 GMT</pubDate>
            <atom:updated>2023-09-23T13:48:07.077Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0_EqHqFFKaVKA9nQDLycZg.png" /></figure><p>In the age of “Web3,” where individuals are promised greater control over their digital assets, Ethereum’s Externally Owned Accounts (EOAs) have presented some obstacles. Users struggle with managing private keys, facing social engineering threats, and falling victim to hacks.</p><p>In this article, we uncover why Ethereum is moving towards account abstraction to address these issues.</p><p>We’ll delve into the key problems driving this change toward a more user-friendly and secure “Web3” experience.</p><h3>Background on The Current Status Quo</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*k-dDq_WbWGU4bcNagjbgxQ.jpeg" /></figure><p>In the world of blockchain, such as Ethereum, there are two primary types of accounts:</p><ol><li><strong>Externally Owned Accounts (EOAs):</strong> These are controlled by private keys.</li><li><strong>Contract Accounts: </strong>These are controlled by code deployed on the blockchain.</li></ol><h3>What is the problem with private keys?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bdTUPwskfc1cjg4NownXVQ.png" /></figure><p>Now, let’s take a moment to consider the issue with private keys. Picture this scenario:</p><p>Imagine you have a keyring with your home, car, and office keys. Now, picture this: you’re out for a run in the park, and you lose the keyring.</p><p>Misplacing that keyring and not being able to get into your home, access your car, or office.</p><p>Private keys are the only way you can access and manage your EOA. If you were to lose your private keys, you’d effectively lose access to your assets.</p><p>Now, think about the dangers of having copies of your private key. If someone untrustworthy, like scammers, got hold of one of these copies, they could get into your home, car, and office without permission. This is because a copied private key has the same power as the original.</p><p>The essential rule here is never share your private key with anyone, no matter what. It’s a golden rule: <strong>NEVER share your private key!</strong></p><h4>Okay, so what’s the way out of this ?</h4><h3>Accounts Abstraction</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3hshZZ7NMdcaosU32f8ySw.jpeg" /></figure><p>Account abstraction is a proposed upgrade that allows users to establish their own transaction validation rules for their crypto wallets.</p><p>Accounts abstraction doesn’t replace your private keys. Its an innovation that built to provide flexibility in the conditions that need to be met for a transaction to be valid.</p><h4>How it actually works ?</h4><p>In a traditional model, a transaction start with the sender, the sender needs to have enough ether to cover gas fees and sign transaction with private key.</p><p>This transaction will be broadcasted to the network, where miners included it in a block.</p><p>With <strong>Account abstraction </strong>this process changes, instead of signing a transaction, you create a smart contract. This contract known as a smart account defines the rules for how transactions should be processed in the future.</p><p><strong>Here where is the magic happens.</strong></p><p>Instead of using private keys, a smart contract account uses another piece of smart contract code to determine the validity of a transaction. This code can be customized to enforce specific conditions for transaction approval, such as:</p><ul><li>Requiring a transaction to be signed by a specific private key.</li><li>Allowing transactions only during certain times of the day.</li></ul><p><strong>The possibilities for defining these conditions are virtually limitless.</strong></p><p>Once you written your smart contract, you deploy it on blockchain to work normally like another smart contracts, and from that point any transaction sent from your smart account will be processed according to the rules that you defined in the deployed smart contract.</p><h4>How does the account abstraction solve the private key issue?</h4><ol><li>It provides the user with the tools to design their own security system.</li></ol><p>2. If someone holds your private keys, they would meet the other validation rules you setup.</p><p>3. If you lose your private key, well if you setup a recovery method, you won’t lose access to your account.</p><h4>Advantages of account abstraction</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vFgwo5XhrLfSY7FnMqShSw.png" /></figure><ol><li><strong>Flexibility:</strong> Traditional wallet accounts limit you to sending transactions and signing them with your private key. However, with account abstraction, you can create your own transaction processing rules.</li><li><strong>Improved Security:</strong> In traditional wallet accounts, private keys are vulnerable points. If someone gets hold of your private key, they can make transactions from your account without your permission. Account abstraction allows you to set rules that enhance security, such as needing multiple signatures for transactions or specifying certain times for transaction processing.</li><li><strong>Better User Experience:</strong> Account abstraction simplifies complex tasks, like handling gas payments and contract interactions. This makes these processes more user-friendly and transparent.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c44058cbdce0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Safemoon Hack]]></title>
            <link>https://medium.com/@mohamad.hammoudk/safemoon-hack-5ed3cdef4119?source=rss-b3e20c9a462d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ed3cdef4119</guid>
            <dc:creator><![CDATA[Mohamad Hammoud]]></dc:creator>
            <pubDate>Tue, 19 Sep 2023 14:56:25 GMT</pubDate>
            <atom:updated>2023-09-19T14:56:25.914Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Iz0dv_fqJIR__ZZ4puWBQ.png" /></figure><p>Safemoon is a DeFi protocol suffered a $8.9 million loss due to a vulnerability attack targeting the last upgrade to the protocol. The attack exploited via access control vulnerability in a smart contract burn function in the SFM/BNB liquidity pool.</p><p><strong>Timeline of Events:</strong> According to Safemoon’s CEO John Karony, on Tuesday 28 March 2023.</p><h3>Description of the smart contract and Incident Analysis:</h3><p>The crucial inquiry lies in the Solidity contract’s ‘burn’ function, which can be found at the following address: https://bscscan.com/address/0xeb11a0a0bef1ac028b8c2d4cd64138dd5938ca7a#code.</p><p><strong>function burn(address from, uint256 amount) public {_tokenTransfer(from, bridgeBurnAddress, amount, 0, false);}</strong></p><p>The vulnerability in question was a publicly-accessible burn function. This function allowed anyone to destroy SFM tokens held within the SFM/BNB pool. A pool has a value that is distributed across the tokens stored within it. Burning tokens contained within the pool increases the perceived value of those tokens that remain.</p><p>After changing the price of the SFM token, the attacker deposited SFM tokens into the pool. Since these tokens were perceived as having a higher value, the attacker was able to drain an outsized amount of BNB from the pool, stealing about $8.9 million from the protocol.</p><h3>Technical Analysis:</h3><p><strong>1.</strong> Just over six hours before the attack, the <a href="https://bscscan.com/address/0x678ee23173dce625a90ed651e91ca5138149f590">Safemoon: Deployer</a> address <a href="https://bscscan.com/tx/0x71273e731752457892f73d2ad8b89060bd4f0bf131ed403d5dfc149319c1c01d">upgraded</a> the token <a href="https://bscscan.com/address/0x42981d0bfbaf196529376ee702f2a9eb9092fcb5">contract</a> to a <a href="https://bscscan.com/address/0xeb11a0a0bef1ac028b8c2d4cd64138dd5938ca7a#code">new implementation</a>. In doing so, the team introduced a vulnerability leading to an astonishingly simple exploit.</p><p><strong>The new code left the burn() function publicly callable, allowing anyone to burn SFM tokens from any address.</strong></p><p><strong>2. </strong>This allowed the attacker to burn large quantities of SFM held inside the SFM:BNB liquidity pool, vastly inflating the price of SFM tokens in the pool.</p><p><strong>3. Then, by selling (previously acquired) SFM tokens into the skewed pool, the attacker was able to drain it of BNB liquidity, for a profit of 28k BNB, or $8.9M.</strong></p><p>Exploit tx: <a href="https://bscscan.com/tx/0x48e52a12cb297354a2a1c54cbc897cf3772328e7e71f51c9889bb8c5e533a934"><strong>0x48e52a12…</strong></a></p><p>Attacker’s address: <a href="https://bscscan.com/address/0x286e09932b8d096cba3423d12965042736b8f850"><strong>0x286e09932b8d096cba3423d12965042736b8f850</strong></a></p><h3>Impact Assessment, Response and Mitigation:</h3><p>The attack, which drained the SFM/BNB pool, was <a href="https://twitter.com/safemoon/status/1640825402795991048">announced</a> by the project and its CEO, <a href="https://twitter.com/CptHodl/status/1640914110350016512">John Karony</a>, with replies disabled on both tweets.</p><p>A few hours after the attack, the hacker sent a message to the <strong>Safemoon</strong>: Deployer address, <a href="https://twitter.com/safemoon/status/1640825402795991048">claiming</a> to be MEV bot operator willing to return the funds: <strong>Hey relax, we are accidentally frontrun an attack against you, we would like to return the fund, setup secure communication channel , lets talk.</strong></p><h3><strong>Lessons Learned:</strong></h3><p>Unprotected burn and mint functions are simple vulnerabilities that place a protocol and its coins at risk. In fact, the error is so fundamental that <a href="https://twitter.com/peckshield/status/1640855857910149122">it was suggested</a> that the real problem might have been a compromised private key that enabled the malicious update.</p><h3><strong>Recommendations:</strong></h3><p>Unprotected burn functions are vulnerabilities that could have been detected and fixed by a smart contract audit. Before pushing any code to the blockchain, including updates to existing protocols, make sure you get a <a href="https://www.halborn.com/services/smart-contract-audits">smart contract audit</a>.</p><h3>Conclusion:</h3><p>To sum it up, Safemoon, a DeFi protocol, experienced a significant setback, losing $8.9 million due to a vulnerability attack that zeroed in on their most recent protocol update. This exploit exploited a weakness in the access control of a smart contract’s burn function, located within the SFM/BNB liquidity pool.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ed3cdef4119" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Roles and Responsibilities in Smart Contract Auditing]]></title>
            <link>https://medium.com/@mohamad.hammoudk/roles-and-responsibilities-in-smart-contract-auditing-33c67076db5f?source=rss-b3e20c9a462d------2</link>
            <guid isPermaLink="false">https://medium.com/p/33c67076db5f</guid>
            <dc:creator><![CDATA[Mohamad Hammoud]]></dc:creator>
            <pubDate>Sat, 09 Sep 2023 20:39:16 GMT</pubDate>
            <atom:updated>2023-09-09T20:39:16.284Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CPhHsG1_UFJuxAMdc4LgEg.png" /></figure><p>In the world of blockchain and smart contracts, keeping things secure is a top priority. But who’s responsible for making sure everything runs smoothly? In this article, we’ll break down the different roles and responsibilities that make smart contract auditing work. From <strong>auditors</strong> to <strong>developers</strong>, <strong>project managers</strong>, and <strong>stakeholders</strong>, let’s uncover the teamwork behind keeping your digital transactions safe and sound.</p><h3>Auditors: Guardians of Smart Contract Security</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6FbfoAEWpJbSJXOA-TBeIA.png" /></figure><p>In the world of smart contracts, auditors are like security inspectors. Their main job is to check if everything is safe and sound. They carefully look at the contract’s code, logic, and security to find any problems.</p><p><strong>What Auditors Do:</strong></p><ol><li><strong>Code Check</strong>: Auditors go through the contract’s code to make sure it’s well-written and doesn’t have mistakes.</li><li><strong>Security Watch</strong>: They look for any weak points that could be exploited by bad actors.</li><li><strong>Logic Test</strong>: Auditors make sure the contract does what it’s supposed to do.</li><li><strong>Suggestions for Improvement</strong>: If they find issues, they tell the developers how to fix them.</li><li><strong>Risk Protection</strong>: They help developers add extra protection to keep everything safe.</li></ol><p>Auditors ensure that smart contracts are super secure, protecting them from online dangers and ensuring they work without hiccups.</p><h3>Developers: Architects of Smart Contract Code</h3><p>Developers are the architects and builders of smart contract code. They are responsible for creating the code that powers the contract’s functionality. Their role is fundamental to the entire process, as they craft the digital infrastructure upon which the smart contract operates.</p><p><strong>Key Responsibilities of Developers:</strong></p><p>Code Creation: Developers write the actual code for the smart contract, translating the contract’s logic and rules into machine-readable instructions.</p><p><strong>Collaboration with Auditors</strong>: They work closely with auditors, taking their feedback and suggestions seriously. If any issues or vulnerabilities are identified during the audit, developers collaborate to fix them.</p><p><strong>Functionality</strong>: Developers ensure that the smart contract functions precisely as intended, adhering to the project’s goals and specifications.</p><p><strong>Security Implementation</strong>: They implement security measures based on the auditor’s recommendations to fortify the contract against potential threats.</p><p><strong>Efficiency</strong>: Developers strive to make the code efficient, minimizing unnecessary gas costs and optimizing performance.</p><p>In essence, developers are the masterminds behind the smart contract’s construction. They bring the contract to life, making sure it not only works smoothly but also meets the highest security standards. Their close collaboration with auditors is essential for creating robust and reliable smart contracts.</p><h3>Project Managers: The Coordinators of Smart Contract Safety</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZFQ5FcHeGWE8jpDPoB0Hog.png" /></figure><p>Think of project managers as the organizers of the smart contract security show. They make sure everything happens on time and everyone works together smoothly to keep smart contracts safe.</p><p><strong>What Project Managers Do:</strong></p><ol><li><strong>Keep Things on Schedule</strong>: Project managers set timelines and make sure everyone meets their deadlines during the audit.</li><li><strong>Communication Hub</strong>: They’re like the messenger between auditors and developers, making sure they talk to each other and understand what needs to be done.</li><li><strong>Problem Solvers</strong>: If there are disagreements or issues, project managers step in to find solutions that make everyone happy.</li><li><strong>Resources Manager</strong>: They handle the budget and make sure everyone has what they need to do their job.</li><li><strong>Reporters</strong>: Project managers tell stakeholders how the audit is going, so everyone knows what’s happening.</li><li><strong>Quality Control:</strong> They make sure the auditing process meets the highest standards for security and reliability.</li></ol><p>In simple terms, project managers make sure the auditing process goes smoothly and that everyone is on the same page to keep smart contracts safe and sound.</p><h3>Stakeholders: The Guardians of Smart Contract Success</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eL2ZgWAaznTKIaIhdNA-1A.png" /></figure><p>Stakeholders are like the guardians who have a vested interest in the smart contract’s success and security. They play a crucial role in ensuring that the contract functions reliably and without hiccups.</p><p><strong>Key Responsibilities of Stakeholders:</strong></p><ol><li><strong>Investment</strong>: Stakeholders often have financial investments in the smart contract project. They want to protect their investments by ensuring the contract is secure.</li><li><strong>Engagement</strong>: They actively engage in the auditing process, asking questions, providing input, and expressing concerns to help improve the contract’s security and functionality.</li><li><strong>Funding</strong>: In some cases, stakeholders provide the necessary funding to conduct a thorough audit and implement recommended improvements. Their financial support is vital for the project’s success.</li><li><strong>Transparency</strong>: Stakeholders expect transparency in the auditing process. They want to know what’s happening, what issues have been identified, and how those issues are being addressed.</li><li><strong>Legal and Regulatory Compliance</strong>: Depending on the nature of the contract and applicable regulations, stakeholders may need to ensure that the auditing process complies with legal requirements.</li><li><strong>Community Trust</strong>: If the contract serves a broader community or user base, stakeholders’ active involvement can help build trust among users. Users are more likely to trust a contract when they see that stakeholders are invested in its security and reliability.</li></ol><p>In summary, stakeholders are the champions of smart contract success, actively engaging in the auditing process to protect their investments and ensure the contract operates securely and efficiently. Their involvement is a key component of the smart contract auditing ecosystem.</p><p><strong>Conclusion: Teamwork Ensures Smart Contract Security</strong></p><p>In the world of smart contract auditing, teamwork makes all the difference. Auditors find flaws, developers build the code, project managers keep things running smoothly, and stakeholders protect their investments. Together, they create a strong safety net, ensuring that smart contracts work safely and reliably. This collaboration is the foundation of trust in blockchain technology, making the digital world more secure for everyone.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33c67076db5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Landing Your First Web Developer Job: Advice for Junior Coders]]></title>
            <link>https://medium.com/@mohamad.hammoudk/landing-your-first-web-developer-job-advice-for-junior-coders-755dde840a4f?source=rss-b3e20c9a462d------2</link>
            <guid isPermaLink="false">https://medium.com/p/755dde840a4f</guid>
            <dc:creator><![CDATA[Mohamad Hammoud]]></dc:creator>
            <pubDate>Mon, 28 Aug 2023 15:30:20 GMT</pubDate>
            <atom:updated>2023-08-28T15:30:20.016Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ERdymRxIuBrxW3tm9eM7IA.png" /></figure><p>Starting off as a newbie in the web development world can feel like setting sail on a big adventure. It’s like trying to climb a mountain when you’re just starting to hike!</p><p>Don’t worry, though. Even the most experienced web developers were once in your shoes. They had to prove themselves to employers who might have had doubts because they were new to the game. So, how can you make employers see your potential and give you a shot, even without a ton of experience?</p><p>This guide will show you the tricks to make employers believe in you and see your budding talent. We’ll talk about making a great portfolio, nailing interviews, and standing out from the crowd. It’s all about showing that even though you’re just starting, you’ve got what it takes to rock the web development world.</p><p>Remember, all the pros were beginners once. The secret is how you handle the challenge and show that you’re ready to learn and work hard. Let’s find out how you can turn the excitement of getting your first web developer job into a real success story!</p><h3>Frontend Exploration: Showcasing Skills and Standing Out</h3><p>Before we dive into the guide, I want to shed light on why I’ve chosen frontend development as my pathway in the web world. There’s a good reason for this choice, and I’m excited to share it with you as we embark on this journey together.</p><p><strong>Why Frontend?</strong></p><ol><li><strong>See Your Progress:</strong> With frontend, every bit of code you write brings instant results on the screen. It’s quick feedback that keeps you motivated.</li><li><strong>Learning Made Visual:</strong> Frontend involves creating what you see on websites. This hands-on approach makes learning concepts easier.</li><li>I<strong>nteractive Magic:</strong> Frontend projects are alive with interaction. Users can directly engage with what you make, showing off your coding and user experience skills.</li><li><strong>Responsive Expertise:</strong> Getting good at making projects work on all devices is key. It shows your flexibility and user-focused mindset.</li><li><strong>Employers Like It:</strong> Employers need developers who can turn designs into functional websites. Frontend devs bridge the gap between design and tech.</li><li><strong>Portfolio Boost:</strong> Your frontend projects shine in your portfolio. Each one is a story of progress and mastering new abilities.</li></ol><h3>Developing Your Foundation: Mastering the Basics</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tPuSXF_GG39y40pIcETGVw.png" /></figure><p>Alright, let’s start by laying down the groundwork for your web developer journey. Before you jump into the job hunt, you’ve got to become a champ in a few key things: <strong>HTML, CSS, and JavaScript</strong>. These three are like the superhero trio of web development — they make websites tick and dance.</p><p><strong>HTML (Hypertext Markup Language):</strong> This is the blueprint of your website. It structures everything, from text to pictures. Learn about tags, elements, and how to put stuff where it belongs. It’s like arranging the blocks of your digital Lego castle.</p><p><strong>CSS (Cascading Style Sheets): </strong>Time to add some style! CSS is all about making things look good. You’ll figure out how to change colours, arrange things neatly, and even make stuff move around. Think of it as giving your website a cool outfit.</p><p><strong>JavaScript (with a Focus on the DOM):</strong> Now, let’s make things interactive. JavaScript is your magic wand for adding actions to your website. When you combine it with the DOM, you can make things pop up, disappear, and do tricks. It’s like teaching your website to play catch.</p><ol><li><a href="https://youtu.be/kUMe1FH4CHE?si=q-yx_LVWneZ_YJ6R">HTML Crash Course</a></li><li><a href="https://youtu.be/yfoY53QXEnI?si=5Q7rx7ojZhFx2t2j">CSS Crash Course</a></li><li><a href="https://www.youtube.com/watch?v=0ik6X4DJKCc&amp;list=PLillGF-RfqbYE6Ik_EuXA2iZFcE082B3s">Javascript DOM Course</a></li></ol><h3><strong>Leveling Up: Mastering JavaScript Algorithms</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z7WMLPx32ApnSkFYeLq8fQ.png" /></figure><p>Alright, you’ve got the basics down — you’re an HTML, CSS, and JavaScript champ! Now, it’s time to take things up a notch. Say hello to JavaScript algorithms.</p><p><strong>JavaScript Algorithms: Crack the Code</strong></p><p>Think of algorithms as your secret recipes for solving problems with code. They’re like the steps you follow to bake the perfect cake, but in the world of programming. Algorithms help you create efficient and clever solutions to challenges you might encounter as a web developer.</p><p>Why Learn JavaScript Algorithms?</p><p>Learning algorithms is like gaining superpowers. They help you write code that’s fast, reliable, and smart. When you know how to use algorithms, you can create websites that load quickly, handle tons of data smoothly, and offer a seamless user experience.</p><ol><li><a href="https://www.youtube.com/watch?v=coqQwbDezUA&amp;list=PLC3y8-rFHvwiRYB4-HHKHblh3_bQNJTMa&amp;index=1">Javascript Algorithms</a></li><li><a href="https://www.youtube.com/watch?v=JgWm6sQwS_I">Javascript “Big O”</a></li></ol><h3>Making Websites Fit Any Screen: Responsive Design</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8aX9eq8fndQpGGJOok3mNg.png" /></figure><p>Great job tackling JavaScript algorithms! Now, let’s switch gears and talk about something super important: making your websites work great on any device — big or small.</p><p><strong>Responsive Design: What’s That?</strong></p><p>Ever seen a website that looks weird on your phone? Responsive design fixes that. It’s like giving your website a special power to look awesome on any screen — whether it’s a computer, tablet, or smartphone.</p><ol><li><a href="https://youtu.be/aook54SsfhY?si=dmxr6l9fAat7HfLq">Media Queries</a></li><li><a href="https://www.youtube.com/watch?v=XZsuI5wyRzs&amp;list=PL5e68lK9hEzciaR-CFduKDww_AVVUw66y&amp;index=1">Responsive Designs</a></li></ol><h3>Creating Your Frontend Masterpiece: Building an End-to-End Responsive App</h3><p>You’re on a roll! You’ve nailed JavaScript algorithms and responsive design. Now, let’s bring it all together by crafting an amazing frontend application that works like a charm on any device.</p><p><strong>Your Mission: An End-to-End App</strong></p><p>Think of an end-to-end app as a digital Swiss Army knife. It’s got everything — user interactions, data handling, and a slick design that adapts to any screen. You’ll be the puppet master behind the scenes, making sure everything clicks together seamlessly.</p><ol><li><a href="https://www.youtube.com/watch?v=-uQIBlaZ4P0&amp;list=PL07efmqYWHZ_rVeQ1ws0ER9eL6cxo-d5V&amp;index=1">List of Projects Todo</a></li></ol><h3><strong>Connecting Your Frontend to the World: Interacting with APIs</strong></h3><p>You’ve built a fantastic frontend app — it’s responsive, user-friendly, and a real eye-catcher. Now, let’s kick it up a notch by connecting your creation to the real world through APIs.</p><p>APIs: The Data Bridge</p><p>An API (Application Programming Interface) is like a bridge that connects your frontend app to external data sources or services. It’s how your app can talk to other software and get the information it needs. APIs are used to fetch data like weather updates, social media feeds, or even the latest news.</p><ol><li><a href="https://www.youtube.com/watch?v=Oive66jrwBs">Fetch API Introduction</a></li><li><a href="https://www.youtube.com/watch?v=QJQLv-Wy6ic">Fetching Weather API</a></li></ol><h3>Taking the Lead: Crafting Your Own End-to-End Responsive Projects with RapidAPI</h3><p>Congratulations! You’ve journeyed through learning the ropes of frontend development, mastered responsive design, and even delved into API integration using <a href="https://rapidapi.com/collection/list-of-free-apis">RapidAPI</a>. Now, it’s your time to shine by creating your very own end-to-end responsive projects that showcase your skills and creativity.</p><h3>Elevating Your Craft: Embark on Your React Journey</h3><p>You’ve come a long way in your developer’s journey, building responsive projects and integrating APIs like a pro. Now, it’s time to take your skills to the next level by diving into the exciting world of React — a powerful JavaScript library for building dynamic and interactive user interfaces.</p><p><strong>Why React?</strong> The Power of Component-Based Development</p><p>React is a game-changer in web development. It follows a component-based architecture, which means you can break down your user interface into smaller, reusable pieces. This not only makes your code more organized and maintainable but also opens the door to building complex applications with ease.</p><ol><li><a href="https://www.youtube.com/watch?v=bMknfKXIFA8">React Course</a></li><li>Take a moment to look at the projects you’ve built. Choose one that you believe will benefit the most from the power of React.</li></ol><p><strong><em>Note: Choice and Freedom</em></strong></p><p><em>While React is my choice for its popularity and versatility, the beauty of web development is the freedom to choose. Angular, Vue, and other frameworks are also fantastic options. The key is to find what suits your style and project best.</em></p><p><em>So, as you delve into the world of dynamic interfaces, remember that while React is a great starting point, the journey is yours to shape. The web development universe is vast, and your toolkit should reflect your passions and aspirations.</em></p><h3>Mastering Git and GitHub: Your Next Web Development Step</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-eLhCx-N9Gc8lltj5nuGNA.png" /></figure><p>You’re on an incredible journey of growth and exploration in the world of web development. Your commitment to mastering various skills, from responsive design to API integration and even transitioning to <strong>React</strong>, is truly commendable. As you continue to evolve, let’s open another door that will further enhance your abilities — the world of <strong>Git and GitHub</strong>.</p><ol><li><a href="https://youtu.be/RGOj5yH7evk?si=NdD7nYhj9nDUScap">Git and Github Course 1</a></li><li><a href="https://youtu.be/ulQA5tjJark?si=ZV_ujL0BdjYKlRBj">Git and Github Course 2</a></li></ol><h3>Showcasing Your React Projects: Deploying on GitHub</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fegus4gPGQPUuR0qS-7uQQ.png" /></figure><ol><li><a href="https://youtu.be/7wzuievFjrk?si=GKdSD8Afslsy_4w4">Deploy to Github</a></li><li>Include your React projects in the resume</li><li>Start applying for <strong>Frontend Web Developer</strong></li></ol><h3>Building Your Network: Connecting in the Tech World</h3><p>As a junior web developer, you’re not just coding solo — you’re also part of a larger tech community. Let’s explore why it’s smart to connect with others and how to do it, both online and offline.</p><p><strong>Why Connect with Others?</strong></p><ol><li>Learn and Grow: When you connect with more experienced folks, you’re getting a backstage pass to their knowledge. You can learn from their successes and even their bumps in the road.</li><li>Stay Updated: The tech world is like a fast train — it doesn’t stop. Being part of networks like LinkedIn and Twitter keeps you in the loop about what’s hot and what’s not.</li><li>Find Opportunities: Sometimes, the best job opportunities aren’t posted on big websites. They’re whispered among friends. Your network can tip you off about these hidden gems.</li><li>Team Up: Collaborating with others on projects can be a game-changer. The more folks you know, the more likely you are to find exciting projects to work on.</li></ol><p><strong>Where to Begin</strong></p><ol><li><strong>LinkedIn:</strong> Think of LinkedIn as your professional hangout. Set up a profile that shows who you are and what you’re about. Connect with coworkers, classmates, and anyone you admire.</li><li><strong>Twitter Talks:</strong> Twitter is like a global coffee shop for tech talk. Follow devs, companies, and tech enthusiasts. Join conversations, ask questions, and share your thoughts.</li></ol><p><strong>Hack into Hackathons</strong></p><p>Ever heard of hackathons? They’re like coding marathons where you can team up with others to build something cool, often in just a day or two. It’s a great chance to learn, network, and maybe even win a prize.</p><p><strong>Find Bootcamps — Paid and Free</strong></p><p>If you’re itching to learn more and level up your skills, bootcamps are like turbocharged learning. Some are paid, but you can also find free ones. They’re intensive, hands-on workshops where you can get your hands dirty with real projects and practical skills.</p><p><strong>Making the Connection</strong></p><ol><li>Be Curious: When you’re talking to someone, ask questions. Be curious about their work and what they’re into.</li><li>Show Your Skills: If you’re part of a hackathon or bootcamp, show off what you’ve learned. It’s a chance to get feedback and show your potential.</li><li>Online Events: Nowadays, lots of events happen online. They’re like virtual meetups. Keep an eye out for them, and join in. They’re a great way to connect with people from all over.</li></ol><p>Remember, building your network is like building a bridge. It takes time and effort, but it’s worth it. The people you meet today might be the ones you work with tomorrow or learn from the day after.</p><p>So, keep coding, keep reaching out, and keep growing in the awesome tech world!</p><h3><strong>Wrapping Up: A Path Traveled, A Future Embraced</strong></h3><p>As we finish this guide, let’s look back at the amazing journey we’ve taken in web development and React. From our first code lines to the complex React projects we’ve created, we’ve built a strong foundation for what lies ahead.</p><p>Frontend development, with its visible progress and interaction, is a great way to showcase skills. The live React projects we’ve explored are clear signs of how much we’ve improved.</p><p>Remember, this isn’t the end; it’s a pause. The world of web development keeps changing, and we’re ready to keep moving forward with the skills we’ve learned.</p><p>As we close this guide, let’s keep pushing ahead. Every challenge, every innovation, adds to our story in the dynamic web development world.</p><p>Until next time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=755dde840a4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>