> For the complete documentation index, see [llms.txt](https://docs.chiliz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chiliz.com/th/phatthana/sung-khuen/omnichain-tokens/base-to-chiliz.md).

# Bridge จาก Base ไป Chiliz Chain

ในการ bridge token ที่มีอยู่แล้วจาก Base ไปยัง Chiliz Chain คุณต้องเขียนและปรับใช้ smart contract แยกกันสองตัว ได้แก่ OFT Adapter บน chain ที่ token มีอยู่แล้ว (Base) และ Native OFT บน chain ปลายทาง (Chiliz Chain)

{% hint style="info" %}
โปรดทราบว่า LayerZero มี [QuickStart สำหรับ OFT contracts ของตัวเอง](https://docs.layerzero.network/v2/developers/evm/oft/quickstart) รวมถึงบทแนะนำเพื่อเรียนรู้วิธี [mint จาก Base ไปยัง EVM chain อื่น](https://docs.layerzero.network/v2/deployments/evm-chains/chiliz-mainnet-oft-quickstart) เช่น Chiliz Chain บทแนะนำนั้นใช้ Optimism เป็น chain เป้าหมาย แต่คุณสามารถแทนที่ด้วย [รายละเอียดของ Chiliz Chain](https://docs.layerzero.network/v2/deployments/evm-chains/chiliz-mainnet-oft-quickstart) ได้
{% endhint %}

## ข้อกำหนดเบื้องต้น

คู่มือนี้ต้องการสิ่งต่อไปนี้:

* ที่อยู่ของ contract token ERC-20 บน Base
* กระเป๋าเงิน Web3 (เช่น MetaMask) ที่ตั้งค่าให้ทำงานได้ทั้งบน Base และ Chiliz Chain
  * [ดูที่นี่สำหรับการตั้งค่า RPC ของ Base Mainnet](https://docs.base.org/base-chain/quickstart/connecting-to-base)
  * [ดูที่นี่สำหรับการตั้งค่า RPC ของ Chiliz Chain](/th/phatthana/phuenthan/tho-chiliz-chain/tho-rpc.md)
* gas token เพียงพอบนแต่ละ chain เพื่อชำระค่าธรรมเนียมการปรับใช้ contract รวมถึงค่าธรรมเนียม gas สำหรับการส่งข้อความ
  * บน Base: token ETH
  * บน Chiliz Chain: token CHZ

เราจะใช้ [Hardhat](https://hardhat.org/) เป็น dev environment พร้อม Node/npx

## ขั้นตอนที่ 1: การพัฒนา Contract

### การเตรียม `OFTAdapter` บน Base

{% hint style="warning" %}
นี่เป็นขั้นตอนการเตรียมการ อย่าปรับใช้ทันที!\
คุณจะปรับใช้ในขั้นตอนที่ 3
{% endhint %}

contract `OFTAdapter` ทำหน้าที่เป็น lockbox สำหรับ token ที่มีอยู่ของคุณ เมื่อผู้ใช้ bridge token ออกจาก Base contract นี้จะล็อก token ERC-20 ต้นฉบับไว้

สร้างไฟล์ใหม่ชื่อ `BaseTokenAdapter.sol` ในโฟลเดอร์ contracts ของคุณ:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;

import { OFTAdapter } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/OFTAdapter.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

contract BaseTokenAdapter is OFTAdapter {
    constructor(
        address _token,      // The address of your EXISTING token on Base
        address _lzEndpoint, // The LayerZero V2 Endpoint address on Base
        address _delegate    // The address capable of making configuration changes (usually your wallet)
    ) OFTAdapter(_token, _lzEndpoint, _delegate) Ownable(_delegate) {}
}
```

{% hint style="info" %}
อย่างที่คุณเห็น contract นี้ขยายจาก [LayerZero OFT Adapter contract](https://github.com/LayerZero-Labs/LayerZero-v2/blob/main/packages/layerzero-v2/evm/oapp/contracts/oft/OFTAdapter.sol) รวมถึง contract `Ownable.sol` มาตรฐานเพื่อมอบคีย์สำหรับการบริหารจัดการ คุณต้องการทั้งสองเพื่อให้คุณ และเฉพาะคุณเท่านั้น สามารถเชื่อมต่อ chain ต่างๆ ได้อย่างปลอดภัย
{% endhint %}

เมื่อปรับใช้บน Base Mainnet คุณต้องส่งที่อยู่ contract ของ token ที่มีอยู่เป็น `_token` และที่อยู่ Base Endpoint V2 (`0x1a44076050125825900e736c501f859c50fE728c`) เป็น `_lzEndpoint`

ดู endpoint ทั้งหมดที่มีสำหรับ Chiliz Chain ได้ที่นี่:

{% embed url="<https://docs.layerzero.network/v2/deployments/chains/base>" %}

### การเตรียม `OFT` บน Chiliz Chain

เนื่องจาก token ยังไม่มีอยู่บน Chiliz Chain โดยกำเนิด คุณต้องปรับใช้ contract OFT มาตรฐาน contract นี้มีสิทธิ์ mint token ใหม่เมื่อได้รับข้อความที่ถูกต้องจาก OFT Adapter ที่ปรับใช้บน Base และเผา token เมื่อผู้ใช้ bridge กลับ

สร้างไฟล์ใหม่ชื่อ `ChilizTokenOFT.sol` ในโฟลเดอร์ contracts ของคุณ:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;

import { OFT } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/OFT.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

contract ChilizTokenOFT is OFT {
    constructor(
        string memory _name,   // The name of the token (Should match your Base token)
        string memory _symbol, // The symbol of the token (Should match your Base token)
        address _lzEndpoint,   // The LayerZero V2 Endpoint address on Chiliz Chain
        address _delegate      // The address capable of making configuration changes
    ) OFT(_name, _symbol, _lzEndpoint, _delegate) Ownable(_delegate) {}
}
```

{% hint style="info" %}
อย่างที่คุณเห็น contract นี้ขยายจาก [LayerZero OFT contract](https://github.com/LayerZero-Labs/LayerZero-v2/blob/main/packages/layerzero-v2/evm/oapp/contracts/oft/OFT.sol) รวมถึง contract `Ownable.sol` มาตรฐาน ด้วยเหตุผลเดียวกับที่กล่าวไว้ข้างต้น
{% endhint %}

เมื่อปรับใช้บน Chiliz Chain ตรวจสอบให้แน่ใจว่า `_name` และ `_symbol` ตรงกับ token ต้นฉบับของคุณบน Base เพื่อหลีกเลี่ยงความสับสนของผู้ใช้ ส่งที่อยู่ Chiliz Chain Endpoint V2 (`0x6F475642a6e85809B1c36Fa62763669b1b48DD5B`) เป็น `_lzEndpoint`

ดู endpoint ทั้งหมดที่มีสำหรับ Chiliz Chain ได้ที่นี่:

{% embed url="<https://docs.layerzero.network/v2/deployments/chains/chiliz>" %}

## ขั้นตอนที่ 2: การกำหนดค่า LayerZero

เมื่อ contract ของคุณพร้อมแล้ว คุณต้องบอกเครื่องมือ LayerZero ว่า contract เหล่านั้นเชื่อมต่อกันอย่างไร ซึ่งทำได้โดยใช้ไฟล์ `layerzero.config.ts` ที่อยู่ใน root ของโปรเจกต์ Hardhat ของคุณ

ไฟล์การกำหนดค่านี้ทำหน้าที่เป็น blueprint สำหรับสถาปัตยกรรม cross-chain ของคุณ โดยจับคู่ smart contract ที่ปรับใช้แล้วกับ LayerZero Endpoint ID (EID) ที่เกี่ยวข้อง และกำหนด pathway (การเชื่อมต่อ) ระหว่าง contract เหล่านั้น

[Simple Config Generator](https://docs.layerzero.network/v2/tools/simple-config) เป็นวิธีที่แนะนำในการสร้างการกำหนดค่าการเชื่อมต่อ เนื่องจากจะจัดการการเชื่อมต่อแบบสองทิศทางโดยอัตโนมัติและใช้การกำหนดค่าความปลอดภัยที่แนะนำโดยอัตโนมัติ

สร้างหรืออัปเดตไฟล์ `layerzero.config.ts` ของคุณใน root ของโปรเจกต์ Hardhat:

```typescript
import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities';
import { OAppEnforcedOption, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat';
import { EndpointId } from '@layerzerolabs/lz-definitions';
import { generateConnectionsConfig } from '@layerzerolabs/metadata-tools';

// Define the Contracts
const baseContract: OmniPointHardhat = {
    eid: EndpointId.BASE_V2_MAINNET,
    contractName: 'BaseTokenAdapter',
};

const chilizContract: OmniPointHardhat = {
    eid: EndpointId.CHILIZ_V2_MAINNET,
    contractName: 'ChilizNativeOFT',
};

// Define standard EVM Gas Limits (Enforced Options)
const EVM_ENFORCED_OPTIONS: OAppEnforcedOption[] = [
    {
        msgType: 1,  // Standard OFT Transfer
        optionType: ExecutorOptionType.LZ_RECEIVE,
        gas: 200000, // Execution gas limit
        value: 0,    // Native drop (0 for standard transfers)
    },
];

// Export the Generated Configuration
export default async function () {
    return {
        contracts: [
            { contract: baseContract },
            { contract: chilizContract },
        ],
        // The generator automatically creates the A->B and B->A pathways!
        connections: await generateConnectionsConfig([
            [
                baseContract,      // Source
                chilizContract,    // Destination
                [['LayerZero Labs'], []], // Default DVN Configuration
                [1, 1],                   // Block Confirmations
                [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Execution Options [To Chiliz, To Base]
            ],
        ]),
    };
}
```

อาร์เรย์ `[EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS]` บอก LayerZero Executor ให้บังคับใช้ gas 200,000 หน่วยเมื่อส่งข้อความไปยัง Chiliz และในทำนองเดียวกัน 200,000 หน่วยเมื่อส่งข้อความกลับมายัง Base

## ขั้นตอนที่ 3: ขั้นตอนการปรับใช้

เมื่อเขียน contract และเตรียม `layerzero.config.ts` แล้ว ถึงเวลาปรับใช้ contract บน network ที่เกี่ยวข้อง LayerZero V2 toolbox อาศัย plugin `hardhat-deploy` เพื่อจัดการการปรับใช้อย่างมีประสิทธิภาพ

คุณต้องสร้างสคริปต์การปรับใช้สองตัวในไดเรกทอรี `deploy/` ของโปรเจกต์: หนึ่งตัวสำหรับ Base Mainnet และอีกตัวสำหรับ Chiliz Chain Mainnet

### สคริปต์การปรับใช้ Base Adapter

สร้างไฟล์ชื่อ `01_deploy_base_adapter.ts` ในโฟลเดอร์ `deploy/` ของคุณ สคริปต์นี้ส่งที่อยู่ token ที่มีอยู่และที่อยู่ Base Endpoint V2 เข้าไปใน constructor

```typescript
import { DeployFunction } from 'hardhat-deploy/types';

const deployAdapter: DeployFunction = async ({ getNamedAccounts, deployments }) => {
    const { deploy } = deployments;
    const { deployer } = await getNamedAccounts();

    // The address of your existing ERC-20 token on Base
    const TOKEN_ADDRESS = "0xYourTokenAddressHere"; 
    
    // The Base Mainnet Endpoint V2 Address
    const BASE_ENDPOINT_V2 = "0x1a44076050125825900e736c501f859c50fE728c";

    console.log("Deploying OFTAdapter to Base Mainnet...");

    await deploy('BaseTokenAdapter', {
        from: deployer,
        args: [
            TOKEN_ADDRESS,       // _token
            BASE_ENDPOINT_V2,    // _lzEndpoint
            deployer             // _delegate (Owner)
        ],
        log: true,
        waitConfirmations: 2,
    });
};

export default deployAdapter;
deployAdapter.tags = ['BaseTokenAdapter'];
```

### สคริปต์การปรับใช้ Chiliz Chain OFT

สร้างไฟล์ที่สองชื่อ `02_deploy_chiliz_oft.ts` ในโฟลเดอร์ `deploy/` ของคุณ สคริปต์นี้เริ่มต้น Native OFT ใหม่บน Chiliz Chain

```typescript
import { DeployFunction } from 'hardhat-deploy/types';

const deployOFT: DeployFunction = async ({ getNamedAccounts, deployments }) => {
    const { deploy } = deployments;
    const { deployer } = await getNamedAccounts();

    // Token Details (Must match your Base token)
    const TOKEN_NAME = "My Token";
    const TOKEN_SYMBOL = "TKN";

    // The Chiliz Chain Mainnet Endpoint V2 Address 
    const CHILIZ_ENDPOINT_V2 = "0x6F475642a6e85809B1c36Fa62763669b1b48DD5B";

    console.log("Deploying Native OFT to Base Mainnet...");

    await deploy('BaseTokenOFT', {
        from: deployer,
        args: [
            TOKEN_NAME,           // _name
            TOKEN_SYMBOL,         // _symbol
            CHILIZ_ENDPOINT_V2,   // _lzEndpoint
            deployer              // _delegate (Owner)
        ],
        log: true,
        waitConfirmations: 2,
    });
};

export default deployOFT;
deployOFT.tags = ['BaseTokenOFT'];
```

### การดำเนินการปรับใช้

ตรวจสอบให้แน่ใจว่า `hardhat.config.ts` ของคุณมี RPC URL และ private key ที่กำหนดค่าอย่างถูกต้องสำหรับทั้ง Base และ Chiliz Chain

{% embed url="<https://docs.base.org/base-chain/quickstart/connecting-to-base>" %}

{% content-ref url="/pages/v6cwrdVHIbumyt27iKUv" %}
[เชื่อมต่อด้วย RPC](/th/phatthana/phuenthan/tho-chiliz-chain/tho-rpc.md)
{% endcontent-ref %}

รันคำสั่งต่อไปนี้ใน terminal ของคุณเพื่อปรับใช้ contract:

```bash
# 1. Deploy the Adapter to Base
npx hardhat deploy --network chiliz --tags BaseTokenAdapter

# 2. Deploy the Native OFT to Chiliz Chain
npx hardhat deploy --network base --tags ChilizTokenOFT
```

เมื่อการปรับใช้เสร็จสมบูรณ์ Hardhat จะบันทึกที่อยู่ contract ในโฟลเดอร์ `deployments/` เครื่องมือ LayerZero จะอ่านที่อยู่เหล่านี้โดยอัตโนมัติเมื่อเรารันคำสั่ง wiring ในขั้นตอนถัดไป

## ขั้นตอนที่ 4: การ Wiring และ Peering

ในขั้นตอนนี้ contract `BaseTokenAdapter` และ `ChilizTokenOFT` ของคุณถูกปรับใช้บนแต่ละ chain แล้ว แต่ยังโดดเดี่ยวอยู่โดยสิ้นเชิง\
หาก contract บน Chiliz Chain ได้รับข้อความสั่งให้ mint token มันจำเป็นต้องรู้ว่าข้อความนั้นมาจาก Adapter ของ *คุณ* บน Base จริงๆ ไม่ใช่จากผู้กระทำที่ไม่หวังดี

คุณต้องสร้างความไว้วางใจนี้โดยการ "wiring" contract เข้าด้วยกันในฐานะ peer ด้วยการเข้ารหัส

ทำได้โดยการรันคำสั่ง `wire` ซึ่งจะสร้างและดำเนินการธุรกรรมบนทั้ง Chiliz และ Base

{% hint style="info" %}
**สิ่งที่เกิดขึ้นเบื้องหลัง**

การกำหนดค่า pathway ของ LayerZero V2 ที่สมบูรณ์ต้องการ 6 ธุรกรรมบนแต่ละ chain:

* `setSendLibrary`: กำหนด LayerZero MessageLib ที่รับผิดชอบการส่งข้อความ (เช่น กำหนดค่าให้ใช้ V2 Send Library)
* `setReceiveLibrary`: กำหนด MessageLib ที่รับผิดชอบการรับข้อความ (รวมถึง `gracePeriod` ที่มักตั้งค่าเป็น `0`)
* `setConfig` (Send Library): ตั้งค่า Decentralized Verifier Networks (DVN) และ Executor เฉพาะสำหรับข้อความขาออก
* `setConfig` (Receive Library): ตั้งค่า DVN เฉพาะที่จำเป็นสำหรับการยืนยันข้อความขาเข้า
* `setEnforcedOptions`: ตั้งค่าขีดจำกัด gas สำหรับการดำเนินการที่จำเป็น เมื่อผู้ใช้ส่งข้อความจาก Base พวกเขาจ่ายค่า gas ปลายทางล่วงหน้า การตั้งค่า enforced options ช่วยให้แน่ใจว่าพวกเขาจ่าย gas เพียงพอสำหรับ LayerZero Executor เพื่อประมวลผลธุรกรรมบน Chiliz Chain ได้สำเร็จ
* `setPeer`: เชื่อมโยง Endpoint ID (EID) ปลายทางกับที่อยู่ contract ที่น่าเชื่อถือ คุณต้องบอก contract บน Base ให้ไว้วางใจ contract บน Chiliz Chain และ contract บน Chiliz Chain ให้ไว้วางใจ contract บน Base
  {% endhint %}

### การดำเนินการ Wire Task

รันคำสั่งต่อไปนี้ใน terminal ของคุณ:

```bash
npx hardhat lz:oapp:wire --oapp-config layerzero.config.ts
```

toolchain จะคำนวณพารามิเตอร์ที่จำเป็นโดยอัตโนมัติ แสดงตารางธุรกรรมที่กำลังจะดำเนินการ และส่งไปยัง Chiliz และ Base โดยใช้กระเป๋าเงิน deployer ของคุณ

เมื่อธุรกรรมได้รับการยืนยันบนทั้งสอง network token bridge ของคุณจะเปิดใช้งานและกำหนดค่าครบถ้วนอย่างเป็นทางการ! Base Adapter ได้รับอนุญาตให้ส่งคำสั่ง mint ไปยัง Chiliz Chain และ Chiliz Chain ได้รับอนุญาตให้ส่งคำสั่ง unlock กลับมายัง Base

## ขั้นตอนที่ 5: การดำเนินงานและการทดสอบ

เมื่อ contract ของคุณถูกปรับใช้และเชื่อมต่อกันอย่างปลอดภัยแล้ว token ของคุณตอนนี้เป็น omnichain ขั้นตอนสุดท้ายคือการดำเนินการโอน cross-chain จาก Base Mainnet ไปยัง Chiliz Chain Mainnet

### 1) การดำเนินการโอน Cross-Chain

LayerZero V2 toolbox มี Hardhat task ในตัวเพื่อทดสอบการโอน OFT โดยตรงจาก terminal ของคุณ คำสั่งนี้จะประมาณค่าธรรมเนียม gas สำหรับ cross-chain เรียกเก็บจากกระเป๋าเงินของคุณใน $ETH (gas token ดั้งเดิมบน chain ต้นทาง Base) และเริ่มต้นการโอน

รันคำสั่งต่อไปนี้:

{% code overflow="wrap" lineNumbers="true" %}

```bash
npx hardhat lz:oft:send --oapp-config layerzero.config.ts --from-eid 30184 --to-eid 30409 --amount 10
```

{% endcode %}

สิ่งที่คำสั่งนี้ทำ:

1. ค้นหา Base Mainnet (`30184`) และ Chiliz Mainnet (`30409`) ในการกำหนดค่าของคุณ
2. ประมาณค่าธรรมเนียม cross-chain ที่ LayerZero Executor ต้องการ
3. เรียกฟังก์ชัน `send()` บน Base Adapter ของคุณ
4. Adapter จะล็อก token 10 ตัวและส่ง packet ไปยัง LayerZero Endpoint

### 2) การติดตาม Packet บน LayerZero Scan

ธุรกรรม cross-chain เป็นแบบ asynchronous แม้ว่าธุรกรรม Chiliz ของคุณจะได้รับการยืนยันในไม่กี่วินาที แต่ข้อความยังคงต้องได้รับการยืนยันและดำเนินการบน Base

เพื่อติดตามเส้นทางนี้แบบ real-time ให้คลิกลิงก์ LayerZero Scan ที่ปรากฏในผลลัพธ์ของ CLI

เรียนรู้เพิ่มเติมเกี่ยวกับเครื่องมือนี้ที่นี่:

{% embed url="<https://docs.layerzero.network/v2/developers/evm/tooling/layerzeroscan>" %}

## การตั้งค่าขีดจำกัด Gas

การตั้งค่าขีดจำกัด gas เป็นสิ่งสำคัญมาก เนื่องจากการไม่ตั้งค่าอาจทำให้ข้อความ cross-chain ของคุณล้มเหลวบน network ปลายทาง

เมื่อผู้ใช้ bridge token จาก Base ไปยัง Chiliz Chain พวกเขาจ่ายค่าธรรมเนียม gas สำหรับ *ทั้งสอง* chain ล่วงหน้าในธุรกรรมเดียวบน Base (โดยใช้ `$ETH`) จากนั้น LayerZero จะใช้ส่วนหนึ่งของค่าธรรมเนียมนั้นเพื่อจ่ายค่า gas ETH จริงที่จำเป็นสำหรับดำเนินการธุรกรรม minting บน Chiliz Chain

เพื่อให้แน่ใจว่า LayerZero มี gas เพียงพอในการประมวลผลฟังก์ชัน `lzReceive` บน chain ปลายทางได้สำเร็จ คุณต้องตั้งค่า Enforced Options หากไม่ได้ตั้งค่าเหล่านี้ ธุรกรรมอาจ revert บน chain ปลายทางเนื่องจากข้อผิดพลาด "Out of Gas"

### **การกำหนดค่า Options**

option นี้ตั้งค่าในไฟล์ `layerzero.config.ts` ของคุณ อัปเดตอาร์เรย์ `connections` เพื่อรวมบล็อก `enforcedOptions` สำหรับแต่ละ pathway:

{% code overflow="wrap" %}

```typescript
import { EndpointId } from '@layerzerolabs/lz-definitions';

// ... (contract definitions as before)

connections: [
    {
        from: 'BaseTokenAdapter',
        to: 'ChilizTokenOFT',
        config: {
            enforcedOptions: [
                {
                    msgType: 1,        // 1 = Standard OFT Transfer (SEND)
                    optionType: 1,     // 1 = lzReceive Option
                    gas: 200000,       // Estimated gas limit to mint on Chiliz Chain
                },
                {
                    msgType: 2,        // 2 = OFT Transfer with payload (SEND_AND_CALL)
                    optionType: 1,
                    gas: 250000,       // Slightly higher gas limit for complex calls
                }
            ]
        },
    },
    {
        from: 'ChilizTokenOFT',
        to: 'BaseTokenAdapter',
        config: {
            enforcedOptions: [
                {
                    msgType: 1,
                    optionType: 1,
                    gas: 200000,       // Estimated gas limit to unlock on Base
                }
            ]
        },
    },
],
// ...
```

{% endcode %}

คำอธิบายของพารามิเตอร์:

* `msgType: 1`: แสดงถึงการโอน token มาตรฐาน `msgType: 2` ใช้สำหรับการเรียก "composed" (เช่น การ bridge token และ stake ทันทีในคลิกเดียว)
* `optionType: 1`: สั่งให้ Executor ดำเนินการเพียงแค่ฟังก์ชัน `lzReceive`
* `gas: 200000`: ขีดจำกัด gas พื้นฐานที่ปลอดภัยสำหรับ OFT mint และ unlock มาตรฐาน คุณสามารถปรับตามการใช้ gas เฉพาะของ contract ที่ปรับใช้ของคุณ

หากคุณตั้งค่า option นี้หลังจาก wire chain แล้ว คุณสามารถ rewire พร้อม option ที่มีอยู่โดยใช้คำสั่งเดิม:

{% code overflow="wrap" %}

```bash
npx hardhat lz:oapp:wire --oapp-config layerzero.config.ts
```

{% endcode %}

เครื่องมือจะตรวจจับการเปลี่ยนแปลงโดยอัตโนมัติและส่งธุรกรรม `setEnforcedOptions()` ไปยัง contract ของคุณบนทั้ง Base และ Chiliz ตอนนี้ เมื่อใดก็ตามที่ผู้ใช้เปิดใช้งาน bridge contract จะกำหนดให้ผู้ใช้จ่ายค่า gas อย่างน้อย 200,000 หน่วยบน chain ปลายทาง เพื่อให้มั่นใจว่าการส่งมอบมีความน่าเชื่อถือ


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.chiliz.com/th/phatthana/sung-khuen/omnichain-tokens/base-to-chiliz.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
