diff --git a/cadence/args/bridged-nft-code-chunks-args.json b/cadence/args/bridged-nft-code-chunks-args.json index f451dd38..b506de26 100644 --- a/cadence/args/bridged-nft-code-chunks-args.json +++ b/cadence/args/bridged-nft-code-chunks-args.json @@ -10,7 +10,7 @@ "value": "696d706f7274204e6f6e46756e6769626c65546f6b656e2066726f6d203078663864366530353836623061323063370a696d706f7274204d6574616461746156696577732066726f6d203078663864366530353836623061323063370a696d706f727420566965775265736f6c7665722066726f6d203078663864366530353836623061323063370a696d706f72742046756e6769626c65546f6b656e2066726f6d203078656538323835366266323065326161360a696d706f727420466c6f77546f6b656e2066726f6d203078306165353363623665336634326137390a0a696d706f72742045564d2066726f6d203078663864366530353836623061323063370a0a696d706f7274204943726f7373564d2066726f6d203078663864366530353836623061323063370a696d706f7274204945564d4272696467654e46544d696e7465722066726f6d203078663864366530353836623061323063370a696d706f727420466c6f7745564d4272696467654e4654457363726f772066726f6d203078663864366530353836623061323063370a696d706f727420466c6f7745564d427269646765436f6e6669672066726f6d203078663864366530353836623061323063370a696d706f727420466c6f7745564d4272696467655574696c732066726f6d203078663864366530353836623061323063370a696d706f727420466c6f7745564d4272696467652066726f6d203078663864366530353836623061323063370a696d706f72742043726f7373564d4e46542066726f6d203078663864366530353836623061323063370a0a2f2f2f205468697320636f6e747261637420697320612074656d706c617465207573656420627920466c6f7745564d42726964676520746f20646566696e652045564d2d6e6174697665204e46547320627269646765642066726f6d20466c6f772045564d20746f20466c6f772e0a2f2f2f2055706f6e206465706c6f796d656e74206f66207468697320636f6e74726163742c2074686520636f6e7472616374206e616d65206973206465726976656420617320612066756e6374696f6e206f6620746865206173736574207479706520286865726520616e2045524337323120616b610a2f2f2f20616e204e46542920616e642074686520636f6e747261637427732045564d20616464726573732e20546865206465726976656420636f6e7472616374206e616d65206973207468656e206a6f696e65642077697468207468697320636f6e7472616374277320636f64652c0a2f2f2f207072657061726564206173206368756e6b7320696e20466c6f7745564d42726964676554656d706c61746573206265666f7265206265696e67206465706c6f79656420746f2074686520466c6f772045564d20427269646765206163636f756e742e0a2f2f2f0a2f2f2f204f6e206272696467696e672c2074686520455243373231206973207472616e7366657272656420746f2074686520627269646765277320436164656e63654f776e65644163636f756e742045564d206164647265737320616e642061206e6577204e4654206973206d696e7465642066726f6d0a2f2f2f207468697320636f6e747261637420746f20746865206272696467696e672063616c6c65722e204f6e2072657475726e20746f20466c6f772045564d2c2074686520726576657273652070726f6365737320697320666f6c6c6f776564202d2074686520746f6b656e206973206275726e65640a2f2f2f20696e207468697320636f6e747261637420616e642074686520455243373231206973207472616e7366657272656420746f2074686520646566696e656420726563697069656e742e20496e2074686973207761792c2074686520436164656e636520746f6b656e206163747320617320610a2f2f2f20726570726573656e746174696f6e206f6620626f7468207468652045564d204e465420616e642074687573206f776e6572736869702072696768747320746f2069742075706f6e206272696467696e67206261636b20746f20466c6f772045564d2e0a2f2f2f0a2f2f2f20546f20627269646765206265747765656e20564d732c20612063616c6c65722063616e20656974686572207573652074686520636f6e7472616374206d6574686f647320646566696e65642062656c6f772c206f72207573652074686520466c6f7745564d42726964676527730a2f2f2f206272696467696e67206d6574686f64732077686963682077696c6c2070726f6772616d61746963616c6c7920726f757465206272696467696e672063616c6c7320746f207468697320636f6e74726163742e0a2f2f2f0a2f2f20544f444f3a20496d706c656d656e74204e465420636f6e747261637420696e74657266616365206f6e636520763220617661696c61626c65206c6f63616c6c790a61636365737328616c6c2920636f6e747261637420" }, { "type": "String", - "value": "203a204943726f7373564d2c204945564d4272696467654e46544d696e7465722c204e6f6e46756e6769626c65546f6b656e207b0a0a202020202f2f2f20506f696e74657220746f2074686520466163746f7279206465706c6f79656420536f6c696469747920636f6e7472616374206164647265737320646566696e696e672074686520627269646765642061737365740a2020202061636365737328616c6c29206c65742065766d4e4654436f6e7472616374416464726573733a2045564d2e45564d416464726573730a202020202f2f2f20506f696e74657220746f2074686520466c6f77204e465420636f6e7472616374206164647265737320646566696e696e672074686520627269646765642061737365742c207468697320636f6e7472616374206164647265737320696e207468697320636173650a2020202061636365737328616c6c29206c657420666c6f774e4654436f6e7472616374416464726573733a20416464726573730a202020202f2f2f204e616d65206f6620746865204e465420636f6c6c656374696f6e20646566696e656420696e2074686520636f72726573706f6e64696e672045524337323120636f6e74726163740a2020202061636365737328616c6c29206c6574206e616d653a20537472696e670a202020202f2f2f2053796d626f6c206f6620746865204e465420636f6c6c656374696f6e20646566696e656420696e2074686520636f72726573706f6e64696e672045524337323120636f6e74726163740a2020202061636365737328616c6c29206c65742073796d626f6c3a20537472696e670a202020202f2f2f20555249206f662074686520636f6e74726163742c20696620617661696c61626c6520617320612076617220696e2063617365207468652062726964676520656e61626c65732063726f73732d564d204d657461646174612073796e63696e6720696e20746865206675747572650a2020202061636365737328616c6c292076617220636f6e74726163745552493a20537472696e673f0a202020202f2f2f2052657461696e206120436f6c6c656374696f6e20746f207265666572656e6365207768656e207265736f6c76696e6720436f6c6c656374696f6e204d657461646174610a202020206163636573732873656c6629206c657420636f6c6c656374696f6e3a2040436f6c6c656374696f6e0a202020202f2f2f204d617070696e67206f6620746f6b656e205552497320696e6465786564206f6e207468656972204552433732312049442e205468697320776f756c64206e6f74206e6f726d616c6c792062652072657461696e65642077697468696e206120436164656e6365204e46540a202020202f2f2f20636f6e74726163742c206275742073696e6365204e4654206d65746164617461206d6179206265207570646174656420696e2045564d2c20697427732072657461696e6564206865726520736f207468617420746865206272696467652063616e207570646174650a202020202f2f2f20697420616761696e73742074686520736f757263652045524337323120636f6e7472616374207768696368206973207472656174656420617320746865204e4654277320736f75726365206f662074727574682e0a2020202061636365737328616c6c29206c657420746f6b656e555249733a207b55496e743235363a20537472696e677d0a0a202020202f2f2f20546865204e4654207265736f7572636520726570726573656e74696e672074686520627269646765642045524337323120746f6b656e0a202020202f2f2f0a2020202061636365737328616c6c29207265736f75726365204e46543a2043726f7373564d4e46542e45564d4e4654207b0a20202020202020202f2f2f2054686520436164656e6365204944206f6620746865204e46540a202020202020202061636365737328616c6c29206c65742069643a2055496e7436340a20202020202020202f2f2f2054686520455243373231204944206f6620746865204e46540a202020202020202061636365737328616c6c29206c65742065766d49443a2055496e743235360a20202020202020202f2f2f20546865206e616d65206f6620746865204e465420617320646566696e656420696e207468652045524337323120636f6e74726163740a202020202020202061636365737328616c6c29206c6574206e616d653a20537472696e670a20202020202020202f2f2f205468652073796d626f6c206f6620746865204e465420617320646566696e656420696e207468652045524337323120636f6e74726163740a202020202020202061636365737328616c6c29206c65742073796d626f6c3a20537472696e670a20202020202020202f2f2f204164646974696f6e616c206f6e636861696e206d657461646174610a202020202020202061636365737328616c6c29206c6574206d657461646174613a207b537472696e673a20416e795374727563747d0a0a2020202020202020696e6974280a2020202020202020202020206e616d653a20537472696e672c0a20202020202020202020202073796d626f6c3a20537472696e672c0a20202020202020202020202065766d49443a2055496e743235362c0a2020202020202020202020206d657461646174613a207b537472696e673a20416e795374727563747d0a202020202020202029207b0a20202020202020202020202073656c662e6e616d65203d206e616d650a20202020202020202020202073656c662e73796d626f6c203d2073796d626f6c0a20202020202020202020202073656c662e6964203d2073656c662e757569640a20202020202020202020202073656c662e65766d4944203d2065766d49440a20202020202020202020202073656c662e6d65746164617461203d206d657461646174610a20202020202020207d0a0a20202020202020202f2f2f2052657475726e7320746865206d65746164617461207669657720747970657320737570706f727465642062792074686973204e46540a202020202020202061636365737328616c6c2920766965772066756e20676574566965777328293a205b547970655d207b0a20202020202020202020202072657475726e205b0a20202020202020202020202020202020547970653c43726f7373564d4e46542e45564d427269646765644d657461646174613e28292c0a20202020202020202020202020202020547970653c4d6574616461746156696577732e53657269616c3e28292c0a20202020202020202020202020202020547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446174613e28292c0a20202020202020202020202020202020547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446973706c61793e28290a2020202020202020202020205d0a20202020202020207d0a0a20202020202020202f2f2f205265736f6c7665732061206d65746164617461207669657720666f722074686973204e46540a202020202020202061636365737328616c6c292066756e207265736f6c766556696577285f20766965773a2054797065293a20416e795374727563743f207b0a2020202020202020202020207377697463682076696577207b0a202020202020202020202020202020202f2f20576520646f6e2774206b6e6f772077686174206b696e64206f662066696c65207468652055524920726570726573656e747320284950465320762048545450292c20736f2077652063616e2774207265736f6c766520446973706c617920766965770a202020202020202020202020202020202f2f20776974682074686520555249206173207468756d626e61696c202d207765206d61792061206e6577207374616e64617264207669657720666f722045564d204e465473202d207468697320697320696e746572696d0a202020202020202020202020202020206361736520547970653c43726f7373564d4e46542e45564d427269646765644d657461646174613e28293a0a202020202020202020202020202020202020202072657475726e2043726f7373564d4e46542e45564d427269646765644d65746164617461280a2020202020202020202020202020202020202020202020206e616d653a2073656c662e6e616d652c0a20202020202020202020202020202020202020202020202073796d626f6c3a2073656c662e73796d626f6c2c0a2020202020202020202020202020202020202020202020207572693a2043726f7373564d4e46542e5552492873656c662e746f6b656e5552492829290a2020202020202020202020202020202020202020290a202020202020202020202020202020206361736520547970653c4d6574616461746156696577732e53657269616c3e28293a0a202020202020202020202020202020202020202072657475726e204d6574616461746156696577732e53657269616c280a20202020202020202020202020202020202020202020202073656c662e69640a2020202020202020202020202020202020202020290a202020202020202020202020202020206361736520547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446174613e28293a0a202020202020202020202020202020202020202072657475726e20" + "value": "203a204943726f7373564d2c204945564d4272696467654e46544d696e7465722c204e6f6e46756e6769626c65546f6b656e207b0a0a202020202f2f2f20506f696e74657220746f2074686520466163746f7279206465706c6f79656420536f6c696469747920636f6e7472616374206164647265737320646566696e696e672074686520627269646765642061737365740a2020202061636365737328616c6c29206c65742065766d4e4654436f6e7472616374416464726573733a2045564d2e45564d416464726573730a202020202f2f2f20506f696e74657220746f2074686520466c6f77204e465420636f6e7472616374206164647265737320646566696e696e672074686520627269646765642061737365742c207468697320636f6e7472616374206164647265737320696e207468697320636173650a2020202061636365737328616c6c29206c657420666c6f774e4654436f6e7472616374416464726573733a20416464726573730a202020202f2f2f204e616d65206f6620746865204e465420636f6c6c656374696f6e20646566696e656420696e2074686520636f72726573706f6e64696e672045524337323120636f6e74726163740a2020202061636365737328616c6c29206c6574206e616d653a20537472696e670a202020202f2f2f2053796d626f6c206f6620746865204e465420636f6c6c656374696f6e20646566696e656420696e2074686520636f72726573706f6e64696e672045524337323120636f6e74726163740a2020202061636365737328616c6c29206c65742073796d626f6c3a20537472696e670a202020202f2f2f20555249206f662074686520636f6e74726163742c20696620617661696c61626c6520617320612076617220696e2063617365207468652062726964676520656e61626c65732063726f73732d564d204d657461646174612073796e63696e6720696e20746865206675747572650a2020202061636365737328616c6c292076617220636f6e74726163745552493a20537472696e673f0a202020202f2f2f2052657461696e206120436f6c6c656374696f6e20746f207265666572656e6365207768656e207265736f6c76696e6720436f6c6c656374696f6e204d657461646174610a202020206163636573732873656c6629206c657420636f6c6c656374696f6e3a2040436f6c6c656374696f6e0a202020202f2f2f204d617070696e67206f6620746f6b656e205552497320696e6465786564206f6e207468656972204552433732312049442e205468697320776f756c64206e6f74206e6f726d616c6c792062652072657461696e65642077697468696e206120436164656e6365204e46540a202020202f2f2f20636f6e74726163742c206275742073696e6365204e4654206d65746164617461206d6179206265207570646174656420696e2045564d2c20697427732072657461696e6564206865726520736f207468617420746865206272696467652063616e207570646174650a202020202f2f2f20697420616761696e73742074686520736f757263652045524337323120636f6e7472616374207768696368206973207472656174656420617320746865204e4654277320736f75726365206f662074727574682e0a2020202061636365737328616c6c29206c657420746f6b656e555249733a207b55496e743235363a20537472696e677d0a0a202020202f2f2f20546865204e4654207265736f7572636520726570726573656e74696e672074686520627269646765642045524337323120746f6b656e0a202020202f2f2f0a2020202061636365737328616c6c29207265736f75726365204e46543a2043726f7373564d4e46542e45564d4e4654207b0a20202020202020202f2f2f2054686520436164656e6365204944206f6620746865204e46540a202020202020202061636365737328616c6c29206c65742069643a2055496e7436340a20202020202020202f2f2f2054686520455243373231204944206f6620746865204e46540a202020202020202061636365737328616c6c29206c65742065766d49443a2055496e743235360a20202020202020202f2f2f20546865206e616d65206f6620746865204e465420617320646566696e656420696e207468652045524337323120636f6e74726163740a202020202020202061636365737328616c6c29206c6574206e616d653a20537472696e670a20202020202020202f2f2f205468652073796d626f6c206f6620746865204e465420617320646566696e656420696e207468652045524337323120636f6e74726163740a202020202020202061636365737328616c6c29206c65742073796d626f6c3a20537472696e670a20202020202020202f2f2f204164646974696f6e616c206f6e636861696e206d657461646174610a202020202020202061636365737328616c6c29206c6574206d657461646174613a207b537472696e673a20416e795374727563747d0a0a2020202020202020696e6974280a2020202020202020202020206e616d653a20537472696e672c0a20202020202020202020202073796d626f6c3a20537472696e672c0a20202020202020202020202065766d49443a2055496e743235362c0a2020202020202020202020206d657461646174613a207b537472696e673a20416e795374727563747d0a202020202020202029207b0a20202020202020202020202073656c662e6e616d65203d206e616d650a20202020202020202020202073656c662e73796d626f6c203d2073796d626f6c0a20202020202020202020202073656c662e6964203d2073656c662e757569640a20202020202020202020202073656c662e65766d4944203d2065766d49440a20202020202020202020202073656c662e6d65746164617461203d206d657461646174610a20202020202020207d0a0a20202020202020202f2f2f2052657475726e7320746865206d65746164617461207669657720747970657320737570706f727465642062792074686973204e46540a202020202020202061636365737328616c6c2920766965772066756e20676574566965777328293a205b547970655d207b0a20202020202020202020202072657475726e205b0a20202020202020202020202020202020547970653c43726f7373564d4e46542e45564d427269646765644d657461646174613e28292c0a20202020202020202020202020202020547970653c4d6574616461746156696577732e53657269616c3e28292c0a20202020202020202020202020202020547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446174613e28292c0a20202020202020202020202020202020547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446973706c61793e28290a2020202020202020202020205d0a20202020202020207d0a0a20202020202020202f2f2f205265736f6c7665732061206d65746164617461207669657720666f722074686973204e46540a202020202020202061636365737328616c6c292066756e207265736f6c766556696577285f20766965773a2054797065293a20416e795374727563743f207b0a2020202020202020202020207377697463682076696577207b0a202020202020202020202020202020202f2f20576520646f6e2774206b6e6f772077686174206b696e64206f662066696c65207468652055524920726570726573656e747320284950465320762048545450292c20736f2077652063616e2774207265736f6c766520446973706c617920766965770a202020202020202020202020202020202f2f20776974682074686520555249206173207468756d626e61696c202d207765206d61792061206e6577207374616e64617264207669657720666f722045564d204e465473202d207468697320697320696e746572696d0a202020202020202020202020202020206361736520547970653c43726f7373564d4e46542e45564d427269646765644d657461646174613e28293a0a202020202020202020202020202020202020202072657475726e2043726f7373564d4e46542e45564d427269646765644d65746164617461280a2020202020202020202020202020202020202020202020206e616d653a2073656c662e6e616d652c0a20202020202020202020202020202020202020202020202073796d626f6c3a2073656c662e73796d626f6c2c0a2020202020202020202020202020202020202020202020207572693a2043726f7373564d4e46542e55524928626173655552493a206e696c2c2076616c75653a2073656c662e746f6b656e5552492829290a2020202020202020202020202020202020202020290a202020202020202020202020202020206361736520547970653c4d6574616461746156696577732e53657269616c3e28293a0a202020202020202020202020202020202020202072657475726e204d6574616461746156696577732e53657269616c280a20202020202020202020202020202020202020202020202073656c662e69640a2020202020202020202020202020202020202020290a202020202020202020202020202020206361736520547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446174613e28293a0a202020202020202020202020202020202020202072657475726e20" }, { "type": "String", "value": "2e7265736f6c7665436f6e747261637456696577280a2020202020202020202020202020202020202020202020207265736f75726365547970653a2073656c662e6765745479706528292c0a20202020202020202020202020202020202020202020202076696577547970653a20547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446174613e28290a2020202020202020202020202020202020202020290a202020202020202020202020202020206361736520547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446973706c61793e28293a0a202020202020202020202020202020202020202072657475726e20" @@ -25,10 +25,7 @@ "value": "2e67657445564d436f6e74726163744164647265737328290a20202020202020207d0a0a20202020202020202f2f2f2053696d696c617220746f204552433732312e746f6b656e555249206d6574686f642c2072657475726e732074686520555249206f6620746865204e465420776974682073656c662e65766d49442061742074696d65206f66206272696467696e670a202020202020202061636365737328616c6c2920766965772066756e20746f6b656e55524928293a20537472696e67207b0a20202020202020202020202072657475726e20" }, { "type": "String", - "value": "2e746f6b656e555249735b73656c662e65766d49445d203f3f2022220a20202020202020207d0a0a20202020202020202f2a202d2d2d20427269646765206f6e6c79206d6574686f64202d2d2d202a2f0a20202020202020202f2f0a20202020202020202f2f2f20416c6c6f7773207468652062726964676520746f20757064617465207468652055524920616761696e73742074686520736f757263652045524337323120636f6e7472616374206f6e206272696467696e67206261636b20746f20436164656e63650a2020202020202020616363657373286163636f756e74290a202020202020202066756e20757064617465555249285f206e65773a20537472696e6729207b0a202020202020202020202020" - }, { - "type": "String", - "value": "2e757064617465546f6b656e5552492869643a2073656c662e65766d49442c206e65775552493a206e6577290a20202020202020207d0a202020207d0a0a202020202f2f2f2054686973207265736f7572636520686f6c6473206173736f636961746564204e4654732c20616e642073657276657320717565726965732061626f75742073746f726564204e4654730a2020202061636365737328616c6c29207265736f7572636520436f6c6c656374696f6e3a204e6f6e46756e6769626c65546f6b656e2e436f6c6c656374696f6e2c2043726f7373564d4e46542e45564d4e4654436f6c6c656374696f6e207b0a20202020202020202f2f2f2064696374696f6e617279206f66204e465420636f6e666f726d696e6720746f6b656e7320696e6465786564206f6e2074686569722049440a202020202020202061636365737328636f6e74726163742920766172206f776e65644e4654733a20407b55496e7436343a20" + "value": "2e746f6b656e555249735b73656c662e65766d49445d203f3f2022220a20202020202020207d0a202020207d0a0a202020202f2f2f2054686973207265736f7572636520686f6c6473206173736f636961746564204e4654732c20616e642073657276657320717565726965732061626f75742073746f726564204e4654730a2020202061636365737328616c6c29207265736f7572636520436f6c6c656374696f6e3a204e6f6e46756e6769626c65546f6b656e2e436f6c6c656374696f6e2c2043726f7373564d4e46542e45564d4e4654436f6c6c656374696f6e207b0a20202020202020202f2f2f2064696374696f6e617279206f66204e465420636f6e666f726d696e6720746f6b656e7320696e6465786564206f6e2074686569722049440a202020202020202061636365737328636f6e74726163742920766172206f776e65644e4654733a20407b55496e7436343a20" }, { "type": "String", "value": "2e4e46547d0a20202020202020202f2f2f204d617070696e67206f662045564d2049447320746f20466c6f77204e4654204944730a202020202020202061636365737328636f6e747261637429206c65742065766d4944546f466c6f7749443a207b55496e743235363a2055496e7436347d0a0a202020202020202061636365737328616c6c29207661722073746f72616765506174683a2053746f72616765506174680a202020202020202061636365737328616c6c2920766172207075626c6963506174683a205075626c6963506174680a0a2020202020202020696e6974202829207b0a20202020202020202020202073656c662e6f776e65644e465473203c2d207b7d0a20202020202020202020202073656c662e65766d4944546f466c6f774944203d207b7d0a2020202020202020202020206c657420636f6c6c656374696f6e44617461203d20" @@ -73,7 +70,7 @@ "value": "2e637265617465456d707479436f6c6c656374696f6e286e6674547970653a20547970653c40" }, { "type": "String", - "value": "2e4e46543e2829290a20202020202020202020202020202020202020207d290a20202020202020202020202020202020290a2020202020202020202020202020202072657475726e20636f6c6c656374696f6e446174610a2020202020202020202020206361736520547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446973706c61793e28293a0a202020202020202020202020202020206c6574206d65646961203d204d6574616461746156696577732e4d65646961280a202020202020202020202020202020202020202066696c653a204d6574616461746156696577732e4854545046696c65280a20202020202020202020202020202020202020202020202075726c3a202268747470733a2f2f6173736574732e776562736974652d66696c65732e636f6d2f3566363239346330633761386364643634336231633832302f3566363239346330633761386364613535636231633933365f466c6f775f576f72646d61726b2e737667220a2020202020202020202020202020202020202020292c0a20202020202020202020202020202020202020206d65646961547970653a2022696d6167652f7376672b786d6c220a20202020202020202020202020202020290a2020202020202020202020202020202072657475726e204d6574616461746156696577732e4e4654436f6c6c656374696f6e446973706c6179280a20202020202020202020202020202020202020206e616d653a202254686520466c6f77564d2042726964676564204e465420436f6c6c656374696f6e222c0a20202020202020202020202020202020202020206465736372697074696f6e3a20225468697320636f6c6c656374696f6e2077617320627269646765642066726f6d20466c6f772045564d2e222c0a202020202020202020202020202020202020202065787465726e616c55524c3a204d6574616461746156696577732e45787465726e616c55524c282268747470733a2f2f6272696467652e666c6f772e636f6d2f6e667422292c0a2020202020202020202020202020202020202020737175617265496d6167653a206d656469612c0a202020202020202020202020202020202020202062616e6e6572496d6167653a206d656469612c0a2020202020202020202020202020202020202020736f6369616c733a207b7d0a20202020202020202020202020202020290a2020202020202020202020206361736520547970653c43726f7373564d4e46542e45564d427269646765644d657461646174613e28293a0a2020202020202020202020202020202072657475726e2043726f7373564d4e46542e45564d427269646765644d65746164617461280a20202020202020202020202020202020202020206e616d653a2073656c662e6e616d652c0a202020202020202020202020202020202020202073796d626f6c3a2073656c662e73796d626f6c2c0a20202020202020202020202020202020202020207572693a2073656c662e636f6e747261637455524920213d206e696c203f2043726f7373564d4e46542e5552492873656c662e636f6e74726163745552492129203a2043726f7373564d4e46542e555249282222290a20202020202020202020202020202020290a20202020202020207d0a202020202020202072657475726e206e696c0a202020207d0a0a202020202f2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a0a2020202020202020496e7465726e616c204d6574686f64730a202020202a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2f0a0a202020202f2f2f20416c6c6f7773207468652062726964676520746f206d696e74204e4654732066726f6d206272696467652d646566696e6564204e465420636f6e7472616374730a202020202f2f2f0a20202020616363657373286163636f756e74290a2020202066756e206d696e744e46542869643a2055496e743235362c20746f6b656e5552493a20537472696e67293a20404e4654207b0a2020202020202020707265207b0a20202020202020202020202073656c662e746f6b656e555249735b69645d203d3d206e696c3a20224120746f6b656e20776974682074686520676976656e2045524337323120494420616c726561647920657869737473220a20202020202020207d0a202020202020202073656c662e746f6b656e555249735b69645d203d20746f6b656e5552490a202020202020202072657475726e203c2d637265617465204e4654280a2020202020202020202020206e616d653a2073656c662e6e616d652c0a20202020202020202020202073796d626f6c3a2073656c662e73796d626f6c2c0a20202020202020202020202065766d49443a2069642c0a2020202020202020202020207572693a20746f6b656e5552492c0a2020202020202020202020206d657461646174613a207b0a20202020202020202020202020202020224272696467656420426c6f636b223a2067657443757272656e74426c6f636b28292e6865696768742c0a2020202020202020202020202020202022427269646765642054696d657374616d70223a2067657443757272656e74426c6f636b28292e74696d657374616d700a2020202020202020202020207d0a2020202020202020290a202020207d0a0a202020202f2f2f20416c6c6f7773207468652062726964676520746f207570646174652074686520555249206f662062726964676564204e4654732e205468697320617373756d65732074686174207468652045564d2d646566696e696e672070726f6a656374206d617920636f6e7461696e0a202020202f2f2f206c6f67696320286f6e636861696e206f72206f6666636861696e292077686963682075706461746573204e4654206d6574616461746120696e2074686520736f757263652045524337323120636f6e74726163742e204f6e206272696467696e672c20746865205552492063616e0a202020202f2f2f207468656e206265207570646174656420696e207468697320636f6e747261637420746f207265666c6563742074686520736f757263652045524337323120636f6e74726163742773206d657461646174612e0a202020202f2f2f0a20202020616363657373286163636f756e74290a2020202066756e207570646174655552492869643a2055496e743235362c206e65775552493a20537472696e6729207b0a2020202020202020707265207b0a20202020202020202020202073656c662e746f6b656e555249735b69645d20213d206e696c3a20224e6f20746f6b656e20776974682074686520676976656e2045524337323120494420657869737473220a20202020202020207d0a202020202020202073656c662e746f6b656e555249735b69645d203d206e65775552490a202020207d0a0a20202020696e6974286e616d653a20537472696e672c2073796d626f6c3a20537472696e672c2065766d436f6e7472616374416464726573733a2045564d2e45564d416464726573732c20636f6e74726163745552493a20537472696e673f29207b0a202020202020202073656c662e65766d4e4654436f6e747261637441646472657373203d2065766d436f6e7472616374416464726573730a202020202020202073656c662e666c6f774e4654436f6e747261637441646472657373203d2073656c662e6163636f756e742e616464726573730a202020202020202073656c662e6e616d65203d206e616d650a202020202020202073656c662e73796d626f6c203d2073796d626f6c0a202020202020202073656c662e636f6e7472616374555249203d20636f6e74726163745552490a202020202020202073656c662e746f6b656e55524973203d207b7d0a202020202020202073656c662e636f6c6c656374696f6e203c2d2063726561746520436f6c6c656374696f6e28290a0a2020202020202020466c6f7745564d427269646765436f6e6669672e6173736f63696174655479706528547970653c40" + "value": "2e4e46543e2829290a20202020202020202020202020202020202020207d290a20202020202020202020202020202020290a2020202020202020202020202020202072657475726e20636f6c6c656374696f6e446174610a2020202020202020202020206361736520547970653c4d6574616461746156696577732e4e4654436f6c6c656374696f6e446973706c61793e28293a0a202020202020202020202020202020206c6574206d65646961203d204d6574616461746156696577732e4d65646961280a202020202020202020202020202020202020202066696c653a204d6574616461746156696577732e4854545046696c65280a20202020202020202020202020202020202020202020202075726c3a202268747470733a2f2f6173736574732e776562736974652d66696c65732e636f6d2f3566363239346330633761386364643634336231633832302f3566363239346330633761386364613535636231633933365f466c6f775f576f72646d61726b2e737667220a2020202020202020202020202020202020202020292c0a20202020202020202020202020202020202020206d65646961547970653a2022696d6167652f7376672b786d6c220a20202020202020202020202020202020290a2020202020202020202020202020202072657475726e204d6574616461746156696577732e4e4654436f6c6c656374696f6e446973706c6179280a20202020202020202020202020202020202020206e616d653a202254686520466c6f77564d2042726964676564204e465420436f6c6c656374696f6e222c0a20202020202020202020202020202020202020206465736372697074696f6e3a20225468697320636f6c6c656374696f6e2077617320627269646765642066726f6d20466c6f772045564d2e222c0a202020202020202020202020202020202020202065787465726e616c55524c3a204d6574616461746156696577732e45787465726e616c55524c282268747470733a2f2f6272696467652e666c6f772e636f6d2f6e667422292c0a2020202020202020202020202020202020202020737175617265496d6167653a206d656469612c0a202020202020202020202020202020202020202062616e6e6572496d6167653a206d656469612c0a2020202020202020202020202020202020202020736f6369616c733a207b7d0a20202020202020202020202020202020290a2020202020202020202020206361736520547970653c43726f7373564d4e46542e45564d427269646765644d657461646174613e28293a0a2020202020202020202020202020202072657475726e2043726f7373564d4e46542e45564d427269646765644d65746164617461280a20202020202020202020202020202020202020206e616d653a2073656c662e6e616d652c0a202020202020202020202020202020202020202073796d626f6c3a2073656c662e73796d626f6c2c0a20202020202020202020202020202020202020207572693a2073656c662e636f6e747261637455524920213d206e696c203f2043726f7373564d4e46542e55524928626173655552493a206e696c2c2076616c75653a2073656c662e636f6e74726163745552492129203a2043726f7373564d4e46542e55524928626173655552493a206e696c2c2076616c75653a202222290a20202020202020202020202020202020290a20202020202020207d0a202020202020202072657475726e206e696c0a202020207d0a0a202020202f2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a0a2020202020202020496e7465726e616c204d6574686f64730a202020202a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2f0a0a202020202f2f2f20416c6c6f7773207468652062726964676520746f206d696e74204e4654732066726f6d206272696467652d646566696e6564204e465420636f6e7472616374730a202020202f2f2f0a20202020616363657373286163636f756e74290a2020202066756e206d696e744e46542869643a2055496e743235362c20746f6b656e5552493a20537472696e67293a20404e4654207b0a2020202020202020707265207b0a20202020202020202020202073656c662e746f6b656e555249735b69645d203d3d206e696c3a20224120746f6b656e20776974682074686520676976656e2045524337323120494420616c726561647920657869737473220a20202020202020207d0a202020202020202073656c662e746f6b656e555249735b69645d203d20746f6b656e5552490a202020202020202072657475726e203c2d637265617465204e4654280a2020202020202020202020206e616d653a2073656c662e6e616d652c0a20202020202020202020202073796d626f6c3a2073656c662e73796d626f6c2c0a20202020202020202020202065766d49443a2069642c0a2020202020202020202020206d657461646174613a207b0a20202020202020202020202020202020224272696467656420426c6f636b223a2067657443757272656e74426c6f636b28292e6865696768742c0a2020202020202020202020202020202022427269646765642054696d657374616d70223a2067657443757272656e74426c6f636b28292e74696d657374616d700a2020202020202020202020207d0a2020202020202020290a202020207d0a0a202020202f2f2f20416c6c6f7773207468652062726964676520746f207570646174652074686520555249206f662062726964676564204e4654732e205468697320617373756d65732074686174207468652045564d2d646566696e696e672070726f6a656374206d617920636f6e7461696e0a202020202f2f2f206c6f67696320286f6e636861696e206f72206f6666636861696e292077686963682075706461746573204e4654206d6574616461746120696e2074686520736f757263652045524337323120636f6e74726163742e204f6e206272696467696e672c20746865205552492063616e0a202020202f2f2f207468656e206265207570646174656420696e207468697320636f6e747261637420746f207265666c6563742074686520736f757263652045524337323120636f6e74726163742773206d657461646174612e0a202020202f2f2f0a20202020616363657373286163636f756e74290a2020202066756e20757064617465546f6b656e5552492865766d49443a2055496e743235362c206e65775552493a20537472696e6729207b0a2020202020202020707265207b0a20202020202020202020202073656c662e746f6b656e555249735b65766d49445d20213d206e696c3a20224e6f20746f6b656e20776974682074686520676976656e2045524337323120494420657869737473220a20202020202020207d0a202020202020202069662073656c662e746f6b656e555249735b65766d49445d20213d206e6577555249207b0a20202020202020202020202073656c662e746f6b656e555249735b65766d49445d203d206e65775552490a20202020202020207d0a202020207d0a0a20202020696e6974286e616d653a20537472696e672c2073796d626f6c3a20537472696e672c2065766d436f6e7472616374416464726573733a2045564d2e45564d416464726573732c20636f6e74726163745552493a20537472696e673f29207b0a202020202020202073656c662e65766d4e4654436f6e747261637441646472657373203d2065766d436f6e7472616374416464726573730a202020202020202073656c662e666c6f774e4654436f6e747261637441646472657373203d2073656c662e6163636f756e742e616464726573730a202020202020202073656c662e6e616d65203d206e616d650a202020202020202073656c662e73796d626f6c203d2073796d626f6c0a202020202020202073656c662e636f6e7472616374555249203d20636f6e74726163745552490a202020202020202073656c662e746f6b656e55524973203d207b7d0a202020202020202073656c662e636f6c6c656374696f6e203c2d2063726561746520436f6c6c656374696f6e28290a0a2020202020202020466c6f7745564d427269646765436f6e6669672e6173736f63696174655479706528547970653c40" }, { "type": "String", "value": "2e4e46543e28292c20776974683a2073656c662e65766d4e4654436f6e747261637441646472657373290a2020202020202020466c6f7745564d4272696467654e4654457363726f772e696e697469616c697a65457363726f77280a202020202020202020202020666f72547970653a20547970653c40" diff --git a/cadence/contracts/bridge/FlowEVMBridge.cdc b/cadence/contracts/bridge/FlowEVMBridge.cdc index 967d64fb..f63be6f5 100644 --- a/cadence/contracts/bridge/FlowEVMBridge.cdc +++ b/cadence/contracts/bridge/FlowEVMBridge.cdc @@ -137,6 +137,16 @@ contract FlowEVMBridge : IFlowEVMNFTBridge { let tokenID = token.id let evmID = CrossVMNFT.getEVMID(from: &token as &{NonFungibleToken.NFT}) ?? UInt256(token.id) + // Grab the URI from the NFT if available + var uri: String = "" + // Default to project-specified URI + if let metadata = token.resolveView(Type()) as! CrossVMNFT.EVMBridgedMetadata? { + uri = metadata.uri.uri() + } else { + // Otherwise, serialize the NFT using OpenSea Metadata strategy + uri = SerializeNFT.serializeNFTMetadataAsURI(&token as &{NonFungibleToken.NFT}) + } + // Lock the NFT & calculate the storage used by the NFT let storageUsed = FlowEVMBridgeNFTEscrow.lockNFT(<-token) // Calculate the bridge fee on current rates @@ -155,15 +165,6 @@ contract FlowEVMBridge : IFlowEVMNFTBridge { let isFactoryDeployed = FlowEVMBridgeUtils.isEVMContractBridgeOwned(evmContractAddress: associatedAddress) // Controlled by the bridge - mint or transfer based on existence if isFactoryDeployed { - // Grab the URI from the NFT if available - var uri: String = "" - // Default to project-specified URI - if let metadata = token.resolveView(Type()) as! CrossVMNFT.EVMBridgedMetadata? { - uri = metadata.uri.uri() - } else { - // Otherwise, serialize the NFT using OpenSea Metadata strategy - uri = SerializeNFT.serializeNFTMetadataAsURI(&token as &{NonFungibleToken.NFT}) - } // Check if the ERC721 exists let existsResponse = EVM.decodeABI( @@ -277,6 +278,11 @@ contract FlowEVMBridge : IFlowEVMNFTBridge { evmContractAddress: associatedAddress ) assert(isEscrowed, message: "Transfer to bridge COA failed - cannot bridge NFT without bridge escrow") + + // Derive the defining Cadence contract name & address & attempt to borrow it as IEVMBridgeNFTMinter + let contractName = FlowEVMBridgeUtils.getContractName(fromType: type)! + let contractAddress = FlowEVMBridgeUtils.getContractAddress(fromType: type)! + let nftContract = getAccount(contractAddress).contracts.borrow<&{IEVMBridgeNFTMinter}>(name: contractName) // Get the token URI from the ERC721 contract let uri = FlowEVMBridgeUtils.getTokenURI(evmContractAddress: associatedAddress, id: id) // If the NFT is currently locked, unlock and return @@ -285,18 +291,15 @@ contract FlowEVMBridge : IFlowEVMNFTBridge { // If the NFT is bridge-defined, update the URI from the source ERC721 contract if self.account.address == FlowEVMBridgeUtils.getContractAddress(fromType: type) { - nft.updateTokenURI(uri) + nftContract!.updateTokenURI(evmID: id, newURI: uri) } return <-nft } // Otherwise, we expect the NFT to be minted in Cadence - let contractAddress = FlowEVMBridgeUtils.getContractAddress(fromType: type)! assert(self.account.address == contractAddress, message: "Unexpected error bridging NFT from EVM") - let contractName = FlowEVMBridgeUtils.getContractName(fromType: type)! - let nftContract = getAccount(contractAddress).contracts.borrow<&{IEVMBridgeNFTMinter}>(name: contractName)! - let nft <- nftContract.mintNFT(id: id, tokenURI: uri) + let nft <- nftContract!.mintNFT(id: id, tokenURI: uri) return <-nft } diff --git a/cadence/contracts/bridge/IEVMBridgeNFTMinter.cdc b/cadence/contracts/bridge/IEVMBridgeNFTMinter.cdc index 8c6b09c1..ef74aa74 100644 --- a/cadence/contracts/bridge/IEVMBridgeNFTMinter.cdc +++ b/cadence/contracts/bridge/IEVMBridgeNFTMinter.cdc @@ -9,4 +9,11 @@ contract interface IEVMBridgeNFTMinter { /// access(account) fun mintNFT(id: UInt256, tokenURI: String): @{NonFungibleToken.NFT} + + /// 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) } diff --git a/cadence/contracts/templates/emulator/EVMBridgedNFTTemplate.cdc b/cadence/contracts/templates/emulator/EVMBridgedNFTTemplate.cdc index 17e17e28..6b2bbc2c 100644 --- a/cadence/contracts/templates/emulator/EVMBridgedNFTTemplate.cdc +++ b/cadence/contracts/templates/emulator/EVMBridgedNFTTemplate.cdc @@ -93,7 +93,7 @@ access(all) contract {{CONTRACT_NAME}} : ICrossVM, IEVMBridgeNFTMinter, NonFungi return CrossVMNFT.EVMBridgedMetadata( name: self.name, symbol: self.symbol, - uri: CrossVMNFT.URI(self.tokenURI()) + uri: CrossVMNFT.URI(baseURI: nil, value: self.tokenURI()) ) case Type(): return MetadataViews.Serial( @@ -129,14 +129,6 @@ access(all) contract {{CONTRACT_NAME}} : ICrossVM, IEVMBridgeNFTMinter, NonFungi access(all) view fun tokenURI(): String { return {{CONTRACT_NAME}}.tokenURIs[self.evmID] ?? "" } - - /* --- Bridge only method --- */ - // - /// Allows the bridge to update the URI against the source ERC721 contract on bridging back to Cadence - access(account) - fun updateURI(_ new: String) { - {{CONTRACT_NAME}}.updateTokenURI(id: self.evmID, newURI: new) - } } /// This resource holds associated NFTs, and serves queries about stored NFTs @@ -328,7 +320,7 @@ access(all) contract {{CONTRACT_NAME}} : ICrossVM, IEVMBridgeNFTMinter, NonFungi return CrossVMNFT.EVMBridgedMetadata( name: self.name, symbol: self.symbol, - uri: self.contractURI != nil ? CrossVMNFT.URI(self.contractURI!) : CrossVMNFT.URI("") + uri: self.contractURI != nil ? CrossVMNFT.URI(baseURI: nil, value: self.contractURI!) : CrossVMNFT.URI(baseURI: nil, value: "") ) } return nil @@ -350,7 +342,6 @@ access(all) contract {{CONTRACT_NAME}} : ICrossVM, IEVMBridgeNFTMinter, NonFungi name: self.name, symbol: self.symbol, evmID: id, - uri: tokenURI, metadata: { "Bridged Block": getCurrentBlock().height, "Bridged Timestamp": getCurrentBlock().timestamp @@ -363,11 +354,13 @@ access(all) contract {{CONTRACT_NAME}} : ICrossVM, IEVMBridgeNFTMinter, NonFungi /// then be updated in this contract to reflect the source ERC721 contract's metadata. /// access(account) - fun updateURI(id: UInt256, newURI: String) { + fun updateTokenURI(evmID: UInt256, newURI: String) { pre { - self.tokenURIs[id] != nil: "No token with the given ERC721 ID exists" + self.tokenURIs[evmID] != nil: "No token with the given ERC721 ID exists" + } + if self.tokenURIs[evmID] != newURI { + self.tokenURIs[evmID] = newURI } - self.tokenURIs[id] = newURI } init(name: String, symbol: String, evmContractAddress: EVM.EVMAddress, contractURI: String?) { diff --git a/flow.json b/flow.json index 9b42a063..11422490 100644 --- a/flow.json +++ b/flow.json @@ -149,22 +149,22 @@ "emulator": "f8d6e0586b0a20c7" } }, - "Serialize": { - "source": "./cadence/contracts/utils/Serialize.cdc", + "SerializationInterfaces": { + "source": "./cadence/contracts/utils/SerializationInterfaces.cdc", "aliases": { "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007" } }, - "SerializeNFT": { - "source": "./cadence/contracts/utils/SerializeNFT.cdc", + "Serialize": { + "source": "./cadence/contracts/utils/Serialize.cdc", "aliases": { "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007" } }, - "SerializationInterfaces": { - "source": "./cadence/contracts/utils/SerializationInterfaces.cdc", + "SerializeNFT": { + "source": "./cadence/contracts/utils/SerializeNFT.cdc", "aliases": { "emulator": "f8d6e0586b0a20c7", "testing": "0000000000000007" diff --git a/local/setup_emulator.1.sh b/local/setup_emulator.1.sh index 5e19e876..20641e18 100644 --- a/local/setup_emulator.1.sh +++ b/local/setup_emulator.1.sh @@ -1,21 +1,21 @@ #!/bin/bash -flow-c1 transactions send ./cadence/transactions/evm/create_account.cdc 100.0 +flow transactions send ./cadence/transactions/evm/create_account.cdc 100.0 -flow-c1 accounts add-contract ./cadence/contracts/utils/ArrayUtils.cdc -flow-c1 accounts add-contract ./cadence/contracts/utils/StringUtils.cdc -flow-c1 accounts add-contract ./cadence/contracts/utils/ScopedFTProviders.cdc +flow accounts add-contract ./cadence/contracts/utils/ArrayUtils.cdc +flow accounts add-contract ./cadence/contracts/utils/StringUtils.cdc +flow accounts add-contract ./cadence/contracts/utils/ScopedFTProviders.cdc -flow-c1 accounts update-contract ./cadence/contracts/standards/EVM.cdc +flow accounts update-contract ./cadence/contracts/standards/EVM.cdc # Create COA in emulator-account # Deploy the Factory contract - NOTE THE `deployedContractAddress` IN THE EMITTED EVENT -flow-c1 transactions send ./cadence/transactions/evm/deploy.cdc \ +flow transactions send ./cadence/transactions/evm/deploy.cdc \ --args-json "$(cat ./cadence/args/deploy-factory-args.json)" # Deploy initial bridge contracts -flow-c1 accounts add-contract ./cadence/contracts/bridge/BridgePermissions.cdc -flow-c1 accounts add-contract ./cadence/contracts/bridge/ICrossVM.cdc -flow-c1 accounts add-contract ./cadence/contracts/bridge/CrossVMNFT.cdc -flow-c1 accounts add-contract ./cadence/contracts/bridge/FlowEVMBridgeConfig.cdc \ No newline at end of file +flow accounts add-contract ./cadence/contracts/bridge/BridgePermissions.cdc +flow accounts add-contract ./cadence/contracts/bridge/ICrossVM.cdc +flow accounts add-contract ./cadence/contracts/bridge/CrossVMNFT.cdc +flow accounts add-contract ./cadence/contracts/bridge/FlowEVMBridgeConfig.cdc \ No newline at end of file diff --git a/local/setup_emulator.2.sh b/local/setup_emulator.2.sh index ee98fcf7..17b19c66 100644 --- a/local/setup_emulator.2.sh +++ b/local/setup_emulator.2.sh @@ -1,55 +1,60 @@ # Provided address is the address of the Factory contract deployed in the previous txn -flow-c1 accounts add-contract ./cadence/contracts/bridge/FlowEVMBridgeUtils.cdc \ +flow accounts add-contract ./cadence/contracts/bridge/FlowEVMBridgeUtils.cdc \ -flow-c1 accounts add-contract ./cadence/contracts/bridge/FlowEVMBridgeNFTEscrow.cdc -flow-c1 accounts add-contract ./cadence/contracts/bridge/FlowEVMBridgeTemplates.cdc +flow accounts add-contract ./cadence/contracts/bridge/FlowEVMBridgeNFTEscrow.cdc +flow accounts add-contract ./cadence/contracts/bridge/FlowEVMBridgeTemplates.cdc # Add the templated contract code chunks for FlowEVMBridgedNFTTemplate.cdc contents -flow-c1 transactions send ./cadence/transactions/bridge/admin/upsert_contract_code_chunks.cdc \ +flow transactions send ./cadence/transactions/bridge/admin/upsert_contract_code_chunks.cdc \ --args-json "$(cat ./cadence/args/bridged-nft-code-chunks-args.json)" --gas-limit 1600 -flow-c1 accounts add-contract ./cadence/contracts/bridge/IEVMBridgeNFTMinter.cdc +flow accounts add-contract ./cadence/contracts/bridge/IEVMBridgeNFTMinter.cdc + +# Deploy Serialization Utils +flow accounts add-contract ./cadence/contracts/utils/SerializationInterfaces.cdc +flow accounts add-contract ./cadence/contracts/utils/Serialize.cdc +flow accounts add-contract ./cadence/contracts/utils/SerializeNFT.cdc # Deploy main bridge interface & contract -flow-c1 accounts add-contract ./cadence/contracts/bridge/IFlowEVMNFTBridge.cdc -flow-c1 accounts add-contract ./cadence/contracts/bridge/FlowEVMBridge.cdc +flow accounts add-contract ./cadence/contracts/bridge/IFlowEVMNFTBridge.cdc +flow accounts add-contract ./cadence/contracts/bridge/FlowEVMBridge.cdc # Deploy the bridge router directing calls from COAs to the dedicated bridge -flow-c1 accounts add-contract ./cadence/contracts/bridge/EVMBridgeRouter.cdc 0xf8d6e0586b0a20c7 FlowEVMBridge +flow accounts add-contract ./cadence/contracts/bridge/EVMBridgeRouter.cdc 0xf8d6e0586b0a20c7 FlowEVMBridge # Create `example-nft` account 179b6b1cb6755e31 with private key 96dfbadf086daa187100a24b1fd2b709b702954bbd030a394148e11bcbb799ef -flow-c1 accounts create --key "351e1310301a7374430f6077d7b1b679c9574f8e045234eac09568ceb15c4f5d937104b4c3180df1e416da20c9d58aac576ffc328a342198a5eae4a29a13c47a" +flow accounts create --key "351e1310301a7374430f6077d7b1b679c9574f8e045234eac09568ceb15c4f5d937104b4c3180df1e416da20c9d58aac576ffc328a342198a5eae4a29a13c47a" # Create `user` account 0xf3fcd2c1a78f5eee with private key bce84aae316aec618888e5bdd24a3c8b8af46896c1ebe457e2f202a4a9c43075 -flow-c1 accounts create --key "c695fa608bd40821552fae13bb710c917309690ed69c22866abad19d276c99296379358321d0123d7074c817dd646ae8f651734526179eaed9f33eba16601ff6" +flow accounts create --key "c695fa608bd40821552fae13bb710c917309690ed69c22866abad19d276c99296379358321d0123d7074c817dd646ae8f651734526179eaed9f33eba16601ff6" # Create `erc721` account 0xe03daebed8ca0615 with private key bf602a4cdffb5610a008622f6601ba7059f8a6f533d7489457deb3d45875acb0 -flow-c1 accounts create --key "9103fd9106a83a2ede667e2486848e13e5854ea512af9bbec9ad2aec155bd5b5c146b53a6c3fd619c591ae0cd730acb875e5b6e074047cf31d620b53c55a4fb4" +flow accounts create --key "9103fd9106a83a2ede667e2486848e13e5854ea512af9bbec9ad2aec155bd5b5c146b53a6c3fd619c591ae0cd730acb875e5b6e074047cf31d620b53c55a4fb4" # Give the user some FLOW -flow-c1 transactions send ./cadence/transactions/flow-token/transfer_flow.cdc 0xf3fcd2c1a78f5eee 100.0 +flow transactions send ./cadence/transactions/flow-token/transfer_flow.cdc 0xf3fcd2c1a78f5eee 100.0 # Give the erc721 some FLOW -flow-c1 transactions send ./cadence/transactions/flow-token/transfer_flow.cdc 0xe03daebed8ca0615 100.0 +flow transactions send ./cadence/transactions/flow-token/transfer_flow.cdc 0xe03daebed8ca0615 100.0 # Create a COA for the user -flow-c1 transactions send ./cadence/transactions/evm/create_account.cdc 10.0 --signer user +flow transactions send ./cadence/transactions/evm/create_account.cdc 10.0 --signer user # Create a COA for the erc721 -flow-c1 transactions send ./cadence/transactions/evm/create_account.cdc 10.0 --signer erc721 +flow transactions send ./cadence/transactions/evm/create_account.cdc 10.0 --signer erc721 # user transfers Flow to the COA -flow-c1 transactions send ./cadence/transactions/evm/deposit.cdc 10.0 --signer user +flow transactions send ./cadence/transactions/evm/deposit.cdc 10.0 --signer user # erc721 transfers Flow to the COA -flow-c1 transactions send ./cadence/transactions/evm/deposit.cdc 10.0 --signer erc721 +flow transactions send ./cadence/transactions/evm/deposit.cdc 10.0 --signer erc721 # Setup User with Example NFT collection - Will break flow.json config due to bug in CLI - break here and update flow.json manually -flow-c1 accounts add-contract ./cadence/contracts/example-assets/ExampleNFT.cdc --signer example-nft +flow accounts add-contract ./cadence/contracts/example-assets/ExampleNFT.cdc --signer example-nft -flow-c1 transactions send ./cadence/transactions/example-assets/setup_collection.cdc --signer user -flow-c1 transactions send ./cadence/transactions/example-assets/mint_nft.cdc f3fcd2c1a78f5eee example description thumbnail '[]' '[]' '[]' --signer example-nft +flow transactions send ./cadence/transactions/example-assets/setup_collection.cdc --signer user +flow transactions send ./cadence/transactions/example-assets/mint_nft.cdc f3fcd2c1a78f5eee example description thumbnail '[]' '[]' '[]' --signer example-nft # Deploy ExampleERC721 contract with erc721's COA as owner - NOTE THE `deployedContractAddress` EMITTED IN THE RESULTING EVENT -flow-c1 transactions send ./cadence/transactions/evm/deploy.cdc \ +flow transactions send ./cadence/transactions/evm/deploy.cdc \ --args-json "$(cat ./cadence/args/deploy-erc721-args.json)" --signer erc721 \ No newline at end of file diff --git a/local/setup_emulator.3.sh b/local/setup_emulator.3.sh index 6485be51..0b7f6054 100644 --- a/local/setup_emulator.3.sh +++ b/local/setup_emulator.3.sh @@ -1,4 +1,4 @@ # Mint an ERC721 with ID 42 to the user's COA -flow-c1 transactions send ./cadence/transactions/example-assets/safe_mint_erc721.cdc \ +flow transactions send ./cadence/transactions/example-assets/safe_mint_erc721.cdc \ 42 "URI" 200000 \ --signer erc721