{"id":35049921,"url":"https://github.com/starkware-libs/usdc-migration","last_synced_at":"2026-03-18T01:32:10.045Z","repository":{"id":320339314,"uuid":"1079739091","full_name":"starkware-libs/usdc-migration","owner":"starkware-libs","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-04T09:10:37.000Z","size":580,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-10T07:50:45.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Cairo","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/starkware-libs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-20T10:04:29.000Z","updated_at":"2025-12-04T09:10:41.000Z","dependencies_parsed_at":"2025-11-29T19:03:04.920Z","dependency_job_id":null,"html_url":"https://github.com/starkware-libs/usdc-migration","commit_stats":null,"previous_names":["starkware-libs/usdc-migration"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/starkware-libs/usdc-migration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starkware-libs%2Fusdc-migration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starkware-libs%2Fusdc-migration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starkware-libs%2Fusdc-migration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starkware-libs%2Fusdc-migration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/starkware-libs","download_url":"https://codeload.github.com/starkware-libs/usdc-migration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starkware-libs%2Fusdc-migration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28076676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-27T09:11:48.027Z","updated_at":"2025-12-27T09:11:48.755Z","avatar_url":"https://github.com/starkware-libs.png","language":"Cairo","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"Starknet Logo\" src=\"assets/starknet-dark.png\"\u003e\n\n  [![License: Apache2.0](https://img.shields.io/badge/License-Apache2.0-green.svg)](LICENSE)\n\u003c/div\u003e\n\n# Token Migration Contract\n\n## Content\n\n- [Overview](#overview)\n- [API Reference](#api-reference)\n- [Dependencies](#dependencies)\n- [Getting help](#getting-help)\n- [Build and Test](#build-and-test)\n- [Audit](#audit)\n- [Security](#security)\n\n## Overview\n\nThis contract aims to aid starknet users in migrating their USDC.e tokens into USDC without having to withdraw them on L1 themselves.\n\n## API Reference\n### View Functions\n- `get_legacy_token() -\u003e ContractAddress` - Get the `ContractAddress` of the legacy token.\n- `get_new_token() -\u003e ContractAddress` - Get the `ContractAddress` of the new token.\n- `is_swap_to_legacy_allowed() -\u003e bool` - Check if exchanging new tokens for legacy tokens (reverse migration) is allowed.\n\n### Migration Functions\n- `swap_to_new(amount: u256)` - Exchange legacy tokens for new ones (1:1 ratio).\n  - Precondition: sufficient allowance for the legacy token.\n- `swap_to_legacy(amount: u256)` - Exchange new tokens for legacy ones (1:1 ratio).\n  - Precondition: sufficient allowance for the new token.\n\n## Dependencies\n\n- Cairo dependencies such as [Scarb](https://docs.swmansion.com/scarb/) and [Starknet foundry](https://foundry-rs.github.io/starknet-foundry/index.html) - install using [starkup](https://github.com/software-mansion/starkup).\n\n## Getting help\n\nReach out to the maintainer at any of the following:\n\n- [GitHub Discussions](discussions)\n- Contact options listed on this [GitHub profile](https://github.com/starkware-libs)\n\n## Build and Test\n\nBuild the contracts from the repo root:\n\n```bash\nscarb --release build\n```\n\nTo run the tests, execute:\n\n```bash\nscarb test\n```\n\n## Audit\n\nFind the latest audit report in [docs/audit](docs/audit).\n\n## Security\n\nThis repo follows good practices of security, but 100% security cannot be assured. This repo is provided \"as is\" without any warranty. Use at your own risk.\n\nFor more information and to report security issues, please refer to our [security documentation](docs/SECURITY.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarkware-libs%2Fusdc-migration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarkware-libs%2Fusdc-migration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarkware-libs%2Fusdc-migration/lists"}