Domains
"optimism":10,
"celo":42220,
"avalanche":43114,
"fuse":122,
"kaia (klaytn)":8217,
"arbitrum nova":42170,
"polygon zkevm":1101,
"harmony one":1666600000,
"binance smart chain":56,
"moonbeam":1284,
"metis":1088,
"gnosis":100,
"coredao":1116,
"fantom":250,
"arbitrum":42161,
"polygon":137,
"base":8453,
"linea":59144,
"mantle":5000,
"zora":7777777,
"viction":88,
"astar":592,
"scroll":534352,
"ethereum":1,
"orderly":291,
"manta pacific":169,
"rari":1000012617,
"xai":660279,
"fraxtal":252,
"mode":34443,
"blast":81457,
"astar zkevm":3776,
"degen chain":666666666,
"merlin":4200,
"x layer":196,
"ancient8":888888888,
"zetachain":7000,
"redstone":690,
"sei":1329,
"taiko":167000,
"bob":60808,
"endurance":648,
"world chain":480,
"cheesechain":383353,
"zircuit":48900,
"kroma":255,
"cyber":7560,
"lisk":1135,
"lukso":42,
"mint":185,
"proof of play":70700,
"re.al":111188,
"sanko":1996,
"tangle":5845,
"bitlayer":200901,
"dogechain":2000,
"flare":14,
"molten":360,
"shibarium":109,
"everclear":25327,
"morph":2818,
"snaxchain":2192,
"aleph zero evm":1000041455,
"chiliz":1000088888,
"flame":253368190,
"immutable zkevm":1000013371,
"metal l2":1000001750,
"polynomial":1000008008,
"rootstock":1000000030,
"superposition":1000055244,
"apechain":33139,
"b3":8333,
"gravity alpha mainnet":1625,
Addresses
"optimism":"0x2a5c54c625220cb2166C94DD9329be1F8785977D",
"celo":"0x7f4CFDf669d7a5d4Adb05917081634875E21Df47",
"avalanche":"0x7daC480d20f322D2ef108A59A465CCb5749371c4",
"fuse":"0xDED4D91f77F69DE32c6da32CE8c1905C7de03C46",
"kaia (klaytn)":"0x80Abe17c3Ca312f63a96D31DdE1F829e90Ee05b7",
"arbitrum nova":"0xb3ae37826ca27CeF44694d4F8975916eF193454F",
"polygon zkevm":"0x7daC480d20f322D2ef108A59A465CCb5749371c4",
"harmony one":"0xDED4D91f77F69DE32c6da32CE8c1905C7de03C46",
"binance smart chain":"0xf3D41b377c93fA5C3b0071966f1811c5063fAD40",
"moonbeam":"0x7daC480d20f322D2ef108A59A465CCb5749371c4",
"metis":"0xB598ECFb72207B11d7F3f8B0e4031d86a1d76381",
"gnosis":"0x7dac480d20f322d2ef108a59a465ccb5749371c4",
"coredao":"0x72FA03C5868EBFeBcA21EB963bEFc4Ae2586a422",
"fantom":"0xE9994efe91B3fCbCF343BB9bcA7e6b7251173ea0",
"arbitrum":"0x7daC480d20f322D2ef108A59A465CCb5749371c4",
"polygon":"0x7daC480d20f322D2ef108A59A465CCb5749371c4",
"base":"0x7dac480d20f322d2ef108a59a465ccb5749371c4",
"linea":"0xC6EDe374Df7763ad70166C4d85d8066A8fb8D272",
"mantle":"0x2F1562Cc3044B95cb969D1684a1f4E43A207476E",
"zora":"0xE95E517f9EE4b43AE198606407b6859f767De95b",
"viction":"0x80Abe17c3Ca312f63a96D31DdE1F829e90Ee05b7",
"astar":"0xcAB586182E6a3CFF18f97F2b0cb316b6879B83a5",
"scroll":"0x7daC480d20f322D2ef108A59A465CCb5749371c4",
"ethereum":"0x7daC480d20f322D2ef108A59A465CCb5749371c4",
"orderly":"0xfD7c029D1F1198826302F5F6c9CD482c06F0D72f",
"manta pacific":"0xc7a66e3A9d1a84dC60f8a630C3eC3D84aCFBE5EC",
"rari":"0xC7F09Ca5E3F5D47BedA89c0FA6E7f07De7385902",
"xai":"0x9e3dcb75d2388B1330b3Ff7e9c5b9f51EE5952F3",
"fraxtal":"0x49e6d51a220acab3b44d325edcab0f164cf48111",
"mode":"0x814490128eB60e6FCB56a38B46FC9FC37726414a",
"blast":"0xDc09f06D11dFC7703BF8f3049E2CcF4507bEA1ab",
"astar zkevm":"0x4924bFdfCfd3DB8D170c5882936396f1EB5542bB",
"degen chain":"0x85Fd2DA31262d26471c738Ce357a3767635A0956",
"merlin":"0x8796f4A273225ac8468585b1E9CFB97A0cEB6174",
"x layer":"0x1812d05671EefA040ac605a0198476dEd081d520",
"ancient8":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"zetachain":"0x6Ca118bdF9BD900Da5D3d85094D92C5B3b9c0DA5",
"redstone":"0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5",
"sei":"0x4b56f191b7F396dec4268b836845C3F63F5e2121",
"taiko":"0x6293432E8731d8267F76B90Fa82650552e7811F2",
"bob":"0xc072c3EbAf165955C5aAd2DbB4293f771de6dbd3",
"endurance":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"world chain":"0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5",
"cheesechain":"0x829761FC0d35F1d05C77EEA2B629255e94Af8F60",
"zircuit":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"kroma":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"cyber":"0xc072c3EbAf165955C5aAd2DbB4293f771de6dbd3",
"lisk":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"lukso":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"mint":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"proof of play":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"re.al":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"sanko":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"tangle":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"bitlayer":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"dogechain":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"flare":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"molten":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"shibarium":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"everclear":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"morph":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"snaxchain":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"aleph zero evm":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"chiliz":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"flame":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"immutable zkevm":"0xc072c3EbAf165955C5aAd2DbB4293f771de6dbd3",
"metal l2":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"polynomial":"0xc072c3EbAf165955C5aAd2DbB4293f771de6dbd3",
"rootstock":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"superposition":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"apechain":"0x7dFb5E7808B5eb4fB8b9e7169537575f6fF1a218",
"b3":"0x7dFb5E7808B5eb4fB8b9e7169537575f6fF1a218",
"gravity alpha mainnet":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
Human readable ABI
[
"function fee() external view returns (uint256 fee)",
"function mint(uint256 amount) external payable",
"function quoteBridge(uint32 _destination) external view returns (uint nativeFee)",
"function bridgeNFT(uint32 _destination, uint256 _Id) external payable virtual returns (bytes32 messageId)",
]
JSON ABI
[
{
"type": "function",
"name": "fee",
"constant": true,
"stateMutability": "view",
"payable": false,
"inputs": [],
"outputs": [
{
"type": "uint256",
"name": "fee"
}
]
},
{
"type": "function",
"name": "mint",
"constant": false,
"stateMutability": "payable",
"payable": true,
"inputs": [
{
"type": "uint256",
"name": "amount"
}
],
"outputs": []
},
{
"type": "function",
"name": "quoteBridge",
"constant": true,
"stateMutability": "view",
"payable": false,
"inputs": [
{
"type": "uint32",
"name": "_destination"
}
],
"outputs": [
{
"type": "uint256",
"name": "nativeFee"
}
]
},
{
"type": "function",
"name": "bridgeNFT",
"constant": false,
"stateMutability": "payable",
"payable": true,
"inputs": [
{
"type": "uint32",
"name": "_destination"
},
{
"type": "uint256",
"name": "_Id"
}
],
"outputs": [
{
"type": "bytes32",
"name": "messageId"
}
]
}
]
const fee = await contract.fee();
const amount = 1;
const tx = await contract.mint(amount, { value: fee.mul(amount) });
const receipt = await tx.wait();
let mintIDHex;
if (network == "Polygon")
mintIDHex = receipt.logs[1].topics[3]
if (receipt.logs.length === 1)
mintIDHex = receipt.logs[0].topics[3]
else
mintIDHex = receipt.logs[2].topics[3]
const mintID = parseInt(mintIDHex, 16);
const domain = 10; // Optimism
const quote = await contract.quoteBridge(domain);
const tx = await contract.bridgeNFT(domain, mintID, { value: quote });
Addresses
"optimism":"0x32F05f390217990404392a4DdAF39D31Db4aFf77",
"celo":"0xad8676147360dBc010504aB69C7f1b1877109527",
"avalanche":"0x904550e0D182cd4aEe0D305891c666a212EC8F01",
"fuse":"0xCd8EAE908E27b9046ca7845DA22f6d3cdf367588",
"kaia (klaytn)":"0xCd8EAE908E27b9046ca7845DA22f6d3cdf367588",
"arbitrum nova":"0x1753Dd0743FC555898EF486b662aa77c9CD6CCa2",
"polygon zkevm":"0x46B4eDaA761eF8d2934e9F7AAf32B5Bf2C9C9F67",
"harmony one":"0xbA32747EF144B5eA6a01A18f7756034e23C998ae",
"binance smart chain":"0x7b4f475d32f9c65de1834A578859F9823bE3c5Cf",
"moonbeam":"0xf3D41b377c93fA5C3b0071966f1811c5063fAD40",
"metis":"0xeB5108C41932b6Db7C933EEf783c651a68cB5178",
"gnosis":"0xFD34afDFbaC1E47aFC539235420e4bE4A206f26D",
"coredao":"0xE94985A7C29db999109330dfB22803A82cAb7022",
"fantom":"0xF6fF3D86D43B7967E8b03Fc169578af1C5100C61",
"arbitrum":"0xFD34afDFbaC1E47aFC539235420e4bE4A206f26D",
"polygon":"0x574E69C50e7D13B3d1B364BF0D48285A5aE2dF56",
"base":"0x5454cF5584939f7f884e95DBA33FECd6D40B8fE2",
"linea":"0xc92A74918Ebb35CA91d7029b7528e0b49fA60B47",
"mantle":"0x261e36AF8C6Cb974a468025E58f3bd39b0419275",
"zora":"0x63F0973Fe299E9635Df70C22C39B9Da0700ef0aB",
"viction":"0xb00300fCe618E049d284eb92E57582A5d15295F4",
"astar":"0x25e6cA1A7cB794835Cb83536874643ccE5c3538b",
"scroll":"0x904550e0D182cd4aEe0D305891c666a212EC8F01",
"ethereum":"0xf3D41b377c93fA5C3b0071966f1811c5063fAD40",
"orderly":"0x814490128eB60e6FCB56a38B46FC9FC37726414a",
"manta pacific":"0xb1d2B9446A9d1550e8d409C0F9745c5A2f10D332",
"rari":"0x9cDb9f7Ede01291556560541a1A802814cB693f9",
"xai":"0x122149a5bcB71AE690b66A71bbaf6fE5C86C6e16",
"fraxtal":"0xDE5E2bf75005422dc408ea96F22467E02cBA8c93",
"mode":"0xfD7c029D1F1198826302F5F6c9CD482c06F0D72f",
"blast":"0xd9371FFFd58D57bfC65e897e18DAF88C88ec273E",
"astar zkevm":"0x61eE60cf66F7f500fD7ed5077646ec6543837A63",
"degen chain":"0x354Fb3fC5b5102569491aA54Ded4fe8F3f803616",
"merlin":"0xCcB5eCb98F05d6A13eaA03b3a1135D155c8cb95a",
"x layer":"0xbfD3425475dd8aF64B29424BDbC5f7957035d711",
"ancient8":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"zetachain":"0x4fc0D96f3d70b4D9b75671Ab92e7Be01CaBE3863",
"redstone":"0xc072c3EbAf165955C5aAd2DbB4293f771de6dbd3",
"sei":"0x47470579B0f2fD91a6Ed1b13bBAd0d723Eec7512",
"taiko":"0x5C5c31edD52Bc662d9A396Ffc1CA96938DA1764C",
"bob":"0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5",
"endurance":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"world chain":"0xc072c3EbAf165955C5aAd2DbB4293f771de6dbd3",
"cheesechain":"0xCd06b1563a8B4663ff8f1ccedE99F8eF4Dd99f88",
"zircuit":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"kroma":"0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5",
"cyber":"0x6Ca118bdF9BD900Da5D3d85094D92C5B3b9c0DA5",
"lisk":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"lukso":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"mint":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"proof of play":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"re.al":"0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5",
"sanko":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"tangle":"0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5",
"bitlayer":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"dogechain":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"flare":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"molten":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"shibarium":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"everclear":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"morph":"0x7dFb5E7808B5eb4fB8b9e7169537575f6fF1a218",
"snaxchain":"0x7dFb5E7808B5eb4fB8b9e7169537575f6fF1a218",
"aleph zero evm":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"chiliz":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"flame":"0x7dFb5E7808B5eb4fB8b9e7169537575f6fF1a218",
"immutable zkevm":"0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5",
"metal l2":"0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5",
"polynomial":"0x6f6aE8851a460406bBB3c929a415d2Df9305AcD5",
"rootstock":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"superposition":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"apechain":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"b3":"0xAFa5f9313F1F2b599173f24807a882F498Be118c",
"gravity alpha mainnet":"0x7dFb5E7808B5eb4fB8b9e7169537575f6fF1a218",
Human readable ABI (hFT)
[
"function fee() external view returns (uint256 fee)",
"function mint(address _to, uint256 _amount) external payable",
"function quoteBridge(uint32 _destination) external view returns (uint nativeFee)",
"function bridgeHFT(uint32 _destination, uint256 _amount) external payable virtual returns (bytes32 messageId)",
]
JSON ABI
[
{
"type": "function",
"name": "fee",
"constant": true,
"stateMutability": "view",
"payable": false,
"inputs": [],
"outputs": [
{
"type": "uint256",
"name": "fee"
}
]
},
{
"type": "function",
"name": "mint",
"constant": false,
"stateMutability": "payable",
"payable": true,
"inputs": [
{
"type": "address",
"name": "_to"
},
{
"type": "uint256",
"name": "_amount"
}
],
"outputs": []
},
{
"type": "function",
"name": "quoteBridge",
"constant": true,
"stateMutability": "view",
"payable": false,
"inputs": [
{
"type": "uint32",
"name": "_destination"
}
],
"outputs": [
{
"type": "uint256",
"name": "nativeFee"
}
]
},
{
"type": "function",
"name": "bridgeHFT",
"constant": false,
"stateMutability": "payable",
"payable": true,
"inputs": [
{
"type": "uint32",
"name": "_destination"
},
{
"type": "uint256",
"name": "_amount"
}
],
"outputs": [
{
"type": "bytes32",
"name": "messageId"
}
]
}
]
const fee = await contract.fee();
const amount = 1;
const tx = await contract.mint(address, amount, { value: fee.mul(amount) });
const receipt = await tx.wait();
const domain = 10; // Optimism
const quote = await contract.quoteBridge(domain);
const tx = await contract.bridgeNFT(domain, amount.mul(BigNumber.from(10).pow(18)), { value: quote });
Addresses
"optimism":"0xc110e7faa95680c79937ccaca3d1cab7902be25e",
"binance smart chain":"0xae4789D7C596fdED0e135Bca007152c87a0756f5",
"gnosis":"0x98Ee7E8f0A0D18F393805cf99A56ce6B33ea1B21",
"arbitrum":"0x233888F5Dc1d3C0360b559aBc029675290DAFa70",
"polygon":"0x0cb0354E9C51960a7875724343dfC37B93d32609",
"base":"0x0cb0354E9C51960a7875724343dfC37B93d32609",
"linea":"0x8F2161c83F46B46628cb591358dE4a89A63eEABf",
"mantle":"0xf4368751f99127F052AFa993aEc3C6393AcA5466",
"zora":"0x8028d4f11d10730B12Ae011474F9db8140F112F4",
"scroll":"0xc0faBF14f8ad908b2dCE4C8aA2e7c1a6bD069957",
"ethereum":"0x64D9b639aE85a1e436c1752889c5C40699f3887C",
"manta pacific":"0x75DAa6Eb3748C33b5fB3716465DAD9658BE42A8D",
"mode":"0x9970cB23f10dBd95B8A3E643f3A6A6ABB6f3cB9b",
"x layer":"0x444791b5cA0E0BdC2De93467f430fbe925b35487",
"ancient8":"0x7dFb5E7808B5eb4fB8b9e7169537575f6fF1a218",
"zetachain":"0xe35030B407C96C037190B63646AC1Eb34F43Cc2b",
"redstone":"0x49bF21531991742b0c1797230758992769771CcD",
"sei":"0x97aa7b7501FA0fe66649DE7394b9794fa40aEF02",
"taiko":"0xb08ab8cBd0226D8335fB0Cb88ce47FAfC9C47096",
"bob":"0xEF62b433Ca3AC8b151c4a255de3eD3dA4e60AdD2",
"world chain":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
"zircuit":"0xA5f471A19fdB367Ea80c4c82ecd30eA94090d549",
"kroma":"0x9f6f71f3D58aCeba796ADD5f00A893C636163BB2",
"everclear":"0xe35030B407C96C037190B63646AC1Eb34F43Cc2b",
"morph":"0x6E55472109E6aBE4054a8E8b8d9EdFfCb31032C5",
Human readable ABI
[
"function quoteBridge(uint32 _destination, uint amount) external view returns (uint fee)",
"function bridgeETH(uint32 _destination, uint amount) public payable returns (bytes32 messageId)",
"function bridgeWETH(uint32 _destination, uint amount) public payable returns (bytes32 messageId)",
]
JSON ABI
[
{
"type": "function",
"name": "quoteBridge",
"constant": true,
"stateMutability": "view",
"payable": false,
"inputs": [
{
"type": "uint32",
"name": "_destination"
},
{
"type": "uint256",
"name": "amount"
}
],
"outputs": [
{
"type": "uint256",
"name": "fee"
}
]
},
{
"type": "function",
"name": "bridgeETH",
"constant": false,
"stateMutability": "payable",
"payable": true,
"inputs": [
{
"type": "uint32",
"name": "_destination"
},
{
"type": "uint256",
"name": "amount"
}
],
"outputs": [
{
"type": "bytes32",
"name": "messageId"
}
]
},
{
"type": "function",
"name": "bridgeWETH",
"constant": false,
"stateMutability": "payable",
"payable": true,
"inputs": [
{
"type": "uint32",
"name": "_destination"
},
{
"type": "uint256",
"name": "amount"
}
],
"outputs": [
{
"type": "bytes32",
"name": "messageId"
}
]
}
]
const domain = 10; // Optimism
const amount = ethers.utils.parseEther("0.01"); // Will bridge 0.01 ETH
const quote = await contract.quoteBridge(domain, amount);
// only for L2s (have eth as native token)
const tx = await contract.bridgeETH(domain, amount, { value: amount.add(quote) });
// only for alt L1s (bsc, polygon, etc.)
// TODO: ensure bridge contract is approved to spend WETH
const tx = await contract.bridgeWETH(domain, amount, { value: quote });