From 6571084cd627498a1988da766267355cfc138299 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Wed, 19 Apr 2023 14:57:14 -0700 Subject: [PATCH 01/23] Removed top level Cargo.toml to have individual examples not be managed together under a workspace --- Cargo.lock | 1467 -------------------------- Cargo.toml | 58 - account/Cargo.toml | 24 +- alloc/Cargo.toml | 18 +- atomic_multiswap/Cargo.toml | 18 +- atomic_swap/Cargo.toml | 18 +- auth/Cargo.toml | 18 +- cross_contract/contract_a/Cargo.toml | 18 +- cross_contract/contract_b/Cargo.toml | 18 +- custom_types/Cargo.toml | 18 +- deployer/contract/Cargo.toml | 18 +- deployer/deployer/Cargo.toml | 18 +- errors/Cargo.toml | 18 +- events/Cargo.toml | 18 +- hello_world/Cargo.toml | 18 +- increment/Cargo.toml | 18 +- liquidity_pool/Cargo.toml | 18 +- logging/Cargo.toml | 18 +- simple_account/Cargo.toml | 24 +- single_offer/Cargo.toml | 18 +- timelock/Cargo.toml | 18 +- token/Cargo.toml | 20 +- 22 files changed, 327 insertions(+), 1572 deletions(-) delete mode 100644 Cargo.lock delete mode 100644 Cargo.toml diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index cd81b930..00000000 --- a/Cargo.lock +++ /dev/null @@ -1,1467 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "arbitrary" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" -dependencies = [ - "derive_arbitrary", -] - -[[package]] -name = "assert_unordered" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74323b7881323eb351134e08ee5331594826789557afef8e309baf481b2264" -dependencies = [ - "ansi_term", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base32" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" - -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-buffer" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes-lit" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c181bca161a49348b90fa75f9a54fe11b7138098eed90d841a1055d574b4250" -dependencies = [ - "num-bigint", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "cc" -version = "1.0.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" -dependencies = [ - "iana-time-zone", - "num-integer", - "num-traits", - "serde", - "winapi", -] - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" - -[[package]] -name = "cpufeatures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" -dependencies = [ - "libc", -] - -[[package]] -name = "crate-git-revision" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f998aef136a4e7833b0e4f0fc0939a59c40140b28e0ffbf524ad84fb2cc568c8" -dependencies = [ - "serde", - "serde_derive", - "serde_json", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "curve25519-dalek" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - -[[package]] -name = "cxx" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7d4e43b25d3c994662706a1d4fcfc32aaa6afd287502c111b237093bb23f3a" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f8829ddc213e2c1368e51a2564c552b65a8cb6a28f31e576270ac81d5e5827" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e72537424b474af1460806647c41d4b6d35d09ef7fe031c5c2fa5766047cc56a" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "darling" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4529658bdda7fd6769b8614be250cdcfc3aeb0ee72fe66f9e41e5e5eb73eac02" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5" -dependencies = [ - "darling_core", - "quote", - "syn", -] - -[[package]] -name = "derive_arbitrary" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cdeb9ec472d588e539a818b2dee436825730da08ad0017c4b1a17676bdc8b7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" -dependencies = [ - "block-buffer 0.10.3", - "crypto-common", -] - -[[package]] -name = "downcast-rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" - -[[package]] -name = "dyn-fmt" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a0836c9bd73a9d3ca55b0effc5b1eedf96dd13ef994389bcac6d4d33c46188" - -[[package]] -name = "ed25519" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" -dependencies = [ - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "either" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" - -[[package]] -name = "ethnum" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0198b9d0078e0f30dedc7acbb21c974e838fc8fae3ee170128658a98cb2c1c04" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "generic-array" -version = "0.14.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "gimli" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "winapi", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" -dependencies = [ - "cxx", - "cxx-build", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "indexmap" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" -dependencies = [ - "autocfg", - "hashbrown", - "serde", -] - -[[package]] -name = "indexmap-nostd" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" - -[[package]] -name = "js-sys" -version = "0.3.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "libc" -version = "0.2.134" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "329c933548736bc49fd575ee68c89e8be4d260064184389a5b77517cddd99ffb" - -[[package]] -name = "libm" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "292a948cd991e376cf75541fe5b97a1081d713c618b4f1b9500f8844e49eb565" - -[[package]] -name = "link-cplusplus" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" -dependencies = [ - "cc", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - -[[package]] -name = "miniz_oxide" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" -dependencies = [ - "adler", -] - -[[package]] -name = "num-bigint" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_threads" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" -dependencies = [ - "libc", -] - -[[package]] -name = "object" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "ppv-lite86" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" - -[[package]] -name = "prettyplease" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fead41e178796ef8274dc612a7d8ce4c7e10ca35cd2c5b5ad24cac63aeb6c0" -dependencies = [ - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.7", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" - -[[package]] -name = "ryu" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" - -[[package]] -name = "scratch" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" - -[[package]] -name = "serde" -version = "1.0.145" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.145" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368f2d60d049ea019a84dcd6687b0d1e0030fe663ae105039bdf967ed5e6a9a7" -dependencies = [ - "base64", - "chrono", - "hex", - "indexmap", - "serde", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ccadfacf6cf10faad22bbadf55986bdd0856edfb5d9210aa1dcf1f516e84e93" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.5", -] - -[[package]] -name = "signature" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb766570a2825fa972bceff0d195727876a9cdf2460ab2e52d455dc2de47fd9" - -[[package]] -name = "soroban-account-contract" -version = "0.0.0" -dependencies = [ - "ed25519-dalek", - "rand 0.7.3", - "soroban-auth", - "soroban-sdk", -] - -[[package]] -name = "soroban-alloc-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-atomic-multiswap-contract" -version = "0.0.0" -dependencies = [ - "assert_unordered", - "soroban-sdk", -] - -[[package]] -name = "soroban-atomic-swap-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-auth" -version = "0.7.0" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=29b505cf95f2fd4fbe639fdb163b606c44920837#29b505cf95f2fd4fbe639fdb163b606c44920837" -dependencies = [ - "soroban-env-host", - "soroban-sdk", -] - -[[package]] -name = "soroban-auth-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-cross-contract-a-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-cross-contract-b-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-custom-types-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-deployer-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-deployer-test-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-env-common" -version = "0.0.15" -source = "git+https://github.com/stellar/rs-soroban-env?rev=5ef87058f07ad67eeba4c350a6b6af82bd17f916#5ef87058f07ad67eeba4c350a6b6af82bd17f916" -dependencies = [ - "arbitrary", - "crate-git-revision", - "ethnum", - "serde", - "soroban-env-macros", - "soroban-wasmi", - "static_assertions", - "stellar-xdr", -] - -[[package]] -name = "soroban-env-guest" -version = "0.0.15" -source = "git+https://github.com/stellar/rs-soroban-env?rev=5ef87058f07ad67eeba4c350a6b6af82bd17f916#5ef87058f07ad67eeba4c350a6b6af82bd17f916" -dependencies = [ - "soroban-env-common", - "static_assertions", -] - -[[package]] -name = "soroban-env-host" -version = "0.0.15" -source = "git+https://github.com/stellar/rs-soroban-env?rev=5ef87058f07ad67eeba4c350a6b6af82bd17f916#5ef87058f07ad67eeba4c350a6b6af82bd17f916" -dependencies = [ - "backtrace", - "curve25519-dalek", - "dyn-fmt", - "ed25519-dalek", - "hex", - "log", - "num-derive", - "num-integer", - "num-traits", - "sha2 0.10.6", - "soroban-env-common", - "soroban-native-sdk-macros", - "soroban-wasmi", - "static_assertions", - "tinyvec", -] - -[[package]] -name = "soroban-env-macros" -version = "0.0.15" -source = "git+https://github.com/stellar/rs-soroban-env?rev=5ef87058f07ad67eeba4c350a6b6af82bd17f916#5ef87058f07ad67eeba4c350a6b6af82bd17f916" -dependencies = [ - "itertools", - "proc-macro2", - "quote", - "serde", - "serde_json", - "stellar-xdr", - "syn", - "thiserror", -] - -[[package]] -name = "soroban-errors-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-events-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-hello-world-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-increment-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-ledger-snapshot" -version = "0.7.0" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=29b505cf95f2fd4fbe639fdb163b606c44920837#29b505cf95f2fd4fbe639fdb163b606c44920837" -dependencies = [ - "serde", - "serde_json", - "soroban-env-host", - "thiserror", -] - -[[package]] -name = "soroban-liquidity-pool-contract" -version = "0.0.0" -dependencies = [ - "num-integer", - "soroban-sdk", -] - -[[package]] -name = "soroban-logging-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-native-sdk-macros" -version = "0.0.15" -source = "git+https://github.com/stellar/rs-soroban-env?rev=5ef87058f07ad67eeba4c350a6b6af82bd17f916#5ef87058f07ad67eeba4c350a6b6af82bd17f916" -dependencies = [ - "itertools", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "soroban-sdk" -version = "0.7.0" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=29b505cf95f2fd4fbe639fdb163b606c44920837#29b505cf95f2fd4fbe639fdb163b606c44920837" -dependencies = [ - "bytes-lit", - "ed25519-dalek", - "rand 0.8.5", - "soroban-env-guest", - "soroban-env-host", - "soroban-ledger-snapshot", - "soroban-sdk-macros", - "stellar-strkey", -] - -[[package]] -name = "soroban-sdk-macros" -version = "0.7.0" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=29b505cf95f2fd4fbe639fdb163b606c44920837#29b505cf95f2fd4fbe639fdb163b606c44920837" -dependencies = [ - "darling", - "itertools", - "proc-macro2", - "quote", - "sha2 0.10.6", - "soroban-env-common", - "soroban-spec", - "stellar-xdr", - "syn", -] - -[[package]] -name = "soroban-simple-account-contract" -version = "0.0.0" -dependencies = [ - "ed25519-dalek", - "rand 0.7.3", - "soroban-auth", - "soroban-sdk", -] - -[[package]] -name = "soroban-single-offer-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-spec" -version = "0.7.0" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=29b505cf95f2fd4fbe639fdb163b606c44920837#29b505cf95f2fd4fbe639fdb163b606c44920837" -dependencies = [ - "base64", - "darling", - "itertools", - "prettyplease", - "proc-macro2", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha2 0.10.6", - "stellar-xdr", - "syn", - "thiserror", - "wasmparser", -] - -[[package]] -name = "soroban-timelock-contract" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-token-contract" -version = "0.0.6" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "soroban-wasmi" -version = "0.16.0-soroban2" -source = "git+https://github.com/stellar/wasmi?rev=862b32f5#862b32f53f9c6223911e79e0b0fc8592fb3bb04c" -dependencies = [ - "soroban-wasmi_core", - "spin", - "wasmparser-nostd", -] - -[[package]] -name = "soroban-wasmi_core" -version = "0.16.0-soroban2" -source = "git+https://github.com/stellar/wasmi?rev=862b32f5#862b32f53f9c6223911e79e0b0fc8592fb3bb04c" -dependencies = [ - "downcast-rs", - "libm", - "memory_units", - "num-rational", - "num-traits", -] - -[[package]] -name = "spin" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "stellar-strkey" -version = "0.0.7" -source = "git+https://github.com/stellar/rs-stellar-strkey#e6ba45c60c16de28c7522586b80ed0150157df73" -dependencies = [ - "base32", - "thiserror", -] - -[[package]] -name = "stellar-xdr" -version = "0.0.15" -source = "git+https://github.com/stellar/rs-stellar-xdr?rev=bcf6f4c3a9dd32822a20af89880650a421d10e7f#bcf6f4c3a9dd32822a20af89880650a421d10e7f" -dependencies = [ - "arbitrary", - "base64", - "crate-git-revision", - "hex", - "serde", - "serde_with", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "syn" -version = "1.0.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e90cde112c4b9690b8cbe810cba9ddd8bc1d7472e2cae317b69e9438c1cba7d2" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "unicode-xid", -] - -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "time" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fab5c8b9980850e06d92ddbe3ab839c062c801f3927c0fb8abd6fc8e918fbca" -dependencies = [ - "itoa", - "libc", - "num_threads", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" - -[[package]] -name = "time-macros" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bb801831d812c562ae7d2bfb531f26e66e4e1f6b17307ba4149c5064710e5b" -dependencies = [ - "time-core", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" - -[[package]] -name = "typenum" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" - -[[package]] -name = "unicode-ident" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" - -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" - -[[package]] -name = "wasmparser" -version = "0.88.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8cf7dd82407fe68161bedcd57fde15596f32ebf6e9b3bdbf3ae1da20e38e5e" -dependencies = [ - "indexmap", -] - -[[package]] -name = "wasmparser-nostd" -version = "0.90.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92a94fbf4c521b038f41382df2056cf47099d3b7a0faa5a6e46f7771fd7c84a6" -dependencies = [ - "indexmap-nostd", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "zeroize" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index 8467de4e..00000000 --- a/Cargo.toml +++ /dev/null @@ -1,58 +0,0 @@ -[workspace] -resolver = "2" - -members = [ - "hello_world", - "increment", - "auth", - "custom_types", - "cross_contract/contract_a", - "cross_contract/contract_b", - "deployer/contract", - "deployer/deployer", - "liquidity_pool", - "single_offer", - "events", - "token", - "logging", - "errors", - "timelock", - "atomic_swap", - "atomic_multiswap", - "account", - "alloc", - "simple_account", -] - -[profile.release-with-logs] -inherits = "release" -debug-assertions = true - -[profile.release] -opt-level = "z" -overflow-checks = true -debug = 0 -strip = "symbols" -debug-assertions = false -panic = "abort" -codegen-units = 1 -lto = true - -[workspace.dependencies.soroban-sdk] -version = "0.7.0" -git = "https://github.com/stellar/rs-soroban-sdk" -rev = "29b505cf95f2fd4fbe639fdb163b606c44920837" - -[workspace.dependencies.soroban-auth] -version = "0.7.0" -git = "https://github.com/stellar/rs-soroban-sdk" -rev = "29b505cf95f2fd4fbe639fdb163b606c44920837" - -# [patch."https://github.com/stellar/rs-soroban-sdk"] -# soroban-sdk = { path = "../rs-soroban-sdk/soroban-sdk" } -# soroban-auth = { path = "../rs-soroban-sdk/soroban-auth" } - -# [patch."https://github.com/stellar/rs-soroban-env"] -# soroban-env-common = { path = "../rs-soroban-env/soroban-env-common" } -# soroban-env-guest = { path = "../rs-soroban-env/soroban-env-guest" } -# soroban-env-host = { path = "../rs-soroban-env/soroban-env-host/" } diff --git a/account/Cargo.toml b/account/Cargo.toml index 4bb11eb9..5a027718 100644 --- a/account/Cargo.toml +++ b/account/Cargo.toml @@ -11,11 +11,25 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } -soroban-auth = { workspace = true } +soroban-sdk = { version = "0.7.0"} +soroban-auth = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } -soroban-auth = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } +soroban-auth = { version = "0.7.0", features = ["testutils"] } ed25519-dalek = { version = "1.0.1" } -rand = { version = "0.7.3" } \ No newline at end of file +rand = { version = "0.7.3" } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/alloc/Cargo.toml b/alloc/Cargo.toml index 535c6fe5..c93321fd 100644 --- a/alloc/Cargo.toml +++ b/alloc/Cargo.toml @@ -11,7 +11,21 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true, features = ["alloc"] } +soroban-sdk = { version = "0.7.0", features = ["alloc"] } [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils", "alloc"] } +soroban-sdk = { version = "0.7.0", features = ["testutils", "alloc"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true \ No newline at end of file diff --git a/atomic_multiswap/Cargo.toml b/atomic_multiswap/Cargo.toml index 9c62e01b..3d74e2c5 100644 --- a/atomic_multiswap/Cargo.toml +++ b/atomic_multiswap/Cargo.toml @@ -11,8 +11,22 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } assert_unordered = "0.3.5" + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/atomic_swap/Cargo.toml b/atomic_swap/Cargo.toml index 7b588bf4..e7507ad8 100644 --- a/atomic_swap/Cargo.toml +++ b/atomic_swap/Cargo.toml @@ -11,7 +11,21 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/auth/Cargo.toml b/auth/Cargo.toml index a6a910f7..7cc68cbc 100644 --- a/auth/Cargo.toml +++ b/auth/Cargo.toml @@ -8,7 +8,21 @@ publish = false crate-type = ["cdylib"] [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/cross_contract/contract_a/Cargo.toml b/cross_contract/contract_a/Cargo.toml index 9ed0e01f..0e765f80 100644 --- a/cross_contract/contract_a/Cargo.toml +++ b/cross_contract/contract_a/Cargo.toml @@ -11,7 +11,21 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0" } [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/cross_contract/contract_b/Cargo.toml b/cross_contract/contract_b/Cargo.toml index 6168d175..5253b6fe 100644 --- a/cross_contract/contract_b/Cargo.toml +++ b/cross_contract/contract_b/Cargo.toml @@ -11,7 +11,21 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0" } [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/custom_types/Cargo.toml b/custom_types/Cargo.toml index 88317e31..53e21256 100644 --- a/custom_types/Cargo.toml +++ b/custom_types/Cargo.toml @@ -11,7 +11,21 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/deployer/contract/Cargo.toml b/deployer/contract/Cargo.toml index b7966d94..29725ed8 100644 --- a/deployer/contract/Cargo.toml +++ b/deployer/contract/Cargo.toml @@ -11,7 +11,21 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/deployer/deployer/Cargo.toml b/deployer/deployer/Cargo.toml index b5297d55..8f997e4c 100644 --- a/deployer/deployer/Cargo.toml +++ b/deployer/deployer/Cargo.toml @@ -11,7 +11,21 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/errors/Cargo.toml b/errors/Cargo.toml index 42ee813d..cce70bb2 100644 --- a/errors/Cargo.toml +++ b/errors/Cargo.toml @@ -11,7 +11,21 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/events/Cargo.toml b/events/Cargo.toml index a1e43b8f..f0a803bb 100644 --- a/events/Cargo.toml +++ b/events/Cargo.toml @@ -11,7 +11,21 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/hello_world/Cargo.toml b/hello_world/Cargo.toml index d853a0ba..17b5edcb 100644 --- a/hello_world/Cargo.toml +++ b/hello_world/Cargo.toml @@ -11,7 +11,21 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/increment/Cargo.toml b/increment/Cargo.toml index 35b22871..f0b963dd 100644 --- a/increment/Cargo.toml +++ b/increment/Cargo.toml @@ -11,7 +11,21 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/liquidity_pool/Cargo.toml b/liquidity_pool/Cargo.toml index c034046a..2ac70a5f 100644 --- a/liquidity_pool/Cargo.toml +++ b/liquidity_pool/Cargo.toml @@ -8,8 +8,22 @@ publish = false crate-type = ["cdylib"] [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} num-integer = { version = "0.1.45", default-features = false, features = ["i128"] } [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true \ No newline at end of file diff --git a/logging/Cargo.toml b/logging/Cargo.toml index 9d4ac092..93943a78 100644 --- a/logging/Cargo.toml +++ b/logging/Cargo.toml @@ -14,7 +14,21 @@ doctest = false testutils = ["soroban-sdk/testutils"] [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/simple_account/Cargo.toml b/simple_account/Cargo.toml index cffd88a5..505ca974 100644 --- a/simple_account/Cargo.toml +++ b/simple_account/Cargo.toml @@ -11,11 +11,25 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } -soroban-auth = { workspace = true } +soroban-sdk = { version = "0.7.0"} +soroban-auth = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } -soroban-auth = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } +soroban-auth = { version = "0.7.0", features = ["testutils"] } ed25519-dalek = { version = "1.0.1" } -rand = { version = "0.7.3" } \ No newline at end of file +rand = { version = "0.7.3" } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/single_offer/Cargo.toml b/single_offer/Cargo.toml index 48383dc6..d5b34d11 100644 --- a/single_offer/Cargo.toml +++ b/single_offer/Cargo.toml @@ -8,8 +8,22 @@ publish = false crate-type = ["cdylib"] [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/timelock/Cargo.toml b/timelock/Cargo.toml index 63e34293..5319ef57 100644 --- a/timelock/Cargo.toml +++ b/timelock/Cargo.toml @@ -11,7 +11,21 @@ crate-type = ["cdylib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} [dev_dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true diff --git a/token/Cargo.toml b/token/Cargo.toml index d3bf730c..acde3f3e 100644 --- a/token/Cargo.toml +++ b/token/Cargo.toml @@ -8,7 +8,21 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "0.7.0"} -[dev-dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +[dev_dependencies] +soroban-sdk = { version = "0.7.0", features = ["testutils"] } + +[profile.release] +opt-level = "z" +overflow-checks = true +debug = 0 +strip = "symbols" +debug-assertions = false +panic = "abort" +codegen-units = 1 +lto = true + +[profile.release-with-logs] +inherits = "release" +debug-assertions = true From 64046ba9d54b845a61cf85400cc0faaec4d873c5 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Wed, 19 Apr 2023 17:29:00 -0700 Subject: [PATCH 02/23] Added Makefile for each soroban-example --- account/Makefile | 23 +++++++++++++++++++++++ alloc/Makefile | 23 +++++++++++++++++++++++ atomic_multiswap/Makefile | 27 +++++++++++++++++++++++++++ atomic_swap/Makefile | 23 +++++++++++++++++++++++ auth/Makefile | 23 +++++++++++++++++++++++ cross_contract/contract_a/Makefile | 23 +++++++++++++++++++++++ cross_contract/contract_b/Makefile | 27 +++++++++++++++++++++++++++ custom_types/Makefile | 23 +++++++++++++++++++++++ deployer/contract/Makefile | 23 +++++++++++++++++++++++ deployer/deployer/Makefile | 27 +++++++++++++++++++++++++++ errors/Makefile | 23 +++++++++++++++++++++++ events/Makefile | 23 +++++++++++++++++++++++ hello_world/Makefile | 23 +++++++++++++++++++++++ increment/Makefile | 23 +++++++++++++++++++++++ liquidity_pool/Makefile | 27 +++++++++++++++++++++++++++ logging/Makefile | 23 +++++++++++++++++++++++ simple_account/Makefile | 23 +++++++++++++++++++++++ single_offer/Makefile | 23 +++++++++++++++++++++++ timelock/Makefile | 23 +++++++++++++++++++++++ token/Makefile | 23 +++++++++++++++++++++++ 20 files changed, 476 insertions(+) create mode 100644 account/Makefile create mode 100644 alloc/Makefile create mode 100644 atomic_multiswap/Makefile create mode 100644 atomic_swap/Makefile create mode 100644 auth/Makefile create mode 100644 cross_contract/contract_a/Makefile create mode 100644 cross_contract/contract_b/Makefile create mode 100644 custom_types/Makefile create mode 100644 deployer/contract/Makefile create mode 100644 deployer/deployer/Makefile create mode 100644 errors/Makefile create mode 100644 events/Makefile create mode 100644 hello_world/Makefile create mode 100644 increment/Makefile create mode 100644 liquidity_pool/Makefile create mode 100644 logging/Makefile create mode 100644 simple_account/Makefile create mode 100644 single_offer/Makefile create mode 100644 timelock/Makefile create mode 100644 token/Makefile diff --git a/account/Makefile b/account/Makefile new file mode 100644 index 00000000..da3b2751 --- /dev/null +++ b/account/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-account-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/alloc/Makefile b/alloc/Makefile new file mode 100644 index 00000000..a6e688bb --- /dev/null +++ b/alloc/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-alloc-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/atomic_multiswap/Makefile b/atomic_multiswap/Makefile new file mode 100644 index 00000000..fda5826d --- /dev/null +++ b/atomic_multiswap/Makefile @@ -0,0 +1,27 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cd ../atomic_swap + cargo build --target wasm32-unknown-unknown --release -p soroban-atomic-swap-contract + + cd ../atomic_multiswap + cargo build --target wasm32-unknown-unknown --release -p soroban-atomic-multiswap-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/atomic_swap/Makefile b/atomic_swap/Makefile new file mode 100644 index 00000000..3005226a --- /dev/null +++ b/atomic_swap/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-atomic-swap-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/auth/Makefile b/auth/Makefile new file mode 100644 index 00000000..c02ef184 --- /dev/null +++ b/auth/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-auth-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/cross_contract/contract_a/Makefile b/cross_contract/contract_a/Makefile new file mode 100644 index 00000000..2bcb4884 --- /dev/null +++ b/cross_contract/contract_a/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-cross-contract-a-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/cross_contract/contract_b/Makefile b/cross_contract/contract_b/Makefile new file mode 100644 index 00000000..15956207 --- /dev/null +++ b/cross_contract/contract_b/Makefile @@ -0,0 +1,27 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cd ../contract_a + cargo build --target wasm32-unknown-unknown --release -p soroban-cross-contract-a-contract + + cd ../contract_b + cargo build --target wasm32-unknown-unknown --release -p soroban-cross-contract-b-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/custom_types/Makefile b/custom_types/Makefile new file mode 100644 index 00000000..619a1934 --- /dev/null +++ b/custom_types/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-custom-types-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/deployer/contract/Makefile b/deployer/contract/Makefile new file mode 100644 index 00000000..7a8f61fb --- /dev/null +++ b/deployer/contract/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-deployer-test-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/deployer/deployer/Makefile b/deployer/deployer/Makefile new file mode 100644 index 00000000..c3bb0b79 --- /dev/null +++ b/deployer/deployer/Makefile @@ -0,0 +1,27 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cd ../contract + cargo build --target wasm32-unknown-unknown --release -p soroban-deployer-test-contract + + cd ../deployer + cargo build --target wasm32-unknown-unknown --release -p soroban-deployer-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/errors/Makefile b/errors/Makefile new file mode 100644 index 00000000..356f5a85 --- /dev/null +++ b/errors/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-errors-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/events/Makefile b/events/Makefile new file mode 100644 index 00000000..6d3d7e33 --- /dev/null +++ b/events/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-events-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/hello_world/Makefile b/hello_world/Makefile new file mode 100644 index 00000000..2eb7ca7b --- /dev/null +++ b/hello_world/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-hello-world-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/increment/Makefile b/increment/Makefile new file mode 100644 index 00000000..1d595d6f --- /dev/null +++ b/increment/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-increment-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/liquidity_pool/Makefile b/liquidity_pool/Makefile new file mode 100644 index 00000000..32a2d24d --- /dev/null +++ b/liquidity_pool/Makefile @@ -0,0 +1,27 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cd ../token + cargo build --target wasm32-unknown-unknown --release -p soroban-token-contract + + cd ../liquidity_pool + cargo build --target wasm32-unknown-unknown --release -p soroban-liquidity-pool-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/logging/Makefile b/logging/Makefile new file mode 100644 index 00000000..ef2a913b --- /dev/null +++ b/logging/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-logging-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/simple_account/Makefile b/simple_account/Makefile new file mode 100644 index 00000000..65c2ac7e --- /dev/null +++ b/simple_account/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-simple-account-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/single_offer/Makefile b/single_offer/Makefile new file mode 100644 index 00000000..d15553cf --- /dev/null +++ b/single_offer/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-single-offer-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/timelock/Makefile b/timelock/Makefile new file mode 100644 index 00000000..432fd014 --- /dev/null +++ b/timelock/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-timelock-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean diff --git a/token/Makefile b/token/Makefile new file mode 100644 index 00000000..8680f6a3 --- /dev/null +++ b/token/Makefile @@ -0,0 +1,23 @@ +default: build + +all: build test + +test: build + cargo test + cargo test --features testutils + +build: + cargo build --target wasm32-unknown-unknown --release -p soroban-token-contract + cd target/wasm32-unknown-unknown/release/ && \ + for i in *.wasm ; do \ + ls -l "$$i"; \ + done + +watch: + cargo watch --clear --watch-when-idle --shell '$(MAKE)' + +fmt: + cargo fmt --all + +clean: + cargo clean From 6e532f0e816c935aeb743cdb4051c4274cd56135 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Wed, 19 Apr 2023 18:59:41 -0700 Subject: [PATCH 03/23] suppress printing the cd command for looking at wasm target files --- account/Makefile | 2 +- alloc/Makefile | 2 +- atomic_multiswap/Makefile | 2 +- atomic_swap/Makefile | 2 +- auth/Makefile | 2 +- cross_contract/contract_a/Makefile | 2 +- cross_contract/contract_b/Makefile | 2 +- custom_types/Makefile | 2 +- deployer/contract/Makefile | 2 +- deployer/deployer/Makefile | 2 +- errors/Makefile | 2 +- events/Makefile | 2 +- hello_world/Makefile | 2 +- increment/Makefile | 2 +- liquidity_pool/Makefile | 2 +- logging/Makefile | 2 +- simple_account/Makefile | 2 +- single_offer/Makefile | 2 +- timelock/Makefile | 2 +- token/Makefile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/account/Makefile b/account/Makefile index da3b2751..a8ada02e 100644 --- a/account/Makefile +++ b/account/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-account-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/alloc/Makefile b/alloc/Makefile index a6e688bb..95f28dd5 100644 --- a/alloc/Makefile +++ b/alloc/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-alloc-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/atomic_multiswap/Makefile b/atomic_multiswap/Makefile index fda5826d..071bc06c 100644 --- a/atomic_multiswap/Makefile +++ b/atomic_multiswap/Makefile @@ -12,7 +12,7 @@ build: cd ../atomic_multiswap cargo build --target wasm32-unknown-unknown --release -p soroban-atomic-multiswap-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/atomic_swap/Makefile b/atomic_swap/Makefile index 3005226a..a1610fe1 100644 --- a/atomic_swap/Makefile +++ b/atomic_swap/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-atomic-swap-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/auth/Makefile b/auth/Makefile index c02ef184..e0195408 100644 --- a/auth/Makefile +++ b/auth/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-auth-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/cross_contract/contract_a/Makefile b/cross_contract/contract_a/Makefile index 2bcb4884..699f9a4e 100644 --- a/cross_contract/contract_a/Makefile +++ b/cross_contract/contract_a/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-cross-contract-a-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/cross_contract/contract_b/Makefile b/cross_contract/contract_b/Makefile index 15956207..6c5eb1ef 100644 --- a/cross_contract/contract_b/Makefile +++ b/cross_contract/contract_b/Makefile @@ -12,7 +12,7 @@ build: cd ../contract_b cargo build --target wasm32-unknown-unknown --release -p soroban-cross-contract-b-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/custom_types/Makefile b/custom_types/Makefile index 619a1934..2ec39670 100644 --- a/custom_types/Makefile +++ b/custom_types/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-custom-types-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/deployer/contract/Makefile b/deployer/contract/Makefile index 7a8f61fb..88ef0d81 100644 --- a/deployer/contract/Makefile +++ b/deployer/contract/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-deployer-test-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/deployer/deployer/Makefile b/deployer/deployer/Makefile index c3bb0b79..32f021b0 100644 --- a/deployer/deployer/Makefile +++ b/deployer/deployer/Makefile @@ -12,7 +12,7 @@ build: cd ../deployer cargo build --target wasm32-unknown-unknown --release -p soroban-deployer-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/errors/Makefile b/errors/Makefile index 356f5a85..11fba7d3 100644 --- a/errors/Makefile +++ b/errors/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-errors-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/events/Makefile b/events/Makefile index 6d3d7e33..81df2aef 100644 --- a/events/Makefile +++ b/events/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-events-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/hello_world/Makefile b/hello_world/Makefile index 2eb7ca7b..e87b4e44 100644 --- a/hello_world/Makefile +++ b/hello_world/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-hello-world-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/increment/Makefile b/increment/Makefile index 1d595d6f..57dc1b5b 100644 --- a/increment/Makefile +++ b/increment/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-increment-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/liquidity_pool/Makefile b/liquidity_pool/Makefile index 32a2d24d..adc7abca 100644 --- a/liquidity_pool/Makefile +++ b/liquidity_pool/Makefile @@ -12,7 +12,7 @@ build: cd ../liquidity_pool cargo build --target wasm32-unknown-unknown --release -p soroban-liquidity-pool-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/logging/Makefile b/logging/Makefile index ef2a913b..b01362e1 100644 --- a/logging/Makefile +++ b/logging/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-logging-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/simple_account/Makefile b/simple_account/Makefile index 65c2ac7e..72de337f 100644 --- a/simple_account/Makefile +++ b/simple_account/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-simple-account-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/single_offer/Makefile b/single_offer/Makefile index d15553cf..4ad67012 100644 --- a/single_offer/Makefile +++ b/single_offer/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-single-offer-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/timelock/Makefile b/timelock/Makefile index 432fd014..45030ab5 100644 --- a/timelock/Makefile +++ b/timelock/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-timelock-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done diff --git a/token/Makefile b/token/Makefile index 8680f6a3..ea858aad 100644 --- a/token/Makefile +++ b/token/Makefile @@ -8,7 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-token-contract - cd target/wasm32-unknown-unknown/release/ && \ + @cd target/wasm32-unknown-unknown/release/ && \ for i in *.wasm ; do \ ls -l "$$i"; \ done From a2adba9ccbf1391e20f075ad7e6af05226753697 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Wed, 19 Apr 2023 22:14:36 -0700 Subject: [PATCH 04/23] fixing Makefile --- Makefile | 30 +++++++++++++++++------------- account/Makefile | 5 +---- alloc/Makefile | 5 +---- atomic_multiswap/Makefile | 11 ++++------- atomic_swap/Makefile | 5 +---- auth/Makefile | 5 +---- cross_contract/contract_a/Makefile | 5 +---- cross_contract/contract_b/Makefile | 11 ++++------- custom_types/Makefile | 5 +---- deployer/contract/Makefile | 5 +---- deployer/deployer/Makefile | 12 +++++------- errors/Makefile | 5 +---- events/Makefile | 5 +---- hello_world/Makefile | 5 +---- increment/Makefile | 5 +---- liquidity_pool/Makefile | 11 ++++------- logging/Makefile | 5 +---- simple_account/Makefile | 5 +---- single_offer/Makefile | 5 +---- timelock/Makefile | 5 +---- token/Makefile | 5 +---- 21 files changed, 50 insertions(+), 105 deletions(-) diff --git a/Makefile b/Makefile index ea78bdae..d398ab81 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,24 @@ +MAKEFILES = $(shell find . -maxdepth 3 -type f -name Makefile) +SUBDIRS = $(filter-out ./,$(dir $(MAKEFILES))) +ROOT_DIR = $(shell pwd) + default: build all: build test -test: build - cargo test - cargo test --features testutils - build: - cargo build --target wasm32-unknown-unknown --release -p soroban-token-contract - cargo build --target wasm32-unknown-unknown --release -p soroban-cross-contract-a-contract - cargo build --target wasm32-unknown-unknown --release -p soroban-atomic-swap-contract - cargo build --target wasm32-unknown-unknown --release - cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @for dir in $(SUBDIRS) ; do \ + cd $$dir; \ + make build || break; \ + cd $(ROOT_DIR); \ + done + +test: build + @for dir in $(SUBDIRS) ; do \ + cd $$dir; \ + make test || break; \ + cd $(ROOT_DIR); \ + done watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' @@ -23,4 +27,4 @@ fmt: cargo fmt --all clean: - cargo clean + cargo clean \ No newline at end of file diff --git a/account/Makefile b/account/Makefile index a8ada02e..b1ee912d 100644 --- a/account/Makefile +++ b/account/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-account-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/alloc/Makefile b/alloc/Makefile index 95f28dd5..3b124399 100644 --- a/alloc/Makefile +++ b/alloc/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-alloc-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/atomic_multiswap/Makefile b/atomic_multiswap/Makefile index 071bc06c..715e8334 100644 --- a/atomic_multiswap/Makefile +++ b/atomic_multiswap/Makefile @@ -1,3 +1,4 @@ +CUR_DIR = $(shell pwd) default: build all: build test @@ -7,15 +8,11 @@ test: build cargo test --features testutils build: - cd ../atomic_swap - cargo build --target wasm32-unknown-unknown --release -p soroban-atomic-swap-contract + @cd ../atomic_swap && make build || break; - cd ../atomic_multiswap + @cd $(CUR_DIR); cargo build --target wasm32-unknown-unknown --release -p soroban-atomic-multiswap-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/atomic_swap/Makefile b/atomic_swap/Makefile index a1610fe1..bdf9119c 100644 --- a/atomic_swap/Makefile +++ b/atomic_swap/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-atomic-swap-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/auth/Makefile b/auth/Makefile index e0195408..4c6a90d4 100644 --- a/auth/Makefile +++ b/auth/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-auth-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/cross_contract/contract_a/Makefile b/cross_contract/contract_a/Makefile index 699f9a4e..3c60226d 100644 --- a/cross_contract/contract_a/Makefile +++ b/cross_contract/contract_a/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-cross-contract-a-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/cross_contract/contract_b/Makefile b/cross_contract/contract_b/Makefile index 6c5eb1ef..d5a31497 100644 --- a/cross_contract/contract_b/Makefile +++ b/cross_contract/contract_b/Makefile @@ -1,3 +1,4 @@ +CUR_DIR = $(shell pwd) default: build all: build test @@ -7,15 +8,11 @@ test: build cargo test --features testutils build: - cd ../contract_a - cargo build --target wasm32-unknown-unknown --release -p soroban-cross-contract-a-contract + @cd ../contract_a && make build || break; - cd ../contract_b + @cd $(CUR_DIR); cargo build --target wasm32-unknown-unknown --release -p soroban-cross-contract-b-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/custom_types/Makefile b/custom_types/Makefile index 2ec39670..2e22e535 100644 --- a/custom_types/Makefile +++ b/custom_types/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-custom-types-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/deployer/contract/Makefile b/deployer/contract/Makefile index 88ef0d81..e7a83ffe 100644 --- a/deployer/contract/Makefile +++ b/deployer/contract/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-deployer-test-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/deployer/deployer/Makefile b/deployer/deployer/Makefile index 32f021b0..d67cada6 100644 --- a/deployer/deployer/Makefile +++ b/deployer/deployer/Makefile @@ -1,3 +1,5 @@ +CUR_DIR = $(shell pwd) + default: build all: build test @@ -7,15 +9,11 @@ test: build cargo test --features testutils build: - cd ../contract - cargo build --target wasm32-unknown-unknown --release -p soroban-deployer-test-contract + @cd ../contract && make build || break; - cd ../deployer + @cd $(CUR_DIR); cargo build --target wasm32-unknown-unknown --release -p soroban-deployer-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/errors/Makefile b/errors/Makefile index 11fba7d3..2ac03697 100644 --- a/errors/Makefile +++ b/errors/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-errors-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/events/Makefile b/events/Makefile index 81df2aef..3a4292f0 100644 --- a/events/Makefile +++ b/events/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-events-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/hello_world/Makefile b/hello_world/Makefile index e87b4e44..cbd7ec59 100644 --- a/hello_world/Makefile +++ b/hello_world/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-hello-world-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/increment/Makefile b/increment/Makefile index 57dc1b5b..4588194e 100644 --- a/increment/Makefile +++ b/increment/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-increment-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/liquidity_pool/Makefile b/liquidity_pool/Makefile index adc7abca..29a9eab9 100644 --- a/liquidity_pool/Makefile +++ b/liquidity_pool/Makefile @@ -1,3 +1,4 @@ +CUR_DIR = $(shell pwd) default: build all: build test @@ -7,15 +8,11 @@ test: build cargo test --features testutils build: - cd ../token - cargo build --target wasm32-unknown-unknown --release -p soroban-token-contract + @cd ../token && make build || break; - cd ../liquidity_pool + @cd $(CUR_DIR); cargo build --target wasm32-unknown-unknown --release -p soroban-liquidity-pool-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/logging/Makefile b/logging/Makefile index b01362e1..19280514 100644 --- a/logging/Makefile +++ b/logging/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-logging-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/simple_account/Makefile b/simple_account/Makefile index 72de337f..f08e6f8f 100644 --- a/simple_account/Makefile +++ b/simple_account/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-simple-account-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/single_offer/Makefile b/single_offer/Makefile index 4ad67012..c9ca9c2d 100644 --- a/single_offer/Makefile +++ b/single_offer/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-single-offer-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/timelock/Makefile b/timelock/Makefile index 45030ab5..17608a09 100644 --- a/timelock/Makefile +++ b/timelock/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-timelock-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' diff --git a/token/Makefile b/token/Makefile index ea858aad..cfa72b24 100644 --- a/token/Makefile +++ b/token/Makefile @@ -8,10 +8,7 @@ test: build build: cargo build --target wasm32-unknown-unknown --release -p soroban-token-contract - @cd target/wasm32-unknown-unknown/release/ && \ - for i in *.wasm ; do \ - ls -l "$$i"; \ - done + @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' From e209dde634f4d01c051ee9a7056a02896cd05086 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Wed, 19 Apr 2023 22:40:44 -0700 Subject: [PATCH 05/23] Fixing the path to wasm file now that its inside one level down --- .gitpod.yml | 2 +- atomic_multiswap/src/lib.rs | 2 +- cross_contract/contract_b/src/lib.rs | 2 +- deployer/deployer/src/test.rs | 2 +- liquidity_pool/src/token.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index a95dc7af..8b31ee15 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -33,7 +33,7 @@ tasks: gp open increment/src/lib.rs gp open increment/src/test.rs gp open README.md - soroban contract invoke --id 1 --wasm target/wasm32-unknown-unknown/release/soroban_increment_contract.wasm --fn increment + soroban contract invoke --id 1 --wasm increment/target/wasm32-unknown-unknown/release/soroban_increment_contract.wasm --fn increment vscode: extensions: - rust-lang.rust-analyzer diff --git a/atomic_multiswap/src/lib.rs b/atomic_multiswap/src/lib.rs index 379e125a..12ad3ad6 100644 --- a/atomic_multiswap/src/lib.rs +++ b/atomic_multiswap/src/lib.rs @@ -11,7 +11,7 @@ use soroban_sdk::{contractimpl, contracttype, Address, BytesN, Env, Vec}; mod atomic_swap { soroban_sdk::contractimport!( - file = "../target/wasm32-unknown-unknown/release/soroban_atomic_swap_contract.wasm" + file = "../atomic_swap/target/wasm32-unknown-unknown/release/soroban_atomic_swap_contract.wasm" ); } diff --git a/cross_contract/contract_b/src/lib.rs b/cross_contract/contract_b/src/lib.rs index fe11415b..99e47cd3 100644 --- a/cross_contract/contract_b/src/lib.rs +++ b/cross_contract/contract_b/src/lib.rs @@ -4,7 +4,7 @@ use soroban_sdk::{contractimpl, BytesN, Env}; mod contract_a { soroban_sdk::contractimport!( - file = "../../target/wasm32-unknown-unknown/release/soroban_cross_contract_a_contract.wasm" + file = "../contract_a/target/wasm32-unknown-unknown/release/soroban_cross_contract_a_contract.wasm" ); } diff --git a/deployer/deployer/src/test.rs b/deployer/deployer/src/test.rs index 2ec56149..8155b454 100644 --- a/deployer/deployer/src/test.rs +++ b/deployer/deployer/src/test.rs @@ -6,7 +6,7 @@ use soroban_sdk::{Bytes, Env, IntoVal, Symbol}; // The contract that will be deployed by the deployer contract. mod contract { soroban_sdk::contractimport!( - file = "../../target/wasm32-unknown-unknown/release/soroban_deployer_test_contract.wasm" + file = "../contract/target/wasm32-unknown-unknown/release/soroban_deployer_test_contract.wasm" ); } diff --git a/liquidity_pool/src/token.rs b/liquidity_pool/src/token.rs index 8d347405..b64b998e 100644 --- a/liquidity_pool/src/token.rs +++ b/liquidity_pool/src/token.rs @@ -2,7 +2,7 @@ use soroban_sdk::{Bytes, BytesN, Env}; soroban_sdk::contractimport!( - file = "../target/wasm32-unknown-unknown/release/soroban_token_contract.wasm" + file = "../token/target/wasm32-unknown-unknown/release/soroban_token_contract.wasm" ); pub fn create_contract( From 9e28ef08f154fe2f01d5332a94a677f234bceee2 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Wed, 19 Apr 2023 22:56:20 -0700 Subject: [PATCH 06/23] Fixing root Makefile for targets of fmt, watch, clean --- Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d398ab81..dbbe758f 100644 --- a/Makefile +++ b/Makefile @@ -21,10 +21,22 @@ test: build done watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' + @for dir in $(SUBDIRS) ; do \ + cd $$dir; \ + make watch || break; \ + cd $(ROOT_DIR); \ + done fmt: - cargo fmt --all + @for dir in $(SUBDIRS) ; do \ + cd $$dir; \ + make fmt || break; \ + cd $(ROOT_DIR); \ + done clean: - cargo clean \ No newline at end of file + @for dir in $(SUBDIRS) ; do \ + cd $$dir; \ + make clean || break; \ + cd $(ROOT_DIR); \ + done \ No newline at end of file From e22b54a3e5aa2deadbc2b7ef76d443f17ce88409 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Thu, 20 Apr 2023 09:51:24 -0700 Subject: [PATCH 07/23] Using the variable instead of make --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index dbbe758f..f5a9cd3a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -MAKEFILES = $(shell find . -maxdepth 3 -type f -name Makefile) -SUBDIRS = $(filter-out ./,$(dir $(MAKEFILES))) +$(MAKE)FILES = $(shell find . -maxdepth 3 -type f -name $(MAKE)file) +SUBDIRS = $(filter-out ./,$(dir $($(MAKE)FILES))) ROOT_DIR = $(shell pwd) default: build @@ -9,34 +9,34 @@ all: build test build: @for dir in $(SUBDIRS) ; do \ cd $$dir; \ - make build || break; \ + $(MAKE) build || break; \ cd $(ROOT_DIR); \ done test: build @for dir in $(SUBDIRS) ; do \ cd $$dir; \ - make test || break; \ + $(MAKE) test || break; \ cd $(ROOT_DIR); \ done watch: @for dir in $(SUBDIRS) ; do \ cd $$dir; \ - make watch || break; \ + $(MAKE) watch || break; \ cd $(ROOT_DIR); \ done fmt: @for dir in $(SUBDIRS) ; do \ cd $$dir; \ - make fmt || break; \ + $(MAKE) fmt || break; \ cd $(ROOT_DIR); \ done clean: @for dir in $(SUBDIRS) ; do \ cd $$dir; \ - make clean || break; \ + $(MAKE) clean || break; \ cd $(ROOT_DIR); \ done \ No newline at end of file From e7fe7fa8ae36e22aa01fb1758340aa8ccfacb02e Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Thu, 20 Apr 2023 10:22:05 -0700 Subject: [PATCH 08/23] Fixed github workflow rush.yml to run make fmt since we don't have top level cargo.toml --- .github/workflows/rust.yml | 2 +- account/Makefile | 2 +- alloc/Makefile | 2 +- atomic_multiswap/Makefile | 2 +- atomic_swap/Makefile | 2 +- auth/Makefile | 2 +- cross_contract/contract_a/Makefile | 2 +- cross_contract/contract_b/Makefile | 2 +- custom_types/Makefile | 2 +- deployer/deployer/Makefile | 2 +- errors/Makefile | 2 +- events/Makefile | 2 +- hello_world/Makefile | 2 +- increment/Makefile | 2 +- liquidity_pool/Makefile | 2 +- logging/Makefile | 2 +- simple_account/Makefile | 2 +- single_offer/Makefile | 2 +- timelock/Makefile | 2 +- token/Makefile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index bddab3a8..80934895 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: rustup update - - run: cargo fmt --all --check + - run: make fmt rust-analyzer-compat: runs-on: ubuntu-latest diff --git a/account/Makefile b/account/Makefile index b1ee912d..2f480862 100644 --- a/account/Makefile +++ b/account/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/alloc/Makefile b/alloc/Makefile index 3b124399..03b1da16 100644 --- a/alloc/Makefile +++ b/alloc/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/atomic_multiswap/Makefile b/atomic_multiswap/Makefile index 715e8334..dcc4f7aa 100644 --- a/atomic_multiswap/Makefile +++ b/atomic_multiswap/Makefile @@ -18,7 +18,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/atomic_swap/Makefile b/atomic_swap/Makefile index bdf9119c..8d65010b 100644 --- a/atomic_swap/Makefile +++ b/atomic_swap/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/auth/Makefile b/auth/Makefile index 4c6a90d4..10f1f227 100644 --- a/auth/Makefile +++ b/auth/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/cross_contract/contract_a/Makefile b/cross_contract/contract_a/Makefile index 3c60226d..71063392 100644 --- a/cross_contract/contract_a/Makefile +++ b/cross_contract/contract_a/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/cross_contract/contract_b/Makefile b/cross_contract/contract_b/Makefile index d5a31497..ca34ff55 100644 --- a/cross_contract/contract_b/Makefile +++ b/cross_contract/contract_b/Makefile @@ -18,7 +18,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/custom_types/Makefile b/custom_types/Makefile index 2e22e535..74dace04 100644 --- a/custom_types/Makefile +++ b/custom_types/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/deployer/deployer/Makefile b/deployer/deployer/Makefile index d67cada6..1fa9aa36 100644 --- a/deployer/deployer/Makefile +++ b/deployer/deployer/Makefile @@ -19,7 +19,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/errors/Makefile b/errors/Makefile index 2ac03697..d1967109 100644 --- a/errors/Makefile +++ b/errors/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/events/Makefile b/events/Makefile index 3a4292f0..bbcaf6ae 100644 --- a/events/Makefile +++ b/events/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/hello_world/Makefile b/hello_world/Makefile index cbd7ec59..36f1df48 100644 --- a/hello_world/Makefile +++ b/hello_world/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/increment/Makefile b/increment/Makefile index 4588194e..29ff93e5 100644 --- a/increment/Makefile +++ b/increment/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/liquidity_pool/Makefile b/liquidity_pool/Makefile index 29a9eab9..447671a6 100644 --- a/liquidity_pool/Makefile +++ b/liquidity_pool/Makefile @@ -18,7 +18,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/logging/Makefile b/logging/Makefile index 19280514..9d8278d1 100644 --- a/logging/Makefile +++ b/logging/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/simple_account/Makefile b/simple_account/Makefile index f08e6f8f..315ed611 100644 --- a/simple_account/Makefile +++ b/simple_account/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/single_offer/Makefile b/single_offer/Makefile index c9ca9c2d..382a8d7b 100644 --- a/single_offer/Makefile +++ b/single_offer/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/timelock/Makefile b/timelock/Makefile index 17608a09..94e6e989 100644 --- a/timelock/Makefile +++ b/timelock/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean diff --git a/token/Makefile b/token/Makefile index cfa72b24..3934fb36 100644 --- a/token/Makefile +++ b/token/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean From 9078f6307faf2749dfa75053108d3fe8ebf0bcbc Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Thu, 20 Apr 2023 12:41:33 -0700 Subject: [PATCH 09/23] Fixing rust-analyzer error by explicitly specifying subdirectory projects --- .github/workflows/rust.yml | 22 +++++++++++++++++++++- Makefile | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 80934895..62a5c379 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -32,7 +32,27 @@ jobs: - run: rustup update - run: rustup +nightly component add rust-analyzer - name: Check if rust-analyzer encounters any errors parsing project - run: rustup run nightly rust-analyzer analysis-stats . 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats token/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats deployer/deployer/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats deployer/contract/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats simple_account/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats timelock/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats alloc/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats hello_world/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats auth/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats custom_types/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats single_offer/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats liquidity_pool/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats increment/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats atomic_multiswap/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats cross_contract/contract_b/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats cross_contract/contract_a/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats errors/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats account/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats events/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats logging/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats atomic_swap/ 2>&1 | (! grep ERROR) build-and-test: strategy: diff --git a/Makefile b/Makefile index f5a9cd3a..4ca7c195 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -$(MAKE)FILES = $(shell find . -maxdepth 3 -type f -name $(MAKE)file) +$(MAKE)FILES = $(shell find . -maxdepth 3 -type f -name Makefile) SUBDIRS = $(filter-out ./,$(dir $($(MAKE)FILES))) ROOT_DIR = $(shell pwd) From 618c0a807c70e48296cdc8e6bfd47a5db7c5f41c Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Thu, 20 Apr 2023 12:43:09 -0700 Subject: [PATCH 10/23] fixing typo --- .github/workflows/rust.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 62a5c379..db78941a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -40,7 +40,6 @@ jobs: run: rustup run nightly rust-analyzer analysis-stats alloc/ 2>&1 | (! grep ERROR) run: rustup run nightly rust-analyzer analysis-stats hello_world/ 2>&1 | (! grep ERROR) run: rustup run nightly rust-analyzer analysis-stats auth/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats 2>&1 | (! grep ERROR) run: rustup run nightly rust-analyzer analysis-stats custom_types/ 2>&1 | (! grep ERROR) run: rustup run nightly rust-analyzer analysis-stats single_offer/ 2>&1 | (! grep ERROR) run: rustup run nightly rust-analyzer analysis-stats liquidity_pool/ 2>&1 | (! grep ERROR) From 890cae4ec616d76f62fc1efddf3b103310a604e7 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Thu, 20 Apr 2023 12:45:19 -0700 Subject: [PATCH 11/23] multiple runs in rush.yml --- .github/workflows/rust.yml | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index db78941a..863a24bc 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -32,26 +32,26 @@ jobs: - run: rustup update - run: rustup +nightly component add rust-analyzer - name: Check if rust-analyzer encounters any errors parsing project - run: rustup run nightly rust-analyzer analysis-stats token/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats deployer/deployer/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats deployer/contract/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats simple_account/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats timelock/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats alloc/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats hello_world/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats auth/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats custom_types/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats single_offer/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats liquidity_pool/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats increment/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats atomic_multiswap/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats cross_contract/contract_b/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats cross_contract/contract_a/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats errors/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats account/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats events/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats logging/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats atomic_swap/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats token/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats deployer/deployer/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats deployer/contract/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats simple_account/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats timelock/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats alloc/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats hello_world/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats auth/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats custom_types/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats single_offer/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats liquidity_pool/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats increment/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats atomic_multiswap/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats cross_contract/contract_b/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats cross_contract/contract_a/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats errors/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats account/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats events/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats logging/ 2>&1 | (! grep ERROR) + - run: rustup run nightly rust-analyzer analysis-stats atomic_swap/ 2>&1 | (! grep ERROR) build-and-test: strategy: From 7b3fa593528119405b41079ad6d9d381ae69abe2 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Thu, 20 Apr 2023 13:22:27 -0700 Subject: [PATCH 12/23] Replaced make fmt with rustfmt --- .github/workflows/rust.yml | 2 +- deployer/deployer/src/test.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 863a24bc..326daf38 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: rustup update - - run: make fmt + - run: rustfmt **/*.rs rust-analyzer-compat: runs-on: ubuntu-latest diff --git a/deployer/deployer/src/test.rs b/deployer/deployer/src/test.rs index 8155b454..05241e0c 100644 --- a/deployer/deployer/src/test.rs +++ b/deployer/deployer/src/test.rs @@ -6,7 +6,8 @@ use soroban_sdk::{Bytes, Env, IntoVal, Symbol}; // The contract that will be deployed by the deployer contract. mod contract { soroban_sdk::contractimport!( - file = "../contract/target/wasm32-unknown-unknown/release/soroban_deployer_test_contract.wasm" + file = + "../contract/target/wasm32-unknown-unknown/release/soroban_deployer_test_contract.wasm" ); } From 5298a2e58eb21c12c9678dd55afa2a0aab5883e6 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Thu, 20 Apr 2023 17:52:07 -0700 Subject: [PATCH 13/23] Makefile improvements --- Makefile | 9 +-------- alloc/Makefile | 5 +---- atomic_multiswap/Makefile | 5 +---- atomic_swap/Makefile | 5 +---- auth/Makefile | 5 +---- cross_contract/contract_a/Makefile | 5 +---- cross_contract/contract_b/Makefile | 5 +---- custom_types/Makefile | 5 +---- deployer/deployer/Makefile | 5 +---- errors/Makefile | 5 +---- events/Makefile | 5 +---- hello_world/Makefile | 5 +---- increment/Makefile | 5 +---- liquidity_pool/Makefile | 5 +---- logging/Makefile | 5 +---- simple_account/Makefile | 5 +---- single_offer/Makefile | 5 +---- timelock/Makefile | 5 +---- token/Makefile | 5 +---- 19 files changed, 19 insertions(+), 80 deletions(-) diff --git a/Makefile b/Makefile index 4ca7c195..ffb70054 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ ROOT_DIR = $(shell pwd) default: build -all: build test +all: test build: @for dir in $(SUBDIRS) ; do \ @@ -20,13 +20,6 @@ test: build cd $(ROOT_DIR); \ done -watch: - @for dir in $(SUBDIRS) ; do \ - cd $$dir; \ - $(MAKE) watch || break; \ - cd $(ROOT_DIR); \ - done - fmt: @for dir in $(SUBDIRS) ; do \ cd $$dir; \ diff --git a/alloc/Makefile b/alloc/Makefile index 03b1da16..3ff8d76f 100644 --- a/alloc/Makefile +++ b/alloc/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-alloc-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/atomic_multiswap/Makefile b/atomic_multiswap/Makefile index dcc4f7aa..c4141e29 100644 --- a/atomic_multiswap/Makefile +++ b/atomic_multiswap/Makefile @@ -1,7 +1,7 @@ CUR_DIR = $(shell pwd) default: build -all: build test +all: test test: build cargo test @@ -14,9 +14,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-atomic-multiswap-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/atomic_swap/Makefile b/atomic_swap/Makefile index 8d65010b..2bf15fd6 100644 --- a/atomic_swap/Makefile +++ b/atomic_swap/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-atomic-swap-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/auth/Makefile b/auth/Makefile index 10f1f227..15c18968 100644 --- a/auth/Makefile +++ b/auth/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-auth-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/cross_contract/contract_a/Makefile b/cross_contract/contract_a/Makefile index 71063392..3970d714 100644 --- a/cross_contract/contract_a/Makefile +++ b/cross_contract/contract_a/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-cross-contract-a-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/cross_contract/contract_b/Makefile b/cross_contract/contract_b/Makefile index ca34ff55..3c26acc6 100644 --- a/cross_contract/contract_b/Makefile +++ b/cross_contract/contract_b/Makefile @@ -1,7 +1,7 @@ CUR_DIR = $(shell pwd) default: build -all: build test +all: test test: build cargo test @@ -14,9 +14,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-cross-contract-b-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/custom_types/Makefile b/custom_types/Makefile index 74dace04..4715cfba 100644 --- a/custom_types/Makefile +++ b/custom_types/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-custom-types-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/deployer/deployer/Makefile b/deployer/deployer/Makefile index 1fa9aa36..b501b4a9 100644 --- a/deployer/deployer/Makefile +++ b/deployer/deployer/Makefile @@ -2,7 +2,7 @@ CUR_DIR = $(shell pwd) default: build -all: build test +all: test test: build cargo test @@ -15,9 +15,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-deployer-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/errors/Makefile b/errors/Makefile index d1967109..7740f719 100644 --- a/errors/Makefile +++ b/errors/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-errors-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/events/Makefile b/events/Makefile index bbcaf6ae..7215de38 100644 --- a/events/Makefile +++ b/events/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-events-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/hello_world/Makefile b/hello_world/Makefile index 36f1df48..3d8f25e4 100644 --- a/hello_world/Makefile +++ b/hello_world/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-hello-world-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/increment/Makefile b/increment/Makefile index 29ff93e5..7cbd5858 100644 --- a/increment/Makefile +++ b/increment/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-increment-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/liquidity_pool/Makefile b/liquidity_pool/Makefile index 447671a6..4f1a093c 100644 --- a/liquidity_pool/Makefile +++ b/liquidity_pool/Makefile @@ -1,7 +1,7 @@ CUR_DIR = $(shell pwd) default: build -all: build test +all: test test: build cargo test @@ -14,9 +14,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-liquidity-pool-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/logging/Makefile b/logging/Makefile index 9d8278d1..1ba56e6f 100644 --- a/logging/Makefile +++ b/logging/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-logging-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/simple_account/Makefile b/simple_account/Makefile index 315ed611..db84c9d3 100644 --- a/simple_account/Makefile +++ b/simple_account/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-simple-account-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/single_offer/Makefile b/single_offer/Makefile index 382a8d7b..baf4367e 100644 --- a/single_offer/Makefile +++ b/single_offer/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-single-offer-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/timelock/Makefile b/timelock/Makefile index 94e6e989..2ff22f72 100644 --- a/timelock/Makefile +++ b/timelock/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-timelock-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check diff --git a/token/Makefile b/token/Makefile index 3934fb36..51734a90 100644 --- a/token/Makefile +++ b/token/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test @@ -10,9 +10,6 @@ build: cargo build --target wasm32-unknown-unknown --release -p soroban-token-contract @ls -l target/wasm32-unknown-unknown/release/*.wasm -watch: - cargo watch --clear --watch-when-idle --shell '$(MAKE)' - fmt: cargo fmt --all --check From 7545693d814fb4f5a5a0b1a03cbddac0230e0209 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Thu, 20 Apr 2023 18:25:11 -0700 Subject: [PATCH 14/23] Removed redundant -p package name from cargo build --- account/Makefile | 2 +- alloc/Makefile | 2 +- atomic_multiswap/Makefile | 2 +- atomic_swap/Makefile | 2 +- auth/Makefile | 2 +- cross_contract/contract_a/Makefile | 2 +- cross_contract/contract_b/Makefile | 2 +- custom_types/Makefile | 2 +- deployer/contract/Makefile | 2 +- deployer/deployer/Makefile | 2 +- errors/Makefile | 2 +- events/Makefile | 2 +- hello_world/Makefile | 2 +- increment/Makefile | 2 +- liquidity_pool/Makefile | 2 +- logging/Makefile | 2 +- simple_account/Makefile | 2 +- single_offer/Makefile | 2 +- timelock/Makefile | 2 +- token/Makefile | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/account/Makefile b/account/Makefile index 2f480862..045382be 100644 --- a/account/Makefile +++ b/account/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-account-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: diff --git a/alloc/Makefile b/alloc/Makefile index 3ff8d76f..bb3e453c 100644 --- a/alloc/Makefile +++ b/alloc/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-alloc-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/atomic_multiswap/Makefile b/atomic_multiswap/Makefile index c4141e29..2f79f531 100644 --- a/atomic_multiswap/Makefile +++ b/atomic_multiswap/Makefile @@ -11,7 +11,7 @@ build: @cd ../atomic_swap && make build || break; @cd $(CUR_DIR); - cargo build --target wasm32-unknown-unknown --release -p soroban-atomic-multiswap-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/atomic_swap/Makefile b/atomic_swap/Makefile index 2bf15fd6..bb3e453c 100644 --- a/atomic_swap/Makefile +++ b/atomic_swap/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-atomic-swap-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/auth/Makefile b/auth/Makefile index 15c18968..bb3e453c 100644 --- a/auth/Makefile +++ b/auth/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-auth-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/cross_contract/contract_a/Makefile b/cross_contract/contract_a/Makefile index 3970d714..bb3e453c 100644 --- a/cross_contract/contract_a/Makefile +++ b/cross_contract/contract_a/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-cross-contract-a-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/cross_contract/contract_b/Makefile b/cross_contract/contract_b/Makefile index 3c26acc6..d89395aa 100644 --- a/cross_contract/contract_b/Makefile +++ b/cross_contract/contract_b/Makefile @@ -11,7 +11,7 @@ build: @cd ../contract_a && make build || break; @cd $(CUR_DIR); - cargo build --target wasm32-unknown-unknown --release -p soroban-cross-contract-b-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/custom_types/Makefile b/custom_types/Makefile index 4715cfba..bb3e453c 100644 --- a/custom_types/Makefile +++ b/custom_types/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-custom-types-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/deployer/contract/Makefile b/deployer/contract/Makefile index e7a83ffe..80d4b1d3 100644 --- a/deployer/contract/Makefile +++ b/deployer/contract/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-deployer-test-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm watch: diff --git a/deployer/deployer/Makefile b/deployer/deployer/Makefile index b501b4a9..da3427d1 100644 --- a/deployer/deployer/Makefile +++ b/deployer/deployer/Makefile @@ -12,7 +12,7 @@ build: @cd ../contract && make build || break; @cd $(CUR_DIR); - cargo build --target wasm32-unknown-unknown --release -p soroban-deployer-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/errors/Makefile b/errors/Makefile index 7740f719..bb3e453c 100644 --- a/errors/Makefile +++ b/errors/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-errors-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/events/Makefile b/events/Makefile index 7215de38..bb3e453c 100644 --- a/events/Makefile +++ b/events/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-events-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/hello_world/Makefile b/hello_world/Makefile index 3d8f25e4..bb3e453c 100644 --- a/hello_world/Makefile +++ b/hello_world/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-hello-world-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/increment/Makefile b/increment/Makefile index 7cbd5858..bb3e453c 100644 --- a/increment/Makefile +++ b/increment/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-increment-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/liquidity_pool/Makefile b/liquidity_pool/Makefile index 4f1a093c..69acfbfe 100644 --- a/liquidity_pool/Makefile +++ b/liquidity_pool/Makefile @@ -11,7 +11,7 @@ build: @cd ../token && make build || break; @cd $(CUR_DIR); - cargo build --target wasm32-unknown-unknown --release -p soroban-liquidity-pool-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/logging/Makefile b/logging/Makefile index 1ba56e6f..bb3e453c 100644 --- a/logging/Makefile +++ b/logging/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-logging-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/simple_account/Makefile b/simple_account/Makefile index db84c9d3..bb3e453c 100644 --- a/simple_account/Makefile +++ b/simple_account/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-simple-account-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/single_offer/Makefile b/single_offer/Makefile index baf4367e..bb3e453c 100644 --- a/single_offer/Makefile +++ b/single_offer/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-single-offer-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/timelock/Makefile b/timelock/Makefile index 2ff22f72..bb3e453c 100644 --- a/timelock/Makefile +++ b/timelock/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-timelock-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: diff --git a/token/Makefile b/token/Makefile index 51734a90..bb3e453c 100644 --- a/token/Makefile +++ b/token/Makefile @@ -7,7 +7,7 @@ test: build cargo test --features testutils build: - cargo build --target wasm32-unknown-unknown --release -p soroban-token-contract + cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm fmt: From cacd931ecfceb631dc55c2b4677328cf2da98ae2 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Thu, 20 Apr 2023 18:34:34 -0700 Subject: [PATCH 15/23] Makefile fixes --- atomic_multiswap/Makefile | 5 +---- cross_contract/contract_b/Makefile | 5 +---- deployer/deployer/Makefile | 6 +----- liquidity_pool/Makefile | 6 +----- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/atomic_multiswap/Makefile b/atomic_multiswap/Makefile index 2f79f531..28d23c7a 100644 --- a/atomic_multiswap/Makefile +++ b/atomic_multiswap/Makefile @@ -1,4 +1,3 @@ -CUR_DIR = $(shell pwd) default: build all: test @@ -8,9 +7,7 @@ test: build cargo test --features testutils build: - @cd ../atomic_swap && make build || break; - - @cd $(CUR_DIR); + $(MAKE) -C ../atomic_swap || break; cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm diff --git a/cross_contract/contract_b/Makefile b/cross_contract/contract_b/Makefile index d89395aa..fce4b0b1 100644 --- a/cross_contract/contract_b/Makefile +++ b/cross_contract/contract_b/Makefile @@ -1,4 +1,3 @@ -CUR_DIR = $(shell pwd) default: build all: test @@ -8,9 +7,7 @@ test: build cargo test --features testutils build: - @cd ../contract_a && make build || break; - - @cd $(CUR_DIR); + $(MAKE) -C ../contract_a || break; cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm diff --git a/deployer/deployer/Makefile b/deployer/deployer/Makefile index da3427d1..bed6acee 100644 --- a/deployer/deployer/Makefile +++ b/deployer/deployer/Makefile @@ -1,5 +1,3 @@ -CUR_DIR = $(shell pwd) - default: build all: test @@ -9,9 +7,7 @@ test: build cargo test --features testutils build: - @cd ../contract && make build || break; - - @cd $(CUR_DIR); + $(MAKE) -C ../contract || break; cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm diff --git a/liquidity_pool/Makefile b/liquidity_pool/Makefile index 69acfbfe..e85b8d05 100644 --- a/liquidity_pool/Makefile +++ b/liquidity_pool/Makefile @@ -1,4 +1,3 @@ -CUR_DIR = $(shell pwd) default: build all: test @@ -8,12 +7,9 @@ test: build cargo test --features testutils build: - @cd ../token && make build || break; - - @cd $(CUR_DIR); + $(MAKE) -C ../token || break; cargo build --target wasm32-unknown-unknown --release @ls -l target/wasm32-unknown-unknown/release/*.wasm - fmt: cargo fmt --all --check From cc17fea97cad3171140afc98c01c2cf6cddc61da Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Thu, 20 Apr 2023 19:01:12 -0700 Subject: [PATCH 16/23] rust.yml fix to make the step name and the following run step a single unit --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 326daf38..9bca9329 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -32,7 +32,7 @@ jobs: - run: rustup update - run: rustup +nightly component add rust-analyzer - name: Check if rust-analyzer encounters any errors parsing project - - run: rustup run nightly rust-analyzer analysis-stats token/ 2>&1 | (! grep ERROR) + run: rustup run nightly rust-analyzer analysis-stats token/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats deployer/deployer/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats deployer/contract/ 2>&1 | (! grep ERROR) - run: rustup run nightly rust-analyzer analysis-stats simple_account/ 2>&1 | (! grep ERROR) From 5a1401ad1199fc6d5739bf7afcbe0267e0e97686 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Thu, 20 Apr 2023 19:12:16 -0700 Subject: [PATCH 17/23] using xargs to run rustfmt on a list of rust files --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9bca9329..f4cc30ad 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: rustup update - - run: rustfmt **/*.rs + - run: ls **/*.rs | xargs rustfmt rust-analyzer-compat: runs-on: ubuntu-latest From 0233cd5e22fd54ef3ca971912f4716f604afe0ba Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Thu, 20 Apr 2023 19:15:55 -0700 Subject: [PATCH 18/23] fixing Makefile for all target to only have test --- account/Makefile | 2 +- deployer/contract/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/account/Makefile b/account/Makefile index 045382be..a256f29c 100644 --- a/account/Makefile +++ b/account/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test diff --git a/deployer/contract/Makefile b/deployer/contract/Makefile index 80d4b1d3..f6901a46 100644 --- a/deployer/contract/Makefile +++ b/deployer/contract/Makefile @@ -1,6 +1,6 @@ default: build -all: build test +all: test test: build cargo test From 1d4a5bd966db21a6e9c5eb1e16364768931a0434 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Fri, 21 Apr 2023 14:32:32 -0700 Subject: [PATCH 19/23] Improvement --- Makefile | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index ffb70054..29080e74 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ $(MAKE)FILES = $(shell find . -maxdepth 3 -type f -name Makefile) SUBDIRS = $(filter-out ./,$(dir $($(MAKE)FILES))) -ROOT_DIR = $(shell pwd) default: build @@ -8,28 +7,20 @@ all: test build: @for dir in $(SUBDIRS) ; do \ - cd $$dir; \ - $(MAKE) build || break; \ - cd $(ROOT_DIR); \ + $(MAKE) -C $$dir build || break; \ done test: build @for dir in $(SUBDIRS) ; do \ - cd $$dir; \ - $(MAKE) test || break; \ - cd $(ROOT_DIR); \ + $(MAKE) -C $$dir test || break; \ done fmt: @for dir in $(SUBDIRS) ; do \ - cd $$dir; \ - $(MAKE) fmt || break; \ - cd $(ROOT_DIR); \ + $(MAKE) -C $$dir fmt || break; \ done clean: @for dir in $(SUBDIRS) ; do \ - cd $$dir; \ - $(MAKE) clean || break; \ - cd $(ROOT_DIR); \ + $(MAKE) -C $$dir clean || break; \ done \ No newline at end of file From 2bbca281df05a26e005d0a9593d5174a255854a5 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Fri, 21 Apr 2023 14:39:01 -0700 Subject: [PATCH 20/23] fixes --- Makefile | 4 ++-- deployer/contract/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 29080e74..c6dd47ea 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -$(MAKE)FILES = $(shell find . -maxdepth 3 -type f -name Makefile) -SUBDIRS = $(filter-out ./,$(dir $($(MAKE)FILES))) +$MAKEFILES = $(shell find . -maxdepth 3 -type f -name Makefile) +SUBDIRS = $(filter-out ./,$(dir $($MAKEFILES))) default: build diff --git a/deployer/contract/Makefile b/deployer/contract/Makefile index f6901a46..e121938c 100644 --- a/deployer/contract/Makefile +++ b/deployer/contract/Makefile @@ -14,7 +14,7 @@ watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' fmt: - cargo fmt --all + cargo fmt --all --check clean: cargo clean From 0ab7f3391e66d8613c24ca727df6d92572cdb5d5 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Fri, 21 Apr 2023 15:10:48 -0700 Subject: [PATCH 21/23] Fixing the path to soroban_token_contract.wasm in liquiditypool example --- liquidity_pool/src/test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liquidity_pool/src/test.rs b/liquidity_pool/src/test.rs index e2a2946a..4814a48b 100644 --- a/liquidity_pool/src/test.rs +++ b/liquidity_pool/src/test.rs @@ -22,7 +22,7 @@ fn create_liqpool_contract( fn install_token_wasm(e: &Env) -> BytesN<32> { soroban_sdk::contractimport!( - file = "../target/wasm32-unknown-unknown/release/soroban_token_contract.wasm" + file = "../token/target/wasm32-unknown-unknown/release/soroban_token_contract.wasm" ); e.install_contract_wasm(WASM) } From 0f17c53250c14e6838d70e6cb44600e542c93418 Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Fri, 21 Apr 2023 16:07:31 -0700 Subject: [PATCH 22/23] Trying parenthesis in rust.yml to run shell script with special character --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f4cc30ad..7d2b8227 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: rustup update - - run: ls **/*.rs | xargs rustfmt + - run: (ls **/*.rs | xargs rustfmt) rust-analyzer-compat: runs-on: ubuntu-latest From f6b35a4ffa5395d46fe5be390565e7b12923a3cb Mon Sep 17 00:00:00 2001 From: Anup Pani Date: Fri, 21 Apr 2023 16:35:17 -0700 Subject: [PATCH 23/23] Switching to make fmt in rust.yml instead so top level Makefile recursively calls each subdirectory. --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7d2b8227..06cf725d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: rustup update - - run: (ls **/*.rs | xargs rustfmt) + - run: make fmt rust-analyzer-compat: runs-on: ubuntu-latest