{"id":30536293,"url":"https://github.com/paxosglobal/cross-chain-contracts","last_synced_at":"2026-01-16T19:37:16.505Z","repository":{"id":262706725,"uuid":"871250447","full_name":"paxosglobal/cross-chain-contracts","owner":"paxosglobal","description":"Paxos cross chain contracts","archived":false,"fork":false,"pushed_at":"2025-05-15T19:10:38.000Z","size":1619,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-27T23:15:26.240Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paxosglobal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":"audits/Paxos - LayerZero Integration - Comprehensive Report.pdf","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-11T15:07:39.000Z","updated_at":"2025-07-06T09:16:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"27db7db7-4a9d-4842-8fde-3aaba8650f90","html_url":"https://github.com/paxosglobal/cross-chain-contracts","commit_stats":null,"previous_names":["paxosglobal/cross-chain-contracts"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/paxosglobal/cross-chain-contracts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paxosglobal%2Fcross-chain-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paxosglobal%2Fcross-chain-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paxosglobal%2Fcross-chain-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paxosglobal%2Fcross-chain-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paxosglobal","download_url":"https://codeload.github.com/paxosglobal/cross-chain-contracts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paxosglobal%2Fcross-chain-contracts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-08-27T16:02:05.505Z","updated_at":"2026-01-16T19:37:16.497Z","avatar_url":"https://github.com/paxosglobal.png","language":"Rust","funding_links":[],"categories":["Use Cases"],"sub_categories":["Github Repositories from Ecosystem Projects"],"readme":"# Cross Chain Contracts\nThis repository contains contracts to support cross chain bridging on EVM chains. The main contract is\n[OFTWrapper](contracts/OFTWrapper.sol) which supports bridging using LayerZero.\n\n## OFTWrapper\n`OFTWrapper` serves as a proxy for LayerZero's OFT standard, allowing LayerZero to mint and burn tokens as usual, \nwhich includes the same AML standards as a same chain transfer. When LayerZero initiates a mint or burn request, \nthe `OFTWrapper` forwards it to the underlying token contract. For this to work, the underlying token must authorize \n`OFTWrapper` to perform minting and burning operations on its behalf.\n\n## Audits\nAudits were performed by both Zellic and Trail of Bits.  Audit reports can be found [here](audits/).\n\n## Upgrade process\n`OFTWrapper` is a non-upgradeable contract. If a change needs to be made a new contract should be deployed.\nThe underlying token should then revoke mint and burn permissions on the old contract and grant mint and burn\npermissions to the new contract.\n\n## Contract Tests\nInstall dependencies:\n\n`npm install`\n\nCompile the contracts:\n\n`npx hardhat compile`\n\nRun unit tests:\n\n`npx hardhat test`\n\nCheck test coverage:\n\n`npx hardhat coverage`\n\n## Sending a cross chain transaction\nThe `send` function is used to send a cross chain transaction. Prior to running `send` you must first estimate the\ngas to be used with `quoteSend`.\n\nArguments of `quoteSend`:\n1. `SendParam`: what parameters should be used for the send call?\n```\n/**\n * @dev Struct representing token parameters for the OFT send() operation.\n */\n struct SendParam {\n     uint32 dstEid; // Destination endpoint ID.\n     bytes32 to; // Recipient address.\n     uint256 amountLD; // Amount to send in local decimals.\n     uint256 minAmountLD; // Minimum amount to send in local decimals.\n     bytes extraOptions; // Additional options supplied by the caller to be used in the LayerZero message.\n     bytes composeMsg; // The composed message for the send() operation.\n     bytes oftCmd; // The OFT command to be executed, unused in default OFT implementations.\n }\n ```\n 2. `_payInLzToken`: what token will be used to pay for the transaction?\n\n Return value of `quoteSend`:\n 1. `MessagingFee`: Passed into the `send` function call\n ```\n struct MessagingFee {\n    uint nativeFee; // gas amount in native gas token\n    uint lzTokenFee; // gas amount in ZRO token\n}\n```\n\nAfter calling `quoteSend` you can call `send` with the following arguments:\n1. `SendParam`\n2. `MessagingFee`\n3. `refundAddress`\n\nAlso include the value as the `MessaagingFee.nativeFee` amount.\n\n### Function signatures\n`send` function signature:\n```send((uint32,bytes32,uint256,uint256,bytes,bytes,bytes),(uint256,uint256),address)```\n\n`quoteSend` function signature:\n```quoteSend((uint32,bytes32,uint256,uint256,bytes,bytes,bytes),bool)```\n\n### Using the hardhat script\nThis repo provides a script to test calling `send` via hardhat. First create a .env file with the following:\n```\nURL_ETH_MAINNET=\"\"\nURL_ETH_SEPOLIA=\"\"\nPRIVATE_KEY=\"\" #Private key for sender\nEVM_OFT_ADDRESS=\"\"\nRECIPIENT_ADDRESS=\"\"\nDESTINATION_EID=\"\" #Endpoint id value from https://docs.layerzero.network/v2/deployments/deployed-contracts\nREFUND_ADDRESS=\"\" #Can be the same as the sender\nAMOUNT=\"1000000\" #Use 1000000 for tokens with 6 decimals to send 1 token\n```\n\nRun the following commands:\n```\nnpm install\nnpx hardhat compile\nnpx hardhat run scripts/send.js --network ethSepolia\n```\n\nNote: You may need to add a new network into `hardhat.config.js` if the network you want to send from isn't already there.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaxosglobal%2Fcross-chain-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaxosglobal%2Fcross-chain-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaxosglobal%2Fcross-chain-contracts/lists"}