diff --git a/ixo-swap/Cargo.lock b/ixo-swap/Cargo.lock index fee1dfe..a7e35a5 100644 --- a/ixo-swap/Cargo.lock +++ b/ixo-swap/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ "getrandom", "once_cell", @@ -15,9 +15,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.52" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84450d0b4a8bd1ba4144ce8ce718fbc5d071358b1e5384bace6536b3d1f2d5b3" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "base16ct" @@ -75,15 +75,15 @@ checksum = "56953345e39537a3e18bdaeba4cb0c58a78c1f61f361dc0fa7c5c7340ae87c5f" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cfg-if" @@ -93,9 +93,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "const-oid" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "cosmwasm-crypto" @@ -117,7 +117,7 @@ version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5e72e330bd3bdab11c52b5ecbdeb6a8697a004c57964caeb5d876f0b088b3c" dependencies = [ - "syn 1.0.85", + "syn 1.0.109", ] [[package]] @@ -141,7 +141,7 @@ checksum = "f5d803bea6bd9ed61bd1ee0b4a2eb09ee20dbb539cc6e0b8795614d20952ebb1" dependencies = [ "proc-macro2", "quote", - "syn 1.0.85", + "syn 1.0.109", ] [[package]] @@ -161,16 +161,16 @@ dependencies = [ "schemars", "serde", "serde-json-wasm", - "sha2 0.10.7", + "sha2 0.10.8", "static_assertions", "thiserror", ] [[package]] name = "cosmwasm-storage" -version = "1.3.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "800aaddd70ba915e19bf3d2d992aa3689d8767857727fdd3b414df4fd52d2aa1" +checksum = "66de2ab9db04757bcedef2b5984fbe536903ada4a8a9766717a4a71197ef34f6" dependencies = [ "cosmwasm-std", "serde", @@ -178,9 +178,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -238,8 +238,8 @@ version = "0.16.2" dependencies = [ "anyhow", "cosmwasm-std", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", "derivative", "itertools", "k256 0.11.6", @@ -252,17 +252,7 @@ dependencies = [ [[package]] name = "cw-storage-plus" version = "0.16.0" -source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=ixo-swap#04b1c97c00b3581016b00c3f023019ae7cedf950" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", -] - -[[package]] -name = "cw-storage-plus" -version = "0.16.0" -source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=master#47d921f481b3fa6b0209960a8f1bd9845292dad9" +source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=master#c1b3c9656178e18c6aea96afdb84ff4045dcabc2" dependencies = [ "cosmwasm-std", "schemars", @@ -271,9 +261,9 @@ dependencies = [ [[package]] name = "cw-storage-plus" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f0e92a069d62067f3472c62e30adedb4cab1754725c0f2a682b3128d2bf3c79" +checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c" dependencies = [ "cosmwasm-std", "schemars", @@ -283,11 +273,11 @@ dependencies = [ [[package]] name = "cw-utils" version = "0.16.0" -source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=ixo-swap#04b1c97c00b3581016b00c3f023019ae7cedf950" +source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=master#c1b3c9656178e18c6aea96afdb84ff4045dcabc2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw2 0.16.0 (git+https://github.com/ixofoundation/ixo-contracts.git?branch=ixo-swap)", + "cw2 0.16.0", "schemars", "semver", "serde", @@ -296,27 +286,13 @@ dependencies = [ [[package]] name = "cw-utils" -version = "0.16.0" -source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=master#47d921f481b3fa6b0209960a8f1bd9845292dad9" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw2 0.16.0 (git+https://github.com/ixofoundation/ixo-contracts.git?branch=master)", - "schemars", - "semver", - "serde", - "thiserror", -] - -[[package]] -name = "cw-utils" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c80e93d1deccb8588db03945016a292c3c631e6325d349ebb35d2db6f4f946f7" +checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw2 1.1.0", + "cw2 1.1.2", "schemars", "semver", "serde", @@ -326,11 +302,11 @@ dependencies = [ [[package]] name = "cw1155" version = "0.16.0" -source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=master#47d921f481b3fa6b0209960a8f1bd9845292dad9" +source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=master#c1b3c9656178e18c6aea96afdb84ff4045dcabc2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-utils 0.16.0 (git+https://github.com/ixofoundation/ixo-contracts.git?branch=master)", + "cw-utils 0.16.0", "schemars", "serde", ] @@ -338,14 +314,14 @@ dependencies = [ [[package]] name = "cw1155-base" version = "0.16.0" -source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=master#47d921f481b3fa6b0209960a8f1bd9845292dad9" +source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=master#c1b3c9656178e18c6aea96afdb84ff4045dcabc2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.16.0 (git+https://github.com/ixofoundation/ixo-contracts.git?branch=master)", - "cw-utils 0.16.0 (git+https://github.com/ixofoundation/ixo-contracts.git?branch=master)", + "cw-storage-plus 0.16.0", + "cw-utils 0.16.0", "cw1155", - "cw2 0.16.0 (git+https://github.com/ixofoundation/ixo-contracts.git?branch=master)", + "cw2 0.16.0", "schemars", "serde", "thiserror", @@ -354,37 +330,26 @@ dependencies = [ [[package]] name = "cw2" version = "0.16.0" -source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=ixo-swap#04b1c97c00b3581016b00c3f023019ae7cedf950" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 0.16.0 (git+https://github.com/ixofoundation/ixo-contracts.git?branch=ixo-swap)", - "schemars", - "serde", -] - -[[package]] -name = "cw2" -version = "0.16.0" -source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=master#47d921f481b3fa6b0209960a8f1bd9845292dad9" +source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=master#c1b3c9656178e18c6aea96afdb84ff4045dcabc2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.16.0 (git+https://github.com/ixofoundation/ixo-contracts.git?branch=master)", + "cw-storage-plus 0.16.0", "schemars", "serde", ] [[package]] name = "cw2" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ac2dc7a55ad64173ca1e0a46697c31b7a5c51342f55a1e84a724da4eb99908" +checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 1.1.0", + "cw-storage-plus 1.2.0", "schemars", + "semver", "serde", "thiserror", ] @@ -392,13 +357,13 @@ dependencies = [ [[package]] name = "cw20-base-lp" version = "0.16.0" -source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=ixo-swap#04b1c97c00b3581016b00c3f023019ae7cedf950" +source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=master#c1b3c9656178e18c6aea96afdb84ff4045dcabc2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.16.0 (git+https://github.com/ixofoundation/ixo-contracts.git?branch=ixo-swap)", - "cw-utils 0.16.0 (git+https://github.com/ixofoundation/ixo-contracts.git?branch=ixo-swap)", - "cw2 0.16.0 (git+https://github.com/ixofoundation/ixo-contracts.git?branch=ixo-swap)", + "cw-storage-plus 0.16.0", + "cw-utils 0.16.0", + "cw2 0.16.0", "cw20-lp", "schemars", "semver", @@ -409,11 +374,11 @@ dependencies = [ [[package]] name = "cw20-lp" version = "1.1.2" -source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=ixo-swap#04b1c97c00b3581016b00c3f023019ae7cedf950" +source = "git+https://github.com/ixofoundation/ixo-contracts.git?branch=master#c1b3c9656178e18c6aea96afdb84ff4045dcabc2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-utils 1.0.1", + "cw-utils 1.0.3", "schemars", "serde", ] @@ -446,7 +411,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.85", + "syn 1.0.109", ] [[package]] @@ -472,9 +437,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.4" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" @@ -496,7 +461,7 @@ checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der 0.7.8", "digest 0.10.7", - "elliptic-curve 0.13.7", + "elliptic-curve 0.13.8", "rfc6979 0.4.0", "signature 2.2.0", "spki 0.7.3", @@ -519,9 +484,9 @@ dependencies = [ [[package]] name = "either" -version = "1.6.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "elliptic-curve" @@ -545,9 +510,9 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.13.7" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9775b22bc152ad86a0cf23f0f348b884b26add12bf741e7ffc4d4ab2ab4d205" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct 0.2.0", "crypto-bigint 0.5.5", @@ -601,9 +566,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", @@ -658,18 +623,18 @@ dependencies = [ [[package]] name = "itertools" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "ixoswap" @@ -681,16 +646,16 @@ dependencies = [ "cosmwasm-std", "cosmwasm-storage", "cw-multi-test", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", "cw1155", "cw1155-base", - "cw2 1.1.0", + "cw2 1.1.2", "cw20-base-lp", "cw20-lp", "prost 0.11.9", "serde", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", ] @@ -703,7 +668,7 @@ dependencies = [ "cfg-if", "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -714,29 +679,29 @@ checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", "ecdsa 0.16.9", - "elliptic-curve 0.13.7", + "elliptic-curve 0.13.8", "once_cell", - "sha2 0.10.7", + "sha2 0.10.8", "signature 2.2.0", ] [[package]] name = "libc" -version = "0.2.112" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "pkcs8" @@ -760,9 +725,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -797,7 +762,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn 1.0.85", + "syn 1.0.109", ] [[package]] @@ -810,7 +775,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn 1.0.85", + "syn 1.0.109", ] [[package]] @@ -860,9 +825,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "schemars" @@ -885,7 +850,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 1.0.85", + "syn 1.0.109", ] [[package]] @@ -918,9 +883,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" [[package]] name = "serde" @@ -948,7 +913,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -959,14 +924,14 @@ checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.85", + "syn 1.0.109", ] [[package]] name = "serde_json" -version = "1.0.74" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2bb9cd061c5865d345bb02ca49fcef1391741b672b54a0bf7b679badec3142" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", @@ -988,9 +953,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -1045,26 +1010,26 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "1.0.85" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a684ac3dcd8913827e18cd09a68384ee66c1de24157e3c556c9ab16d85695fb7" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] name = "syn" -version = "2.0.50" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2", "quote", @@ -1073,41 +1038,35 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] name = "typenum" -version = "1.15.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "version_check" @@ -1117,12 +1076,12 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/ixo-swap/Cargo.toml b/ixo-swap/Cargo.toml index daae72c..1bc28c8 100644 --- a/ixo-swap/Cargo.toml +++ b/ixo-swap/Cargo.toml @@ -40,8 +40,8 @@ cw-utils = { version = "1.0.1" } cw1155-base = { git = "https://github.com/ixofoundation/ixo-contracts.git", branch = "master", version = "0.16.0" } cw1155 = { git = "https://github.com/ixofoundation/ixo-contracts.git", branch = "master", version = "0.16.0" } cw2 = { version = "1.1.0" } -cw20-lp = { git = "https://github.com/ixofoundation/ixo-contracts.git", branch = "ixo-swap", version = "1.1.2" } -cw20-base-lp = { git = "https://github.com/ixofoundation/ixo-contracts.git", branch = "ixo-swap", version = "0.16.0", features = ["library"] } +cw20-lp = { git = "https://github.com/ixofoundation/ixo-contracts.git", branch = "master", version = "1.1.2" } +cw20-base-lp = { git = "https://github.com/ixofoundation/ixo-contracts.git", branch = "master", version = "0.16.0", features = ["library"] } cosmwasm-std = { version = "1.3.1" } cosmwasm-storage = { version = "1.3.1" } cosmwasm-schema = { version = "1.3.1" } diff --git a/ixo-swap/Developing.md b/ixo-swap/Developing.md index 40bd1bf..61bf7ad 100644 --- a/ixo-swap/Developing.md +++ b/ixo-swap/Developing.md @@ -64,15 +64,16 @@ as this will be included in the body of a transaction. We also want to have a reproducible build process, so third parties can verify that the uploaded Wasm code did indeed come from the claimed rust code. -To solve both these issues, we have produced `rust-optimizer`, a docker image to +To solve both these issues, we have produced `cosmwasm/optimizer`, a docker image to produce an extremely small build output in a consistent manner. The suggest way to run it is this: ```sh docker run --rm -v "$(pwd)":/code \ - --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \ + --mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.11.3 + --platform linux/amd64 \ + cosmwasm/optimizer:0.15.0 ``` We must mount the contract code to `/code`. You can use a absolute path instead diff --git a/ixo-swap/build.sh b/ixo-swap/build.sh new file mode 100755 index 0000000..fbc954a --- /dev/null +++ b/ixo-swap/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +docker run --rm -v "$(pwd)":/code \ + --mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \ + --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ + --platform linux/amd64 \ + cosmwasm/optimizer:0.15.0 diff --git a/ixo-swap/src/error.rs b/ixo-swap/src/error.rs index cef1731..87b5ee4 100644 --- a/ixo-swap/src/error.rs +++ b/ixo-swap/src/error.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Decimal, StdError, Uint128}; +use cosmwasm_std::{CheckedMultiplyFractionError, Decimal, StdError, Uint128}; use thiserror::Error; #[derive(Error, Debug, PartialEq)] @@ -9,6 +9,9 @@ pub enum ContractError { #[error("{0}")] Cw20Error(#[from] cw20_base_lp::ContractError), + #[error("{0}")] + CheckedMultiplyFraction(#[from] CheckedMultiplyFractionError), + #[error("{0}")] PaymentError(#[from] cw_utils::PaymentError), diff --git a/ixo-swap/src/token_amount.rs b/ixo-swap/src/token_amount.rs index 372ef19..b618ca5 100644 --- a/ixo-swap/src/token_amount.rs +++ b/ixo-swap/src/token_amount.rs @@ -1,7 +1,7 @@ -use std::{collections::HashMap, convert::TryInto}; +use std::{collections::HashMap, convert::TryFrom}; use cosmwasm_schema::cw_serde; -use cosmwasm_std::{Decimal, StdError, StdResult, Uint128, Uint256}; +use cosmwasm_std::{CheckedMultiplyFractionError, Decimal, StdError, Uint128}; use cw1155::TokenId; use crate::{ @@ -116,14 +116,16 @@ impl TokenAmount { Ok(TokenAmount::Multiple(amounts)) } - fn get_percent_from_single(input_amount: Uint128, percent: Uint128) -> StdResult { - Ok(TokenAmount::Single( - input_amount - .full_mul(percent) - .checked_div(Uint256::from(SCALE_FACTOR)) - .map_err(StdError::divide_by_zero)? - .try_into()?, - )) + fn get_percent_from_single( + input_amount: Uint128, + percent: Uint128, + ) -> Result { + let fraction = (SCALE_FACTOR.u128(), 1u128); + let result = input_amount + .full_mul(percent) + .checked_div_ceil(fraction) + .map_err(|err| err)?; + Ok(TokenAmount::Single(Uint128::try_from(result)?)) } }