# Submit Ticket

### Header

<table><thead><tr><th width="189">Fields</th><th>Description</th></tr></thead><tbody><tr><td>Evmaddress</td><td>The current address of the user's connected wallet.</td></tr><tr><td>Signature</td><td>The user's signature of the post body</td></tr></tbody></table>

### Body

<table><thead><tr><th width="191">Fields</th><th>Description</th></tr></thead><tbody><tr><td>hash</td><td>Problematic transaction hash</td></tr><tr><td>chain</td><td>From chain nickName</td></tr></tbody></table>

***Signature***:

To obtain a correct interface signature, we need to follow these 5 steps:

1. Construct the body parameter object correctly according to the requirements.
2. Concatenate the parameters of the complete body parameter object, sorted alphabetically, using '&' as a separator. For example:  *`chan=FSN&hash=0x4190dc4627cb4e97292...`*
3. Prefix the string generated in **`step 2`** with **`EvmAddress=...&{result of step 2}`**, for example: *`EvmAddress=0x42a6685ef29886Cbcb595Aa903f00dea0d1787d8&chan=FSN&hash=0x4190dc4627...`*
4. Apply **`keccak256`** hashing to the result of **`step 3`**.
5. Sign the result of **`step 4`** with the wallet.

***get Signature*** examples：

```javascript
sortParams = (params, evmAddress) => {
    let keys = Object.keys(params)
    if(!keys.length) return undefined
    keys = keys.sort();
    const keyValList = []
    for (const key of keys) {
        const val = params[key];
        if(val) {
            keyValList.push(`${key}=${val}`)
        }
    }
    const data = keyValList.join('&')
    const raw = `EvmAddress=${evmAddress}&${data}`
    return raw
}

// step 1
const bodyParams = {
    chain: "FSN",
    hash: "0x4190dc4627cb4e97292b6b718d718d3c3af93f14477346efc181ff549f69f794"
}

// step 2 & setp3
let raw = sortParams(bodyParams, '0x42a6685ef29886Cbcb595Aa903f00dea0d1787d8') as string;
console.log(raw) // EvmAddress=0x42a6685ef29886Cbcb595Aa903f00dea0d1787d8&chan=FSN&hash=0x4190dc4627cb4e97292b6b718d718d3c3af93f14477346efc181ff549f69f794

// step4
raw = keccak256(toHex(raw));
console.log(raw) // 0x86a444bc2c6104a3aadcf82c00dc6328fea2bd3472298369dedcbdb592ad257d

// step5 Calling wallet message signing
// Calculates an Ethereum-specific signature in EIP-191 format: keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)).
// Note: The signature should not include the prefix '0x'.
let signature = wallet.signMessage(raw)
```


---

# Agent Instructions: 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:

```
GET https://chainge-finance.gitbook.io/chainge-finance/get-started/chainge-2.0-api-documentation/submit-ticket.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
