> For the complete documentation index, see [llms.txt](https://contracts.synapseprotocol.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://contracts.synapseprotocol.com/bridge/erc20migrator.md).

# ERC20Migrator

## Methods

### legacyToken

```solidity
function legacyToken() external view returns (contract IERC20)
```

*Returns the legacy token that is being migrated.*

#### Returns

| Name | Type            | Description |
| ---- | --------------- | ----------- |
| \_0  | contract IERC20 | undefined   |

### migrate

```solidity
function migrate(uint256 amount) external nonpayable
```

*Transfers part of an account's balance in the old token to this contract, and mints the same amount of new tokens for that account.*

#### Parameters

| Name   | Type    | Description                     |
| ------ | ------- | ------------------------------- |
| amount | uint256 | amount of tokens to be migrated |

### newToken

```solidity
function newToken() external view returns (contract IERC20)
```

*Returns the new token to which we are migrating.*

#### Returns

| Name | Type            | Description |
| ---- | --------------- | ----------- |
| \_0  | contract IERC20 | undefined   |


---

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

```
GET https://contracts.synapseprotocol.com/bridge/erc20migrator.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.
