diff --git a/cadence/args/bridged-nft-code-chunks-args-previewnet.json b/cadence/args/bridged-nft-code-chunks-args-previewnet.json deleted file mode 100644 index 01852cc6..00000000 --- a/cadence/args/bridged-nft-code-chunks-args-previewnet.json +++ /dev/null @@ -1,119 +0,0 @@ -[ - { - "type": "String", - "value": "bridgedNFT" - }, - { - "type": "Array", - "value": [ - { - "type": "String", - "value": "696d706f7274204e6f6e46756e6769626c65546f6b656e2066726f6d203078623637363362343339396138383863380a696d706f7274204d6574616461746156696577732066726f6d203078623637363362343339396138383863380a696d706f727420566965775265736f6c7665722066726f6d203078623637363362343339396138383863380a696d706f72742046756e6769626c65546f6b656e2066726f6d203078613032323565373030306163383261390a696d706f727420466c6f77546f6b656e2066726f6d203078343434356537616431313536383237360a0a696d706f72742045564d2066726f6d203078623637363362343339396138383863380a0a696d706f7274204943726f7373564d2066726f6d203078373739326366623735643864666464380a696d706f7274204943726f7373564d41737365742066726f6d203078373739326366623735643864666464380a696d706f7274204945564d4272696467654e46544d696e7465722066726f6d203078373739326366623735643864666464380a696d706f727420466c6f7745564d4272696467654e4654457363726f772066726f6d203078373739326366623735643864666464380a696d706f727420466c6f7745564d427269646765436f6e6669672066726f6d203078373739326366623735643864666464380a696d706f727420466c6f7745564d4272696467655574696c732066726f6d203078373739326366623735643864666464380a696d706f727420466c6f7745564d4272696467652066726f6d203078373739326366623735643864666464380a696d706f72742043726f7373564d4e46542066726f6d203078373739326366623735643864666464380a696d706f727420466c6f7745564d4272696467655265736f6c7665722066726f6d203078373739326366623735643864666464380a0a2f2f2f205468697320636f6e747261637420697320612074656d706c617465207573656420627920466c6f7745564d42726964676520746f20646566696e652045564d2d6e6174697665204e46547320627269646765642066726f6d20466c6f772045564d20746f20466c6f772e0a2f2f2f2055706f6e206465706c6f796d656e74206f66207468697320636f6e74726163742c2074686520636f6e7472616374206e616d65206973206465726976656420617320612066756e6374696f6e206f6620746865206173736574207479706520286865726520616e2045524337323120616b610a2f2f2f20616e204e46542920616e642074686520636f6e747261637427732045564d20616464726573732e20546865206465726976656420636f6e7472616374206e616d65206973207468656e206a6f696e65642077697468207468697320636f6e7472616374277320636f64652c0a2f2f2f207072657061726564206173206368756e6b7320696e20466c6f7745564d42726964676554656d706c61746573206265666f7265206265696e67206465706c6f79656420746f2074686520466c6f772045564d20427269646765206163636f756e742e0a2f2f2f0a2f2f2f204f6e206272696467696e672c2074686520455243373231206973207472616e7366657272656420746f2074686520627269646765277320436164656e63654f776e65644163636f756e742045564d206164647265737320616e642061206e6577204e4654206973206d696e7465642066726f6d0a2f2f2f207468697320636f6e747261637420746f20746865206272696467696e672063616c6c65722e204f6e2072657475726e20746f20466c6f772045564d2c2074686520726576657273652070726f6365737320697320666f6c6c6f776564202d2074686520746f6b656e206973206c6f636b65640a2f2f2f20696e204e465420657363726f7720616e642074686520455243373231206973207472616e7366657272656420746f2074686520646566696e656420726563697069656e742e20496e2074686973207761792c2074686520436164656e636520746f6b656e206163747320617320610a2f2f2f20726570726573656e746174696f6e206f6620626f7468207468652045564d204e465420616e642074687573206f776e6572736869702072696768747320746f2069742075706f6e206272696467696e67206261636b20746f20466c6f772045564d2e0a2f2f2f0a2f2f2f20546f20627269646765206265747765656e20564d732c20612063616c6c65722063616e20656974686572207573652074686520696e74657266616365206578706f736564206f6e20436164656e63654f776e65644163636f756e74206f722075736520466c6f7745564d4272696467650a2f2f2f207075626c696320636f6e7472616374206d6574686f64732e0a2f2f2f0a61636365737328616c6c2920636f6e747261637420" - }, - { - "type": "String", - "value": "203a204943726f7373564d2c204943726f7373564d41737365742c204945564d4272696467654e46544d696e7465722c204e6f6e46756e6769626c65546f6b656e207b0a0a202020202f2f2f20506f696e74657220746f2074686520466163746f7279206465706c6f79656420536f6c696469747920636f6e7472616374206164647265737320646566696e696e672074686520627269646765642061737365740a2020202061636365737328616c6c29206c65742065766d4e4654436f6e7472616374416464726573733a2045564d2e45564d416464726573730a202020202f2f2f204e616d65206f6620746865204e465420636f6c6c656374696f6e20646566696e656420696e2074686520636f72726573706f6e64696e672045524337323120636f6e74726163740a2020202061636365737328616c6c29206c6574206e616d653a20537472696e670a202020202f2f2f2053796d626f6c206f6620746865204e465420636f6c6c656374696f6e20646566696e656420696e2074686520636f72726573706f6e64696e672045524337323120636f6e74726163740a2020202061636365737328616c6c29206c65742073796d626f6c3a20537472696e670a202020202f2f2f20555249206f662074686520636f6e74726163742c20696620617661696c61626c6520617320612076617220696e2063617365207468652062726964676520656e61626c65732063726f73732d564d204d657461646174612073796e63696e6720696e20746865206675747572650a2020202061636365737328616c6c292076617220636f6e74726163745552493a20537472696e673f0a202020202f2f2f2052657461696e206120436f6c6c656374696f6e20746f207265666572656e6365207768656e207265736f6c76696e6720436f6c6c656374696f6e204d657461646174610a202020206163636573732873656c6629206c657420636f6c6c656374696f6e3a2040436f6c6c656374696f6e0a202020202f2f2f204d617070696e67206f6620746f6b656e205552497320696e6465786564206f6e207468656972204552433732312049442e205468697320776f756c64206e6f74206e6f726d616c6c792062652072657461696e65642077697468696e206120436164656e6365204e46540a202020202f2f2f20636f6e74726163742c206275742073696e6365204e4654206d65746164617461206d6179206265207570646174656420696e2045564d2c20697427732072657461696e6564206865726520736f207468617420746865206272696467652063616e207570646174650a202020202f2f2f20697420616761696e73742074686520736f757263652045524337323120636f6e7472616374207768696368206973207472656174656420617320746865204e4654277320736f75726365206f662074727574682e0a2020202061636365737328616c6c29206c657420746f6b656e555249733a207b55496e743235363a20537472696e677d0a0a202020202f2f2f20546865204e4654207265736f7572636520726570726573656e74696e672074686520627269646765642045524337323120746f6b656e0a202020202f2f2f0a2020202061636365737328616c6c29207265736f75726365204e4654203a204943726f7373564d41737365742e4173736574496e666f2c2043726f7373564d4e46542e45564d4e4654207b0a20202020202020202f2f2f2054686520436164656e6365204944206f6620746865204e46540a202020202020202061636365737328616c6c29206c65742069643a2055496e7436340a20202020202020202f2f2f2054686520455243373231204944206f6620746865204e46540a202020202020202061636365737328616c6c29206c65742065766d49443a2055496e743235360a20202020202020202f2f2f204164646974696f6e616c206f6e636861696e206d657461646174610a202020202020202061636365737328616c6c29206c6574206d657461646174613a207b537472696e673a20416e795374727563747d0a0a2020202020202020696e6974280a20202020202020202020202065766d49443a2055496e743235362c0a2020202020202020202020206d657461646174613a207b537472696e673a20416e795374727563747d0a202020202020202029207b0a20202020202020202020202073656c662e6964203d2073656c662e757569640a20202020202020202020202073656c662e65766d4944203d2065766d49440a20202020202020202020202073656c662e6d65746164617461203d206d657461646174610a20202020202020207d0a0a20202020202020202f2f2f2052657475726e7320746865206d65746164617461207669657720747970657320737570706f727465642062792074686973204e46540a202020202020202061636365737328616c6c2920766965772066756e20676574566965777328293a205b547970655d207b0a20202020202020202020202072657475726e205b0a20202020202020202020202020202020547970653c4d6574616461746156696577732e446973706c61793e28292c0a20202020202020202020202020202020547970653c4d6574616461746156696577732e53657269616c3e28292c0a20202020202020202020202020202020547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446174613e28292c0a20202020202020202020202020202020547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446973706c61793e28292c0a20202020202020202020202020202020547970653c4d6574616461746156696577732e45564d427269646765644d657461646174613e28290a2020202020202020202020205d0a20202020202020207d0a0a202020202020202061636365737328616c6c2920766965772066756e206765744e616d6528293a20537472696e67207b0a20202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e6e616d650a20202020202020207d0a0a202020202020202061636365737328616c6c2920766965772066756e2067657453796d626f6c28293a20537472696e67207b0a20202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e73796d626f6c0a20202020202020207d0a0a202020202020202061636365737328616c6c2920766965772066756e20746f6b656e55524928293a20537472696e67207b0a20202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e746f6b656e555249735b73656c662e65766d49445d203f3f2022220a20202020202020207d0a0a20202020202020202f2f2f205265736f6c7665732061206d65746164617461207669657720666f722074686973204e46540a202020202020202061636365737328616c6c292066756e207265736f6c766556696577285f20766965773a2054797065293a20416e795374727563743f207b0a2020202020202020202020207377697463682076696577207b0a202020202020202020202020202020206361736520547970653c4d6574616461746156696577732e446973706c61793e28293a0a20202020202020202020202020202020202020206c657420636f6e7472616374526566203d2026" - }, - { - "type": "String", - "value": "20617320267b4943726f7373564d41737365747d0a202020202020202020202020202020202020202072657475726e20466c6f7745564d4272696467655265736f6c7665722e7265736f6c766542726964676564566965772862726964676564436f6e74726163743a2073656c665265662c20766965773a20547970653c4d6574616461746156696577732e446973706c61793e2829290a202020202020202020202020202020206361736520547970653c4d6574616461746156696577732e53657269616c3e28293a0a202020202020202020202020202020202020202072657475726e204d6574616461746156696577732e53657269616c280a20202020202020202020202020202020202020202020202073656c662e69640a2020202020202020202020202020202020202020290a202020202020202020202020202020206361736520547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446174613e28293a0a202020202020202020202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e7265736f6c7665436f6e747261637456696577280a2020202020202020202020202020202020202020202020207265736f75726365547970653a2073656c662e6765745479706528292c0a20202020202020202020202020202020202020202020202076696577547970653a20547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446174613e28290a2020202020202020202020202020202020202020290a202020202020202020202020202020206361736520547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446973706c61793e28293a0a202020202020202020202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e7265736f6c7665436f6e747261637456696577280a2020202020202020202020202020202020202020202020207265736f75726365547970653a2073656c662e6765745479706528292c0a20202020202020202020202020202020202020202020202076696577547970653a20547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446973706c61793e28290a2020202020202020202020202020202020202020290a202020202020202020202020202020206361736520547970653c4d6574616461746156696577732e45564d427269646765644d657461646174613e28293a0a202020202020202020202020202020202020202072657475726e204d6574616461746156696577732e45564d427269646765644d65746164617461280a2020202020202020202020202020202020202020202020206e616d653a2073656c662e6765744e616d6528292c0a20202020202020202020202020202020202020202020202073796d626f6c3a2073656c662e67657453796d626f6c28292c0a2020202020202020202020202020202020202020202020207572693a204d6574616461746156696577732e55524928626173655552493a206e696c2c2076616c75653a2073656c662e746f6b656e5552492829290a2020202020202020202020202020202020202020290a2020202020202020202020207d0a20202020202020202020202072657475726e206e696c0a20202020202020207d0a0a20202020202020202f2f2f207075626c69632066756e6374696f6e207468617420616e796f6e652063616e2063616c6c20746f206372656174652061206e657720656d70747920636f6c6c656374696f6e0a202020202020202061636365737328616c6c292066756e20637265617465456d707479436f6c6c656374696f6e28293a20407b4e6f6e46756e6769626c65546f6b656e2e436f6c6c656374696f6e7d207b0a20202020202020202020202072657475726e203c2d20" - }, - { - "type": "String", - "value": "2e637265617465456d707479436f6c6c656374696f6e286e6674547970653a2073656c662e676574547970652829290a20202020202020207d0a0a20202020202020202f2a202d2d2d2043726f7373564d4e465420636f6e666f726d616e6365202d2d2d202a2f0a20202020202020202f2f0a20202020202020202f2f2f2052657475726e73207468652045564d20636f6e74726163742061646472657373206f6620746865204e46540a202020202020202061636365737328616c6c2920766965772066756e2067657445564d436f6e74726163744164647265737328293a2045564d2e45564d41646472657373207b0a20202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e67657445564d436f6e74726163744164647265737328290a20202020202020207d0a202020207d0a0a202020202f2f2f2054686973207265736f7572636520686f6c6473206173736f636961746564204e4654732c20616e642073657276657320717565726965732061626f75742073746f726564204e4654730a2020202061636365737328616c6c29207265736f7572636520436f6c6c656374696f6e203a2043726f7373564d4e46542e45564d4e4654436f6c6c656374696f6e207b0a20202020202020202f2f2f2064696374696f6e617279206f66204e465420636f6e666f726d696e6720746f6b656e7320696e6465786564206f6e2074686569722049440a202020202020202061636365737328616c6c2920766172206f776e65644e4654733a20407b55496e7436343a207b4e6f6e46756e6769626c65546f6b656e2e4e46547d7d0a20202020202020202f2f2f204d617070696e67206f662045564d2049447320746f20466c6f77204e4654204944730a202020202020202061636365737328636f6e747261637429206c65742065766d4944546f466c6f7749443a207b55496e743235363a2055496e7436347d0a0a202020202020202061636365737328616c6c29207661722073746f72616765506174683a2053746f72616765506174680a202020202020202061636365737328616c6c2920766172207075626c6963506174683a205075626c6963506174680a0a2020202020202020696e6974202829207b0a20202020202020202020202073656c662e6f776e65644e465473203c2d207b7d0a20202020202020202020202073656c662e65766d4944546f466c6f774944203d207b7d0a2020202020202020202020206c657420636f6c6c656374696f6e44617461203d20" - }, - { - "type": "String", - "value": "2e7265736f6c7665436f6e747261637456696577280a20202020202020202020202020202020202020207265736f75726365547970653a20547970653c40" - }, - { - "type": "String", - "value": "2e4e46543e28292c0a202020202020202020202020202020202020202076696577547970653a20547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446174613e28290a202020202020202020202020202020202920617321204d6574616461746156696577732e4e4654436f6c6c656374696f6e446174613f0a202020202020202020202020202020203f3f2070616e69632822436f756c64206e6f74207265736f6c76652074686520636f6c6c656374696f6e2064617461207669657720666f7220746865204e465420636f6c6c656374696f6e22290a20202020202020202020202073656c662e73746f7261676550617468203d20636f6c6c656374696f6e446174612e73746f72616765506174680a20202020202020202020202073656c662e7075626c696350617468203d20636f6c6c656374696f6e446174612e7075626c6963506174680a20202020202020207d0a0a202020202020202061636365737328616c6c2920766965772066756e206765744e616d6528293a20537472696e67207b0a20202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e6e616d650a20202020202020207d0a0a202020202020202061636365737328616c6c2920766965772066756e2067657453796d626f6c28293a20537472696e67207b0a20202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e73796d626f6c0a20202020202020207d0a0a20202020202020202f2f2f2052657475726e732061206c697374206f66204e46542074797065732074686174207468697320726563656976657220616363657074730a202020202020202061636365737328616c6c2920766965772066756e20676574537570706f727465644e4654547970657328293a207b547970653a20426f6f6c7d207b0a20202020202020202020202072657475726e207b20547970653c40" - }, - { - "type": "String", - "value": "2e4e46543e28293a2074727565207d0a20202020202020207d0a0a20202020202020202f2f2f2052657475726e732077686574686572206f72206e6f742074686520676976656e20747970652069732061636365707465642062792074686520636f6c6c656374696f6e0a20202020202020202f2f2f204120636f6c6c656374696f6e20746861742063616e2061636365707420616e7920747970652073686f756c64206a7573742072657475726e20747275652062792064656661756c740a202020202020202061636365737328616c6c2920766965772066756e206973537570706f727465644e46545479706528747970653a2054797065293a20426f6f6c207b0a202020202020202020202072657475726e2074797065203d3d20547970653c40" - }, - { - "type": "String", - "value": "2e4e46543e28290a20202020202020207d0a0a20202020202020202f2f2f2052656d6f76657320616e204e46542066726f6d2074686520636f6c6c656374696f6e20616e64206d6f76657320697420746f207468652063616c6c65720a2020202020202020616363657373284e6f6e46756e6769626c65546f6b656e2e5769746864726177292066756e20776974686472617728776974686472617749443a2055496e743634293a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d207b0a2020202020202020202020206c657420746f6b656e203c2d2073656c662e6f776e65644e4654732e72656d6f7665286b65793a2077697468647261774944290a202020202020202020202020202020203f3f2070616e69632822436f756c64206e6f7420776974686472617720616e204e46542077697468207468652070726f76696465642049442066726f6d2074686520636f6c6c656374696f6e22290a0a20202020202020202020202072657475726e203c2d746f6b656e0a20202020202020207d0a0a20202020202020202f2f2f2057697468647261777320616e204e46542066726f6d2074686520636f6c6c656374696f6e206279206974732045564d2049440a2020202020202020616363657373284e6f6e46756e6769626c65546f6b656e2e5769746864726177292066756e207769746864726177427945564d4944285f2069643a2055496e74323536293a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d207b0a20202020202020202020202072657475726e203c2d2073656c662e776974686472617728776974686472617749443a200a2020202020202020202020202020202073656c662e676574436164656e636549442866726f6d3a20696429203f3f2070616e69632822436f756c64206e6f7420776974686472617720616e204e46542077697468207468652070726f76696465642045564d2049442066726f6d2074686520636f6c6c656374696f6e22290a202020202020202020202020290a20202020202020207d0a0a20202020202020202f2f2f205474616b65732061204e465420616e64206164647320697420746f2074686520636f6c6c656374696f6e732064696374696f6e61727920616e6420616464732074686520494420746f207468652065766d4944546f466c6f774944206d617070696e670a202020202020202061636365737328616c6c292066756e206465706f73697428746f6b656e3a20407b4e6f6e46756e6769626c65546f6b656e2e4e46547d29207b0a2020202020202020202020206c657420746f6b656e203c2d20746f6b656e206173212040" - }, - { - "type": "String", - "value": "2e4e46540a0a2020202020202020202020202f2f2061646420746865206e657720746f6b656e20746f207468652064696374696f6e6172792077686963682072656d6f76657320746865206f6c64206f6e650a20202020202020202020202073656c662e65766d4944546f466c6f7749445b746f6b656e2e65766d49445d203d20746f6b656e2e69640a2020202020202020202020206c6574206f6c64546f6b656e203c2d2073656c662e6f776e65644e4654735b746f6b656e2e69645d203c2d20746f6b656e0a0a20202020202020202020202064657374726f79206f6c64546f6b656e0a20202020202020207d0a0a20202020202020202f2f2f2052657475726e7320616e206172726179206f66207468652049447320746861742061726520696e2074686520636f6c6c656374696f6e0a202020202020202061636365737328616c6c2920766965772066756e2067657449447328293a205b55496e7436345d207b0a20202020202020202020202072657475726e2073656c662e6f776e65644e4654732e6b6579730a20202020202020207d0a0a20202020202020202f2f2f2052657475726e7320616e206172726179206f66207468652045564d2049447320746861742061726520696e2074686520636f6c6c656374696f6e0a202020202020202061636365737328616c6c2920766965772066756e2067657445564d49447328293a205b55496e743235365d207b0a20202020202020202020202072657475726e2073656c662e65766d4944546f466c6f7749442e6b6579730a20202020202020207d0a0a20202020202020202f2f2f2052657475726e732074686520436164656e6365204e46542e696420666f722074686520676976656e2045564d204e46542049442069662069742065786973747320696e2074686520636f6c6c656374696f6e0a202020202020202061636365737328616c6c2920766965772066756e20676574436164656e636549442866726f6d2065766d49443a2055496e74323536293a2055496e7436343f207b0a20202020202020202020202069662073656c662e65766d4944546f466c6f7749445b65766d49445d20213d206e696c207b0a2020202020202020202020202020202072657475726e2073656c662e65766d4944546f466c6f7749445b65766d49445d0a2020202020202020202020207d20656c73652069662065766d4944203c2055496e743235362855496e7436342e6d6178292026262073656c662e626f72726f774e46542855496e7436342865766d4944292920213d206e696c207b0a2020202020202020202020202020202072657475726e2055496e7436342865766d4944290a2020202020202020202020207d20656c7365207b0a2020202020202020202020202020202072657475726e206e696c0a2020202020202020202020207d0a20202020202020207d0a0a20202020202020202f2f2f2052657475726e73207468652045564d204e4654204944206173736f63696174656420776974682074686520436164656e6365204e46542049442e2054686520676f616c20697320746f20726574726965766520746865204552433732312049442076616c75652e0a20202020202020202f2f2f20417320666172206173207468652062726964676520697320636f6e6365726e65642c20616e2045524337323120646566696e6564206279207468652062726964676520697320746865204e46542773204944206174207468652074696d65206f66206272696467696e670a20202020202020202f2f2f206f72207468652076616c7565206f6620746865204e46542e65766d494420696620697420696d706c656d656e7473207468652043726f7373564d4e46542e45564d4e465420696e74657266616365207768656e20627269646765642e0a20202020202020202f2f2f20466f6c6c6f77696e672074686973207061747465726e2c206966206c6f636b65642c20746865204e465420697320636865636b656420666f722045564d4e465420636f6e666f726d616e63652072657475726e696e67202e65766d494420696620736f2c0a20202020202020202f2f2f206f746865727769736520746865204e465427732049442069732072657475726e656420617320612055496e743235362073696e63652074686174277320686f77207468652062726964676520776f756c642068616e646c65206d696e74696e6720696e207468650a20202020202020202f2f2f20636f72726573706f6e64696e672045524337323120636f6e74726163742e0a20202020202020202f2f2f0a202020202020202061636365737328616c6c2920766965772066756e2067657445564d49442866726f6d20636164656e636549443a2055496e743634293a2055496e743235363f207b0a2020202020202020202020206966206c6574206e6674203d2073656c662e626f72726f774e465428636164656e6365494429207b0a202020202020202020202020202020206966206c65742065766d4e4654203d2043726f7373564d4e46542e67657445564d49442866726f6d3a206e667429207b0a202020202020202020202020202020202020202072657475726e2065766d4e46540a202020202020202020202020202020207d0a2020202020202020202020202020202072657475726e2055496e74323536286e66742e6964290a2020202020202020202020207d0a20202020202020202020202072657475726e206e696c0a20202020202020207d0a0a20202020202020202f2f2f2052657475726e732074686520636f6e747261637455524920666f7220746865204e465420636f6c6c656374696f6e20617320646566696e656420696e2074686520736f757263652045524337323120636f6e74726163742e204966206e6f6e65207761730a20202020202020202f2f2f20646566696e6564206174207468652074696d65206f66206272696467696e672c20616e20656d70747920737472696e672069732072657475726e65642e0a202020202020202061636365737328616c6c2920766965772066756e20636f6e747261637455524928293a20537472696e673f207b0a20202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e636f6e74726163745552490a20202020202020207d0a0a20202020202020202f2f2f20476574732074686520616d6f756e74206f66204e4654732073746f72656420696e2074686520636f6c6c656374696f6e0a202020202020202061636365737328616c6c2920766965772066756e206765744c656e67746828293a20496e74207b0a20202020202020202020202072657475726e2073656c662e6f776e65644e4654732e6b6579732e6c656e6774680a20202020202020207d0a0a20202020202020202f2f2f205265747269657665732061207265666572656e636520746f20746865204e46542073746f72656420696e2074686520636f6c6c656374696f6e206279206974732049440a202020202020202061636365737328616c6c2920766965772066756e20626f72726f774e4654285f2069643a2055496e743634293a20267b4e6f6e46756e6769626c65546f6b656e2e4e46547d3f207b0a20202020202020202020202072657475726e202673656c662e6f776e65644e4654735b69645d0a20202020202020207d0a0a20202020202020202f2f2f20426f72726f77207468652076696577207265736f6c76657220666f722074686520737065636966696564204e46542049440a202020202020202061636365737328616c6c2920766965772066756e20626f72726f77566965775265736f6c7665722869643a2055496e743634293a20267b566965775265736f6c7665722e5265736f6c7665727d3f207b0a20202020202020202020202072657475726e202673656c662e6f776e65644e4654735b69645d20617320267b566965775265736f6c7665722e5265736f6c7665727d3f203f3f206e696c0a20202020202020207d0a0a20202020202020202f2f2f204372656174657320616e20656d70747920636f6c6c656374696f6e0a202020202020202061636365737328616c6c292066756e20637265617465456d707479436f6c6c656374696f6e28293a20407b4e6f6e46756e6769626c65546f6b656e2e436f6c6c656374696f6e7d20207b0a20202020202020202020202072657475726e203c2d" - }, - { - "type": "String", - "value": "2e637265617465456d707479436f6c6c656374696f6e286e6674547970653a20547970653c40" - }, - { - "type": "String", - "value": "2e4e46543e2829290a20202020202020207d0a202020207d0a0a202020202f2f2f20637265617465456d707479436f6c6c656374696f6e206372656174657320616e20656d70747920436f6c6c656374696f6e20666f722074686520737065636966696564204e465420747970650a202020202f2f2f20616e642072657475726e7320697420746f207468652063616c6c657220736f207468617420746865792063616e206f776e204e4654730a2020202061636365737328616c6c292066756e20637265617465456d707479436f6c6c656374696f6e286e6674547970653a2054797065293a20407b4e6f6e46756e6769626c65546f6b656e2e436f6c6c656374696f6e7d207b0a202020202020202072657475726e203c2d2063726561746520436f6c6c656374696f6e28290a202020207d0a0a202020202f2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a0a202020202020202020202020476574746572730a202020202a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2f0a0a202020202f2f2f2052657475726e7320746865206e616d65206f66207468652061737365740a202020202f2f2f0a2020202061636365737328616c6c2920766965772066756e206765744e616d6528293a20537472696e67207b0a202020202020202072657475726e2073656c662e6e616d650a202020207d0a0a202020202f2f2f2052657475726e73207468652073796d626f6c206f66207468652061737365740a202020202f2f2f0a2020202061636365737328616c6c2920766965772066756e2067657453796d626f6c28293a20537472696e67207b0a202020202020202072657475726e2073656c662e73796d626f6c0a202020207d0a0a202020202f2f2f2052657475726e73207468652045564d20636f6e74726163742061646472657373206f6620746865204e4654207468697320636f6e747261637420726570726573656e74730a202020202f2f2f0a2020202061636365737328616c6c2920766965772066756e2067657445564d436f6e74726163744164647265737328293a2045564d2e45564d41646472657373207b0a202020202020202072657475726e2073656c662e65766d4e4654436f6e7472616374416464726573730a202020207d0a0a202020202f2f2f2046756e6374696f6e20746861742072657475726e7320616c6c20746865204d6574616461746120566965777320696d706c656d656e7465642062792061204e6f6e2046756e6769626c6520546f6b656e0a202020202f2f2f0a202020202f2f2f204072657475726e20416e206172726179206f6620547970657320646566696e696e672074686520696d706c656d656e7465642076696577732e20546869732076616c75652077696c6c20626520757365642062790a202020202f2f2f202020202020202020646576656c6f7065727320746f206b6e6f7720776869636820706172616d6574657220746f207061737320746f20746865207265736f6c7665566965772829206d6574686f642e0a202020202f2f2f0a2020202061636365737328616c6c2920766965772066756e20676574436f6e74726163745669657773287265736f75726365547970653a20547970653f293a205b547970655d207b0a202020202020202072657475726e205b0a202020202020202020202020547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446174613e28292c0a202020202020202020202020547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446973706c61793e28292c0a202020202020202020202020547970653c4d6574616461746156696577732e45564d427269646765644d657461646174613e28290a20202020202020205d0a202020207d0a0a202020202f2f2f2046756e6374696f6e2074686174207265736f6c7665732061206d65746164617461207669657720666f72207468697320636f6e74726163742e0a202020202f2f2f0a202020202f2f2f2040706172616d20766965773a205468652054797065206f6620746865206465736972656420766965772e0a202020202f2f2f204072657475726e20412073747275637475726520726570726573656e74696e67207468652072657175657374656420766965772e0a202020202f2f2f0a2020202061636365737328616c6c292066756e207265736f6c7665436f6e747261637456696577287265736f75726365547970653a20547970653f2c2076696577547970653a2054797065293a20416e795374727563743f207b0a2020202020202020737769746368207669657754797065207b0a2020202020202020202020206361736520547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446174613e28293a0a202020202020202020202020202020206c6574206964656e746966696572203d2022" - }, - { - "type": "String", - "value": "436f6c6c656374696f6e220a202020202020202020202020202020206c657420636f6c6c656374696f6e44617461203d204d6574616461746156696577732e4e4654436f6c6c656374696f6e44617461280a202020202020202020202020202020202020202073746f72616765506174683a2053746f7261676550617468286964656e7469666965723a206964656e74696669657229212c0a20202020202020202020202020202020202020207075626c6963506174683a205075626c696350617468286964656e7469666965723a206964656e74696669657229212c0a20202020202020202020202020202020202020207075626c6963436f6c6c656374696f6e3a20547970653c26" - }, - { - "type": "String", - "value": "2e436f6c6c656374696f6e3e28292c0a20202020202020202020202020202020202020207075626c69634c696e6b6564547970653a20547970653c26" - }, - { - "type": "String", - "value": "2e436f6c6c656374696f6e3e28292c0a2020202020202020202020202020202020202020637265617465456d707479436f6c6c656374696f6e46756e6374696f6e3a202866756e28293a20407b4e6f6e46756e6769626c65546f6b656e2e436f6c6c656374696f6e7d207b0a20202020202020202020202020202020202020202020202072657475726e203c2d" - }, - { - "type": "String", - "value": "2e637265617465456d707479436f6c6c656374696f6e286e6674547970653a20547970653c40" - }, - { - "type": "String", - "value": "2e4e46543e2829290a20202020202020202020202020202020202020207d290a20202020202020202020202020202020290a2020202020202020202020202020202072657475726e20636f6c6c656374696f6e446174610a2020202020202020202020206361736520547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446973706c61793e28293a0a202020202020202020202020202020206c65742073656c66526566203d202673656c6620617320267b4943726f7373564d41737365747d0a20202020202020202020202020202020466c6f7745564d4272696467655265736f6c7665722e7265736f6c766542726964676564566965772862726964676564436f6e74726163743a2073656c665265662c20766965773a20547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446973706c61793e2829290a2020202020202020202020206361736520547970653c4d6574616461746156696577732e45564d427269646765644d657461646174613e28293a0a2020202020202020202020202020202072657475726e204d6574616461746156696577732e45564d427269646765644d65746164617461280a20202020202020202020202020202020202020206e616d653a2073656c662e6e616d652c0a202020202020202020202020202020202020202073796d626f6c3a2073656c662e73796d626f6c2c0a20202020202020202020202020202020202020207572693a2073656c662e636f6e747261637455524920213d206e696c203f204d6574616461746156696577732e55524928626173655552493a206e696c2c2076616c75653a2073656c662e636f6e74726163745552492129203a204d6574616461746156696577732e55524928626173655552493a206e696c2c2076616c75653a202222290a20202020202020202020202020202020290a20202020202020207d0a202020202020202072657475726e206e696c0a202020207d0a0a202020202f2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a0a2020202020202020496e7465726e616c204d6574686f64730a202020202a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2f0a0a202020202f2f2f20416c6c6f7773207468652062726964676520746f206d696e74204e4654732066726f6d206272696467652d646566696e6564204e465420636f6e7472616374730a202020202f2f2f0a20202020616363657373286163636f756e74290a2020202066756e206d696e744e46542869643a2055496e743235362c20746f6b656e5552493a20537472696e67293a20404e4654207b0a2020202020202020707265207b0a20202020202020202020202073656c662e746f6b656e555249735b69645d203d3d206e696c3a20224120746f6b656e20776974682074686520676976656e2045524337323120494420616c726561647920657869737473220a20202020202020207d0a202020202020202073656c662e746f6b656e555249735b69645d203d20746f6b656e5552490a202020202020202072657475726e203c2d637265617465204e4654280a20202020202020202020202065766d49443a2069642c0a2020202020202020202020206d657461646174613a207b0a20202020202020202020202020202020224272696467656420426c6f636b223a2067657443757272656e74426c6f636b28292e6865696768742c0a2020202020202020202020202020202022427269646765642054696d657374616d70223a2067657443757272656e74426c6f636b28292e74696d657374616d700a2020202020202020202020207d0a2020202020202020290a202020207d0a0a202020202f2f2f20416c6c6f7773207468652062726964676520746f207570646174652074686520555249206f662062726964676564204e4654732e205468697320617373756d65732074686174207468652045564d2d646566696e696e672070726f6a656374206d617920636f6e7461696e0a202020202f2f2f206c6f67696320286f6e636861696e206f72206f6666636861696e292077686963682075706461746573204e4654206d6574616461746120696e2074686520736f757263652045524337323120636f6e74726163742e204f6e206272696467696e672c20746865205552492063616e0a202020202f2f2f207468656e206265207570646174656420696e207468697320636f6e747261637420746f207265666c6563742074686520736f757263652045524337323120636f6e74726163742773206d657461646174612e0a202020202f2f2f0a20202020616363657373286163636f756e74290a2020202066756e20757064617465546f6b656e5552492865766d49443a2055496e743235362c206e65775552493a20537472696e6729207b0a2020202020202020707265207b0a20202020202020202020202073656c662e746f6b656e555249735b65766d49445d20213d206e696c3a20224e6f20746f6b656e20776974682074686520676976656e2045524337323120494420657869737473220a20202020202020207d0a202020202020202069662073656c662e746f6b656e555249735b65766d49445d20213d206e6577555249207b0a20202020202020202020202073656c662e746f6b656e555249735b65766d49445d203d206e65775552490a20202020202020207d0a202020207d0a0a20202020696e6974286e616d653a20537472696e672c2073796d626f6c3a20537472696e672c2065766d436f6e7472616374416464726573733a2045564d2e45564d416464726573732c20636f6e74726163745552493a20537472696e673f29207b0a202020202020202073656c662e65766d4e4654436f6e747261637441646472657373203d2065766d436f6e7472616374416464726573730a202020202020202073656c662e6e616d65203d206e616d650a202020202020202073656c662e73796d626f6c203d2073796d626f6c0a202020202020202073656c662e636f6e7472616374555249203d20636f6e74726163745552490a202020202020202073656c662e746f6b656e55524973203d207b7d0a202020202020202073656c662e636f6c6c656374696f6e203c2d2063726561746520436f6c6c656374696f6e28290a0a2020202020202020466c6f7745564d427269646765436f6e6669672e6173736f63696174655479706528547970653c40" - }, - { - "type": "String", - "value": "2e4e46543e28292c20776974683a2073656c662e65766d4e4654436f6e747261637441646472657373290a2020202020202020466c6f7745564d4272696467654e4654457363726f772e696e697469616c697a65457363726f77280a202020202020202020202020666f72547970653a20547970653c40" - }, - { - "type": "String", - "value": "2e4e46543e28292c0a2020202020202020202020206e616d653a206e616d652c0a20202020202020202020202073796d626f6c3a2073796d626f6c2c0a202020202020202020202020657263373231416464726573733a2073656c662e65766d4e4654436f6e7472616374416464726573730a2020202020202020290a202020207d0a7d0a" - } - ] - } -] \ No newline at end of file diff --git a/cadence/args/bridged-token-code-chunks-args-previewnet.json b/cadence/args/bridged-token-code-chunks-args-previewnet.json deleted file mode 100644 index ee895343..00000000 --- a/cadence/args/bridged-token-code-chunks-args-previewnet.json +++ /dev/null @@ -1,87 +0,0 @@ -[ - { - "type": "String", - "value": "bridgedToken" - }, - { - "type": "Array", - "value": [ - { - "type": "String", - "value": "696d706f7274204e6f6e46756e6769626c65546f6b656e2066726f6d203078623637363362343339396138383863380a696d706f7274204d6574616461746156696577732066726f6d203078623637363362343339396138383863380a696d706f72742046756e6769626c65546f6b656e4d6574616461746156696577732066726f6d203078613032323565373030306163383261390a696d706f727420566965775265736f6c7665722066726f6d203078623637363362343339396138383863380a696d706f72742046756e6769626c65546f6b656e2066726f6d203078613032323565373030306163383261390a696d706f727420466c6f77546f6b656e2066726f6d203078343434356537616431313536383237360a0a696d706f72742045564d2066726f6d203078623637363362343339396138383863380a0a696d706f7274204943726f7373564d2066726f6d203078373739326366623735643864666464380a696d706f7274204943726f7373564d41737365742066726f6d203078373739326366623735643864666464380a696d706f7274204945564d427269646765546f6b656e4d696e7465722066726f6d203078373739326366623735643864666464380a696d706f727420466c6f7745564d427269646765546f6b656e457363726f772066726f6d203078373739326366623735643864666464380a696d706f727420466c6f7745564d427269646765436f6e6669672066726f6d203078373739326366623735643864666464380a696d706f727420466c6f7745564d4272696467655574696c732066726f6d203078373739326366623735643864666464380a696d706f727420466c6f7745564d4272696467652066726f6d203078373739326366623735643864666464380a696d706f72742043726f7373564d546f6b656e2066726f6d203078373739326366623735643864666464380a696d706f727420466c6f7745564d4272696467655265736f6c7665722066726f6d203078373739326366623735643864666464380a0a2f2f2f205468697320636f6e747261637420697320612074656d706c617465207573656420627920466c6f7745564d42726964676520746f20646566696e652045564d2d6e61746976652066756e6769626c6520746f6b656e7320627269646765642066726f6d20466c6f772045564d20746f200a2f2f2f20436164656e63652e2055706f6e206465706c6f796d656e74206f66207468697320636f6e74726163742c2074686520636f6e7472616374206e616d65206973206465726976656420617320612066756e6374696f6e206f6620746865206173736574207479706520286865726520616e200a2f2f2f2045524332302920616e642074686520636f6e747261637427732045564d20616464726573732e20546865206465726976656420636f6e7472616374206e616d65206973207468656e206a6f696e65642077697468207468697320636f6e7472616374277320636f64652c0a2f2f2f207072657061726564206173206368756e6b7320696e20466c6f7745564d42726964676554656d706c61746573206265666f7265206265696e67206465706c6f79656420746f2074686520466c6f772045564d20427269646765206163636f756e742e0a2f2f2f0a2f2f2f204f6e206272696467696e672c20746865204552433230206973207472616e7366657272656420746f2074686520627269646765277320436164656e63654f776e65644163636f756e742045564d206164647265737320616e6420746f6b656e7320617265206d696e7465642066726f6d0a2f2f2f207468697320636f6e747261637420746f20746865206272696467696e672063616c6c65722e204f6e2072657475726e20746f20466c6f772045564d2c2074686520726576657273652070726f6365737320697320666f6c6c6f776564202d2074686520746f6b656e206973206275726e65640a2f2f2f20696e207468697320636f6e747261637420616e6420746865204552433230206973207472616e7366657272656420746f2074686520646566696e656420726563697069656e742e20496e2074686973207761792c2074686520436164656e6365205661756c74206163747320617320610a2f2f2f20726570726573656e746174696f6e206f6620626f7468207468652045564d20746f6b656e7320616e642074687573206f776e6572736869702072696768747320746f2069742075706f6e206272696467696e67206261636b20746f20466c6f772045564d2e0a2f2f2f0a2f2f2f20546f20627269646765206265747765656e20564d732c20612063616c6c65722063616e20656974686572207573652074686520696e74657266616365206578706f736564206f6e20436164656e63654f776e65644163636f756e74206f722075736520466c6f7745564d4272696467650a2f2f2f207075626c696320636f6e7472616374206d6574686f64732e0a2f2f2f0a61636365737328616c6c2920636f6e747261637420" - }, - { - "type": "String", - "value": "203a204943726f7373564d2c204943726f7373564d41737365742c204945564d427269646765546f6b656e4d696e7465722c2046756e6769626c65546f6b656e207b0a0a202020202f2f2f20506f696e74657220746f2074686520466163746f7279206465706c6f79656420536f6c696469747920636f6e7472616374206164647265737320646566696e696e672074686520627269646765642061737365740a2020202061636365737328616c6c29206c65742065766d546f6b656e436f6e7472616374416464726573733a2045564d2e45564d416464726573730a202020202f2f2f204e616d65206f66207468652066756e6769626c6520746f6b656e20646566696e656420696e2074686520636f72726573706f6e64696e6720455243323020636f6e74726163740a2020202061636365737328616c6c29206c6574206e616d653a20537472696e670a202020202f2f2f2053796d626f6c206f66207468652066756e6769626c6520746f6b656e20646566696e656420696e2074686520636f72726573706f6e64696e6720455243323020636f6e74726163740a2020202061636365737328616c6c29206c65742073796d626f6c3a20537472696e670a202020202f2f2f20446563696d616c20706c6163652076616c756520646566696e656420696e2074686520736f7572636520455243323020636f6e74726163740a2020202061636365737328616c6c29206c657420646563696d616c733a2055496e74380a202020202f2f2f20555249206f662074686520636f6e74726163742c20696620617661696c61626c6520617320612076617220696e2063617365207468652062726964676520656e61626c65732063726f73732d564d204d657461646174612073796e63696e6720696e20746865206675747572650a2020202061636365737328616c6c292076617220636f6e74726163745552493a20537472696e673f0a202020202f2f2f20546f74616c20737570706c79206f66207468697320436164656e636520746f6b656e20696e2063697263756c6174696f6e0a202020202f2f2f204e4f54453a205468697320646f6573206e6f74207265666c6563742074686520746f74616c20737570706c79206f662074686520736f7572636520455243323020696e2063697263756c6174696f6e2077697468696e2045564d0a2020202061636365737328616c6c292076617220746f74616c537570706c793a205546697836340a202020202f2f2f2052657461696e2061205661756c7420746f207265666572656e6365207768656e207265736f6c76696e67205661756c74204d657461646174610a202020206163636573732873656c6629206c6574207661756c743a20405661756c740a0a202020202f2f2f20546865205661756c74207265736f7572636520726570726573656e74696e6720746865206272696467656420455243323020746f6b656e0a202020202f2f2f0a2020202061636365737328616c6c29207265736f75726365205661756c74203a204943726f7373564d41737365742e4173736574496e666f2c2043726f7373564d546f6b656e2e45564d546f6b656e496e666f2c2046756e6769626c65546f6b656e2e5661756c74207b0a20202020202020202f2f2f2042616c616e6365206f662074686520746f6b656e7320696e206120676976656e205661756c740a202020202020202061636365737328616c6c29207661722062616c616e63653a205546697836340a0a2020202020202020696e69742862616c616e63653a2055466978363429207b0a20202020202020202020202073656c662e62616c616e6365203d2062616c616e63650a20202020202020207d0a0a20202020202020202f2a202d2d2d2043726f7373564d546f6b656e2e45564d46545661756c7420636f6e666f726d616e6365202d2d2d202a2f0a20202020202020202f2f0a20202020202020202f2f2f204765747320746865204552433230206e616d652076616c75650a202020202020202061636365737328616c6c2920766965772066756e206765744e616d6528293a20537472696e67207b0a20202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e6e616d650a20202020202020207d0a20202020202020202f2f2f2047657473207468652045524332302073796d626f6c2076616c75650a202020202020202061636365737328616c6c2920766965772066756e2067657453796d626f6c28293a20537472696e67207b0a20202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e73796d626f6c0a20202020202020207d0a20202020202020202f2f2f20476574732074686520455243323020646563696d616c732076616c75650a202020202020202061636365737328616c6c2920766965772066756e20676574446563696d616c7328293a2055496e7438207b0a20202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e646563696d616c730a20202020202020207d0a20202020202020202f2f2f2052657475726e73207468652045564d20636f6e74726163742061646472657373206f66207468652066756e6769626c6520746f6b656e0a202020202020202061636365737328616c6c2920766965772066756e2067657445564d436f6e74726163744164647265737328293a2045564d2e45564d41646472657373207b0a20202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e67657445564d436f6e74726163744164647265737328290a20202020202020207d0a0a202020202020202061636365737328616c6c2920766965772066756e20676574566965777328293a205b547970655d207b0a20202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e676574436f6e74726163745669657773287265736f75726365547970653a206e696c290a20202020202020207d0a0a202020202020202061636365737328616c6c292066756e207265736f6c766556696577285f20766965773a2054797065293a20416e795374727563743f207b0a20202020202020202020202072657475726e20" - }, - { - "type": "String", - "value": "2e7265736f6c7665436f6e747261637456696577287265736f75726365547970653a206e696c2c2076696577547970653a2076696577290a20202020202020207d0a0a20202020202020202f2f2f20676574537570706f727465645661756c745479706573206f7074696f6e616c6c792072657475726e732061206c697374206f66207661756c742074797065732074686174207468697320726563656976657220616363657074730a202020202020202061636365737328616c6c2920766965772066756e20676574537570706f727465645661756c74547970657328293a207b547970653a20426f6f6c7d207b0a20202020202020202020202072657475726e207b2073656c662e6765745479706528293a2074727565207d0a20202020202020207d0a0a202020202020202061636365737328616c6c2920766965772066756e206973537570706f727465645661756c745479706528747970653a2054797065293a20426f6f6c207b0a20202020202020202020202072657475726e2073656c662e676574537570706f727465645661756c74547970657328295b747970655d203f3f2066616c73650a20202020202020207d0a0a20202020202020202f2f2f2041736b732069662074686520616d6f756e742063616e2062652077697468647261776e2066726f6d2074686973207661756c740a202020202020202061636365737328616c6c2920766965772066756e206973417661696c61626c65546f576974686472617728616d6f756e743a20554669783634293a20426f6f6c207b0a20202020202020202020202072657475726e20616d6f756e74203c3d2073656c662e62616c616e63650a20202020202020207d0a0a20202020202020202f2f2f206465706f7369740a20202020202020202f2f2f0a20202020202020202f2f2f2046756e6374696f6e20746861742074616b65732061205661756c74206f626a65637420617320616e20617267756d656e7420616e6420616464730a20202020202020202f2f2f206974732062616c616e636520746f207468652062616c616e6365206f6620746865206f776e657273205661756c742e0a20202020202020202f2f2f0a20202020202020202f2f2f20497420697320616c6c6f77656420746f2064657374726f79207468652073656e74205661756c74206265636175736520746865205661756c740a20202020202020202f2f2f2077617320612074656d706f7261727920686f6c646572206f662074686520746f6b656e732e20546865205661756c7427732062616c616e6365206861730a20202020202020202f2f2f206265656e20636f6e73756d656420616e64207468657265666f72652063616e2062652064657374726f7965642e0a20202020202020202f2f2f0a202020202020202061636365737328616c6c292066756e206465706f7369742866726f6d3a20407b46756e6769626c65546f6b656e2e5661756c747d29207b0a2020202020202020202020206c6574207661756c74203c2d2066726f6d2061732120405661756c740a20202020202020202020202073656c662e62616c616e6365203d2073656c662e62616c616e6365202b207661756c742e62616c616e63650a2020202020202020202020207661756c742e62616c616e6365203d20302e300a20202020202020202020202064657374726f79207661756c740a20202020202020207d0a0a20202020202020202f2f2f20637265617465456d7074795661756c740a20202020202020202f2f2f0a20202020202020202f2f2f2046756e6374696f6e207468617420637265617465732061206e6577205661756c74207769746820612062616c616e6365206f66207a65726f0a20202020202020202f2f2f20616e642072657475726e7320697420746f207468652063616c6c696e6720636f6e746578742e20412075736572206d7573742063616c6c20746869732066756e6374696f6e0a20202020202020202f2f2f20616e642073746f7265207468652072657475726e6564205661756c7420696e2074686569722073746f7261676520696e206f7264657220746f20616c6c6f772074686569720a20202020202020202f2f2f206163636f756e7420746f2062652061626c6520746f2072656365697665206465706f73697473206f66207468697320746f6b656e20747970652e0a20202020202020202f2f2f0a202020202020202061636365737328616c6c292066756e20637265617465456d7074795661756c7428293a20405661756c74207b0a20202020202020202020202072657475726e203c2d637265617465205661756c742862616c616e63653a20302e30290a20202020202020207d0a0a20202020202020202f2f2f2077697468647261770a20202020202020202f2f2f0a20202020202020202f2f2f2046756e6374696f6e20746861742074616b657320616e20616d6f756e7420617320616e20617267756d656e740a20202020202020202f2f2f20616e6420776974686472617773207468617420616d6f756e742066726f6d20746865205661756c742e0a20202020202020202f2f2f0a20202020202020202f2f2f20497420637265617465732061206e65772074656d706f72617279205661756c742074686174206973207573656420746f20686f6c640a20202020202020202f2f2f2074686520746f6b656e73207468617420617265206265696e67207472616e736665727265642e2049742072657475726e7320746865206e65776c790a20202020202020202f2f2f2063726561746564205661756c7420746f2074686520636f6e7465787420746861742063616c6c656420736f2069742063616e206265206465706f73697465640a20202020202020202f2f2f20656c736577686572652e0a20202020202020202f2f2f0a20202020202020206163636573732846756e6769626c65546f6b656e2e5769746864726177292066756e20776974686472617728616d6f756e743a20554669783634293a20405661756c74207b0a20202020202020202020202073656c662e62616c616e6365203d2073656c662e62616c616e6365202d20616d6f756e740a20202020202020202020202072657475726e203c2d637265617465205661756c742862616c616e63653a20616d6f756e74290a20202020202020207d0a0a20202020202020202f2f2f2043616c6c6564207768656e20612066756e6769626c6520746f6b656e206973206275726e6564207669612074686520604275726e65722e6275726e282960206d6574686f640a202020202020202061636365737328636f6e7472616374292066756e206275726e43616c6c6261636b2829207b0a20202020202020202020202069662073656c662e62616c616e6365203e20302e30207b0a20202020202020202020202020202020" - }, - { - "type": "String", - "value": "2e746f74616c537570706c79203d20" - }, - { - "type": "String", - "value": "2e746f74616c537570706c79202d2073656c662e62616c616e63650a2020202020202020202020207d0a20202020202020202020202073656c662e62616c616e6365203d20302e300a20202020202020207d0a202020207d0a0a202020202f2f2f20637265617465456d7074795661756c740a202020202f2f2f0a202020202f2f2f2046756e6374696f6e207468617420637265617465732061206e6577205661756c74207769746820612062616c616e6365206f66207a65726f20616e642072657475726e7320697420746f207468652063616c6c696e6720636f6e746578742e20412075736572206d7573742063616c6c0a202020202f2f2f20746869732066756e6374696f6e20616e642073746f7265207468652072657475726e6564205661756c7420696e2074686569722073746f7261676520696e206f7264657220746f20616c6c6f77207468656972206163636f756e7420746f2062652061626c6520746f0a202020202f2f2f2072656365697665206465706f73697473206f66207468697320746f6b656e20747970652e0a202020202f2f2f0a2020202061636365737328616c6c292066756e20637265617465456d7074795661756c74287661756c74547970653a2054797065293a2040" - }, - { - "type": "String", - "value": "2e5661756c74207b0a202020202020202072657475726e203c2d20637265617465205661756c742862616c616e63653a20302e30290a202020207d0a0a202020202f2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a0a202020202020202020202020476574746572730a202020202a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2f0a0a202020202f2f2f2052657475726e7320746865206e616d65206f66207468652061737365740a202020202f2f2f0a2020202061636365737328616c6c2920766965772066756e206765744e616d6528293a20537472696e67207b0a202020202020202072657475726e2073656c662e6e616d650a202020207d0a0a202020202f2f2f2052657475726e73207468652073796d626f6c206f66207468652061737365740a202020202f2f2f0a2020202061636365737328616c6c2920766965772066756e2067657453796d626f6c28293a20537472696e67207b0a202020202020202072657475726e2073656c662e73796d626f6c0a202020207d0a0a202020202f2f2f2052657475726e73207468652045564d20636f6e74726163742061646472657373206f66207468652066756e6769626c6520746f6b656e207468697320636f6e747261637420726570726573656e74730a202020202f2f2f0a2020202061636365737328616c6c2920766965772066756e2067657445564d436f6e74726163744164647265737328293a2045564d2e45564d41646472657373207b0a202020202020202072657475726e2073656c662e65766d546f6b656e436f6e7472616374416464726573730a202020207d0a0a202020202f2f2f2046756e6374696f6e20746861742072657475726e7320616c6c20746865204d6574616461746120566965777320696d706c656d656e74656420627920746869732066756e6769626c6520746f6b656e20636f6e74726163742e0a202020202f2f2f0a202020202f2f2f204072657475726e20416e206172726179206f6620547970657320646566696e696e672074686520696d706c656d656e7465642076696577732e20546869732076616c75652077696c6c206265207573656420627920646576656c6f7065727320746f206b6e6f772077686963680a202020202f2f2f202020202020202020706172616d6574657220746f207061737320746f20746865207265736f6c7665436f6e7472616374566965772829206d6574686f642e0a202020202f2f2f0a2020202061636365737328616c6c2920766965772066756e20676574436f6e74726163745669657773287265736f75726365547970653a20547970653f293a205b547970655d207b0a202020202020202072657475726e205b0a202020202020202020202020547970653c46756e6769626c65546f6b656e4d6574616461746156696577732e4654566965773e28292c0a202020202020202020202020547970653c46756e6769626c65546f6b656e4d6574616461746156696577732e4654446973706c61793e28292c0a202020202020202020202020547970653c46756e6769626c65546f6b656e4d6574616461746156696577732e46545661756c74446174613e28292c0a202020202020202020202020547970653c46756e6769626c65546f6b656e4d6574616461746156696577732e546f74616c537570706c793e28292c0a202020202020202020202020547970653c4d6574616461746156696577732e45564d427269646765644d657461646174613e28290a20202020202020205d0a202020207d0a0a202020202f2f2f2046756e6374696f6e2074686174207265736f6c7665732061206d65746164617461207669657720666f72207468697320636f6e74726163742e0a202020202f2f2f0a202020202f2f2f2040706172616d20766965773a205468652054797065206f6620746865206465736972656420766965772e0a202020202f2f2f0a202020202f2f2f204072657475726e20412073747275637475726520726570726573656e74696e67207468652072657175657374656420766965772e0a202020202f2f2f0a2020202061636365737328616c6c292066756e207265736f6c7665436f6e747261637456696577287265736f75726365547970653a20547970653f2c2076696577547970653a2054797065293a20416e795374727563743f207b0a2020202020202020737769746368207669657754797065207b0a2020202020202020202020206361736520547970653c46756e6769626c65546f6b656e4d6574616461746156696577732e4654566965773e28293a0a2020202020202020202020202020202072657475726e2046756e6769626c65546f6b656e4d6574616461746156696577732e465456696577280a20202020202020202020202020202020202020206674446973706c61793a2073656c662e7265736f6c7665436f6e747261637456696577287265736f75726365547970653a206e696c2c2076696577547970653a20547970653c46756e6769626c65546f6b656e4d6574616461746156696577732e4654446973706c61793e282929206173212046756e6769626c65546f6b656e4d6574616461746156696577732e4654446973706c61793f2c0a202020202020202020202020202020202020202066745661756c74446174613a2073656c662e7265736f6c7665436f6e747261637456696577287265736f75726365547970653a206e696c2c2076696577547970653a20547970653c46756e6769626c65546f6b656e4d6574616461746156696577732e46545661756c74446174613e282929206173212046756e6769626c65546f6b656e4d6574616461746156696577732e46545661756c74446174613f0a20202020202020202020202020202020290a2020202020202020202020206361736520547970653c46756e6769626c65546f6b656e4d6574616461746156696577732e4654446973706c61793e28293a0a202020202020202020202020202020206c657420636f6e7472616374526566203d2073656c662e626f72726f7754686973436f6e747261637428290a2020202020202020202020202020202072657475726e20466c6f7745564d4272696467655265736f6c7665722e7265736f6c766542726964676564566965772862726964676564436f6e74726163743a20636f6e74726163745265662c20766965773a20547970653c46756e6769626c65546f6b656e4d6574616461746156696577732e4654446973706c61793e2829290a2020202020202020202020206361736520547970653c46756e6769626c65546f6b656e4d6574616461746156696577732e46545661756c74446174613e28293a0a2020202020202020202020202020202072657475726e2046756e6769626c65546f6b656e4d6574616461746156696577732e46545661756c7444617461280a202020202020202020202020202020202020202073746f72616765506174683a202f73746f726167652f" - }, - { - "type": "String", - "value": "5661756c742c0a20202020202020202020202020202020202020207265636569766572506174683a202f7075626c69632f" - }, - { - "type": "String", - "value": "52656365697665722c0a20202020202020202020202020202020202020206d65746164617461506174683a202f7075626c69632f" - }, - { - "type": "String", - "value": "5661756c742c0a202020202020202020202020202020202020202072656365697665724c696e6b6564547970653a20547970653c26" - }, - { - "type": "String", - "value": "2e5661756c743e28292c0a20202020202020202020202020202020202020206d657461646174614c696e6b6564547970653a20547970653c26" - }, - { - "type": "String", - "value": "2e5661756c743e28292c0a2020202020202020202020202020202020202020637265617465456d7074795661756c7446756e6374696f6e3a202866756e28293a20407b46756e6769626c65546f6b656e2e5661756c747d207b0a20202020202020202020202020202020202020202020202072657475726e203c2d73656c662e637265617465456d7074795661756c74287661756c74547970653a20547970653c40" - }, - { - "type": "String", - "value": "2e5661756c743e2829290a20202020202020202020202020202020202020207d290a20202020202020202020202020202020290a2020202020202020202020206361736520547970653c46756e6769626c65546f6b656e4d6574616461746156696577732e546f74616c537570706c793e28293a0a2020202020202020202020202020202072657475726e2046756e6769626c65546f6b656e4d6574616461746156696577732e546f74616c537570706c79280a2020202020202020202020202020202020202020746f74616c537570706c793a2073656c662e746f74616c537570706c790a20202020202020202020202020202020290a2020202020202020202020206361736520547970653c4d6574616461746156696577732e45564d427269646765644d657461646174613e28293a0a2020202020202020202020202020202072657475726e204d6574616461746156696577732e45564d427269646765644d65746164617461280a20202020202020202020202020202020202020206e616d653a2073656c662e6e616d652c0a202020202020202020202020202020202020202073796d626f6c3a2073656c662e73796d626f6c2c0a20202020202020202020202020202020202020207572693a2073656c662e636f6e747261637455524920213d206e696c203f204d6574616461746156696577732e55524928626173655552493a206e696c2c2076616c75653a2073656c662e636f6e74726163745552492129203a204d6574616461746156696577732e55524928626173655552493a206e696c2c2076616c75653a202222290a20202020202020202020202020202020290a20202020202020207d0a202020202020202072657475726e206e696c0a202020207d0a0a202020202f2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a0a2020202020202020496e7465726e616c204d6574686f64730a202020202a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2f0a0a202020202f2f2f20416c6c6f7773207468652062726964676520746f206d696e7420746f6b656e732066726f6d206272696467652d646566696e65642066756e6769626c6520746f6b656e20636f6e7472616374730a202020202f2f2f0a20202020616363657373286163636f756e74292066756e206d696e74546f6b656e7328616d6f756e743a20554669783634293a20407b46756e6769626c65546f6b656e2e5661756c747d207b0a202020202020202073656c662e746f74616c537570706c79203d2073656c662e746f74616c537570706c79202b20616d6f756e740a202020202020202072657475726e203c2d20637265617465205661756c742862616c616e63653a20616d6f756e74290a202020207d0a0a202020202f2f2f2052657475726e732061207265666572656e636520746f207468697320636f6e747261637420617320616e204943726f7373564d417373657420636f6e74726163740a202020202f2f2f0a202020206163636573732873656c66290a2020202066756e20626f72726f7754686973436f6e747261637428293a20267b4943726f7373564d41737365747d207b0a20202020202020206c657420636f6e747261637441646472657373203d2073656c662e6163636f756e742e616464726573730a202020202020202072657475726e206765744163636f756e7428636f6e747261637441646472657373292e636f6e7472616374732e626f72726f773c267b4943726f7373564d41737365747d3e286e616d653a2022" - }, - { - "type": "String", - "value": "2229210a202020207d0a0a20202020696e6974286e616d653a20537472696e672c2073796d626f6c3a20537472696e672c20646563696d616c733a2055496e74382c2065766d436f6e7472616374416464726573733a2045564d2e45564d416464726573732c20636f6e74726163745552493a20537472696e673f29207b0a202020202020202073656c662e65766d546f6b656e436f6e747261637441646472657373203d2065766d436f6e7472616374416464726573730a202020202020202073656c662e6e616d65203d206e616d650a202020202020202073656c662e73796d626f6c203d2073796d626f6c0a202020202020202073656c662e646563696d616c73203d20646563696d616c730a202020202020202073656c662e636f6e7472616374555249203d20636f6e74726163745552490a202020202020202073656c662e746f74616c537570706c79203d20302e300a202020202020202073656c662e7661756c74203c2d20637265617465205661756c742862616c616e63653a20302e30290a0a2020202020202020466c6f7745564d427269646765436f6e6669672e6173736f63696174655479706528547970653c40" - }, - { - "type": "String", - "value": "2e5661756c743e28292c20776974683a2073656c662e65766d546f6b656e436f6e747261637441646472657373290a2020202020202020466c6f7745564d427269646765546f6b656e457363726f772e696e697469616c697a65457363726f77280a202020202020202020202020776974683a203c2d637265617465205661756c742862616c616e63653a20302e30292c0a2020202020202020202020206e616d653a206e616d652c0a20202020202020202020202073796d626f6c3a2073796d626f6c2c0a202020202020202020202020646563696d616c733a20646563696d616c732c0a20202020202020202020202065766d546f6b656e416464726573733a2073656c662e65766d546f6b656e436f6e7472616374416464726573730a2020202020202020290a202020207d0a7d0a" - } - ] - } -] \ No newline at end of file diff --git a/cadence/contracts/templates/previewnet/EVMBridgedNFTTemplate.cdc b/cadence/contracts/templates/previewnet/EVMBridgedNFTTemplate.cdc deleted file mode 100644 index cd03f65c..00000000 --- a/cadence/contracts/templates/previewnet/EVMBridgedNFTTemplate.cdc +++ /dev/null @@ -1,390 +0,0 @@ -import NonFungibleToken from 0xb6763b4399a888c8 -import MetadataViews from 0xb6763b4399a888c8 -import ViewResolver from 0xb6763b4399a888c8 -import FungibleToken from 0xa0225e7000ac82a9 -import FlowToken from 0x4445e7ad11568276 - -import EVM from 0xb6763b4399a888c8 - -import ICrossVM from 0x7792cfb75d8dfdd8 -import ICrossVMAsset from 0x7792cfb75d8dfdd8 -import IEVMBridgeNFTMinter from 0x7792cfb75d8dfdd8 -import FlowEVMBridgeNFTEscrow from 0x7792cfb75d8dfdd8 -import FlowEVMBridgeConfig from 0x7792cfb75d8dfdd8 -import FlowEVMBridgeUtils from 0x7792cfb75d8dfdd8 -import FlowEVMBridge from 0x7792cfb75d8dfdd8 -import CrossVMNFT from 0x7792cfb75d8dfdd8 -import FlowEVMBridgeResolver from 0x7792cfb75d8dfdd8 - -/// This contract is a template used by FlowEVMBridge to define EVM-native NFTs bridged from Flow EVM to Flow. -/// Upon deployment of this contract, the contract name is derived as a function of the asset type (here an ERC721 aka -/// an NFT) and the contract's EVM address. The derived contract name is then joined with this contract's code, -/// prepared as chunks in FlowEVMBridgeTemplates before being deployed to the Flow EVM Bridge account. -/// -/// On bridging, the ERC721 is transferred to the bridge's CadenceOwnedAccount EVM address and a new NFT is minted from -/// this contract to the bridging caller. On return to Flow EVM, the reverse process is followed - the token is locked -/// in NFT escrow and the ERC721 is transferred to the defined recipient. In this way, the Cadence token acts as a -/// representation of both the EVM NFT and thus ownership rights to it upon bridging back to Flow EVM. -/// -/// To bridge between VMs, a caller can either use the interface exposed on CadenceOwnedAccount or use FlowEVMBridge -/// public contract methods. -/// -access(all) contract {{CONTRACT_NAME}} : ICrossVM, ICrossVMAsset, IEVMBridgeNFTMinter, NonFungibleToken { - - /// Pointer to the Factory deployed Solidity contract address defining the bridged asset - access(all) let evmNFTContractAddress: EVM.EVMAddress - /// Name of the NFT collection defined in the corresponding ERC721 contract - access(all) let name: String - /// Symbol of the NFT collection defined in the corresponding ERC721 contract - access(all) let symbol: String - /// URI of the contract, if available as a var in case the bridge enables cross-VM Metadata syncing in the future - access(all) var contractURI: String? - /// Retain a Collection to reference when resolving Collection Metadata - access(self) let collection: @Collection - /// Mapping of token URIs indexed on their ERC721 ID. This would not normally be retained within a Cadence NFT - /// contract, but since NFT metadata may be updated in EVM, it's retained here so that the bridge can update - /// it against the source ERC721 contract which is treated as the NFT's source of truth. - access(all) let tokenURIs: {UInt256: String} - - /// The NFT resource representing the bridged ERC721 token - /// - access(all) resource NFT : ICrossVMAsset.AssetInfo, CrossVMNFT.EVMNFT { - /// The Cadence ID of the NFT - access(all) let id: UInt64 - /// The ERC721 ID of the NFT - access(all) let evmID: UInt256 - /// Additional onchain metadata - access(all) let metadata: {String: AnyStruct} - - init( - evmID: UInt256, - metadata: {String: AnyStruct} - ) { - self.id = self.uuid - self.evmID = evmID - self.metadata = metadata - } - - /// Returns the metadata view types supported by this NFT - access(all) view fun getViews(): [Type] { - return [ - Type(), - Type(), - Type(), - Type(), - Type() - ] - } - - access(all) view fun getName(): String { - return {{CONTRACT_NAME}}.name - } - - access(all) view fun getSymbol(): String { - return {{CONTRACT_NAME}}.symbol - } - - access(all) view fun tokenURI(): String { - return {{CONTRACT_NAME}}.tokenURIs[self.evmID] ?? "" - } - - /// Resolves a metadata view for this NFT - access(all) fun resolveView(_ view: Type): AnyStruct? { - switch view { - case Type(): - let contractRef = &{{CONTRACT_NAME}} as &{ICrossVMAsset} - return FlowEVMBridgeResolver.resolveBridgedView(bridgedContract: selfRef, view: Type()) - case Type(): - return MetadataViews.Serial( - self.id - ) - case Type(): - return {{CONTRACT_NAME}}.resolveContractView( - resourceType: self.getType(), - viewType: Type() - ) - case Type(): - return {{CONTRACT_NAME}}.resolveContractView( - resourceType: self.getType(), - viewType: Type() - ) - case Type(): - return MetadataViews.EVMBridgedMetadata( - name: self.getName(), - symbol: self.getSymbol(), - uri: MetadataViews.URI(baseURI: nil, value: self.tokenURI()) - ) - } - return nil - } - - /// public function that anyone can call to create a new empty collection - access(all) fun createEmptyCollection(): @{NonFungibleToken.Collection} { - return <- {{CONTRACT_NAME}}.createEmptyCollection(nftType: self.getType()) - } - - /* --- CrossVMNFT conformance --- */ - // - /// Returns the EVM contract address of the NFT - access(all) view fun getEVMContractAddress(): EVM.EVMAddress { - return {{CONTRACT_NAME}}.getEVMContractAddress() - } - } - - /// This resource holds associated NFTs, and serves queries about stored NFTs - access(all) resource Collection : CrossVMNFT.EVMNFTCollection { - /// dictionary of NFT conforming tokens indexed on their ID - access(all) var ownedNFTs: @{UInt64: {NonFungibleToken.NFT}} - /// Mapping of EVM IDs to Flow NFT IDs - access(contract) let evmIDToFlowID: {UInt256: UInt64} - - access(all) var storagePath: StoragePath - access(all) var publicPath: PublicPath - - init () { - self.ownedNFTs <- {} - self.evmIDToFlowID = {} - let collectionData = {{CONTRACT_NAME}}.resolveContractView( - resourceType: Type<@{{CONTRACT_NAME}}.NFT>(), - viewType: Type() - ) as! MetadataViews.NFTCollectionData? - ?? panic("Could not resolve the collection data view for the NFT collection") - self.storagePath = collectionData.storagePath - self.publicPath = collectionData.publicPath - } - - access(all) view fun getName(): String { - return {{CONTRACT_NAME}}.name - } - - access(all) view fun getSymbol(): String { - return {{CONTRACT_NAME}}.symbol - } - - /// Returns a list of NFT types that this receiver accepts - access(all) view fun getSupportedNFTTypes(): {Type: Bool} { - return { Type<@{{CONTRACT_NAME}}.NFT>(): true } - } - - /// Returns whether or not the given type is accepted by the collection - /// A collection that can accept any type should just return true by default - access(all) view fun isSupportedNFTType(type: Type): Bool { - return type == Type<@{{CONTRACT_NAME}}.NFT>() - } - - /// Removes an NFT from the collection and moves it to the caller - access(NonFungibleToken.Withdraw) fun withdraw(withdrawID: UInt64): @{NonFungibleToken.NFT} { - let token <- self.ownedNFTs.remove(key: withdrawID) - ?? panic("Could not withdraw an NFT with the provided ID from the collection") - - return <-token - } - - /// Withdraws an NFT from the collection by its EVM ID - access(NonFungibleToken.Withdraw) fun withdrawByEVMID(_ id: UInt256): @{NonFungibleToken.NFT} { - return <- self.withdraw(withdrawID: - self.getCadenceID(from: id) ?? panic("Could not withdraw an NFT with the provided EVM ID from the collection") - ) - } - - /// Ttakes a NFT and adds it to the collections dictionary and adds the ID to the evmIDToFlowID mapping - access(all) fun deposit(token: @{NonFungibleToken.NFT}) { - let token <- token as! @{{CONTRACT_NAME}}.NFT - - // add the new token to the dictionary which removes the old one - self.evmIDToFlowID[token.evmID] = token.id - let oldToken <- self.ownedNFTs[token.id] <- token - - destroy oldToken - } - - /// Returns an array of the IDs that are in the collection - access(all) view fun getIDs(): [UInt64] { - return self.ownedNFTs.keys - } - - /// Returns an array of the EVM IDs that are in the collection - access(all) view fun getEVMIDs(): [UInt256] { - return self.evmIDToFlowID.keys - } - - /// Returns the Cadence NFT.id for the given EVM NFT ID if it exists in the collection - access(all) view fun getCadenceID(from evmID: UInt256): UInt64? { - if self.evmIDToFlowID[evmID] != nil { - return self.evmIDToFlowID[evmID] - } else if evmID < UInt256(UInt64.max) && self.borrowNFT(UInt64(evmID)) != nil { - return UInt64(evmID) - } else { - return nil - } - } - - /// Returns the EVM NFT ID associated with the Cadence NFT ID. The goal is to retrieve the ERC721 ID value. - /// As far as the bridge is concerned, an ERC721 defined by the bridge is the NFT's ID at the time of bridging - /// or the value of the NFT.evmID if it implements the CrossVMNFT.EVMNFT interface when bridged. - /// Following this pattern, if locked, the NFT is checked for EVMNFT conformance returning .evmID if so, - /// otherwise the NFT's ID is returned as a UInt256 since that's how the bridge would handle minting in the - /// corresponding ERC721 contract. - /// - access(all) view fun getEVMID(from cadenceID: UInt64): UInt256? { - if let nft = self.borrowNFT(cadenceID) { - if let evmNFT = CrossVMNFT.getEVMID(from: nft) { - return evmNFT - } - return UInt256(nft.id) - } - return nil - } - - /// Returns the contractURI for the NFT collection as defined in the source ERC721 contract. If none was - /// defined at the time of bridging, an empty string is returned. - access(all) view fun contractURI(): String? { - return {{CONTRACT_NAME}}.contractURI - } - - /// Gets the amount of NFTs stored in the collection - access(all) view fun getLength(): Int { - return self.ownedNFTs.keys.length - } - - /// Retrieves a reference to the NFT stored in the collection by its ID - access(all) view fun borrowNFT(_ id: UInt64): &{NonFungibleToken.NFT}? { - return &self.ownedNFTs[id] - } - - /// Borrow the view resolver for the specified NFT ID - access(all) view fun borrowViewResolver(id: UInt64): &{ViewResolver.Resolver}? { - return &self.ownedNFTs[id] as &{ViewResolver.Resolver}? ?? nil - } - - /// Creates an empty collection - access(all) fun createEmptyCollection(): @{NonFungibleToken.Collection} { - return <-{{CONTRACT_NAME}}.createEmptyCollection(nftType: Type<@{{CONTRACT_NAME}}.NFT>()) - } - } - - /// createEmptyCollection creates an empty Collection for the specified NFT type - /// and returns it to the caller so that they can own NFTs - access(all) fun createEmptyCollection(nftType: Type): @{NonFungibleToken.Collection} { - return <- create Collection() - } - - /********************** - Getters - ***********************/ - - /// Returns the name of the asset - /// - access(all) view fun getName(): String { - return self.name - } - - /// Returns the symbol of the asset - /// - access(all) view fun getSymbol(): String { - return self.symbol - } - - /// Returns the EVM contract address of the NFT this contract represents - /// - access(all) view fun getEVMContractAddress(): EVM.EVMAddress { - return self.evmNFTContractAddress - } - - /// Function that returns all the Metadata Views implemented by a Non Fungible Token - /// - /// @return An array of Types defining the implemented views. This value will be used by - /// developers to know which parameter to pass to the resolveView() method. - /// - access(all) view fun getContractViews(resourceType: Type?): [Type] { - return [ - Type(), - Type(), - Type() - ] - } - - /// Function that resolves a metadata view for this contract. - /// - /// @param view: The Type of the desired view. - /// @return A structure representing the requested view. - /// - access(all) fun resolveContractView(resourceType: Type?, viewType: Type): AnyStruct? { - switch viewType { - case Type(): - let identifier = "{{CONTRACT_NAME}}Collection" - let collectionData = MetadataViews.NFTCollectionData( - storagePath: StoragePath(identifier: identifier)!, - publicPath: PublicPath(identifier: identifier)!, - publicCollection: Type<&{{CONTRACT_NAME}}.Collection>(), - publicLinkedType: Type<&{{CONTRACT_NAME}}.Collection>(), - createEmptyCollectionFunction: (fun(): @{NonFungibleToken.Collection} { - return <-{{CONTRACT_NAME}}.createEmptyCollection(nftType: Type<@{{CONTRACT_NAME}}.NFT>()) - }) - ) - return collectionData - case Type(): - let selfRef = &self as &{ICrossVMAsset} - FlowEVMBridgeResolver.resolveBridgedView(bridgedContract: selfRef, view: Type()) - case Type(): - return MetadataViews.EVMBridgedMetadata( - name: self.name, - symbol: self.symbol, - uri: self.contractURI != nil ? MetadataViews.URI(baseURI: nil, value: self.contractURI!) : MetadataViews.URI(baseURI: nil, value: "") - ) - } - return nil - } - - /********************** - Internal Methods - ***********************/ - - /// Allows the bridge to mint NFTs from bridge-defined NFT contracts - /// - access(account) - fun mintNFT(id: UInt256, tokenURI: String): @NFT { - pre { - self.tokenURIs[id] == nil: "A token with the given ERC721 ID already exists" - } - self.tokenURIs[id] = tokenURI - return <-create NFT( - evmID: id, - metadata: { - "Bridged Block": getCurrentBlock().height, - "Bridged Timestamp": getCurrentBlock().timestamp - } - ) - } - - /// Allows the bridge to update the URI of bridged NFTs. This assumes that the EVM-defining project may contain - /// logic (onchain or offchain) which updates NFT metadata in the source ERC721 contract. On bridging, the URI can - /// then be updated in this contract to reflect the source ERC721 contract's metadata. - /// - access(account) - fun updateTokenURI(evmID: UInt256, newURI: String) { - pre { - self.tokenURIs[evmID] != nil: "No token with the given ERC721 ID exists" - } - if self.tokenURIs[evmID] != newURI { - self.tokenURIs[evmID] = newURI - } - } - - init(name: String, symbol: String, evmContractAddress: EVM.EVMAddress, contractURI: String?) { - self.evmNFTContractAddress = evmContractAddress - self.name = name - self.symbol = symbol - self.contractURI = contractURI - self.tokenURIs = {} - self.collection <- create Collection() - - FlowEVMBridgeConfig.associateType(Type<@{{CONTRACT_NAME}}.NFT>(), with: self.evmNFTContractAddress) - FlowEVMBridgeNFTEscrow.initializeEscrow( - forType: Type<@{{CONTRACT_NAME}}.NFT>(), - name: name, - symbol: symbol, - erc721Address: self.evmNFTContractAddress - ) - } -} diff --git a/cadence/contracts/templates/previewnet/EVMBridgedTokenTemplate.cdc b/cadence/contracts/templates/previewnet/EVMBridgedTokenTemplate.cdc deleted file mode 100644 index 422d05dc..00000000 --- a/cadence/contracts/templates/previewnet/EVMBridgedTokenTemplate.cdc +++ /dev/null @@ -1,278 +0,0 @@ -import NonFungibleToken from 0xb6763b4399a888c8 -import MetadataViews from 0xb6763b4399a888c8 -import FungibleTokenMetadataViews from 0xa0225e7000ac82a9 -import ViewResolver from 0xb6763b4399a888c8 -import FungibleToken from 0xa0225e7000ac82a9 -import FlowToken from 0x4445e7ad11568276 - -import EVM from 0xb6763b4399a888c8 - -import ICrossVM from 0x7792cfb75d8dfdd8 -import ICrossVMAsset from 0x7792cfb75d8dfdd8 -import IEVMBridgeTokenMinter from 0x7792cfb75d8dfdd8 -import FlowEVMBridgeTokenEscrow from 0x7792cfb75d8dfdd8 -import FlowEVMBridgeConfig from 0x7792cfb75d8dfdd8 -import FlowEVMBridgeUtils from 0x7792cfb75d8dfdd8 -import FlowEVMBridge from 0x7792cfb75d8dfdd8 -import CrossVMToken from 0x7792cfb75d8dfdd8 -import FlowEVMBridgeResolver from 0x7792cfb75d8dfdd8 - -/// This contract is a template used by FlowEVMBridge to define EVM-native fungible tokens bridged from Flow EVM to -/// Cadence. Upon deployment of this contract, the contract name is derived as a function of the asset type (here an -/// ERC20) and the contract's EVM address. The derived contract name is then joined with this contract's code, -/// prepared as chunks in FlowEVMBridgeTemplates before being deployed to the Flow EVM Bridge account. -/// -/// On bridging, the ERC20 is transferred to the bridge's CadenceOwnedAccount EVM address and tokens are minted from -/// this contract to the bridging caller. On return to Flow EVM, the reverse process is followed - the token is burned -/// in this contract and the ERC20 is transferred to the defined recipient. In this way, the Cadence Vault acts as a -/// representation of both the EVM tokens and thus ownership rights to it upon bridging back to Flow EVM. -/// -/// To bridge between VMs, a caller can either use the interface exposed on CadenceOwnedAccount or use FlowEVMBridge -/// public contract methods. -/// -access(all) contract {{CONTRACT_NAME}} : ICrossVM, ICrossVMAsset, IEVMBridgeTokenMinter, FungibleToken { - - /// Pointer to the Factory deployed Solidity contract address defining the bridged asset - access(all) let evmTokenContractAddress: EVM.EVMAddress - /// Name of the fungible token defined in the corresponding ERC20 contract - access(all) let name: String - /// Symbol of the fungible token defined in the corresponding ERC20 contract - access(all) let symbol: String - /// Decimal place value defined in the source ERC20 contract - access(all) let decimals: UInt8 - /// URI of the contract, if available as a var in case the bridge enables cross-VM Metadata syncing in the future - access(all) var contractURI: String? - /// Total supply of this Cadence token in circulation - /// NOTE: This does not reflect the total supply of the source ERC20 in circulation within EVM - access(all) var totalSupply: UFix64 - /// Retain a Vault to reference when resolving Vault Metadata - access(self) let vault: @Vault - - /// The Vault resource representing the bridged ERC20 token - /// - access(all) resource Vault : ICrossVMAsset.AssetInfo, CrossVMToken.EVMTokenInfo, FungibleToken.Vault { - /// Balance of the tokens in a given Vault - access(all) var balance: UFix64 - - init(balance: UFix64) { - self.balance = balance - } - - /* --- CrossVMToken.EVMFTVault conformance --- */ - // - /// Gets the ERC20 name value - access(all) view fun getName(): String { - return {{CONTRACT_NAME}}.name - } - /// Gets the ERC20 symbol value - access(all) view fun getSymbol(): String { - return {{CONTRACT_NAME}}.symbol - } - /// Gets the ERC20 decimals value - access(all) view fun getDecimals(): UInt8 { - return {{CONTRACT_NAME}}.decimals - } - /// Returns the EVM contract address of the fungible token - access(all) view fun getEVMContractAddress(): EVM.EVMAddress { - return {{CONTRACT_NAME}}.getEVMContractAddress() - } - - access(all) view fun getViews(): [Type] { - return {{CONTRACT_NAME}}.getContractViews(resourceType: nil) - } - - access(all) fun resolveView(_ view: Type): AnyStruct? { - return {{CONTRACT_NAME}}.resolveContractView(resourceType: nil, viewType: view) - } - - /// getSupportedVaultTypes optionally returns a list of vault types that this receiver accepts - access(all) view fun getSupportedVaultTypes(): {Type: Bool} { - return { self.getType(): true } - } - - access(all) view fun isSupportedVaultType(type: Type): Bool { - return self.getSupportedVaultTypes()[type] ?? false - } - - /// Asks if the amount can be withdrawn from this vault - access(all) view fun isAvailableToWithdraw(amount: UFix64): Bool { - return amount <= self.balance - } - - /// deposit - /// - /// Function that takes a Vault object as an argument and adds - /// its balance to the balance of the owners Vault. - /// - /// It is allowed to destroy the sent Vault because the Vault - /// was a temporary holder of the tokens. The Vault's balance has - /// been consumed and therefore can be destroyed. - /// - access(all) fun deposit(from: @{FungibleToken.Vault}) { - let vault <- from as! @Vault - self.balance = self.balance + vault.balance - vault.balance = 0.0 - destroy vault - } - - /// createEmptyVault - /// - /// Function that creates a new Vault with a balance of zero - /// and returns it to the calling context. A user must call this function - /// and store the returned Vault in their storage in order to allow their - /// account to be able to receive deposits of this token type. - /// - access(all) fun createEmptyVault(): @Vault { - return <-create Vault(balance: 0.0) - } - - /// withdraw - /// - /// Function that takes an amount as an argument - /// and withdraws that amount from the Vault. - /// - /// It creates a new temporary Vault that is used to hold - /// the tokens that are being transferred. It returns the newly - /// created Vault to the context that called so it can be deposited - /// elsewhere. - /// - access(FungibleToken.Withdraw) fun withdraw(amount: UFix64): @Vault { - self.balance = self.balance - amount - return <-create Vault(balance: amount) - } - - /// Called when a fungible token is burned via the `Burner.burn()` method - access(contract) fun burnCallback() { - if self.balance > 0.0 { - {{CONTRACT_NAME}}.totalSupply = {{CONTRACT_NAME}}.totalSupply - self.balance - } - self.balance = 0.0 - } - } - - /// createEmptyVault - /// - /// Function that creates a new Vault with a balance of zero and returns it to the calling context. A user must call - /// this function and store the returned Vault in their storage in order to allow their account to be able to - /// receive deposits of this token type. - /// - access(all) fun createEmptyVault(vaultType: Type): @{{CONTRACT_NAME}}.Vault { - return <- create Vault(balance: 0.0) - } - - /********************** - Getters - ***********************/ - - /// Returns the name of the asset - /// - access(all) view fun getName(): String { - return self.name - } - - /// Returns the symbol of the asset - /// - access(all) view fun getSymbol(): String { - return self.symbol - } - - /// Returns the EVM contract address of the fungible token this contract represents - /// - access(all) view fun getEVMContractAddress(): EVM.EVMAddress { - return self.evmTokenContractAddress - } - - /// Function that returns all the Metadata Views implemented by this fungible token contract. - /// - /// @return An array of Types defining the implemented views. This value will be used by developers to know which - /// parameter to pass to the resolveContractView() method. - /// - access(all) view fun getContractViews(resourceType: Type?): [Type] { - return [ - Type(), - Type(), - Type(), - Type(), - Type() - ] - } - - /// Function that resolves a metadata view for this contract. - /// - /// @param view: The Type of the desired view. - /// - /// @return A structure representing the requested view. - /// - access(all) fun resolveContractView(resourceType: Type?, viewType: Type): AnyStruct? { - switch viewType { - case Type(): - return FungibleTokenMetadataViews.FTView( - ftDisplay: self.resolveContractView(resourceType: nil, viewType: Type()) as! FungibleTokenMetadataViews.FTDisplay?, - ftVaultData: self.resolveContractView(resourceType: nil, viewType: Type()) as! FungibleTokenMetadataViews.FTVaultData? - ) - case Type(): - let contractRef = self.borrowThisContract() - return FlowEVMBridgeResolver.resolveBridgedView(bridgedContract: contractRef, view: Type()) - case Type(): - return FungibleTokenMetadataViews.FTVaultData( - storagePath: /storage/{{CONTRACT_NAME}}Vault, - receiverPath: /public/{{CONTRACT_NAME}}Receiver, - metadataPath: /public/{{CONTRACT_NAME}}Vault, - receiverLinkedType: Type<&{{CONTRACT_NAME}}.Vault>(), - metadataLinkedType: Type<&{{CONTRACT_NAME}}.Vault>(), - createEmptyVaultFunction: (fun(): @{FungibleToken.Vault} { - return <-self.createEmptyVault(vaultType: Type<@{{CONTRACT_NAME}}.Vault>()) - }) - ) - case Type(): - return FungibleTokenMetadataViews.TotalSupply( - totalSupply: self.totalSupply - ) - case Type(): - return MetadataViews.EVMBridgedMetadata( - name: self.name, - symbol: self.symbol, - uri: self.contractURI != nil ? MetadataViews.URI(baseURI: nil, value: self.contractURI!) : MetadataViews.URI(baseURI: nil, value: "") - ) - } - return nil - } - - /********************** - Internal Methods - ***********************/ - - /// Allows the bridge to mint tokens from bridge-defined fungible token contracts - /// - access(account) fun mintTokens(amount: UFix64): @{FungibleToken.Vault} { - self.totalSupply = self.totalSupply + amount - return <- create Vault(balance: amount) - } - - /// Returns a reference to this contract as an ICrossVMAsset contract - /// - access(self) - fun borrowThisContract(): &{ICrossVMAsset} { - let contractAddress = self.account.address - return getAccount(contractAddress).contracts.borrow<&{ICrossVMAsset}>(name: "{{CONTRACT_NAME}}")! - } - - init(name: String, symbol: String, decimals: UInt8, evmContractAddress: EVM.EVMAddress, contractURI: String?) { - self.evmTokenContractAddress = evmContractAddress - self.name = name - self.symbol = symbol - self.decimals = decimals - self.contractURI = contractURI - self.totalSupply = 0.0 - self.vault <- create Vault(balance: 0.0) - - FlowEVMBridgeConfig.associateType(Type<@{{CONTRACT_NAME}}.Vault>(), with: self.evmTokenContractAddress) - FlowEVMBridgeTokenEscrow.initializeEscrow( - with: <-create Vault(balance: 0.0), - name: name, - symbol: symbol, - decimals: decimals, - evmTokenAddress: self.evmTokenContractAddress - ) - } -}