# Proxy Transfer

Proxy transfer allows the authorized party to transfer money through signature, which is generally used in trading platforms, and it can be used alone.

It can also be used in conjunction with freezing, and generally requires cooperation.

In order to prevent inconsistent signatures, ierc20 has developed a signature standard.

```
const message = JSON.stringify({
  title: 'ierc-20 one approve', // one approve
  to: '0x33302dbff493ed81ba2e7e35e2e8e833db023333', // platform address
  tick: 'ethi', // token
  amt: "333", // token amt
  value: "0.01", // eth value
  nonce: (+new Date()).toString(),
}, null, 4)
```

Through authorization, a signature can be obtained, and the same method will be used to verify it on the chain.

The verification code reference is as follows:

```
export const verifyMessage = (data: {
    tick: string;
    amt: string;
    nonce: string;
    value: string;
    sign: string;
}, seller: string) => {
    const message = JSON.stringify({
        title: 'ierc-20 one approve',
        to: DEX_ADDRESS, 
        tick: data.tick,
        amt: data.amt,
        value: data.value,
        nonce: data.nonce,
    }, null, 4)
    const recoveredAddress = ethers.utils.verifyMessage(message, data.sign)
    if(recoveredAddress.toLocaleLowerCase() === seller?.toLocaleLowerCase()){
        return {
            isVerify: true, 
            message
        }
    }else{
        return {
            isVerify: false, 
            message
        }
    }
}
```

The sending agent on the chain can also send to address 0,

But if you use ETH as the payment currency, then send it along with the amount and send it to the seller.

<table><thead><tr><th width="101.33333333333331">Key</th><th width="126">Required</th><th>Description</th></tr></thead><tbody><tr><td>p</td><td>yes</td><td>protocol name，ierc-20, there is no difference between the two.</td></tr><tr><td>op</td><td>yes</td><td>proxy_transfer</td></tr><tr><td>proxy</td><td>yes</td><td>array object, Agent information.</td></tr></tbody></table>

For example:

```
// proxy transfer; send 0eth from self to 0x0000000000000000000000000000000000000000 or 0x33302dbff493ed81ba2e7e35e2e8e833db023333 or platform address
{
  "p": "ierc-20",
  "op": "proxy_transfer", //transfer operation
  "proxy": [
    {
      "tick": "ethi", // tick
      "nonce": "12222", // nonce
      "from": sellerAddress, // seller address, verify
      "to": "0x22222222222222222222222222222222222222222222", // buyer address (test)
      "amt": "333",
      "value": "0.001",
      "sign": sign // the agent must carry the signature to the chain, which can be confirmed
    }
  ]
}
```


---

# 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://docs.ierc20.com/devs/ierc-20/proxy-transfer.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.
