# NRC20 token跨链指南

# 创建跨链token

首先需要在NULS主网上面创建可跨链的token,比如可跨链的NRC20 token。

可跨链NRC20 token合约HEX码:

504b03040a0000000000527d8250000000000000000000000000090000004d4554412d494e462f504b03040a0000000800517d825085177e5f7200000087000000140000004d4554412d494e462f4d414e49464553542e4d46f34dcccb4c4b2d2ed10d4b2d2acecccfb35230d433e0e5722c4acec82c4b2d420807e4a45694162bc02478b99c4a33734a749d2aad140a32538b8a52734af379b99c8b52134b5253c0c28e0589c919a90abe8965a9790ac67aa62073419a5274bd52b241f658e819c41b9a98f072f1720100504b03040a0000000000527d825000000000000000000000000003000000696f2f504b03040a0000000000527d825000000000000000000000000008000000696f2f6e756c732f504b03040a0000000000527d825000000000000000000000000011000000696f2f6e756c732f636f6e74726163742f504b03040a0000000000527d825000000000000000000000000017000000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b03040a0000000800527d82501154e3411a060000970d000024000000696f2f6e756c732f636f6e74726163742f746f6b656e2f4f776e61626c652e636c617373ad56d957137714fe862c13e2b8107089eb68ad84b004e9a2a2b5026e088286c502b5740803190d333899a0b4b5fb6af7bda77de8a32ff59cda5381534ffbd887fe4fede9f79b0c611ba0e7d887fcd67bbf7bef77efef4efefae7b73f0034e1db2812e88ba21f57ca518de7c43010c5208622785ecc572378218a61bc188116e5e5888c4c140a46c5a12e632c8acd181700d9080ca1714dc6f528aad017414ecc131198621e9261c9988ce04639f6c116a279194e949b8218a622b819c12db1a4f16971ff928c9765bc22617bf74d53b7f3596332ad9b56c1cce8a367a674d391a0b49bbc69cb69f9bc9e97102f09f6da9a991fd36dbb24ba3963998ead659c365bd71ccb96b0b7d3b0526621974fcd5fa5f2a3d7532da3a3b69ecf1f9710b2049c84f009c3349c931202899a7e09c1366b542760a761ea5d858911ddeed546723c89755a192dd7afd986d87b8741276bd03575a531c7baae9b29ba2c0469ae7ccad06f76174daa899af5bc8ba70ba6634ce8fd46de20408b695a8ee61896496b87fc95b5924caa9fb60852296cb62d67a68ad6af69535a2aa799e3a91ec736cc710a6fec71b4ccf58bdaa41b1ab3499f2d3337edf9bc41ac4b18158e9782524e24ec4fac1d946037629648a8b0bd742f828895609dac6e77a5db9a1a25f4ad83bbcead1bea84e66453adc678bbe9e8e3baedfa1232ed8cc02f732c6ea6b45c8109dde62fcf4c6bf638b9af1a1af2234f1ed1789071cbc4e73a3aa13b596bb44b9ba04448201d96d121e1c0d22c5fd26c4a38babd24ddc975d39dd66f140c3e0661a9c72ad819fdac21aa53f1caaf41b8a420854619b715bc8a230a1a50afa00ef5325e53f03aa8ca97ff06de94d0d0cd4cab4c80eabe10d51a7337f3c6d58c66aafa2d3d537074d5701a64bca5e06dbc23a1b1a49829d6c97aaa0a4e820938baf6e339b8eabb1721bdabe03dbc2fe1e9ff0ab2b4cb08880f14dcc111e6feb4a592d32c73a68e4cabd36432afe7c6147c888fd8a796e7b5b560e44645254b430a3ec62712765d558dbc8050b58598b56221f235fa56ce96e5677c765e3175d3f4a76857f0193e67e5f915a670ff0b055fe22b3ea82e4b15b18d67d5523546e61f9484fa84f72454c7aa53172054b7f26b545b770ab6a98e58564ed74c055fe31b76d1b5595de27ef7c8353dc35ebcc3b75c2fe6195938af9b2e65bbd77ab3c26d6b9e8c306b5bcbf16c6ba273b9ade335831276fa42f539865092ede2d3607213832be9176d60d8a7bd2c6dde8fd27edc4f8a3e6190977dabf431b70e5dc19647744560c8a57a8b1af9f9deef7edcc855589b9c64064431f890b1e2c8ab70d1fd06cfa4bb59c2fc02e6ae184e36ed164b7fb1678ef880ad3cf16b9cab3467bf77b2d5cf63c65b9eb12626355bef65138f2756016c6704c2750997ff6f5ffbb19f7f9d12fcc75586a068a85c054577e51c81249a2ec7c3dc5da004bb2caa92b3909273287b804032f92b020f10bcefea37718c511bd8c5713736600f2ab1174f40346757174fe229ceec7738420d819be24edc8504d6cf25a0b07b78609172c8533eeadd1e73819a71dc03eaf080aa0814fc131bc53483d05d846261811b58845bede3d409fe649455b4c878668991a0e8f31e0b273d16b69000e1f00ce458640ee50b0c443903b5fcef59b7c8c816cf4810cfae86151458511fac14b11a7db0249c428b8735487a84eccee40c363c8432e0a6a676161be7b02959cb5c2dcfd1518ec7187c33e2a450a06f2b2278e862d5ca3a10a4b6957ceea696f0215eb4b3b9686756c4b02929f99869e1d8ca3268c30e9c5e1444bc14c4699c2966501a26ff119edd13e073a8a82523df430ede4530108b91191e543e44d5c02cb6c6b6cd603bf7214eb11d1c6610a744f077ec1c0870dc35102002ef7b7a9a83b5b1ddb1703cf80bf6cc606f73e821f60dc443b350eb67b0ff87790307a81e7bac391c5a0451e7020c048b3b8a1f249c5c1b0fc71e8fcb2edca1fba5d26a6268c039067c9ec1b693d90bb8c4b21c4627a6d185db64ef0e4fbec365fc88347e428f4b48ba187489f77b38ebf22e56e7b82a7357e78918a0f655a276d0c630113b719179bfcdec74711526ea26dae8208d27dc3a09c64e497f6358c625d6f429b60f9e5606089d76995f18cbe88a187b91743357c692ab468d9bad6a1633fe05504b03040a0000000800527d8250d416394ff80300008d0800003e000000696f2f6e756c732f636f6e74726163742f746f6b656e2f4f776e61626c65244f776e6572736869705472616e736665727265644576656e742e636c6173739d545b6f1b5510fe8e77e3759cb563e7d25b42ea9600bec6e5dad2b821ad6921e024a5a92ac10bd9d8db7813b336bbeb04518140e2051012cfbc435ef20012712590104f41e28dff838099e36d2eb6e3483cec9c3973e6cc7cf3cdecf9f39f5f7e03f002ee0d228857c288e32a6bd758bccadbeb1a0a61dcc01c8bd734cc873188ab21dce4f5168b6208aff37a9bc51d0d6f68785320d270cc2dabde7497b76dd311982a59f5bcddacb9f972ddf61ca3ece5ddca66fe66a5e298ae3b2b10b2cd6ddf37e8552d77fa8a40a2fb9257df34ed3c391a6b3593ae050b966d797302ef274f73ee8fa0ff69ea81805aac574c81e192659b4bcd0fd64ce73ec7151829d5cb46ed81e158bcf78d2a1721705ed6e456adc67dc7b0dd87a6e39895db5ba6ed09e80b369d156b86eb9ae47afd9402a64f0c453cc4d64defee71ca13c9d469a4c7dcae5b977af0d8c9c410255b3a68d7907b7417343f6c1a352a673c59da30b68c7ccdb0d7f3cb6b1b66d99b4dbd2720eacc58d79164cc2056222b9e51de5c341a92481a3f9a8daae156dbec2bc9d402252128cd1a390bda84bcfa8ae758f6bac018957c18b96da5c8e1957ad3299b772c6e8ceed339c38e3acee0ac8e7358d0318a311de32cdec2db1a4a02d7fe6f43342cea780e491d33c80b9cedc474ab69d52acc56f2c4108f8efd4037742c6199c55d223c9b78f2b348fb3b3afdc12f52373b4915b8d0b397fefc1197d4cc103553cea0c0e831faa491d89beacf82c064bf81a166198d8669570472c9eee674f7cbe766b6c3ffc904f5f19f4c164f3e46829eb43868f6a020c0cda6872fc0fd0662311e03da87e8fc1cce93bc40bb2a9dabb48ea5337b10e9c708a4b37b50d2b93da83fc9db132447a4cf2a3d7e06a258a3c8654c9225ddbe8ba72833a4c63984d4387b406a9c5f21eb255cf6b3e66965af81f4cf507e3c481394c68732b4de76f0430b3c8d69fff21c7973e02043560e4186a57583ee6cca0867da5e07e0821212277ea62710b51388dd13c8b3bd81a89d401cbae39e0064dc0742bf8f1feb2ff25198e374e6070ca8bb997d44d32d0c64e8fb1e03ca6ee677041799ae7dea152d59fa5ad0bec3f00ec25969272f2e631f715ec8a692c30e8659fb039aba0355d9a51c8a4479992601d826941f41c3c784f211cdc5a784f23314f03955f785449f68e33a40bf8a14f55dd0be880cd902c892358e412d2afec6a4865c508c85e7b9bc19c92f97f78d4f55ae5d41242dd1871851217671a2dac6cd66d537af16260eb14625862fa9815f51ceaf8fb09af3718d529a2b789ed2319a29a8f179f12ff11c203c048574f87a4030347a4c7c68f7280e7738f92b06df7d8cf0c8500b7a1b5f6424dad6095424f6490bc32dc43aa7e4db235392f4d104f092942fe3a29c077a20304ba8f01f504b03040a0000000800527d82505cfe886644030000f70600003c000000696f2f6e756c732f636f6e74726163742f746f6b656e2f4f776e61626c65244f776e65727368697052656e6f756e6365644576656e742e636c6173739d546b4f1341143dd3d796bad0420504015151fa4016f185f20645498a1a5112fdb6b41358a8bbb5bbc50fc61fa3064894447c15a3d1183f60e26f32c63bd315a1e59198a677eedeb973eeb9e7ceeecfdf9fbe02e8c56415fcd04208a347786785d7abe07c08177051984b0afa4208a22788cb62bd224cbf3003c20c2a185230cc509dcbf325c32ad8b71e9b3ccfd096322ccd2c646d2d6d994e5e4f3b9a9d59d44633993cb7ed7e8680336fd81d3d0ced95998eb5c84d8d90f4d92c17b903866938430ca3b18392f72f1b9f61f08d5b19ce104e1926bf597838cbf377c54986ba9495d6b3337ade10cf6ed027683234cab6ec792377879b56c14cf3ccb5256e3a0ceaa4493be359ddb63925f61d40b0630f20ea3232c79ddb3b556c8fc50fd23162579c3abe8b4ae52a04f8a3829e25c2f5b1d482bea46b59dd9cd36ecd2ef0b4d31f7fc0c02ca148c5965444a7beaba71d3dbd38a5e7a45074651882f3ba3d5f52d71b8b4f52c0b1a69dbc61ce311ca64efe8195a204169ab60af9349f3084d6aaab51b7485411c56115f51851518b3a15a3185330ce70f1ff04567055c5099c54114782065a4e66ac60643342bdd37b003cd971c307555cc38430d785b9a122892e9a46b9600ccdbbcec2bd3da4130d23489397378821ba4327192499daf6ef99a165bf81d3b4f55c8e9b198633b1ca29540ec6d5a2bf2cffefedd827bf2536bef736dae9131306a9040ffd68aa402422e64cdfa200c5ebd140b6919eeed1be97d67022f9012cb1014fa2eb03bc6f28e4c111b23572fb19aaf09cfc1768a2a7f6d21134a315909e8066d213c53ce4b7e1985b42a355ecf913efe15ddf020ec8e08a04544b092e20bd8e38ee1e1e921d50b6e0b78d5648465fd2995712a1a194b54529208988c274155dac65b7d7e14472057edf5a72133589227c49fa2fc3ef5d4b7e837f4ab0dc44ad58bae85f44601561e1fd80e25b85cfbb46105e49a299ca00af89c43a14bc2512ef285e240a1fb7e934bc456a181d3845645a89d469b21e744a85034a0dfb852605b1d088a04c2f8e4bf986ab5db4c4aa3a2119293b699494fcb24dc9a85bb253aaeaa995a8f4deb8a813724240cb6704ef6fa0aa2e54c4a112b41a795a44751135e583fabe0dbec585f7e08cb4dd1411236154ec1c8e027f00504b03040a0000000800527d825068fe421cca0100005e04000022000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373a552d14e1341143d03b5cb16aa28a8a0284a08697970131ff481a76a24694282a19507dfa6bb431d989da933b325fc9a0f7e801f65bc534ba5b6a5896eb23b3be79e7bcebd33f7c7cf6fdf01bcc64e84e711b623bc60a8367a3d6bfa5c7de80bed19569a5a0bfb5e71e7848bf092186dcbb53b1376c828699e0b86f55afde89cf779a2b8ee262d6fa5ee1e306c9e14dacb5c9c4a273b4a34b4369e7b69b463d83b9226d18572496ab4b73cf589cb2e123ee224a7525c9248d95de51da318963291ca9c2b4a5eacd59b0ccb9ea8aa55f47aea8a61e3ba869cfb2fc93bd96d6a2fbac29244dce154582a8ecf18ded4a61b37b2cc0ae70e668aec8c37f3915b6add0b3bd6d5fedcae4ec4d7425a9191e2921f1e26c3db39554d2faafe99eee85ae4d09a9ce1d33ca17fb489f86034e8ae63ae94b90cc7c9d0fe2fb799475d6999c2a6e2502af2a8b4cd85d0af0295616b42d0876832e030acfe19c2e3ceb9486942f76fcbd8fd6be06f278fcd7e99816101e1894b749788695fa15d99d66580b0952958157727b07b589dc0eee301a9dfc0b0466f144cd70784877844ff01ac2efc0647a1c7d81886d6166f864684cdd9b94ff0748aef388d085b83ef33dca135141a7c4ad46e488a10ff02504b03040a0000000800527d8250db5fc78805120000352a00002d000000696f2f6e756c732f636f6e74726163742f746f6b656e2f43726f73734c6f636b6564546f6b656e2e636c617373b5590b7c53d779ff3ee9ea61f9f2b0c1c63218642060cb32c6240462888931060cb62196636a6843aeed8bad204b8e244348d26e6db32de9d26c5db3a45dd6a46bb7926d594b5230a634cfa649dbad8f75cdda6dedde5bd6ad491fdbda344b49ffdfb95757922d992ef9f5c7cfe79e7bee39dff7ffdedf115fbaf4992789681347cba897be20c31765f8920c7f1ea03efa8b32aaa62ffbe82b01f2c94b2f7d5586afc9f097f2edeb010c7f25c33702f422fd753955d1377df4ad0055d0df05e8dbf41d59f97b1ffd838ffe318053ff24c33fcbf02f32fcab8ffe2d40cbe9df85c44b72e03f64f9bb72ea3f65f8af72fa1ebd5c4eafd0f765f881ecfb61807e44ff2dfbfe4786fff5d18f03d428fc7ae955197e2ac36bb2f5fffcf4ba50fd998f2e09e837f0854906f6b3cb47ef05737663a70c2fb226af9e007bd9e767bf6c2b936f019995fb5997e7023f2f0cd01e5e0478bc58868a72aea4977dbc449697022657812757fb79991ca8f171d0c7b53e5eeee3154c5ac29830992a7b6e364e182d712331d612cda46289b16d4cdef4a989e1649cc93f6a8ec4268c789a89bb99ca33c98c118f4e4d4ec64f31555b47278ccc78cbced8587722638e99291cf70f1ba03762e2d4226bcf5426166fe93526f1b12c1a1b4b1899a9149877157eddde134bb624a6e2e996916422933246322de9d1e32d1da3a329339dde569c5d3b68fa8c783c79d21c65cabc098a6f91bd0058184f8e1c3747773a721f7b4b387226e949c220f3715eded97f201a3d3a70607f57dfd1e85074a0abf768e781be81fe8ece01a695f3f3655adad058cc01b4cee4a829d68b25ccbea989613335600cc795bb24478cf8a0918ac9bbbda865c66390b9712eb34cf2b89968e94c25d3e91ea5a10159008360ff5422139b300763e91868742412f0ac4c2c99009d75c5411bce9e96c198791244dc0d8d70ca9aac08731dd1bb3d968865da99da1be64a596a653699eec641a605422866c43b269200ceb4ba10ff41238568ca98a90241c29715a4dfbc652a963247252e940f8bfb300d345cc65fe6fd5a521d9ee4c9849942b8a427cdc4a8cc74b5d2918d1ecf09233e654a641758f9d464d6d20ba21963e4387c54bd5be914548021913e66a676a792134c37bc25f4c5c1371e869b1d53e45d992453c5b09119191f28e07bf565f81e996bf123fb8430c7a0938c911a3333b0da9222fbe04a4a35f8ec3ab20fc6b233dc816397675bd21c3e9b08e2ac207d08512d9611fb2ccdcb0cdd5831324939b9a0603f53a4c8b6eda5d3e59637996f7c5c87e49e3536e85cced0254db9a0c07c12c3258db330cbcf4a204c5bdf1457452b60e96d2026958ff749e1989c4c254fe06d712c3192328db4d9a1560c14bf80313a6a8e0e5a21b1189570d6f745e9a961c5ded9e44fc6b3d315f1a431aa129f4a79d153e98c39d169e355a90b59a5322b9bdad8396ec4124c4d257355314d069076c693a37daa986bf061b8e8d223455db83c65a2ec266c8045b2f5ace474d0382551becdd28493247e29e10d65f80d6b4b6b6eba294fc90eff40daccbd2cca1eca7dc68a13186fd24307c533ac2d79081caa8bf1ada73002dfac538253b9941687d092a9c9512363ce225f7fb91c033a3a38c4e2ce91f291a954ca4c642c675f573a43e4e25e72836764dc1c398e02dd505a372d25be953e6165cfd6ec6453cecb8bd3c8775c39ef9e488f3175fcbff816a7b450c9b753d2cf2e2363944e3dd85b3352327e430d25e227d75a05a2c9a9d488b93b2685b36a760fb44178ea743df5eb149561806ed069900ee914a787755e498750e57246db6ba4c791ab757a1b0de9f476196ec4c0ab7082435caff36a5ee3e3b53a5f419fd7791daf47ff51a21f5300d666b36fd709533a9a05b3def5ee045a83ceb8914e9b6901f5888f1b746ee4b0ce4d1cc181822282ac53cc0a3afd293da2d363f4299d3e29c3b3f43924c7f954075edcacf3066ed17923b7ea748ea675de4437eb74275fe9e3ab74decc57a316e9bc85b7ea7c0db7e9bc4d84dfaef3b5dcaed3e3f4699d1ea5472ea7816c2acf6aa0e05da7d382fc16820c9fa18b3aefe0ebd050a7478ea24d2895d875eee09d4810b31d4aa79b08d67e0ea6a10fd10790549289befece4d1bfbcd113376c21cd5b99386753a41c775dec55d3edeadf31ede8bfebe3b919e3a762c361203a6905dae46434a0c01f68c8e8bd91a9d7e9d7e83a97960dc0ca9080b4d4ca533a161333486a285780f65c68d4428990aa1e134e2381edab8418e3f05910a38d83d492879cce2b1412cb14fe7fddca3732ff7f9f80082a83071e87c106ae7ebc56f37723f53b7e048a87b8310b253a9990e1989d190a15ae874e818d0a8362094ad82a1f478722a3e2ab0332090464dd3e9217a9869fd2f78b3803425761e3899b05ad8baa2be978becb9be99e73228d973f328eaeee1ae7ea8c53dd0d58771327952f26777c9c6cf3f3115cfc4d41d7a43a9345bea6c4d51f8bd921ebd69bbab774f4e655449ca99e9c0f0cde64866dbdc95c6b94b4cb54599dc00a1510f35732206f2ab4a9424153c56d246a0a0f214815194695591be475562e5d0d214071bf6956ea653d6550af81a0ecb312d1dbbcdccbb1d2a937526e371704377b32d9bb066adc33a31c7aed50587f31a70dfb891ee336fb51a39b99a24d44be16dda91cc8d0028a5d49dd292e2422197c974c698985424e58a31929c983452e640729e628ceb6f452c7102aed9752bd0258c78e704585d53449545aa5c51b0fe4cd2fa8c5e0497c0f8a15866bc3fbf711cfe85eed2c55ad0795dbdb057adc8aded4c26e3a601c3e85047da745e8bfa0b6ce1cff66b10c071985c93239d110c80563bbddf3c358b4cd63f41c67bdc3c151507ae2870022c6d2ba87d6a4f591ca46dfd7853e684ba5254371c2ee6d1544fbdd4472e3a4007c94f95d20310e119b59fe804f0744933a09ea8f8c47458cd8fe0efed79efefc0df8d79ef47f1875283f92aac5d4fc3781fc15b0bde184f4ff82cf119b57514a3572dae2113a36e6da0633486e7b8fd358627035a3142aed9841a2f4b68806e2e42c8fde82c422d97253448c78b10d26623da7c5942719ab009bd821d1e3c27c3e741ec71f29e232d7c917c43e7c97f8eca72d3406e5a1e6e3a471c8e9c2357b84a3b47ee70f3e3a45769d3b4609a160a81b35436438b04db055aeca64317a96288ed95f35439434b1e73306f0252a2ada4511595d332aaa61a784b2d45e81a6aa536ba9ab6d176fceba16b61f9764ad20e25df55166e5b3e99894fb19a8957b9d42c017f72ab99789886d344410ddb269522e68ee87d704054f31448088b16a00e345da0a52e7a9aaafa9a5f201ff474a639622f55b76941ed05f2635166620d4d49b6927c1877d142ea8287ef86647b693575d37ada07e97af2a46871a468a1343cd972870c662e9caea72978bb1b6717a0593a04ea276dfb5adf8ee0dbad585948aed7a9da47a75ea72a1fdd566073917b816b96acb7d31db61bdc01181a9e6bc34d3053f3795a166ec258138e600c8af99a642696d3727e5badc05f4f6550f72228bd0a4a5e0d358b60618b9e23d85a7aa72dd85a7a97124c6627947904dc12775173fc0afdaa0df1fb6026fa1c54986add576b555ae4c98fd19e8bb47c2852a56d3a4f2bda3ccd555acb0cd5b579952041af92441e35e1a0479e9630d65cc4b953e3d36fcc28a1dc4aa8300530de04cd19b41829a00edcd7e1cb4688b505e2ec80407df83600bd8aa07b81aa0e9e2a4279b0b34109e58552f6d3bb95cf01b3a38641470d83f41e7aaf52c320dd49bf66dbb04c6c58c6afc145e6d10a1a5fdb49ef0105f1efc6a6e7c9a79d26cd3d432bc34de769950461d66bab7b2396d7f646ce3882d602a43886f4fb1570bb5570b83570a7f5702f112c641176a037daaeb90a0aba0b22ba14e07272fbafe3d7a9ae98c7f9d8817c771632bbedb83a3207b20004ecf2bc607b9e36375fa010a3258e6052cf7481563349a05da0354c1fa6aa884cd7b288394d57f49e7ee3a5482e06d741a3043be8d07505f45c054daf81fe3602ceb510630f800dd1fb9d58bc9656d0fbe83795d58e38a21fb145af42145ba2af41c6ba4745e54915082efbe4fb71d2fa76af6dd1a5a4414197e84a2808b1e9a3df7a8d96cfa7a9dfa60fd82e1f0320b1c1aa307c39223edc14b13d180b329f1590950af7075161ef4336f85df8e5fd79a65ce5c8b34a792babd909254fd1fcf03b206521f9269088b7f42804b5eef6ba2684de0e09bda63a15795aa44e059e47b0063d2ae0347966e15a6f2ae4dc08b967f242ce32d21f80c3c700fbe3f0cc3f441ef9236aa24fd095b892eec2fa3efa63254a3b76d5224845000dbb562b013c1079a70a3711b4c711b4470519ab9904992b17647e04594771b9ef83ea2cb91fb0cb636bd60233b4aefebe0749b72c711a65b129527f9ed617b3497e989d05c073c827d314840787e822f2fb67f31265ab03b9d5b14dab6d1b99dd0f28963f69e40a7ae74b0e1f72fce726db7f6ac336b4868bd49885192e749d856ae733d0cdb328c09fcb739b5a075aad2a49ac66f3b8cd871d0063c88d42a23e0ba0290b402d4c53291c2f00c717e09c5fccc351efe0a87770d4d3ef95c6f1a083e32c708896bbc260d89ce5dd17699ea60d0f51855a40f281824ec3b436d665f36075e715f82f43cb5f01eeaf220d7c0d35edebd44cdfa04e7a31cfbc5d0ef62e077b17fdbec2be1065e523aa0e3abeb916b9c25f5ca887e8618c225427f80a9daab08461650b1aac8d4f532b82f11c6dcaf55701e541df461efa4e5e5f58650362fa2802cfaa25df8238aac242debe301ac22b23d374d5a1cacd6d9af709ba7ac8ad3d41ad436e286d4b343aa4596f4d987aac29766f8d4691017032a871d03343d74c535b9b37e89da16d3913af462c10bd04c57c17c27f0f59eb6598fa1564cd1fa0bafe1037841f3995b5b076becbeef0066df7d3f02ef5d40d1a9224fab1b2033de4c791403ca0e34512e9c798cdb69fa0a29d904b7ef6b2b5fa1e3be243086cd8bc4d431a139f6996a109b506e25f0147c929d8ea827e0ca17e02715ea525f45388f35a5e7b17724408218b59d60fd19fd85d50c8ee82fc88bb5b547be7921f106d3c77d87856e6e169aedc7e9eaecda2692f406395809f81da2514bc37a80ecc7248563a48563a48563a48563a48aa1d248f3a489ec317a1d166e922bf29b63ae0a07d4368d3d4c7a0ddfc0735a9dc327b8c0a5a6374021ed668297b28c85e94751fb570195dc3813cc46d0ee23607719b83b8cd46bc1435e4cf508e73adb1b572042b12557e428bd282f28b539fa44fd912dd89afa2ad06ab61428cefe80b472aaf3b4f1d5919cb9a9aa1f62b72f85db9a4ce0b817f319573055572252de325b49e97e6457d8383bd81ced8d81b6cd72d4771be4b6177c92fc58eb5b56c1f9e43d41ca9dc29f6cea2699f8d467920d7004d2dd02ca725bc02bd515d893efc8cd3876791041d248fd3a72d24dc8e73127e77cf6d2c6d0de5376a6d9ea0e705d2b30e80b7fa19eabc40bb5ca8061bb26ff675c91b96e6bbd95a0d7a73fa3d4d8badc588f5ae58043db39da70d6146bc8e746ea40a6ea21a8e40f1cd14e10db499375227b7529437d1105f49c7f92a4af066ba9db7d05dbcd56921a208b6b3aa4f87888e72ee769473b7537befb66bef7adc05a4e3f3382e66addc8b1571b105e4518d7013bc6cab8ea3e750ec2d5dbe13c0e552f100ba87597a43e03c4fef9650513dee4999754993bb1b4dae4764574dee5199a91e77cf34eddde20d557bd185ec0e6ad5de7ccdfa0b9afeb6b260997d2f2d531f826541bfa36ca1d8cd74fa8d8fe434db8e6b1cf10ed2f83a3851074272276de44e6ae35dd8db4507793719bc8726792f4d7137ddc6fbe91eeea10f721fddcf079576fb116c066ef5e7a13f3fd2eb1ae55c65b8f7ee539af4a2f73ea67a6c09ef071cdd3f60eb5e43d33983371712e99d4ae39ad3635b272fe0a4f5ed5e3bbc57907689366a567b7d89ba35d56bdff62ad5bc86532ef9bf0c3bc00eab77a26570eb0aa9f9e8001ecc39f8634e6d576593a354cd034aac6aeb98037799721056ec3de4aabc8e159fcfda7c26ed7bd972099966d57648fe2ece4be56c4617cb6fa3000f512d1fceeb7b963b3c97d3138aa7cc9e746e60e05e6d737fcae66edadc6b8a481999a17db3c57c0792d78d792c6b1c9635b698327b5afdaa324be0676c96b7ab720c539410b8b980ad25312ecc3c0c894768398fe665ab150efb158ec42b6c89652640dc85b23f8b96d50272d496bdb2e9c9c8931fb5b957ee2f22f518b2c7789ed4950edb4ae7da5099776d00b372c5ec39fabccd6cbffd3bdc62c4d7265cb1c3d3b822619abb65ab7e968fe38217476e4ee4b5608b6d76b7aabd5c0ec2cfab94fe02fdade2ec42013f487f83d869c4f32754f673504b03040a0000000800527d8250ea7bbc798f040000e609000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c6173738d565b6f1b4514fec6bbde75b69bbb49d224b46929e05b6a2ee19a4b73218140d2943835b4406163af926d9cdd74771d90a0129540ea033c801020242e2f252f790089b80824c45390f82ffc03049c995dbb89e3243cf8ccd93367e67cdf7c6746fef39f5f7e03f018ae6988e34213148c7333c1cd248f4da998d63083e735bcc0cd0c66b937abe2450d2770218697f838c7cd7c0c176358e0ee256e5e56b1a822c71075deb64d97e1d49ce564ed72c9cb161cdb778d829ff58a6bd98962d1353d6f9841f5364cbbc853a39b46a96c3274cd5d37368decbae1af6627ad9559db37574c97529511cbb6fc3186cb89a3773d66b6e1f6c93c833ce5140940eb9c659b17cbebcba6bb642c9728d231e7148c52de702dfe1d06657fd5f2189a2736365c87b04f6f9ab6cfa0cfdac47caa64789e49d39983607c67cdb4b34bdc9edbb798389e5d2cdbbeb56ee62dcfa22a970cd758377dd39db06dc7377ccbb169cf546382462d27bb68de285bae59a41d632ba6bf10883190481e2747ccab659f39e694f98969b479ae2aa0e6edf9e065f381a03d54f6104979b930eb64e2706114a2639488f97d6152c9b057b20bcbd7cd823f9cbccac01c2ed28129219241a234e77ca3b0366f6c08eda8c1a9f4aae1ad06824b89e42c152156e5122533fa88f94ece772d7b85215e852f760ea2b4b39673ca6ec19cb1782f6842cdf33c4d471f967474a15b470f3727d1abe332f22a5e21e9fe7f37a87855c7237854c5151d4fe16986ee7a189365ab244e3bbe6fe5bbe2f28deab88ad7b8799d006606c28b364ae43203e2ae898c37740c6384a1adfef4187a1bea1ff6391d5a3e9059f43a43e7be7312413aa6fea308379aded362c4ab514b9054c60627c330983828cd41b5c2631aaecbaff6cf11f9fd89a9c3a771869ecc38a82b2121c215a78735c2451723e94ea346f37de8a7effbe9ab44a34c633c75172c95de412495d981941adc81fca358758a6c17a2646f50a68b267868818f4e94719aa2a9603d06f000203c5e97098f578e088fd796708efc4e89261f2467bf7d080f93e590b234f2e5d1d44f88fc50c3a088e03ba2a61e248435191248868bc7289b575404977b0c34117d8fd6dc143b74055935d44a889a2e444320523d90f71b0249370622d503f980d67c7808909e104806830d80c8f5406e3704725e2c3a0044ae07f211adf9f810205c335e98ae7cb8d75f9423d1782b95fe1e51793bbd8b965405d134fdee202a6da77f8732cf75dba58ea22143bf0ad4afd0ba45375ec4298b9f679020514cda9b205513e45db4f381627205b12db472ef0fa8f21664699b404882462f01053e818a4fe9e43e23989f13e52ff026be14b40602c0355ab7e89fc6e3824e1143148be009d1a0badac2fe46bf8a2715d6adb0b836cea9d32b1752ff393cc6e9805d734a306be26046da4ef7ad069c78580ac36f55e37210271a5a10efbb07bf43dc9eafe9367d43cdf32da6f0dd1e35a643d89d04fa193c4b5038d84128ede3ec5fbae511824b30c947e84718cbefffa445f49c862caed1b6bc51867ec5892b77a1773457484141a5b5a32df025eeb7073e616e6dbb594147059df58d77674fe30d8540231815760c67c3a746c173f42c35fd07504b03040a0000000800527d8250826261e37e040000ca09000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c6173738d56df531b5514fe6e76b31bb60be19740015b5aab8624b06ad156c36f84160da5051a0bd5da25d9c296b08bbb1b5e1c1ffa6ff8aebcf0a033923a3ae3f88433fe2ffe078e7aeedd854212c0879c7bf6dc73eef9cef9cebd933ffff9e53700efe189864e4c3441c12417535c4c73db8c8a590d73b8a3e12e177398e7dabc8a4f345cc244029ff235cfc54202f71258e4ea7d2e1ea85852b1cc203ff3dc6d862b79db359c4ad9378aae1378663130fcd29631552a7996efe7186281cb10df35cb158ba12bffdcdc358d6d33d834a6ed8d7927b0362c8fbc9451dbb183718687a9f30fbc60b7e1f18305823be3960840326f3bd6bdcaf6bae5ad98eb65b2b4e7dda2592e989ecdbf23a31c6cda3e43f38a673afe33cb9bddb59c80419f771ccb9b299bbe6fd176b61e4ce06e598eb1c2e58d53c154e3f5a58a13d8db56c1f66dca72dff4cc6d2bb0bc29c7710333b05d87ce4c372ed03cf63196acaf2ab66795e84475c30ae6040d03a9c18b8850fd23e76b17f498f72b4e47af70e6fc704dd0772124b187729d4163c23ff6ba9c3a9b0c854a30cb54ed6b9153d974368cc5f5e75631c80dae3130971353b72588318988e6e5c02c6e2d983b822f1a674abd69fa9b21c9526a709e92502d95323933fa4804ee72e0d9ce0643e7117c717268a593b565b7e215ad399bf3af090687b99b8e3eace8e842b78e1e2e2ea357c74314547c4674fdff0950f148c73b7857c5aa8e5bb8cdd05d0b63ba62974b96c7d0712af26b7ed5c674ace131179f132bd981c01da3b2b203e26689cd2f74e430cad05adb3786de867c47534ded2a84048bc9a6eca73a248cd4a0fef34a6db47d62a4a8eb8d8681483277762ca7c43094aa27a59ea7a841b91affa3c939c7bf3f3573f636aed1d3d8099a47488871aee9018d71bac54a8cd3aad17e1ffae9fb75fa2ad32ad3da997e0996ce1c2096ce1e404a0f1d40fe51445d21d98538c92c790ea109c36881810e1a82ab644d87f118c01b80d0785e26349e3926349e5bc20dd293120986374fc8b7f036490ec7a09587c6d33f21f6c3717e45186f8a7c7ae810e5634861300a1e276f9e4d1175bc42af09eb2d8ab92d4ee80abd8e112b1162ba060d8148b540720d81641a03916a814c50cce419407a2220596a743d10b916c84c4320c322a80e885c0be40ec5dc3d0308e78b27a68b1e9df517f970ea5ea433df232eef670ed192ae229ea1df77884bfb99dfa12c70de0e699a68c9d2af0af55b24f7a065859dbc783f4307896cd24907e9c8413e441b5fc8265791d843926b7f4095f7204bfb04421265f41250200f150bd4b94582f9804a5ec2975816650d84808fcb7a41ff266e8a724a18215b0cef8be1d4d516f637fa557ca0b06e85756a93bc747adba2d27f8eda381b56d79c1695357130a3ad57fb36c39ab8598acc4f8fec7268a732b4d0def70a7ebbb8398fe826add2f0ac119b8f4fb0311bc1ee20d01fe22382c2c10e41699b64ffd20d8f115c82493a223dc658e1f42705d1531a55f1848ee58332f22b2eadbe84dede5c25064529c9f6d65097b8de16ea8439d9fa4d15ed5574d40eded313833712018d614cc8715c8f9e19051fd393d4f41f504b03040a0000000000527d82500000000000000000000000000f0000004d4554412d494e462f6d6176656e2f504b03040a0000000000527d8250000000000000000000000000200000004d4554412d494e462f6d6176656e2f696f2e6e756c732e636f6e74726163742f504b03040a0000000000527d8250000000000000000000000000330000004d4554412d494e462f6d6176656e2f696f2e6e756c732e636f6e74726163742f63726f73732d6c6f636b65642d6e726332302f504b03040a0000000800877c82502e35654a77020000d60600003a0000004d4554412d494e462f6d6176656e2f696f2e6e756c732e636f6e74726163742f63726f73732d6c6f636b65642d6e726332302f706f6d2e786d6ca5545d6fda30147d6e7e4586f66a1be8b42194a642d5a64da26b25d8b457cf318921b123db01aaa9ff7d3776424281f1b0e4c5f7dc0f9f7b7cede87e5fe4e1966b2394bc1b8cf070701f0751a9d59a331b82539abb41666d3925a4a05b2e312d29cb38563a25cf4f8fe4031e425210b69f4b99ee8d38a4ed763bbcbb7509e3e170447e3dce1750a1a0484863a964bc9f6ec4d438ef5c316a1dababdb77e9f05d8ade9bc483c8e560b007b1cb8c0a95f0fca7172176de881c61417013a55a55e5b724160acb2a3798296935653622adc717a3da8a15e00030ad8c41b9621b9e20a9d918eaf6dc3ebe113f06edd1e2fbec79f1f569199116f5319216fc6c35e7a8d925bce432e192096ee2e0a607bcd4e6297d936c7acceb881e3370a2b63fb42d8e59d7b12dbdf96cf979d1a70b3e72bcf55526dbf165226ab542a600e0c08696e27fe8f44ca71420bf2b91bb3a51995729cca4afe90db7ee38c320b533e507ac4939eee0a8053f734c15a5c8b9463ee1a485ae875bfca99ebf5e0be084f65722adb4bb111ebb898caa34e330381f23d2ac1b8fa53ae5d67b9a75e381be5522641aff587e4193881c6cbf0f39dd28223d252eab026578462b830bb556ff9083ef39435e93ab528c30fc6fa5a80b54353b73e8a9451a005866d4f018ce6943530e0d38b375a68ae66d6e63c66bbaa540ba5eb661e428eeec09005c50211f726accc9bb801f9ac5ac2c73e1df3278560ef18712703e55c1a5eda00e8bdfff69de62ecc614274283a1f4cb6bad5b13d4e5bd4328345c836261a9b40d113a577434194e4617f37719b71914b02acc6925591682d9563d5fd0ea8a9fa9d7419d8e6726ac46df9c610f302753d8ae8dbbcfcdf50d00f54ac5c15f504b03040a0000000800527d82502e8227b67a0000007e000000410000004d4554412d494e462f6d6176656e2f696f2e6e756c732e636f6e74726163742f63726f73732d6c6f636b65642d6e726332302f706f6d2e70726f706572746965730dccbd0ac3201440e1dda7b8905931b65902194287b6437f405fc0aa6da4c11bae1ae8dbd7edc007a73b8714c896e0e1f5839bdd43629d592acc1b8154d00fe3518d87014eda80924ab23d508e98a65e48aeeff3535f1e867d08eb76f5534491ea9a85c354c8bac22c95f86ed1cc11e6cc5774dfe07922d75e7f504b010214030a0000000000527d8250000000000000000000000000090000000000000000001000ed41000000004d4554412d494e462f504b010214030a0000000800517d825085177e5f7200000087000000140000000000000000000000a481270000004d4554412d494e462f4d414e49464553542e4d46504b010214030a0000000000527d8250000000000000000000000000030000000000000000001000ed41cb000000696f2f504b010214030a0000000000527d8250000000000000000000000000080000000000000000001000ed41ec000000696f2f6e756c732f504b010214030a0000000000527d8250000000000000000000000000110000000000000000001000ed4112010000696f2f6e756c732f636f6e74726163742f504b010214030a0000000000527d8250000000000000000000000000170000000000000000001000ed4141010000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b010214030a0000000800527d82501154e3411a060000970d0000240000000000000000000000a48176010000696f2f6e756c732f636f6e74726163742f746f6b656e2f4f776e61626c652e636c617373504b010214030a0000000800527d8250d416394ff80300008d0800003e0000000000000000000000a481d2070000696f2f6e756c732f636f6e74726163742f746f6b656e2f4f776e61626c65244f776e6572736869705472616e736665727265644576656e742e636c617373504b010214030a0000000800527d82505cfe886644030000f70600003c0000000000000000000000a481260c0000696f2f6e756c732f636f6e74726163742f746f6b656e2f4f776e61626c65244f776e65727368697052656e6f756e6365644576656e742e636c617373504b010214030a0000000800527d825068fe421cca0100005e040000220000000000000000000000a481c40f0000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373504b010214030a0000000800527d8250db5fc78805120000352a00002d0000000000000000000000a481ce110000696f2f6e756c732f636f6e74726163742f746f6b656e2f43726f73734c6f636b6564546f6b656e2e636c617373504b010214030a0000000800527d8250ea7bbc798f040000e6090000300000000000000000000000a4811e240000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c617373504b010214030a0000000800527d8250826261e37e040000ca090000300000000000000000000000a481fb280000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c617373504b010214030a0000000000527d82500000000000000000000000000f0000000000000000001000ffffc72d00004d4554412d494e462f6d6176656e2f504b010214030a0000000000527d8250000000000000000000000000200000000000000000001000fffff42d00004d4554412d494e462f6d6176656e2f696f2e6e756c732e636f6e74726163742f504b010214030a0000000000527d8250000000000000000000000000330000000000000000001000ffff322e00004d4554412d494e462f6d6176656e2f696f2e6e756c732e636f6e74726163742f63726f73732d6c6f636b65642d6e726332302f504b010214030a0000000800877c82502e35654a77020000d60600003a0000000000000000000000a481832e00004d4554412d494e462f6d6176656e2f696f2e6e756c732e636f6e74726163742f63726f73732d6c6f636b65642d6e726332302f706f6d2e786d6c504b010214030a0000000800527d82502e8227b67a0000007e000000410000000000000000000000a481523100004d4554412d494e462f6d6176656e2f696f2e6e756c732e636f6e74726163742f63726f73732d6c6f636b65642d6e726332302f706f6d2e70726f70657274696573504b05060000000012001200b60500002b3200000000
1

