# Hưỡng dẫn Deploy Contrac

By [Danh Suneo](https://paragraph.com/@danh-suneo) · 2023-10-28

---

1/ Truy cập Link

[https://remix.ethereum.org/](https://remix.ethereum.org/)

2/ Tạo 1 thư mục mới trên remix click vào trên ảnh

![](https://storage.googleapis.com/papyrus_images/ee393d57b8aff77d9723a1153b9e6b4db00a6887bfb8fbc0a74e4b97b60b395d.jpg)

3/ Đặt tên cho mục này rồi ấn Enter

![](https://storage.googleapis.com/papyrus_images/3b4950f6f8c8711656c5062a08319d68cc8ab818f3dcee6cc13b0088e8ed6d59.jpg)

4/ Copy code dưới dân dán vào mục trống

    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.4;
    contract FunctionTypes{
        uint256 public number = 5;
        
        constructor() payable {}
    
        // 函数类型
        // function (<parameter types>) {internal|external} [pure|view|payable] [returns (<return types>)]
        // 默认function
        function add() external{
            number = number + 1;
        }
    
        // pure: 纯纯牛马
        function addPure(uint256 _number) external pure returns(uint256 new_number){
            new_number = _number+1;
        }
        
        // view: 看客
        function addView() external view returns(uint256 new_number) {
            new_number = number + 1;
        }
    
        // internal: 内部
        function minus() internal {
            number = number - 1;
        }
    
        // 合约内的函数可以调用内部函数
        function minusCall() external {
            minus();
        }
    
        // payable: 递钱，能给合约支付eth的函数
        function minusPayable() external payable returns(uint256 balance) {
            minus();    
            balance = address(this).balance;
        }
    }
    

5/ Click như trên Hình

![](https://storage.googleapis.com/papyrus_images/ed5dfccd4f7176cf2d9440acc2a10b5d827ea914a10b3c51f89eb5e66aad8ba6.png)

6/ Bước cuối Click vào Logo Eth xong chọn vào mục metamask kết nối ví nhớ chuyển qua mạng #Scorll nhé sau đó depoly trả 0.3$ fee mạng Scroll

![](https://storage.googleapis.com/papyrus_images/0c0c21451fcff4baf72528055bf1f9480750490e30bc763b5fc63c21b8faabcb.png)

7/ vào check xem đủ điều kiện chưa nhé :

[**Scroll – Native zkEVM Layer 2 for Ethereum**](https://scroll.io/developer-nft/check-eligibility)

[https://scroll.io/developer-nft/check-eligibility](https://scroll.io/developer-nft/check-eligibility)

---

*Originally published on [Danh Suneo](https://paragraph.com/@danh-suneo/h-ng-d-n-deploy-contrac)*
