# Orbiter Router

{% hint style="info" %}
OrbiterRouter can be used to initiate cross-chain transactions with us within your contract. Just call: OrbiterRouter contract address in your entry contract and pass the parameters. The latest version of the contract is currently called: OrbiterRouterV3 contract. This contract is backward compatible.
{% endhint %}

{% hint style="info" %}
OBSource and OrbiterRouterV1 are obsolete, please do not use this contract anymore
{% endhint %}

<figure><img src="/files/sgqSJ4N5ShrxsIWTaC0P" alt=""><figcaption><p>OrbiterRouterV3</p></figcaption></figure>

## Mainnet

{% content-ref url="/pages/k7B6yLJN0JOBBBwpcitO" %}
[Smart Contract](/developer/smart-contract.md)
{% endcontent-ref %}

## Testnet

|   |   |   |
| - | - | - |
|   |   |   |
|   |   |   |
|   |   |   |

## EVMcontract

### EVM OrbiterRouterV3 ABI

```
[
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "to",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "amount",
                "type": "uint256"
            }
        ],
        "name": "Transfer",
        "type": "event"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "to",
                "type": "address"
            },
            {
                "internalType": "bytes",
                "name": "data",
                "type": "bytes"
            }
        ],
        "name": "transfer",
        "outputs": [

        ],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "contract IERC20",
                "name": "token",
                "type": "address"
            },
            {
                "internalType": "address",
                "name": "to",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "value",
                "type": "uint256"
            },
            {
                "internalType": "bytes",
                "name": "data",
                "type": "bytes"
            }
        ],
        "name": "transferToken",
        "outputs": [

        ],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "contract IERC20",
                "name": "token",
                "type": "address"
            },
            {
                "internalType": "address[]",
                "name": "tos",
                "type": "address[]"
            },
            {
                "internalType": "uint256[]",
                "name": "values",
                "type": "uint256[]"
            }
        ],
        "name": "transferTokens",
        "outputs": [

        ],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address[]",
                "name": "tos",
                "type": "address[]"
            },
            {
                "internalType": "uint256[]",
                "name": "values",
                "type": "uint256[]"
            }
        ],
        "name": "transfers",
        "outputs": [

        ],
        "stateMutability": "payable",
        "type": "function"
    }
]
```

#### Introduction to main methods

* Initiate Orbiter Maker cross-chain transaction
* * transferToken
  * * The ERC20 token of the chain where the contract is located cross-chain
    * parameter
      * token=> ERC20 contract address (if not approved, you need to approve it first)
      * to=>address (pass Orbiter Maker address)
      * value=>uint （quantity）
      * data=> bytes (extended parameters that need to be passed, see below for details)Introduction to Data extended parameters）
  * transfer
    * Cross-chain native main currency of the chain where the contract is located
    * parameter
      * to => address (pass Orbiter Maker address)
      * data=> bytes (extended parameters that need to be passed, see below for details)Introduction to Data extended parameters）

### Introduction to Data extended parameters

**Parameter format**

// Parameter text

> t=0x069A775eF31FaE8311B2EE2024243C9F1eE46E63f98A7DCAF3D077C951f5174b

// The hexadecimal encoding is passed into the contract

<https://string-functions.com/string-hex.aspx> hex code

> 743D30783036394137373565463331466145383331314232454532303234323433433946316545343645363366393841374443414633443037374339353 1663531373462

//  Parameter text

> c=9002\&t=0xEFc6089224068b20197156A91D50132b2A47b908

// The hexadecimal encoding is passed into the contract

> 633d3930303226743d307845466336303839323234303638623230313937313536413931443530313332623241343762393038

**Supported parameter list**

| name                | desc                                                                                                                              | default     | required         |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----------- | ---------------- |
| c                   | Security code, vc parameter obtained through routers interface, if the amount has a mantissa, it does not need to be passed here. |             | false            |
| <p>t</p><p><br></p> | Target link receiving address (can be passed when ToStarknet and cross-address)                                                   |             | false            |
| <p>app<br></p>      | If you enter the evm wallet address, you will get a commission                                                                    | <p><br></p> | <p><br>false</p> |

\
\ <br>

### Starknet contract

{% hint style="info" %}
Mainnet: 0x058680be0cf3f29c7a33474a218e5fed1ad213051cb2e9eac501a26852d64ca2

Testnet: 0x045cf46534ccc555f5f80816b4f842780ad4cedd82825460310ff2e5e9aa999a
{% endhint %}

### &#x20;Starknet OrbiterRouterV3 ABI

````
```typescript
[
    {
        "name": "Uint256",
        "size": 2,
        "type": "struct",
        "members": [
            {
                "name": "low",
                "type": "felt",
                "offset": 0
            },
            {
                "name": "high",
                "type": "felt",
                "offset": 1
            }
        ]
    },
    {
        "data": [
            {
                "name": "to",
                "type": "felt"
            },
            {
                "name": "amount",
                "type": "Uint256"
            },
            {
                "name": "token",
                "type": "felt"
            },
            {
                "name": "ext_len",
                "type": "felt"
            },
            {
                "name": "ext",
                "type": "felt*"
            }
        ],
        "keys": [],
        "name": "Transfer",
        "type": "event"
    },
    {
        "name": "transferERC20",
        "type": "function",
        "inputs": [
            {
                "name": "_token",
                "type": "felt"
            },
            {
                "name": "_to",
                "type": "felt"
            },
            {
                "name": "_amount",
                "type": "Uint256"
            },
            {
                "name": "_ext_len",
                "type": "felt"
            },
            {
                "name": "_ext",
                "type": "felt*"
            }
        ],
        "outputs": []
    }
]
```
````

### test transaction:

<https://sepolia.starkscan.co/tx/0x4e64431da3a475ea77e87adf2d1709f56a2782389039e93596a497e5ce2df7a>

<br>


---

# 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.orbiter.finance/developer/smart-contract/orbiter-router.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.