在NULS轻钱包上使用上面的HEX码创建一个NRC20 token合约:

1

合约发布成功之后,token创建成功,接下来需要把token注册为跨链资产。

# 注册跨链资产

跨链token发布之后,进入主网CLI命令行,查询该token在链上的资产ID:

  • 命令:getContractAsset <contractAddress>

    参数 说明
    contractAddress 跨链token合约地址
nuls>>> getContractAsset tNULSeBaN1ZqpJMewjrZWPh7sFXq7KzgbJxBxW
{
  "assetSymbol" : "TEST",
  "assetId" : 56,
  "assetOwnerAddress" : "tNULSeBaN1ZqpJMewjrZWPh7sFXq7KzgbJxBxW",
  "assetName" : "test",
  "initNumber" : 10000000000000000,
  "assetType" : 2,
  "decimalPlace" : 8
}
1
2
3
4
5
6
7
8
9
10

接下来就需要在主网上把token注册为跨链资产:

  • 命令:addcrosslocalasset <address><assetId>

    参数 说明
    <address> 注册跨链资产地址,需要导入节点钱包且余额足够支付交易手续费
    <assetId> NRC20 token在主网的资产ID
nuls>>> addcrosslocalasset tNULSeBaMqpRQkHCs5ur3ck4LXEZB4qmmkPNo3 56
Please enter the password.
Enter your password:********
6d7c81a251c2dd55b90a859412e069c4bd58eaa43ed3f5d0f46ceefde879fe29
1
2
3
4

