Skip to content

Commit

Permalink
Add 2 new fa coin module, and swap example
Browse files Browse the repository at this point in the history
  • Loading branch information
Jin committed Oct 24, 2023
1 parent 264f839 commit d0326b0
Show file tree
Hide file tree
Showing 6 changed files with 623 additions and 1 deletion.
13 changes: 13 additions & 0 deletions examples/typescript/facoin/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "facoin"
version = "1.0.0"
authors = []

[addresses]
aptos_framework = "0x1"
FACoin = "_"

[dependencies.AptosFramework]
git = "https://github.com/aptos-labs/aptos-core.git"
rev = "mainnet"
subdir = "aptos-move/framework/aptos-framework"
17 changes: 17 additions & 0 deletions examples/typescript/facoin/publish.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"function_id": "0x1::code::publish_package_txn",
"type_args": [],
"args": [
{
"type": "hex",
"value": "0x066661636f696e0100000000000000004044424644373036444337423244424346383030423741453236333539344541313937444532363537443844383942453244434138383642454437313330464439bd011f8b08000000000002ff3d8e410a83301045f7738a927da36e0b5d48c14b88c8988c1aac49c844dbe33769adbb799fff3ed37a540b4ed481c5952ef78b1851396305ec14d8389ba34a96b214805b9c5de094b41d408b5a076226ee007d74dc8f214dbc5c58b253be2b014dfd485b197b910c4d9eac26ab0cb1acb3d3fc950e261373718ed1f3ad2812cedb20955b8beffaf589031fa77281642a0808b4676945632d25e66dd026e4e8d75cdd4ec5f9d7a19f2ce0033e554261ff0000000203636174d40e1f8b08000000000002ffed59eb6edb3614fe9fa7605320930bd54e86b6ebd42468dab5db80a5019a0cc5500c0a2d51365789f4482a4e5ae4dd7778d385b6e274bda0c0961f814df25c78beef1c1ed293c9041da1efef53767f0f553caf4b82d41c2b94f16a4a1991a8c20ccf489e16359bd16949522c255108b31cd65096924b5c2d408a32c51167a4a76539270ce56451f22b92c73046b62660d18d08b4a46589a60465826045d90c61c4c8d2db44de26b2369754cdb50e34c722cf780e2b64bd589457e0092be82c460c572446f2aa9af232363ee624a3152ee5d8183e03619ce782488978617459d51966da0f3e5518769da30b8ad18ca8b4220ae758e16834464712dc93d4ecf6820849398b1155b069f0202760c47ab81060515c21a938181a6fb980bc3c7a0ef14a920ce2f2610bc15f2dc1fc42719916021c5f72f12e49fa714e920fa7a42c62740cf17d4de0c399c04c1644982fcf6ac1cc8763e7678c5e3af9232d7efd64d8109ffe45b2d6c089f97a9380db57cb04b3c15640aa3c4988105c046392ce1859195402004f925a158f8329be5010db275b6654c376a2231c90c12383f812941b002bfc0ea834c76ca6c3ae85811752a117af4eced29337af5ebc4e50fde8013a407b4eb99d3f3a3d7d71969efe71fcece4b704a0cd605ffbf5e3435838dd7e7e74b6ed56df7d0b78f25a64249d095e2f801dd59488c87c81c58321b6b1fd592f1bfdd9ecea175ee648904222c81cf044095e1a4a568035c406f2c5616d983c05ac758a006ffba1707b8580d69942c736777a34808491e81db972bcd37fda460ac6938659cd94b76aa7bb7c6b96685fecb467a099ba6e21fb9551457149df930e52260c6633863a66b33a00632786923bc9216d24cd28ec15e9a1d4a6518473703d413b9654a3ce964a9dc71a501d076edc0750763c08a6c6905497883cb5835659dc23c0e849a3703de11b4d7eda8ca684615812d6c9a851d6d0adf52eee4d5ad6270983221a8dfa733a4922c345a48bc8f62846937ba6daa17b93d595bdfd98a5b624868b1f9b395f22d7aa9a6ecf955a249389abf36338182605bea0b09731fc73aee8afb79677320bc10d1f3a622397698e0ecf4da00d57279a729326217cdae0b2e44b7b7c70a107ecd16198d5cf92718f279efe4090b0e0ce08f04ae3ebd744016c1d8668553e176e52e5d76c50d5cdbc9bd475d76d50e993cf313eb56903ca7d5a344aedcc0dea2a7e01a6799fd23beb0df4e9bbb6267d6840887b1b8fdb885eb7c40036ec4375088ac3b52fcc17942cdbcafa9a2850618ff7fe693fd059e866e53b697904b3a66d51732a7d33039f7c176379b4a8a725cd4c71eab709893b48f7fd897c1854286330f56eb538b8a2e2a2e8e6a39da7b66d18ac515edc09003e4e45eb40d43339ea576a537235104df0f479005e9a70d9b31562b7ae864344b884fe47a721920ba8220584046719af99ea8589c0d9660e70037950c2017d9e789ca069abb4b839a847a0ecef9ac2f8008356030b01ede31164c3fa66168eee5acdb9005ae5e994430bb3d4fc93fe7c30abc25ce5e912aa8f911e3a280893b55839282ea95432527cbdde02afc97c13b69df5de8fdb34b2b1eb280cf538c852dda79ae231a4b39f90cd5e6370cfa9bf761969ac2bde9efc674dd3b28143803ed73d203a2f047f4fd8392a2829f301e6788f56d803c255873f5f8f4c41b5deb90d877a810d80877d6ca6548f4b9196f97af40cd9d4eca5a1539f369d1df538d4a369a767d4bd64d8db6e62d1005bf411b289295f941c9daee076c4f0025f8a142178c69e5e1a79cb01604328bd148440570ff72d57ea91e4fa1a0c3730c6dbac405c776919a11764fd7d6505b3c2284e9dd615f4dc7803e0379fd09f947f6eb79b71d447bbad9f6951e25990824df6899aac42f93b2b86c1fc04246bf63f965f0ecb02ee6a6bc07c0345381778f959ce5d8de2d2295c45af2d9c415185f6b70fdc7fe6cc0da1f4c1bbd5d9e84a6d88e84faec1fe5c80baeeefe6febbc00186df7c6e7e8d5667a571be4583dc696cccae0c88b4aa6aa55f8af41306118465c4df4dcd9b067c3ef7713b1fb74db5be8c5ec0c517c689b48feb5ac65de7a96548400cb8d11ace58359495f0b46d883010f0f652a9a55a8234e336182b375cbb00727f672d416e4b1fad5da83b91bfd252991a47ecfd35767b6dafbabc88ccfc089e93ccb333642a111595fa653ecd09a3248fdab7df51075eb7eb59c9a7b8dc5fe7d761e3467823b75419f5df1f001415f967a803e46eedeeb1d75c5f60413ac5926650daf9b28db5130aa27dfba4ebbe8d3a5d41bab9d1ce9bc39a48ae17c55840285bc1a7bb9705ce48e795cedc4c9d701c9a8ad1deee6ea8724381f02c18ca64000c43d2442ba62c2ee8e0401b8dd1836e36f7bb9121773fc20b2add413de4478c1e76d43597d7e148f542ad03f72f6212e8e84624468fba8fab2b1dda47c4e4ce2704e5876e12ea3bda70407edced17d2a12473a16bd9e9b2eeee5b72098f524a3f6e605a42f98f30e4bd4af52f87b07af7f2e1eeeeee5e8c4a0e3fc951a341ff141626ed6a4dd990bb2656daa566fc5b4969fbfaa65dbb3155afb7aeb7fe01c6000b1d191e0000000003646f67d40e1f8b08000000000002ffed59eb6edb3614fe9fa7605b20930bd54e86b6ebd424687add80a5019a0cc5500c0a2d51365789f4482a4e5ae4dd7778d385b6e274bda0c0961f814df25c78beef1c1ed293c9041da21fef51766f17553caf4b82d41c2b94f16a4a1991a8c20ccf489e16359bd16949522c255108b31cd65096920b5c2d408a32c51167a4a76539270ce56451f24b92c73046b62660d18d08b4a46589a60465826045d90c61c4c8d2db44de26b2369754cdb50e34c722cf780e2b64bd589497e0092be82c460c572446f2b29af232363ee624a3152ee5d8183e05619ce782488978617459d51966da0f3e5518769da3738ad18ca8b4220ae758e16834468712dc93d4ecf69c0849398b1155b069f0202760c47ab81060515c22a938181a6fb980bc3c7c06f14a929ccfd0c72d047fb504f30bc5655a08707cc9c5fb24e9c739493e9e90b288d111c4f70d810fa70233591061be3cad05331f8e9c9f317ae9e40fb5f8d5e361437cfa17c95a03c7e6eb75026e5f2d13cc065b01a9f224214270118c493a6364655009003c496a553c0aa6f842416c1f6f99510ddbb18e7040068f0ce24b506e00acf07ba0d21cb3990ebb16065e48855ebc3e3e4d8fdfbe7ef12641f5c3fb681fed3ae576fef0e4e4c5697af2c7d1d3e3df128036837dedd58f0e60e1f4f6f3e357b7ddea3bef004f5e8b8ca433c1eb05b0a39a1211992fb07830c436b6aff4b2d19fcdae7ee1658e04292482cc014f94e0a5a1640558436c205f1cd686c953c05aa708f0b61f0ab75708689d29746473a74703481889de934bc73bfda76da4603c6998d54c79ab76bacbb76689f6c54e7b069aa9ab16b25f19551497f403e92065c2603663a86336ab0330766228b9951cd046d28cc25e911e4a6d1a453807d713b46d4935ea6ca9d479ac01d571e0c67d0065db83606a0c497589c8533b6895c53d028c1e370ad713bed1e4a7cd684a188625619d8c1a650ddd5aefe2dea4657d923028a2d1a83fa79324325c44ba88dc1ec56872d7543b7477b2bab2b71fb3d496c470f12333e74be45a55d3db73a516c964e2eafc180e864981cf29ec650cff9c2bfaeb8de59dcc4270c3878ed8c8659aa3c3331368c3d589a6dca449089f36b82cf9d21e1f5ce8017b741866f5b364dce389a73f10242cb83302bcd2f8fa3551005b87215a95cf85eb54f9351b547533ef3a75dd751b54fae4738c4f6dda80729f168d523b738dba8a9f8369dea7f4f67a037dfaaead491f1b10e2dec6e336a2572d31800d7b501d82e270e50bf33925cbb6b2be210a54d8e3bd7fda0f7416ba59f9415a1ec1ac695bd49c4adfccc027dfc5581e2dea694933539cfa6d42e20ed23d7f221f0415ca184cbd5b2d0eaea8b828baf968fb896d1b066b94177702808f53d13a10f54c8efa95da945c0d44133c7d1e8097265cf66c85d8adabe110112ea1ffd16988e402aa480121c159c66ba67a612270b69903dc401e9470409f271e2768da2a2d6e0eea1128fbbba6303ec0a0d5c04240fb7804d9b0be9985a3bb56732e8056793ae5d0c22c35ffa43f1fccaa305779ba84ea63a4870e0ac2642d560e8a0b2a958c145fafb7c06b32df846d7bbdf7e3368d6cec3a0a433d0eb254f7a9a6780ce9ec2764b3d718dc73eaaf5c461aeb8ab727ff69d3b46ce010a0cf750f88ce0ac13f1076860a4aca7c8039dea315f68070d5e1cfb7235350adb76fc2a15e6003e0611f9b29d5e352a465be1d3d4336357b69e8d4a74d67473d0ef568dae919752f19f6b69b5834c0167d846c62ca572547a72bb81931bcc0d72245089eb1a79746de7200d8104a2f0521d0d5c37dcb957a24b9be06c30d8cf1362b10d75d5a46e839597f5f59c1ac308a53a775053d37de00f8dd27f467e59fdbed661cf5d16eeb675a947816a460937da226ab50fece8a61303f03c99afd8fe5d7c3b280bbda1a30df4211ce055e7e917357a3b8740a57d16b0b675054a1fded03f79f397343287df06e7436ba521b22fadc35d85f0a50d7fd5ddf7f1738c0f0bbcfcd6fd1eaac34ce3768903b8d8dd99501915655adf44b917ec22082b08cf8bba979d380cf673e6e67e3b6a9d697d173b8f8c23891f6715dcbb8eb3cb50c098801375ac319ab86b2129eb60d110602de5e2ab5544b9066dc0663e5866b1740ee6faf25c84de9a3b50b752bf2575a2a53e388bdbfc66eafed55971791991fc173927976864c25a2a252bfcca7396194e451fbf63beac0eb763d2bf914977bebfc3a68dc086fe4962aa3fefb0380a222ff0cb58fdcaddd3df69aeb0b2c48a758d20c4a3b5fb6b1764241b46f9e74ddb751a72b483737da79735813c9f5a2180b08652bf864e7a2c019e9bcd2999ba9138e435331daddd909556e28109e0543990c8061489a68c594c505edef6ba331badfcde67e3732e4ee277841a53ba887fc88d1838ebae6f23a1ca95ea875e0fe454c021ddd88c4e861f77175a543fb8498dcfa8ca0fcd44d427d471b0ec8cf3bfd423a94642e742d3b5dd6dd79472ee0514ae9c70d4c4b28ff1186bc57a9fee51056ef5c3cd8d9d9d98d51c933ac9fde614cff141626ed6a4dd990bb2656daa566fc7b4969fbfaa65dbb3655afb6aeb6fe010ca47f45191e000000000300000000000000000000000000000000000000000000000000000000000000010e4170746f734672616d65776f726b00000000000000000000000000000000000000000000000000000000000000010b4170746f735374646c696200000000000000000000000000000000000000000000000000000000000000010a4d6f76655374646c696200"
},
{
"type": "hex",
"value": [
"0xa11ceb0b060000000c0100100210300340a60104e6011605fc01de0207da04ac0508860a4006c60a7710bd0ba1010ade0c0c0cea0cad040d9711060000010101020103010401050106010700080800020a0000030d07010001020e08000216060002180600021a0600021b080003270200042907010000072b07000009000100000b020100000c030100000f01040000100501000011000100001206010000130301000014070800061c050a00031d0c0d0108011e0e0e00031f0f0a01080520101101080221130101080522101101080223150101080224170101080325180a0003260a19010803281b1c00042a011e0100072c1f2000052d210100022e222300022f22240002302225000331222600021128080002322a01010802332c0801080a0b0c0b0d0b0e120f0b10121112130b151d1d121e1203060c05030003060c05080102060c05010b0201080301060c04060c05050303060c0305010801050b020108030b020108030608060b02010807060c0105010803020b02010900050101010301060b0201090002050b02010900010b02010807010807030608060b0201090003050b020108030b02010803060c0b02010807060805030608050b020109000801050b020108030b02010803060c0608050b02010807030608050b02010900010206050a02010b0201090006080808060608080c0804080502060c0a020108080104010b09010900010a0201080a070608080b090104080a080a02080a080a01060808010804010806010805010c060b020108030b020108030801060800060c0b020108070206080403060b020108030b020108030b02010807060c0b02010807060805040608050b020109000b0201090003050b020108030b020108030b02010807060c060805030608050b020109000303636174056572726f720e66756e6769626c655f6173736574066f626a656374066f7074696f6e167072696d6172795f66756e6769626c655f73746f7265067369676e657206737472696e67144d616e6167656446756e6769626c654173736574046275726e0d46756e6769626c654173736574076465706f7369740e667265657a655f6163636f756e74064f626a656374084d657461646174610c6765745f6d657461646174610b696e69745f6d6f64756c65046d696e74087472616e7366657210756e667265657a655f6163636f756e74087769746864726177086d696e745f726566074d696e745265660c7472616e736665725f7265660b5472616e73666572526566086275726e5f726566074275726e5265660d46756e6769626c6553746f72650a616464726573735f6f660869735f6f776e6572117065726d697373696f6e5f64656e6965640e6f626a6563745f616464726573730d7072696d6172795f73746f7265096275726e5f66726f6d1b656e737572655f7072696d6172795f73746f72655f657869737473106465706f7369745f776974685f7265660f7365745f66726f7a656e5f666c6167156372656174655f6f626a6563745f6164647265737311616464726573735f746f5f6f626a6563740e436f6e7374727563746f72526566136372656174655f6e616d65645f6f626a656374064f7074696f6e046e6f6e6506537472696e6704757466382b6372656174655f7072696d6172795f73746f72655f656e61626c65645f66756e6769626c655f61737365741167656e65726174655f6d696e745f7265661167656e65726174655f6275726e5f7265661567656e65726174655f7472616e736665725f7265660f67656e65726174655f7369676e6572117472616e736665725f776974685f7265661177697468647261775f776974685f726566aaae4a8e53425071b082002b1147d5b1a3761b15ba51898b223795d0a61eb6e100000000000000000000000000000000000000000000000000000000000000010a020403434154030801000000000000000520aaae4a8e53425071b082002b1147d5b1a3761b15ba51898b223795d0a61eb6e10a02090843415420436f696e0a021f1e687474703a2f2f6578616d706c652e636f6d2f66617669636f6e2e69636f0a021312687474703a2f2f6578616d706c652e636f6d126170746f733a3a6d657461646174615f76318c010101000000000000000a454e4f545f4f574e4552344f6e6c792066756e6769626c65206173736574206d65746164617461206f776e65722063616e206d616b65206368616e6765732e01144d616e6167656446756e6769626c654173736574010301183078313a3a6f626a6563743a3a4f626a65637447726f7570010c6765745f6d657461646174610101000002031508041708051908060001040100091d11030c030b000a030c040c070a040b0711093800040c050f0701110b270e0438012b0010000c050b010b0338020c060b050b060b023803020101000100141d11030c030b000a030c040c050a040b0511093800040c050f0701110b270e0438012b0010010c070b010b0338040c060b070b060b023805020201040100161d11030c020b000a020c030c040a030b0411093800040c050f0701110b270e0338012b0010010c050b010b0238040c060b050b0608380602030100000a0707020c000e0007001112380702040000001a250b00070011140c010e010c030a03380807031116070011163108070411160705111611170a0311180c050a0311190c020a03111a0c060b03111b0c040e040b050b060b0212002d00020501040100272211030c030b000a030c040c070a040b0711093800040c050f0701110b270e0438012b000c060b010b0338040c080a0610020b02111c0c050b0610010b080b053805020601040100292211030c040b000a040c050c070a050b0711093800040c050f0701110b270e0538012b0010010c090b010a0438020c060b020b0438040c080b090b060b080b033809020701040100161d11030c020b000a020c030c040a030b0411093800040c050f0701110b270e0338012b0010010c050b010b0238040c060b050b060938060208010001002b1d11030c030b000a030c040c060a040b0611093800040c050f0701110b270e0438012b0010010c070b020b0338020c050b070b050b01380a0200020001000000",
"0xa11ceb0b060000000c0100100210300340a60104e6011605fc01de0207da04ac0508860a4006c60a7710bd0ba1010ade0c0c0cea0cad040d9711060000010101020103010401050106010700080800020a0000030d07010001020e08000216060002180600021a0600021b080003270200042907010000072b07000009000100000b020100000c030100000f01040000100501000011000100001206010000130301000014070800061c050a00031d0c0d0108011e0e0e00031f0f0a01080520101101080221130101080522101101080223150101080224170101080325180a0003260a19010803281b1c00042a011e0100072c1f2000052d210100022e222300022f22240002302225000331222600021128080002322a01010802332c0801080a0b0c0b0d0b0e120f0b10121112130b151d1d121e1203060c05030003060c05080102060c05010b0201080301060c04060c05050303060c0305010801050b020108030b020108030608060b02010807060c0105010803020b02010900050101010301060b0201090002050b02010900010b02010807010807030608060b0201090003050b020108030b02010803060c0b02010807060805030608050b020109000801050b020108030b02010803060c0608050b02010807030608050b02010900010206050a02010b0201090006080808060608080c0804080502060c0a020108080104010b09010900010a0201080a070608080b090104080a080a02080a080a01060808010804010806010805010c060b020108030b020108030801060800060c0b020108070206080403060b020108030b020108030b02010807060c0b02010807060805040608050b020109000b0201090003050b020108030b020108030b02010807060c060805030608050b020109000303646f67056572726f720e66756e6769626c655f6173736574066f626a656374066f7074696f6e167072696d6172795f66756e6769626c655f73746f7265067369676e657206737472696e67144d616e6167656446756e6769626c654173736574046275726e0d46756e6769626c654173736574076465706f7369740e667265657a655f6163636f756e74064f626a656374084d657461646174610c6765745f6d657461646174610b696e69745f6d6f64756c65046d696e74087472616e7366657210756e667265657a655f6163636f756e74087769746864726177086d696e745f726566074d696e745265660c7472616e736665725f7265660b5472616e73666572526566086275726e5f726566074275726e5265660d46756e6769626c6553746f72650a616464726573735f6f660869735f6f776e6572117065726d697373696f6e5f64656e6965640e6f626a6563745f616464726573730d7072696d6172795f73746f7265096275726e5f66726f6d1b656e737572655f7072696d6172795f73746f72655f657869737473106465706f7369745f776974685f7265660f7365745f66726f7a656e5f666c6167156372656174655f6f626a6563745f6164647265737311616464726573735f746f5f6f626a6563740e436f6e7374727563746f72526566136372656174655f6e616d65645f6f626a656374064f7074696f6e046e6f6e6506537472696e6704757466382b6372656174655f7072696d6172795f73746f72655f656e61626c65645f66756e6769626c655f61737365741167656e65726174655f6d696e745f7265661167656e65726174655f6275726e5f7265661567656e65726174655f7472616e736665725f7265660f67656e65726174655f7369676e6572117472616e736665725f776974685f7265661177697468647261775f776974685f726566aaae4a8e53425071b082002b1147d5b1a3761b15ba51898b223795d0a61eb6e100000000000000000000000000000000000000000000000000000000000000010a020403444f47030801000000000000000520aaae4a8e53425071b082002b1147d5b1a3761b15ba51898b223795d0a61eb6e10a020908444f4720436f696e0a021f1e687474703a2f2f6578616d706c652e636f6d2f66617669636f6e2e69636f0a021312687474703a2f2f6578616d706c652e636f6d126170746f733a3a6d657461646174615f76318c010101000000000000000a454e4f545f4f574e4552344f6e6c792066756e6769626c65206173736574206d65746164617461206f776e65722063616e206d616b65206368616e6765732e01144d616e6167656446756e6769626c654173736574010301183078313a3a6f626a6563743a3a4f626a65637447726f7570010c6765745f6d657461646174610101000002031508041708051908060001040100091d11030c030b000a030c040c070a040b0711093800040c050f0701110b270e0438012b0010000c050b010b0338020c060b050b060b023803020101000100141d11030c030b000a030c040c050a040b0511093800040c050f0701110b270e0438012b0010010c070b010b0338040c060b070b060b023805020201040100161d11030c020b000a020c030c040a030b0411093800040c050f0701110b270e0338012b0010010c050b010b0238040c060b050b0608380602030100000a0707020c000e0007001112380702040000001a250b00070011140c010e010c030a03380807031116070011163108070411160705111611170a0311180c050a0311190c020a03111a0c060b03111b0c040e040b050b060b0212002d00020501040100272211030c030b000a030c040c070a040b0711093800040c050f0701110b270e0438012b000c060b010b0338040c080a0610020b02111c0c050b0610010b080b053805020601040100292211030c040b000a040c050c070a050b0711093800040c050f0701110b270e0538012b0010010c090b010a0438020c060b020b0438040c080b090b060b080b033809020701040100161d11030c020b000a020c030c040a030b0411093800040c050f0701110b270e0338012b0010010c050b010b0238040c060b050b060938060208010001002b1d11030c030b000a030c040c060a040b0611093800040c050f0701110b270e0438012b0010010c070b020b0338020c050b070b050b01380a0200020001000000"
]
}
]
}
Loading

0 comments on commit d0326b0

Please sign in to comment.