{"_id":"@polymarket/fx-portal","_rev":"115-4a37e602beadc6b913dcd804448f5cd0","name":"@polymarket/fx-portal","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@polymarket/fx-portal","version":"1.0.0","keywords":["ethereum","matic"],"author":{"name":"Jaynti Kanani","email":"jdkanani@gmail.com"},"license":"MIT","_id":"@polymarket/fx-portal@1.0.0","maintainers":[{"name":"l-kov","email":"ljkovatch@gmail.com"},{"name":"jonamen","email":"jon@polymarket.com"},{"name":"smhtm","email":"sam.hatem17@gmail.com"},{"name":"esinger93457","email":"ethan@polymarket.com"},{"name":"cristiangpr","email":"cristiangp777@gmail.com"},{"name":"dylangolow","email":"dylangolow@gmail.com"}],"homepage":"https://github.com/jdkanani/fx-portal#readme","bugs":{"url":"https://github.com/jdkanani/fx-portal/issues"},"dist":{"shasum":"721151356df20a53b30a61ff3548482a67f39960","tarball":"https://registry.npmjs.org/@polymarket/fx-portal/-/fx-portal-1.0.0.tgz","fileCount":46,"integrity":"sha512-pOX9CAkh6H+uddK6IsAyHGQsE1A4nRoC5bJWNAsjl/Cqzbd5Nmm06hWR1tYjgGz7deyn3dYh5iHZfIhsL64JQA==","signatures":[{"sig":"MEQCIDVMY19IKMA71R7bqEF81QYezduM4uSth2M/emunyn72AiAB8TIanHkON41fOLbvfF7ejsOm4FmOx8Culwhdf4Fm1g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":149560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0Lv6CRA9TVsSAnZWagAApdEP/i0ijMuQtrICDmE4dAMt\nb/xTUAU3Cl5CfKXBp1kWB96OmwErjJZtk2M5kAXM+DRpZKBhWBVZPN00aovR\n226ylMZ3ElgiHPxca9TMeEpkQ/X4M0gjrP2qUNigoAtnzZ+uNpBwCHelU9il\n6sDxSqsCTsdbdu2UvXyLkD/oF6KhD2kWwFrG9lZzhLl4GTr1JgGLQHpJNDam\nqLkidQjJDDyfcNPW/Ms1NILeumtdMA6vTqF2oa8d6jLkLUtYThhoiQXv+jRX\n2TIisiyvTRWx6sQh7WzHjh9d33GkJjOS5u31BRTYhfNu9y7R7Y/6YQuN8Web\nmUj39MlgnK+5z69sOY4qTVymSOjVQr+5mkc9P0UHrn43Hf8BgGJPCgyoAPgW\nTcUO0VJDx96oj2AsSidxQ62fg5OhARF2/9lT8hIkirYjVkb5D0b/m4iE9oUO\npvKD6PeX2tmVoy+heWl3cFiyiktImGmaM8O2uvGMCczxyru47wQFAFCWI+yS\nVVYZgCYUN5k/jsT8cGxcHpOT5Ovb8fjiSOcauEP3t/3YL+xvJrFB/2wj8NXq\nF0+1gskDiVMltJEYXHEgbctf1D9+K+MIcr2aZhGLKScjQ77SLhqfxgpGVRl3\np3K+vxDlh5ktfjOChVhUbHnM04Zy1ygTzN7Yi2vxbSS6opucS5tq2UTW8sgx\nNIXu\r\n=+0jS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"d7c12b29293dbbbf662dc9c6868a99466584ca13","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"smhtm","email":"sam.hatem17@gmail.com"},"repository":{"url":"git+https://github.com/jdkanani/fx-portal.git","type":"git"},"_npmVersion":"6.14.12","description":"FxPortal for Matic chain. No mapping. Seamless.","directories":{},"_nodeVersion":"12.22.1","_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","dotenv":"^8.2.0","ethers":"^5.0.24","hardhat":"^2.0.7","ethereum-waffle":"^3.2.1","@nomiclabs/hardhat-ethers":"^2.0.1","@nomiclabs/hardhat-waffle":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/fx-portal_1.0.0_1624292345614_0.7757340661496364","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-06-21T16:19:05.614Z","modified":"2026-09-29T19:47:57.785Z","1.0.0":"2021-06-21T16:19:05.720Z"},"bugs":{"url":"https://github.com/jdkanani/fx-portal/issues"},"author":{"name":"Jaynti Kanani","email":"jdkanani@gmail.com"},"license":"MIT","homepage":"https://github.com/jdkanani/fx-portal#readme","keywords":["ethereum","matic"],"repository":{"url":"git+https://github.com/jdkanani/fx-portal.git","type":"git"},"description":"FxPortal for Matic chain. No mapping. Seamless.","maintainers":[{"email":"bapi@polymarket.com","name":"bapi-poly"},{"email":"agupta@polymarket.com","name":"ad1-poly"},{"email":"prayuj@polymarket.com","name":"prayujt"},{"email":"ethan@polymarket.com","name":"esinger93457"},{"email":"jon@polymarket.com","name":"jonamen"},{"email":"sheldontaylor.7@gmail.com","name":"sherrbss"},{"email":"arun@polymarket.com","name":"devstardude-poly"},{"email":"julian@polymarket.com","name":"juliankoh"},{"email":"neesh@polymarket.com","name":"neesh-polymarket"},{"email":"carlos@polymarket.com","name":"carlos-poly"},{"email":"william@polymarket.com","name":"poly-william"},{"email":"kurush@polymarket.com","name":"kurushdubash-poly"},{"email":"kevin.costello@polymarket.com","name":"elvisc0stell0"},{"email":"matthew.wilson@polymarket.com","name":"mwilson-poly"},{"email":"srdjan.rakic@polymarket.com","name":"srdjan.rakic"},{"email":"christian.conforti@polymarket.com","name":"christian-poly"},{"email":"balint@polymarket.com","name":"balintpoly"},{"email":"pradeep@polymarket.com","name":"pradeep-poly"},{"email":"zannis.kalampoukis@polymarket.com","name":"zannis-poly"},{"email":"shrenuj@polymarket.com","name":"shrenuj-polymarket"},{"email":"danny.nam@polymarket.com","name":"danny.nam"},{"email":"cesare@polymarket.com","name":"cesare-poly"},{"email":"mohamed@polymarket.com","name":"mohamed-polymarket"},{"email":"ash.bhimasani@polymarket.com","name":"ash-polymarket"},{"email":"ruben.sospedra@polymarket.com","name":"sospedra-poly"},{"email":"bartek.legiec@polymarket.com","name":"bartek-poly"},{"email":"joe@polymarket.com","name":"polyjsmth"},{"email":"chaz@polymarket.com","name":"chaz-polymarket"},{"email":"khaidar.kairbek@polymarket.com","name":"khaidar-poly"},{"email":"npm@legate.me","name":"legate"},{"email":"george.visconti@polymarket.com","name":"georgevisconti"},{"email":"ryan.hall@polymarket.com","name":"ryanrhall-pm"},{"email":"benedek.gobolos@polymarket.com","name":"gbls.bndk.poly"},{"email":"worktrial1@polymarket.com","name":"work-trial"},{"email":"franky@polymarket.com","name":"franky-poly"},{"email":"aswin.nair@polymarket.com","name":"aswinnairpm"},{"email":"ivan+polymarket@3perf.com","name":"iamakulov-poly"},{"email":"suhail@polymarket.com","name":"suhail-polymarket"},{"email":"ethan.goldberg@polymarket.com","name":"ethangold3"},{"email":"antonio.simeonov@polymarket.com","name":"tonyatpolymarket"},{"email":"siddharth.sharma@polymarket.com","name":"sidd-poly"},{"email":"jason.fieldman@polymarket.com","name":"jason.fieldman.poly"},{"email":"steven@polymarket.com","name":"itsstevenwal"},{"email":"anthony.khaiat@polymarket.com","name":"polykha"},{"email":"shivkanth.bagavathy@polymarket.com","name":"shivkanthb-poly"},{"email":"gyula.halmos@polymarket.com","name":"gyula-poly"},{"email":"vedant.patel@polymarket.com","name":"vedantpatel101"},{"email":"samuel.davies@polymarket.com","name":"samueldaviespolymarket"},{"email":"matheus.silva@polymarket.com","name":"matt-poly"},{"email":"marco.cornacchia@polymarket.com","name":"marco-poly"},{"email":"oliver.cai@polymarket.com","name":"oliver-cai-gh"},{"email":"louis@polymarket.com","name":"louisferraropm"},{"email":"dan@polymarket.com","name":"dthomas-poly"},{"email":"daniel.im@polymarket.com","name":"daniel.im"},{"email":"jacob.tieshue@polymarket.com","name":"jacob.tieshue"},{"email":"troy.nguyen@polymarket.com","name":"tnguyenpolymarket"},{"email":"alice.zhao@polymarket.com","name":"azpoly"},{"email":"lucille@polymarket.com","name":"lucilleh"},{"email":"chris.scott+npm@polymarket.com","name":"chris.scott.pm"},{"email":"graydon.driver@polymarket.com","name":"graydondriver"},{"email":"jeshua.sharkey@polymarket.com","name":"jeshfrompoly"},{"email":"nickrice@polymarket.com","name":"nickrice"},{"email":"viktar.naumik@polymarket.com","name":"vicnaum_poly"},{"email":"namik.mesic@polymarket.com","name":"namikmesic-hub"},{"email":"rob@polymarket.com","name":"rob-poly"},{"email":"fedner@polymarket.com","name":"fednerj"},{"email":"kevin+2@polymarket.com","name":"kshaynpm2"},{"email":"martin@polymarket.com","name":"martin-poly"},{"email":"harley@polymarket.com","name":"harley-poly"}],"readme":"Fork of Polygon's [fx-portal](https://github.com/Polymarket/fx-portal). Polygon's repo does not have an associated npm package so we forked it to create our own so that we can use the contracts without dealing with submodules.\n\n# fx-portal(Flexible portal)\n\nFxPortal for Polygon(prev Matic)Chain. No mapping. Seamless communication with Ethereum Network.\n\n### What is Fx bridge (fx-portal)?\n\n**It is a powerful yet simple implementation Polygon [state sync](https://docs.matic.network/docs/contribute/state-sync) mechanism. Polygon PoS bridge is based on it. The code in the `examples` folder are examples of the usage of this methodology. You can use these examples to build your own implementations or own custom bridge.**\n\nIn short, it's Meta bridge. This bridge allows any state-syncs without mapping.\n\n#### Some use-cases of Fx-portal\n\n* [ERC20 token tranfer from Ethereum to Matic-Chain without mapping request](https://github.com/jdkanani/fx-portal/tree/main/contracts/examples/erc20-transfer)\n* [Lazy minting of ERC20 tokens on MaticChain](https://github.com/jdkanani/fx-portal/tree/main/contracts/examples/mintable-erc20-transfer)\n* [State Transfer between Ethereum-Matic](https://github.com/jdkanani/fx-portal/tree/main/contracts/examples/state-transfer)\n\n**What about [PoS portal](https://docs.matic.network/docs/develop/ethereum-matic/pos/getting-started)?**\n\nPoS Portal is another bridge, but it works only for few ERC standards and requires mappings. It is more developer-friendly, allows customization without much headache.\n\nWhile Fx-portal focuses on permissionless-ness and flexibility, a developer might have to write more code but more customizable than PoS Portal. It requires no mapping.\n\n**Can I build my bridge?**\n\nYes. You can check docs here: https://docs.matic.network/docs/develop/l1-l2-communication/ethereum-to-matic\nhttps://docs.matic.network/docs/develop/l1-l2-communication/matic-to-ethereum\n\n### What are FxChild and FxRoot?\n\n`FxChild` (FxChild.sol)  and `FxRoot` (FxRoot.sol) are main contracts on which mapping-less bridge works. It calls and passes data to user-defined methods on another chain without mapping.\n\n**Mumbai**\n\n| Contract | Deployed address  |\n| :----- | :- |\n| [FxRoot (Goerli)](https://goerli.etherscan.io/address/0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA#code) | `0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA` |\n| [FxChild (Mumbai)](https://explorer-mumbai.maticvigil.com/address/0xCf73231F28B7331BBe3124B907840A94851f9f11/contracts) | `0xCf73231F28B7331BBe3124B907840A94851f9f11`|\n\n**Mainnet**\n\n\n| Contract | Deployed address  |\n| :----- | :- |\n| [FxRoot (Ethereum Mainnet)](https://etherscan.io/address/0xfe5e5d361b2ad62c541bab87c45a0b9b018389a2#code) | `0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2` |\n| [FxChild (Matic Mainnnet)](https://explorer-mainnet.maticvigil.com/address/0x8397259c983751DAf40400790063935a11afa28a/contracts) | `0x8397259c983751DAf40400790063935a11afa28a`|\n\n\nYou can deploy your own `FxChild` and `FxRoot`, but no need. Except you want to have some fun and have extra ETH to throw away.\n\n### What can I build with it?\n\n* Arbitrary state bridge (examples/state-transfer)\n* Normal ERC20 bridge (examples/erc2-transfer)\n* ERC20 token generator bridge (example/mintable-erc20-transfer)\n","readmeFilename":"README.md"}