From f541956e1acccf587435adaf8b24af02411cc5f9 Mon Sep 17 00:00:00 2001 From: Assaf Morami Date: Wed, 13 Jul 2022 16:46:56 +0300 Subject: [PATCH] Fix all contracts under cosmwasm/v010-contracts --- cosmwasm/Cargo.lock | 137 ++++++++++-------- cosmwasm/Cargo.toml | 2 +- .../shared/cosmwasm-v010-types/src/types.rs | 1 + cosmwasm/v010-contracts/burner/Cargo.lock | 87 ++++++++++- cosmwasm/v010-contracts/burner/Cargo.toml | 7 +- cosmwasm/v010-contracts/dist/Cargo.toml | 3 + cosmwasm/v010-contracts/erc20/Cargo.lock | 87 ++++++++++- cosmwasm/v010-contracts/erc20/Cargo.toml | 3 + cosmwasm/v010-contracts/escrow/Cargo.lock | 87 ++++++++++- cosmwasm/v010-contracts/escrow/Cargo.toml | 3 + .../v010-contracts/escrow/src/contract.rs | 69 +++------ cosmwasm/v010-contracts/escrow/src/state.rs | 8 +- cosmwasm/v010-contracts/gov/Cargo.toml | 3 + cosmwasm/v010-contracts/hackatom/Cargo.lock | 87 ++++++++++- cosmwasm/v010-contracts/hackatom/Cargo.toml | 3 + cosmwasm/v010-contracts/mint/Cargo.toml | 3 + .../v010-contracts/plaintext-logs/Cargo.toml | 3 + cosmwasm/v010-contracts/queue/Cargo.lock | 87 ++++++++++- cosmwasm/v010-contracts/queue/Cargo.toml | 7 +- cosmwasm/v010-contracts/reflect/Cargo.lock | 87 ++++++++++- cosmwasm/v010-contracts/reflect/Cargo.toml | 7 +- cosmwasm/v010-contracts/staking/Cargo.toml | 7 +- 22 files changed, 652 insertions(+), 136 deletions(-) diff --git a/cosmwasm/Cargo.lock b/cosmwasm/Cargo.lock index 0b26f9e58..1072bc936 100644 --- a/cosmwasm/Cargo.lock +++ b/cosmwasm/Cargo.lock @@ -45,9 +45,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" +checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" dependencies = [ "addr2line", "cc", @@ -148,7 +148,7 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" name = "cosmwasm-schema" version = "0.16.0" dependencies = [ - "schemars 0.8.8", + "schemars 0.8.10", "serde_json", ] @@ -179,9 +179,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" dependencies = [ "libc", ] @@ -216,9 +216,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "dyn-clone" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" +checksum = "140206b78fb2bc3edbcfc9b5ccbd0b30699cfe8d348b8b31b330e47df5291a5a" [[package]] name = "enclave-ffi-types" @@ -286,9 +286,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "lazy_static" @@ -298,33 +298,34 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.119" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "lock_api" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" dependencies = [ + "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.14" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ] [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap" @@ -338,12 +339,11 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" dependencies = [ "adler", - "autocfg", ] [[package]] @@ -358,9 +358,9 @@ dependencies = [ [[package]] name = "object" -version = "0.27.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ "memchr", ] @@ -404,27 +404,27 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.36" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" +checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "quote" -version = "1.0.15" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" +checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" dependencies = [ "proc-macro2", ] [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ "bitflags", ] @@ -455,9 +455,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] name = "schemars" @@ -472,12 +472,12 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6b5a3c80cea1ab61f4260238409510e814e38b4b563c06044edf91e7dc070e3" +checksum = "1847b767a3d62d95cbf3d8a9f0e421cf57a0d8aa4f411d4b16525afb0284d4ed" dependencies = [ "dyn-clone", - "schemars_derive 0.8.8", + "schemars_derive 0.8.10", "serde", "serde_json", ] @@ -490,19 +490,19 @@ checksum = "11af7a475c9ee266cfaa9e303a47c830ebe072bf3101ab907a7b7b9d816fa01d" dependencies = [ "proc-macro2", "quote", - "serde_derive_internals", + "serde_derive_internals 0.25.0", "syn", ] [[package]] name = "schemars_derive" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ae4dce13e8614c46ac3c38ef1c0d668b101df6ac39817aebdaa26642ddae9b" +checksum = "af4d7e1b012cb3d9129567661a63755ea4b8a7386d339dc945ae187e403c6743" dependencies = [ "proc-macro2", "quote", - "serde_derive_internals", + "serde_derive_internals 0.26.0", "syn", ] @@ -527,15 +527,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.6" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d" +checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1" [[package]] name = "serde" -version = "1.0.136" +version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "0171ebb889e45aa68b44aee0859b3eede84c6f5f5c228e6f140c0b2a0a46cad6" dependencies = [ "serde_derive", ] @@ -551,9 +551,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "dc1d3230c1de7932af58ad8ffbe1d784bd55efd5a9d84ac24f69c72d83543dfb" dependencies = [ "proc-macro2", "quote", @@ -571,11 +571,22 @@ dependencies = [ "syn", ] +[[package]] +name = "serde_derive_internals" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "serde_json" -version = "1.0.79" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" +checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" dependencies = [ "itoa", "ryu", @@ -611,9 +622,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" [[package]] name = "snafu" @@ -645,13 +656,13 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "syn" -version = "1.0.86" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" +checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -679,18 +690,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ "proc-macro2", "quote", @@ -699,9 +710,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ "serde", ] @@ -713,16 +724,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] -name = "unicode-width" -version = "0.1.9" +name = "unicode-ident" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "unicode-width" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "vec_map" diff --git a/cosmwasm/Cargo.toml b/cosmwasm/Cargo.toml index 3b88cbbb3..53324cc3f 100644 --- a/cosmwasm/Cargo.toml +++ b/cosmwasm/Cargo.toml @@ -1,3 +1,3 @@ [workspace] members = ["packages/*"] -exclude = ["packages/enclave-test", "enclaves"] +exclude = ["packages/enclave-test", "enclaves", "v010-contracts/*"] diff --git a/cosmwasm/enclaves/shared/cosmwasm-v010-types/src/types.rs b/cosmwasm/enclaves/shared/cosmwasm-v010-types/src/types.rs index 45de65343..5fe472d8c 100644 --- a/cosmwasm/enclaves/shared/cosmwasm-v010-types/src/types.rs +++ b/cosmwasm/enclaves/shared/cosmwasm-v010-types/src/types.rs @@ -161,6 +161,7 @@ where pub enum CustomMsg { Debug(String), Raw(Binary), + Empty {}, } impl Into> for CustomMsg { diff --git a/cosmwasm/v010-contracts/burner/Cargo.lock b/cosmwasm/v010-contracts/burner/Cargo.lock index 941fabe36..e931f328c 100644 --- a/cosmwasm/v010-contracts/burner/Cargo.lock +++ b/cosmwasm/v010-contracts/burner/Cargo.lock @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -160,14 +160,16 @@ name = "cosmwasm-sgx-vm" version = "0.10.0" dependencies = [ "base64 0.12.3", - "cosmwasm-std", "enclave-ffi-types", "hex", "lazy_static", "log", "memmap", + "num_cpus", "parity-wasm", + "parking_lot", "schemars 0.7.6", + "secret-cosmwasm-std", "serde", "serde_json", "sgx_types", @@ -282,6 +284,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" version = "0.4.8" @@ -300,6 +311,16 @@ version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" +[[package]] +name = "lock_api" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" version = "0.4.14" @@ -335,6 +356,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "object" version = "0.26.2" @@ -356,6 +387,31 @@ version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi", +] + [[package]] name = "pest" version = "2.1.3" @@ -515,6 +571,25 @@ dependencies = [ "syn", ] +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "secret-cosmwasm-std" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5d4b8fed972d924458d9c3c0e6c9fbf6c4c5e30655571e3d2b78be056d316e9" +dependencies = [ + "base64 0.11.0", + "schemars 0.7.6", + "serde", + "serde-json-wasm", + "snafu", +] + [[package]] name = "semver" version = "0.11.0" @@ -611,6 +686,12 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "smallvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" + [[package]] name = "snafu" version = "0.6.10" diff --git a/cosmwasm/v010-contracts/burner/Cargo.toml b/cosmwasm/v010-contracts/burner/Cargo.toml index dc0fb3cad..6cfe2cadd 100644 --- a/cosmwasm/v010-contracts/burner/Cargo.toml +++ b/cosmwasm/v010-contracts/burner/Cargo.toml @@ -33,7 +33,9 @@ cranelift = ["cosmwasm-vm/default-cranelift"] singlepass = ["cosmwasm-vm/default-singlepass"] [dependencies] -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print", features = ["iterator"] } +cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print", features = [ + "iterator" +] } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } snafu = { version = "0.6.3" } @@ -43,3 +45,6 @@ cosmwasm-vm = { path = "../../packages/sgx-vm", package = "cosmwasm-sgx-vm", def "iterator" ] } cosmwasm-schema = { path = "../../packages/schema" } + +[workspace] +members = [] diff --git a/cosmwasm/v010-contracts/dist/Cargo.toml b/cosmwasm/v010-contracts/dist/Cargo.toml index 302676f26..cdcc82255 100644 --- a/cosmwasm/v010-contracts/dist/Cargo.toml +++ b/cosmwasm/v010-contracts/dist/Cargo.toml @@ -35,3 +35,6 @@ cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0 cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } + +[workspace] +members = [] diff --git a/cosmwasm/v010-contracts/erc20/Cargo.lock b/cosmwasm/v010-contracts/erc20/Cargo.lock index d60e23947..4ae0d0cdf 100644 --- a/cosmwasm/v010-contracts/erc20/Cargo.lock +++ b/cosmwasm/v010-contracts/erc20/Cargo.lock @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -148,14 +148,16 @@ name = "cosmwasm-sgx-vm" version = "0.10.0" dependencies = [ "base64 0.12.3", - "cosmwasm-std", "enclave-ffi-types", "hex", "lazy_static", "log", "memmap", + "num_cpus", "parity-wasm", + "parking_lot", "schemars 0.7.6", + "secret-cosmwasm-std", "serde", "serde_json", "sgx_types", @@ -292,6 +294,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" version = "0.4.8" @@ -310,6 +321,16 @@ version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" +[[package]] +name = "lock_api" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" version = "0.4.14" @@ -345,6 +366,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "object" version = "0.26.2" @@ -366,6 +397,31 @@ version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi", +] + [[package]] name = "pest" version = "2.1.3" @@ -525,6 +581,25 @@ dependencies = [ "syn", ] +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "secret-cosmwasm-std" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5d4b8fed972d924458d9c3c0e6c9fbf6c4c5e30655571e3d2b78be056d316e9" +dependencies = [ + "base64 0.11.0", + "schemars 0.7.6", + "serde", + "serde-json-wasm", + "snafu", +] + [[package]] name = "semver" version = "0.11.0" @@ -621,6 +696,12 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "smallvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" + [[package]] name = "snafu" version = "0.6.10" diff --git a/cosmwasm/v010-contracts/erc20/Cargo.toml b/cosmwasm/v010-contracts/erc20/Cargo.toml index e403f08dd..1be278387 100644 --- a/cosmwasm/v010-contracts/erc20/Cargo.toml +++ b/cosmwasm/v010-contracts/erc20/Cargo.toml @@ -45,3 +45,6 @@ hex = "0.4" [dev-dependencies] cosmwasm-vm = { path = "../../packages/sgx-vm", package = "cosmwasm-sgx-vm", default-features = false } cosmwasm-schema = { path = "../../packages/schema" } + +[workspace] +members = [] diff --git a/cosmwasm/v010-contracts/escrow/Cargo.lock b/cosmwasm/v010-contracts/escrow/Cargo.lock index 30922b8e4..5a2e750af 100644 --- a/cosmwasm/v010-contracts/escrow/Cargo.lock +++ b/cosmwasm/v010-contracts/escrow/Cargo.lock @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -148,14 +148,16 @@ name = "cosmwasm-sgx-vm" version = "0.10.0" dependencies = [ "base64 0.12.3", - "cosmwasm-std", "enclave-ffi-types", "hex", "lazy_static", "log", "memmap", + "num_cpus", "parity-wasm", + "parking_lot", "schemars 0.7.6", + "secret-cosmwasm-std", "serde", "serde_json", "sgx_types", @@ -291,6 +293,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" version = "0.4.8" @@ -309,6 +320,16 @@ version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" +[[package]] +name = "lock_api" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" version = "0.4.14" @@ -344,6 +365,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "object" version = "0.26.2" @@ -365,6 +396,31 @@ version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi", +] + [[package]] name = "pest" version = "2.1.3" @@ -524,6 +580,25 @@ dependencies = [ "syn", ] +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "secret-cosmwasm-std" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5d4b8fed972d924458d9c3c0e6c9fbf6c4c5e30655571e3d2b78be056d316e9" +dependencies = [ + "base64 0.11.0", + "schemars 0.7.6", + "serde", + "serde-json-wasm", + "snafu", +] + [[package]] name = "semver" version = "0.11.0" @@ -620,6 +695,12 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "smallvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" + [[package]] name = "snafu" version = "0.6.10" diff --git a/cosmwasm/v010-contracts/escrow/Cargo.toml b/cosmwasm/v010-contracts/escrow/Cargo.toml index a54bc6406..a09b5c68d 100644 --- a/cosmwasm/v010-contracts/escrow/Cargo.toml +++ b/cosmwasm/v010-contracts/escrow/Cargo.toml @@ -44,3 +44,6 @@ serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] cosmwasm-vm = { path = "../../packages/sgx-vm", package = "cosmwasm-sgx-vm", default-features = false } cosmwasm-schema = { path = "../../packages/schema" } + +[workspace] +members = [] diff --git a/cosmwasm/v010-contracts/escrow/src/contract.rs b/cosmwasm/v010-contracts/escrow/src/contract.rs index 0ed8d37b6..f636923ff 100644 --- a/cosmwasm/v010-contracts/escrow/src/contract.rs +++ b/cosmwasm/v010-contracts/escrow/src/contract.rs @@ -1,7 +1,6 @@ use cosmwasm_std::{ - generic_err, log, unauthorized, Api, BankMsg, Binary, CanonicalAddr, Coin, CosmosMsg, Env, - Extern, HandleResponse, HandleResult, InitResponse, InitResult, MigrateResponse, Querier, - StdResult, Storage, + log, Api, BankMsg, Binary, Coin, CosmosMsg, Env, Extern, HandleResponse, HandleResult, + HumanAddr, InitResponse, InitResult, MigrateResponse, Querier, StdError, StdResult, Storage, }; use crate::msg::{HandleMsg, InitMsg, MigrateMsg, QueryMsg}; @@ -13,14 +12,14 @@ pub fn init( msg: InitMsg, ) -> InitResult { let state = State { - arbiter: deps.api.canonical_address(&msg.arbiter)?, - recipient: deps.api.canonical_address(&msg.recipient)?, + arbiter: msg.arbiter.clone(), + recipient: msg.recipient.clone(), source: env.message.sender.clone(), end_height: msg.end_height, end_time: msg.end_time, }; if state.is_expired(&env) { - Err(generic_err("creating expired escrow")) + Err(StdError::generic_err("creating expired escrow")) } else { config(&mut deps.storage).save(&state)?; Ok(InitResponse::default()) @@ -46,28 +45,22 @@ fn try_approve( quantity: Option>, ) -> HandleResult { if env.message.sender != state.arbiter { - Err(unauthorized()) + Err(StdError::unauthorized()) } else if state.is_expired(&env) { - Err(generic_err("escrow expired")) + Err(StdError::generic_err("escrow expired")) } else { let amount = if let Some(quantity) = quantity { quantity } else { // release everything - let contract_address_human = deps.api.human_address(&env.contract.address)?; + let contract_address_human = env.contract.address.clone(); // Querier guarantees to returns up-to-date data, including funds sent in this handle message // https://github.com/CosmWasm/wasmd/blob/master/x/wasm/internal/keeper/keeper.go#L185-L192 deps.querier.query_all_balances(contract_address_human)? }; - send_tokens( - &deps.api, - &env.contract.address, - &state.recipient, - amount, - "approve", - ) + send_tokens(&env.contract.address, &state.recipient, amount, "approve") } } @@ -78,32 +71,25 @@ fn try_refund( ) -> HandleResult { // anyone can try to refund, as long as the contract is expired if !state.is_expired(&env) { - Err(generic_err("escrow not yet expired")) + Err(StdError::generic_err("escrow not yet expired")) } else { - let contract_address_human = deps.api.human_address(&env.contract.address)?; + let contract_address_human = env.contract.address.clone(); // Querier guarantees to returns up-to-date data, including funds sent in this handle message // https://github.com/CosmWasm/wasmd/blob/master/x/wasm/internal/keeper/keeper.go#L185-L192 let balance = deps.querier.query_all_balances(contract_address_human)?; - send_tokens( - &deps.api, - &env.contract.address, - &state.source, - balance, - "refund", - ) + send_tokens(&env.contract.address, &state.source, balance, "refund") } } // this is a helper to move the tokens, so the business logic is easy to read -fn send_tokens( - api: &A, - from_address: &CanonicalAddr, - to_address: &CanonicalAddr, +fn send_tokens( + from_address: &HumanAddr, + to_address: &HumanAddr, amount: Vec, action: &str, ) -> HandleResult { - let from_human = api.human_address(from_address)?; - let to_human = api.human_address(to_address)?; + let from_human = from_address.clone(); + let to_human = to_address.clone(); let log = vec![log("action", action), log("to", to_human.as_str())]; let r = HandleResponse { @@ -148,7 +134,7 @@ mod tests { height: u64, time: u64, ) -> Env { - let mut env = mock_env(api, signer, sent); + let mut env = mock_env(signer, sent); env.block.height = height; env.block.time = time; env @@ -168,18 +154,9 @@ mod tests { assert_eq!( state, State { - arbiter: deps - .api - .canonical_address(&HumanAddr::from("verifies")) - .unwrap(), - recipient: deps - .api - .canonical_address(&HumanAddr::from("benefits")) - .unwrap(), - source: deps - .api - .canonical_address(&HumanAddr::from("creator")) - .unwrap(), + arbiter: HumanAddr::from("verifies"), + recipient: HumanAddr::from("benefits"), + source: HumanAddr::from("creator"), end_height: Some(1000), end_time: None, } @@ -206,7 +183,7 @@ mod tests { // initialize the store let init_amount = coins(1000, "earth"); let init_env = mock_env_height(&deps.api, "creator", &init_amount, 876, 0); - let contract_addr = deps.api.human_address(&init_env.contract.address).unwrap(); + let contract_addr = init_env.contract.address.clone(); let msg = init_msg_expire_by_height(1000); let init_res = init(&mut deps, init_env, msg).unwrap(); assert_eq!(0, init_res.messages.len()); @@ -270,7 +247,7 @@ mod tests { // initialize the store let init_amount = coins(1000, "earth"); let init_env = mock_env_height(&deps.api, "creator", &init_amount, 876, 0); - let contract_addr = deps.api.human_address(&init_env.contract.address).unwrap(); + let contract_addr = init_env.contract.address.clone(); let msg = init_msg_expire_by_height(1000); let init_res = init(&mut deps, init_env, msg).unwrap(); assert_eq!(0, init_res.messages.len()); diff --git a/cosmwasm/v010-contracts/escrow/src/state.rs b/cosmwasm/v010-contracts/escrow/src/state.rs index 2f0298be8..5441210b8 100644 --- a/cosmwasm/v010-contracts/escrow/src/state.rs +++ b/cosmwasm/v010-contracts/escrow/src/state.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{CanonicalAddr, Env, Storage}; +use cosmwasm_std::{Env, HumanAddr, Storage}; use cosmwasm_storage::{singleton, singleton_read, ReadonlySingleton, Singleton}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -7,9 +7,9 @@ static CONFIG_KEY: &[u8] = b"config"; #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] pub struct State { - pub arbiter: CanonicalAddr, - pub recipient: CanonicalAddr, - pub source: CanonicalAddr, + pub arbiter: HumanAddr, + pub recipient: HumanAddr, + pub source: HumanAddr, pub end_height: Option, pub end_time: Option, } diff --git a/cosmwasm/v010-contracts/gov/Cargo.toml b/cosmwasm/v010-contracts/gov/Cargo.toml index 3b1b83ee7..bf1e26db3 100644 --- a/cosmwasm/v010-contracts/gov/Cargo.toml +++ b/cosmwasm/v010-contracts/gov/Cargo.toml @@ -35,3 +35,6 @@ cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0 cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } schemars = "0.7" serde = { version = "1", default-features = false, features = ["derive"] } + +[workspace] +members = [] diff --git a/cosmwasm/v010-contracts/hackatom/Cargo.lock b/cosmwasm/v010-contracts/hackatom/Cargo.lock index 621677a53..54eb99b46 100644 --- a/cosmwasm/v010-contracts/hackatom/Cargo.lock +++ b/cosmwasm/v010-contracts/hackatom/Cargo.lock @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -148,14 +148,16 @@ name = "cosmwasm-sgx-vm" version = "0.10.0" dependencies = [ "base64 0.12.3", - "cosmwasm-std", "enclave-ffi-types", "hex", "lazy_static", "log", "memmap", + "num_cpus", "parity-wasm", + "parking_lot", "schemars 0.7.6", + "secret-cosmwasm-std", "serde", "serde_json", "sgx_types", @@ -292,6 +294,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" version = "0.4.8" @@ -310,6 +321,16 @@ version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" +[[package]] +name = "lock_api" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" version = "0.4.14" @@ -345,6 +366,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "object" version = "0.26.2" @@ -366,6 +397,31 @@ version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi", +] + [[package]] name = "pest" version = "2.1.3" @@ -525,6 +581,25 @@ dependencies = [ "syn", ] +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "secret-cosmwasm-std" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5d4b8fed972d924458d9c3c0e6c9fbf6c4c5e30655571e3d2b78be056d316e9" +dependencies = [ + "base64 0.11.0", + "schemars 0.7.6", + "serde", + "serde-json-wasm", + "snafu", +] + [[package]] name = "semver" version = "0.11.0" @@ -621,6 +696,12 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "smallvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" + [[package]] name = "snafu" version = "0.6.10" diff --git a/cosmwasm/v010-contracts/hackatom/Cargo.toml b/cosmwasm/v010-contracts/hackatom/Cargo.toml index 10de2ed47..4f0ef68cd 100644 --- a/cosmwasm/v010-contracts/hackatom/Cargo.toml +++ b/cosmwasm/v010-contracts/hackatom/Cargo.toml @@ -37,3 +37,6 @@ sha2 = "0.9.1" cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } cosmwasm-vm = { path = "../../packages/sgx-vm", package = "cosmwasm-sgx-vm", default-features = false } + +[workspace] +members = [] diff --git a/cosmwasm/v010-contracts/mint/Cargo.toml b/cosmwasm/v010-contracts/mint/Cargo.toml index 8bf5844e9..9b43a5b40 100644 --- a/cosmwasm/v010-contracts/mint/Cargo.toml +++ b/cosmwasm/v010-contracts/mint/Cargo.toml @@ -35,3 +35,6 @@ cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0 cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } + +[workspace] +members = [] diff --git a/cosmwasm/v010-contracts/plaintext-logs/Cargo.toml b/cosmwasm/v010-contracts/plaintext-logs/Cargo.toml index 1c5854b45..bed846772 100644 --- a/cosmwasm/v010-contracts/plaintext-logs/Cargo.toml +++ b/cosmwasm/v010-contracts/plaintext-logs/Cargo.toml @@ -33,4 +33,7 @@ backtraces = ["cosmwasm-std/backtraces"] cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", rev = "cf28ea21" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } + #snafu = { version = "0.6.3" } +[workspace] +members = [] diff --git a/cosmwasm/v010-contracts/queue/Cargo.lock b/cosmwasm/v010-contracts/queue/Cargo.lock index 03d9f6d8d..958aa8ba5 100644 --- a/cosmwasm/v010-contracts/queue/Cargo.lock +++ b/cosmwasm/v010-contracts/queue/Cargo.lock @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -148,14 +148,16 @@ name = "cosmwasm-sgx-vm" version = "0.10.0" dependencies = [ "base64 0.12.3", - "cosmwasm-std", "enclave-ffi-types", "hex", "lazy_static", "log", "memmap", + "num_cpus", "parity-wasm", + "parking_lot", "schemars 0.7.6", + "secret-cosmwasm-std", "serde", "serde_json", "sgx_types", @@ -270,6 +272,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" version = "0.4.8" @@ -288,6 +299,16 @@ version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" +[[package]] +name = "lock_api" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" version = "0.4.14" @@ -323,6 +344,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "object" version = "0.26.2" @@ -344,6 +375,31 @@ version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi", +] + [[package]] name = "pest" version = "2.1.3" @@ -514,6 +570,25 @@ dependencies = [ "syn", ] +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "secret-cosmwasm-std" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5d4b8fed972d924458d9c3c0e6c9fbf6c4c5e30655571e3d2b78be056d316e9" +dependencies = [ + "base64 0.11.0", + "schemars 0.7.6", + "serde", + "serde-json-wasm", + "snafu", +] + [[package]] name = "semver" version = "0.11.0" @@ -610,6 +685,12 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "smallvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" + [[package]] name = "snafu" version = "0.6.10" diff --git a/cosmwasm/v010-contracts/queue/Cargo.toml b/cosmwasm/v010-contracts/queue/Cargo.toml index b3229b5d7..05e8d994d 100644 --- a/cosmwasm/v010-contracts/queue/Cargo.toml +++ b/cosmwasm/v010-contracts/queue/Cargo.toml @@ -28,7 +28,9 @@ cranelift = ["cosmwasm-vm/default-cranelift"] singlepass = ["cosmwasm-vm/default-singlepass"] [dependencies] -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print", features = ["iterator"] } +cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print", features = [ + "iterator" +] } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } @@ -37,3 +39,6 @@ cosmwasm-schema = { path = "../../packages/schema" } cosmwasm-vm = { path = "../../packages/sgx-vm", package = "cosmwasm-sgx-vm", default-features = false, features = [ "iterator" ] } + +[workspace] +members = [] diff --git a/cosmwasm/v010-contracts/reflect/Cargo.lock b/cosmwasm/v010-contracts/reflect/Cargo.lock index 16bb79d3f..0e1cd3dd0 100644 --- a/cosmwasm/v010-contracts/reflect/Cargo.lock +++ b/cosmwasm/v010-contracts/reflect/Cargo.lock @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -148,14 +148,16 @@ name = "cosmwasm-sgx-vm" version = "0.10.0" dependencies = [ "base64 0.12.3", - "cosmwasm-std", "enclave-ffi-types", "hex", "lazy_static", "log", "memmap", + "num_cpus", "parity-wasm", + "parking_lot", "schemars 0.7.6", + "secret-cosmwasm-std", "serde", "serde_json", "sgx_types", @@ -279,6 +281,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itoa" version = "0.4.8" @@ -297,6 +308,16 @@ version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" +[[package]] +name = "lock_api" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" version = "0.4.14" @@ -332,6 +353,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "object" version = "0.26.2" @@ -353,6 +384,31 @@ version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi", +] + [[package]] name = "pest" version = "2.1.3" @@ -524,6 +580,25 @@ dependencies = [ "syn", ] +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "secret-cosmwasm-std" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5d4b8fed972d924458d9c3c0e6c9fbf6c4c5e30655571e3d2b78be056d316e9" +dependencies = [ + "base64 0.11.0", + "schemars 0.7.6", + "serde", + "serde-json-wasm", + "snafu", +] + [[package]] name = "semver" version = "0.11.0" @@ -620,6 +695,12 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "smallvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" + [[package]] name = "snafu" version = "0.6.10" diff --git a/cosmwasm/v010-contracts/reflect/Cargo.toml b/cosmwasm/v010-contracts/reflect/Cargo.toml index ba0a1a9fb..49bd6b250 100644 --- a/cosmwasm/v010-contracts/reflect/Cargo.toml +++ b/cosmwasm/v010-contracts/reflect/Cargo.toml @@ -36,7 +36,9 @@ cranelift = ["cosmwasm-vm/default-cranelift"] singlepass = ["cosmwasm-vm/default-singlepass"] [dependencies] -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print", features = ["staking"] } +cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print", features = [ + "staking" +] } cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } schemars = "0.7" serde = { version = "^1.0.117", default-features = false, features = [ @@ -46,3 +48,6 @@ serde = { version = "^1.0.117", default-features = false, features = [ [dev-dependencies] cosmwasm-vm = { path = "../../packages/sgx-vm", package = "cosmwasm-sgx-vm", default-features = false } cosmwasm-schema = { path = "../../packages/schema" } + +[workspace] +members = [] diff --git a/cosmwasm/v010-contracts/staking/Cargo.toml b/cosmwasm/v010-contracts/staking/Cargo.toml index 6b7e7a29f..ef15e7cbd 100644 --- a/cosmwasm/v010-contracts/staking/Cargo.toml +++ b/cosmwasm/v010-contracts/staking/Cargo.toml @@ -30,8 +30,13 @@ overflow-checks = true backtraces = ["cosmwasm-std/backtraces"] [dependencies] -cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print", features = ["staking"] } +cosmwasm-std = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print", features = [ + "staking" +] } cosmwasm-storage = { git = "https://github.com/enigmampc/SecretNetwork", tag = "v1.0.4-debug-print" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } snafu = { version = "0.6.3" } + +[workspace] +members = []