查询一下该跨链资产:

  • 命令:crossassetinfo <chainId><assetId>

    参数 说明
    <chainId> 跨链token链ID(主网:1,测试网:2)
    <assetId> 前面查询的token资产ID
nuls>>> crossassetinfo 2 56
{
  "chainId" : 2,
  "assetId" : 56,
  "symbol" : "TEST",
  "assetName" : "test",
  "depositNuls" : "100000000000",
  "destroyNuls" : "20000000000",
  "initNumber" : "10000000000000000000",
  "decimalPlaces" : 8,
  "enable" : true,
  "createTime" : 1599198332,
  "address" : "tNULSeBaMqpRQkHCs5ur3ck4LXEZB4qmmkPNo3",
  "txHash" : "5bbc2a038586151a6b9c5afeefb546ecd5481e25741b97f07c3d0fb30382eb6a"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

# token跨链

# 主网到平行链

NRC20 token从主网到平行链进行跨链时,直接在NULS网页钱包转账页面进行转账,收款地址填平行链接收地址,资产类型选择跨链Token

2

交易确认之后,通过平行链钱包查询该资产:

  • 命令:getbalance <address><chainId><assetId>

    参数 说明
    <address> 平行链接收token地址
    [chainId] token的链ID(默认为本链ID)
    [assetId] token的资产ID(默认1)
nuls>>> getbalance TNVTdTSPTXQudD2FBSefpQRkXTyhhtSjyEVAF 2 56
{
  "available" : 1000000,
  "total" : 1000000,
  "freeze" : 0
}
1
2
3
4
5
6

或者直接在网页钱包中查看跨链过来的资产:

7

这就完成了NRC20 token从主网到平行链的跨链。

# 平行链到NULS主网/平行链

当NRC20 token跨链到了平行链之后,就变成了一般的跨链资产,那么发起跨链交易如下:

  • 命令:createcrosstx <formAddress><toAddress><chainId><assetId><amount>[remark]

    参数 说明
    <formAddress> 发出地址,改地址需要拥有一定数量平行链资产和NULS作为交易发起手续费,跨链token
    <toAddress> 主网/其他平行链接收地址
    <chainId> 跨链资产链ID
    <assetId> 跨链资产资产ID
    <amount> 资产数量
    [remark] 备注
nerve>>> createcrosstx TNVTdTSPTXQudD2FBSefpQRkXTyhhtSjyEVAF tNULSeBaMuU6sq72mptyghDXDWQXKJ5QUaWhGj 2 56 2000
Please enter the password.
Enter your password:**********
55ea878ef4e54af445c70ba121b8ef42593197e3f1b72b2eee039043b985bf15
1
2
3
4

如果接受跨链地址为主网,则在钱包显示为合约资产:

3

如果接收地址为其他平行链地址,则查询方式与发出平行链一致(略)。

# 注意

跨链过程中交易需要经过多个区块的确认,所以需要等一定时间才能查询到跨链资产。

# 在NerveDEX上创建NRC20 token交易对

首先,进入NerveDEX (opens new window),选择目录中工具下面的NervePad点击进入:

4

进入NervePad之后,选择创建交易对页签,进入交易对创建页面,并且选择NRC20token为交易资产,完善其他信息发起创建交易对交易(创建交易对的地址需要拥有大于200NVT资产):

5

交易对创建成功之后,进入交易中心的OpenList可以查看创建成功的交易对:

6

至此,我们成功的创建了交易对,开始交易吧!