diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml
index 90099987..b216fd16 100644
--- a/.github/workflows/basic.yml
+++ b/.github/workflows/basic.yml
@@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- rust-version: [1.78.0]
+ rust-version: [1.82.0]
steps:
- name: Checkout sources
uses: actions/checkout@v3
@@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- rust-version: [1.78.0]
+ rust-version: [1.82.0]
steps:
- name: Checkout sources
uses: actions/checkout@v3
@@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- rust-version: [1.78.0]
+ rust-version: [1.82.0]
steps:
- name: Checkout sources
uses: actions/checkout@v3
diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml
index da8bb577..206a0387 100644
--- a/.github/workflows/codecov.yml
+++ b/.github/workflows/codecov.yml
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
- rust-version: [1.78.0]
+ rust-version: [1.82.0]
steps:
- name: Checkout sources
uses: actions/checkout@v3
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 73e7cbe6..9fbd6369 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- rust-version: [1.78.0]
+ rust-version: [1.82.0]
steps:
- name: Checkout sources
uses: actions/checkout@v3
diff --git a/Cargo.lock b/Cargo.lock
index e63b5f39..faa26686 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3,20 +3,17 @@
version = 3
[[package]]
-name = "addr2line"
-version = "0.21.0"
+name = "ahash"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
dependencies = [
- "gimli",
+ "cfg-if",
+ "once_cell",
+ "version_check",
+ "zerocopy",
]
-[[package]]
-name = "adler"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
-
[[package]]
name = "android-tzdata"
version = "0.1.1"
@@ -42,37 +39,134 @@ dependencies = [
]
[[package]]
-name = "autocfg"
-version = "1.3.0"
+name = "ark-bls12-381"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
+checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488"
+dependencies = [
+ "ark-ec",
+ "ark-ff",
+ "ark-serialize",
+ "ark-std",
+]
[[package]]
-name = "backtrace"
-version = "0.3.69"
+name = "ark-ec"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
+checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba"
dependencies = [
- "addr2line",
- "cc",
- "cfg-if",
- "libc",
- "miniz_oxide",
- "object",
- "rustc-demangle",
+ "ark-ff",
+ "ark-poly",
+ "ark-serialize",
+ "ark-std",
+ "derivative",
+ "hashbrown 0.13.2",
+ "itertools",
+ "num-traits",
+ "zeroize",
]
[[package]]
-name = "base16ct"
-version = "0.2.0"
+name = "ark-ff"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
+checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba"
+dependencies = [
+ "ark-ff-asm",
+ "ark-ff-macros",
+ "ark-serialize",
+ "ark-std",
+ "derivative",
+ "digest",
+ "itertools",
+ "num-bigint",
+ "num-traits",
+ "paste",
+ "rustc_version",
+ "zeroize",
+]
+
+[[package]]
+name = "ark-ff-asm"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348"
+dependencies = [
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "ark-ff-macros"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565"
+dependencies = [
+ "num-bigint",
+ "num-traits",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
[[package]]
-name = "base32"
+name = "ark-poly"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf"
+dependencies = [
+ "ark-ff",
+ "ark-serialize",
+ "ark-std",
+ "derivative",
+ "hashbrown 0.13.2",
+]
+
+[[package]]
+name = "ark-serialize"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5"
+dependencies = [
+ "ark-serialize-derive",
+ "ark-std",
+ "digest",
+ "num-bigint",
+]
+
+[[package]]
+name = "ark-serialize-derive"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "ark-std"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa"
+checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185"
+dependencies = [
+ "num-traits",
+ "rand",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
+
+[[package]]
+name = "base16ct"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
[[package]]
name = "base64"
@@ -116,7 +210,7 @@ dependencies = [
"num-bigint",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.39",
]
[[package]]
@@ -205,21 +299,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f"
dependencies = [
"quote",
- "syn",
+ "syn 2.0.39",
]
[[package]]
name = "curve25519-dalek"
-version = "4.1.2"
+version = "4.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348"
+checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
dependencies = [
"cfg-if",
"cpufeatures",
"curve25519-dalek-derive",
"digest",
"fiat-crypto",
- "platforms",
"rustc_version",
"subtle",
"zeroize",
@@ -233,7 +326,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.39",
]
[[package]]
@@ -257,7 +350,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
- "syn",
+ "syn 2.0.39",
]
[[package]]
@@ -268,9 +361,15 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178"
dependencies = [
"darling_core",
"quote",
- "syn",
+ "syn 2.0.39",
]
+[[package]]
+name = "data-encoding"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2"
+
[[package]]
name = "der"
version = "0.7.9"
@@ -291,6 +390,17 @@ dependencies = [
"serde",
]
+[[package]]
+name = "derivative"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
[[package]]
name = "derive_arbitrary"
version = "1.3.2"
@@ -299,7 +409,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.39",
]
[[package]]
@@ -331,7 +441,6 @@ dependencies = [
"elliptic-curve",
"rfc6979",
"signature",
- "spki",
]
[[package]]
@@ -346,15 +455,16 @@ dependencies = [
[[package]]
name = "ed25519-dalek"
-version = "2.0.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980"
+checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871"
dependencies = [
"curve25519-dalek",
"ed25519",
"rand_core",
"serde",
"sha2",
+ "subtle",
"zeroize",
]
@@ -376,7 +486,6 @@ dependencies = [
"ff",
"generic-array",
"group",
- "pkcs8",
"rand_core",
"sec1",
"subtle",
@@ -447,12 +556,6 @@ dependencies = [
"wasm-bindgen",
]
-[[package]]
-name = "gimli"
-version = "0.28.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
-
[[package]]
name = "group"
version = "0.13.0"
@@ -470,6 +573,15 @@ version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+[[package]]
+name = "hashbrown"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
+dependencies = [
+ "ahash",
+]
+
[[package]]
name = "hashbrown"
version = "0.14.5"
@@ -559,9 +671,9 @@ checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590"
[[package]]
name = "itertools"
-version = "0.11.0"
+version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
"either",
]
@@ -583,16 +695,14 @@ dependencies = [
[[package]]
name = "k256"
-version = "0.13.1"
+version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc"
+checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b"
dependencies = [
"cfg-if",
"ecdsa",
"elliptic-curve",
- "once_cell",
"sha2",
- "signature",
]
[[package]]
@@ -606,9 +716,9 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.155"
+version = "0.2.164"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
+checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f"
[[package]]
name = "libm"
@@ -622,21 +732,6 @@ version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
-[[package]]
-name = "memchr"
-version = "2.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
-
-[[package]]
-name = "miniz_oxide"
-version = "0.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08"
-dependencies = [
- "adler",
-]
-
[[package]]
name = "num-bigint"
version = "0.4.4"
@@ -662,7 +757,7 @@ checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.39",
]
[[package]]
@@ -684,21 +779,24 @@ dependencies = [
"autocfg",
]
-[[package]]
-name = "object"
-version = "0.32.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
-dependencies = [
- "memchr",
-]
-
[[package]]
name = "once_cell"
version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
+[[package]]
+name = "p256"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b"
+dependencies = [
+ "ecdsa",
+ "elliptic-curve",
+ "primeorder",
+ "sha2",
+]
+
[[package]]
name = "paste"
version = "1.0.15"
@@ -737,12 +835,6 @@ dependencies = [
"spki",
]
-[[package]]
-name = "platforms"
-version = "3.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e4c7666f2019727f9e8e14bf14456e99c707d780922869f1ba473eee101fa49"
-
[[package]]
name = "powerfmt"
version = "0.2.0"
@@ -762,7 +854,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d"
dependencies = [
"proc-macro2",
- "syn",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "primeorder"
+version = "0.13.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6"
+dependencies = [
+ "elliptic-curve",
]
[[package]]
@@ -823,17 +924,11 @@ dependencies = [
"subtle",
]
-[[package]]
-name = "rustc-demangle"
-version = "0.1.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
-
[[package]]
name = "rustc_version"
-version = "0.4.0"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
dependencies = [
"semver",
]
@@ -853,7 +948,6 @@ dependencies = [
"base16ct",
"der",
"generic-array",
- "pkcs8",
"subtle",
"zeroize",
]
@@ -881,7 +975,7 @@ checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.39",
]
[[package]]
@@ -922,7 +1016,7 @@ dependencies = [
"darling",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.39",
]
[[package]]
@@ -964,21 +1058,21 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
[[package]]
name = "soroban-builtin-sdk-macros"
-version = "20.3.0"
+version = "22.0.0-rc.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7cc32c6e817f3ca269764ec0d7d14da6210b74a5bf14d4e745aa3ee860558900"
+checksum = "c45d2492cd44f05cc79eeb857985f153f12a4423ce51b4b746b5925024c473b1"
dependencies = [
"itertools",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.39",
]
[[package]]
name = "soroban-env-common"
-version = "20.3.0"
+version = "22.0.0-rc.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c14e18d879c520ff82612eaae0590acaf6a7f3b977407e1abb1c9e31f94c7814"
+checksum = "39b6d2ec8955243394278e1fae88be3b367fcfed9cf74e5044799a90786a8642"
dependencies = [
"arbitrary",
"crate-git-revision",
@@ -990,13 +1084,14 @@ dependencies = [
"soroban-wasmi",
"static_assertions",
"stellar-xdr",
+ "wasmparser",
]
[[package]]
name = "soroban-env-guest"
-version = "20.3.0"
+version = "22.0.0-rc.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5122ca2abd5ebcc1e876a96b9b44f87ce0a0e06df8f7c09772ddb58b159b7454"
+checksum = "4002fc582cd20cc9b9fbb73959bc5d6b5b15feda11485cbfab0c28e78ecbab3e"
dependencies = [
"soroban-env-common",
"static_assertions",
@@ -1004,13 +1099,19 @@ dependencies = [
[[package]]
name = "soroban-env-host"
-version = "20.3.0"
+version = "22.0.0-rc.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "114a0fa0d0cc39d0be16b1ee35b6e5f4ee0592ddcf459bde69391c02b03cf520"
+checksum = "8cb9be0260d39a648db0d33e1c6f8f494ec0c4f5be2b8a0a4e15ed4b7c6a92b0"
dependencies = [
- "backtrace",
+ "ark-bls12-381",
+ "ark-ec",
+ "ark-ff",
+ "ark-serialize",
"curve25519-dalek",
+ "ecdsa",
"ed25519-dalek",
+ "elliptic-curve",
+ "generic-array",
"getrandom",
"hex-literal",
"hmac",
@@ -1018,8 +1119,10 @@ dependencies = [
"num-derive",
"num-integer",
"num-traits",
+ "p256",
"rand",
"rand_chacha",
+ "sec1",
"sha2",
"sha3",
"soroban-builtin-sdk-macros",
@@ -1027,13 +1130,14 @@ dependencies = [
"soroban-wasmi",
"static_assertions",
"stellar-strkey",
+ "wasmparser",
]
[[package]]
name = "soroban-env-macros"
-version = "20.3.0"
+version = "22.0.0-rc.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b13e3f8c86f812e0669e78fcb3eae40c385c6a9dd1a4886a1de733230b4fcf27"
+checksum = "a328297a568ae98999fdb06902e3362dfd8a2bfa9abea40beaeb7dc93a402fe7"
dependencies = [
"itertools",
"proc-macro2",
@@ -1041,14 +1145,14 @@ dependencies = [
"serde",
"serde_json",
"stellar-xdr",
- "syn",
+ "syn 2.0.39",
]
[[package]]
name = "soroban-ledger-snapshot"
-version = "20.5.0"
+version = "22.0.0-rc.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61a54708f44890e0546180db6b4f530e2a88d83b05a9b38a131caa21d005e25a"
+checksum = "23a4ca0a3cede93a08a2eedb7547fb6095c007975c8c7139f7126350371afe1f"
dependencies = [
"serde",
"serde_json",
@@ -1060,15 +1164,17 @@ dependencies = [
[[package]]
name = "soroban-sdk"
-version = "20.5.0"
+version = "22.0.0-rc.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84fc8be9068dd4e0212d8b13ad61089ea87e69ac212c262914503a961c8dc3a3"
+checksum = "0750607b238ba62447cb6038daf834f173861b5db43577ae68d351127dd5439c"
dependencies = [
"arbitrary",
"bytes-lit",
"ctor",
+ "derive_arbitrary",
"ed25519-dalek",
"rand",
+ "rustc_version",
"serde",
"serde_json",
"soroban-env-guest",
@@ -1080,9 +1186,9 @@ dependencies = [
[[package]]
name = "soroban-sdk-macros"
-version = "20.5.0"
+version = "22.0.0-rc.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db20def4ead836663633f58d817d0ed8e1af052c9650a04adf730525af85b964"
+checksum = "d5edc95c3923c3d61da4fbc6ac606ac97e1fabf9c4d2ab7849757e8e875bd239"
dependencies = [
"crate-git-revision",
"darling",
@@ -1095,14 +1201,14 @@ dependencies = [
"soroban-spec",
"soroban-spec-rust",
"stellar-xdr",
- "syn",
+ "syn 2.0.39",
]
[[package]]
name = "soroban-spec"
-version = "20.5.0"
+version = "22.0.0-rc.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3eefeb5d373b43f6828145d00f0c5cc35e96db56a6671ae9614f84beb2711cab"
+checksum = "4afa4d83de8965586f735e9d4724fd44f0d119980718064f7658f3fe50c01782"
dependencies = [
"base64 0.13.1",
"stellar-xdr",
@@ -1112,9 +1218,9 @@ dependencies = [
[[package]]
name = "soroban-spec-rust"
-version = "20.5.0"
+version = "22.0.0-rc.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3152bca4737ef734ac37fe47b225ee58765c9095970c481a18516a2b287c7a33"
+checksum = "431b6ab7b2ae63c24ed88e828c9ef7b5541c314df34336a9e5837c6e0d6c7ae0"
dependencies = [
"prettyplease",
"proc-macro2",
@@ -1122,7 +1228,7 @@ dependencies = [
"sha2",
"soroban-spec",
"stellar-xdr",
- "syn",
+ "syn 2.0.39",
"thiserror",
]
@@ -1136,9 +1242,9 @@ dependencies = [
[[package]]
name = "soroban-token-sdk"
-version = "20.5.0"
+version = "22.0.0-rc.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee8ed0ae2e5d5e67b7939200bba3712b4c81dcf87b2ccd68bba049bec64c780f"
+checksum = "2d9986d00de31e52f3d19b6e1a867403387226e1011987ff48f9c9a9e3379335"
dependencies = [
"soroban-sdk",
]
@@ -1180,20 +1286,20 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "stellar-strkey"
-version = "0.0.8"
+version = "0.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12d2bf45e114117ea91d820a846fd1afbe3ba7d717988fee094ce8227a3bf8bd"
+checksum = "5e3aa3ed00e70082cb43febc1c2afa5056b9bb3e348bbb43d0cd0aa88a611144"
dependencies = [
- "base32",
"crate-git-revision",
+ "data-encoding",
"thiserror",
]
[[package]]
name = "stellar-xdr"
-version = "20.1.0"
+version = "22.0.0-rc.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e59cdf3eb4467fb5a4b00b52e7de6dca72f67fac6f9b700f55c95a5d86f09c9d"
+checksum = "c88dc0e928b9cb65ea43836b52560bb4ead3e32895f5019ca223dc7cd1966cbf"
dependencies = [
"arbitrary",
"base64 0.13.1",
@@ -1217,6 +1323,17 @@ version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
+[[package]]
+name = "syn"
+version = "1.0.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
[[package]]
name = "syn"
version = "2.0.39"
@@ -1246,7 +1363,7 @@ dependencies = [
"cfg-if",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.39",
]
[[package]]
@@ -1257,7 +1374,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.39",
"test-case-core",
]
@@ -1278,7 +1395,7 @@ checksum = "268026685b2be38d7103e9e507c938a1fcb3d7e6eb15e87870b617bf37b6d581"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.39",
]
[[package]]
@@ -1357,7 +1474,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.39",
"wasm-bindgen-shared",
]
@@ -1379,7 +1496,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.39",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -1410,11 +1527,12 @@ dependencies = [
[[package]]
name = "wasmparser"
-version = "0.88.0"
+version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb8cf7dd82407fe68161bedcd57fde15596f32ebf6e9b3bdbf3ae1da20e38e5e"
+checksum = "a58e28b80dd8340cb07b8242ae654756161f6fc8d0038123d679b7b99964fa50"
dependencies = [
- "indexmap 1.9.3",
+ "indexmap 2.2.6",
+ "semver",
]
[[package]]
@@ -1437,9 +1555,9 @@ dependencies = [
[[package]]
name = "windows-targets"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
@@ -1453,54 +1571,88 @@ dependencies = [
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.52.5"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.52.5"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "zerocopy"
+version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
[[package]]
name = "zeroize"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
+dependencies = [
+ "zeroize_derive",
+]
+
+[[package]]
+name = "zeroize_derive"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
diff --git a/Cargo.toml b/Cargo.toml
index 621caaeb..ff1bb554 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,9 +13,8 @@ ed25519-dalek = "1.0.1"
num-integer = { version = "0.1.45", default-features = false, features = [
"i128",
] }
-soroban-sdk = "20.5.0"
-soroban-auth = "20.5.0"
-soroban-token-sdk = "20.5.0"
+soroban-sdk = "22.0.0-rc.3.2"
+soroban-token-sdk = "22.0.0-rc.3.2"
test-case = "3.3"
[profile.release]
diff --git a/Makefile b/Makefile
index 3db46a6d..d5dff3be 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-SUBDIRS := contracts/token contracts/collections contracts/deployer contracts/auctions
+SUBDIRS := contracts/token contracts/collections contracts/deployer
BUILD_FLAGS ?=
default: build
diff --git a/contracts/auctions/src/contract.rs b/contracts/auctions/src/contract.rs
index 0aa32679..54b44358 100644
--- a/contracts/auctions/src/contract.rs
+++ b/contracts/auctions/src/contract.rs
@@ -4,10 +4,11 @@ use crate::{
collection,
error::ContractError,
storage::{
- generate_auction_id, get_admin, get_auction_by_id, get_auction_token, get_auctions,
- get_auctions_by_seller_id, get_highest_bid, is_initialized, save_admin, save_auction_by_id,
- save_auction_by_seller, save_auction_token, set_highest_bid, set_initialized, update_admin,
- validate_input_params, Auction, AuctionStatus, HighestBid, ItemInfo,
+ generate_auction_id, get_admin_old, get_auction_by_id, get_auction_token, get_auctions,
+ get_auctions_by_seller_id, get_highest_bid, is_initialized, save_admin_old,
+ save_auction_by_id, save_auction_by_seller, save_auction_token, set_highest_bid,
+ set_initialized, update_admin, validate_input_params, Auction, AuctionStatus, HighestBid,
+ ItemInfo,
},
token,
};
@@ -30,7 +31,7 @@ impl MarketplaceContract {
return Err(ContractError::AlreadyInitialized);
}
- save_admin(&env, &admin);
+ save_admin_old(&env, &admin);
save_auction_token(&env, auction_token);
set_initialized(&env);
@@ -56,10 +57,12 @@ impl MarketplaceContract {
// placeholder
&item_info.buy_now_price.unwrap_or(1),
&item_info.minimum_price.unwrap_or(1),
+ &item_info.amount,
];
+
validate_input_params(&env, &input_values[..])?;
- let currency = get_auction_token(&env)?;
+ let auction_token = get_auction_token(&env)?;
let nft_client = collection::Client::new(&env, &item_info.collection_addr);
let item_balance = nft_client.balance_of(&seller, &item_info.item_id);
@@ -70,7 +73,7 @@ impl MarketplaceContract {
);
// we need at least one item to start an auction
- if item_balance < 1 {
+ if item_balance < item_info.amount {
log!(
&env,
"Auction: Create Auction: Not enough balance of the item to sell"
@@ -88,7 +91,7 @@ impl MarketplaceContract {
highest_bid: None,
end_time,
status: AuctionStatus::Active,
- currency,
+ auction_token,
};
save_auction(&env, &auction)?;
@@ -130,7 +133,7 @@ impl MarketplaceContract {
return Err(ContractError::InvalidBidder);
}
- let token_client = token::Client::new(&env, &auction.currency);
+ let token_client = token::Client::new(&env, &auction.auction_token);
match auction.highest_bid {
Some(current_highest_bid) if bid_amount > current_highest_bid => {
@@ -192,7 +195,7 @@ impl MarketplaceContract {
return Err(ContractError::AuctionNotFinished);
}
- let token_client = token::Client::new(&env, &auction.currency);
+ let token_client = token::Client::new(&env, &auction.auction_token);
let highest_bid = get_highest_bid(&env, auction_id)?;
// check if minimum price has been reached
@@ -213,7 +216,7 @@ impl MarketplaceContract {
&auction.seller,
&highest_bid.bidder,
&auction.item_info.item_id,
- &1,
+ &auction.item_info.amount,
);
auction.status = AuctionStatus::Ended;
@@ -274,7 +277,7 @@ impl MarketplaceContract {
let old_highest_bid = get_highest_bid(&env, auction_id)?;
- let token = token::Client::new(&env, &auction.currency);
+ let token = token::Client::new(&env, &auction.auction_token);
// refund only when there is some previous highest bid
if old_highest_bid.bid > 0 {
@@ -424,7 +427,7 @@ impl MarketplaceContract {
#[allow(dead_code)]
pub fn update_admin(env: Env, new_admin: Address) -> Result
{
- let old_admin = get_admin(&env)?;
+ let old_admin = get_admin_old(&env)?;
old_admin.require_auth();
env.events()
@@ -437,7 +440,7 @@ impl MarketplaceContract {
#[allow(dead_code)]
pub fn upgrade(env: Env, new_wasm_hash: BytesN<32>) -> Result<(), ContractError> {
- let admin: Address = get_admin(&env)?;
+ let admin: Address = get_admin_old(&env)?;
admin.require_auth();
env.deployer().update_current_contract_wasm(new_wasm_hash);
diff --git a/contracts/auctions/src/error.rs b/contracts/auctions/src/error.rs
index 1915b21f..53ec611a 100644
--- a/contracts/auctions/src/error.rs
+++ b/contracts/auctions/src/error.rs
@@ -21,5 +21,5 @@ pub enum ContractError {
InvalidBidder = 14,
AdminNotFound = 15,
NoBidFound = 16,
- CurrencyNotFound = 17,
+ AuctionTokenNotFound = 17,
}
diff --git a/contracts/auctions/src/storage.rs b/contracts/auctions/src/storage.rs
index c75dbcef..ce65a8a7 100644
--- a/contracts/auctions/src/storage.rs
+++ b/contracts/auctions/src/storage.rs
@@ -1,4 +1,6 @@
-use soroban_sdk::{contracttype, log, panic_with_error, vec, Address, Env, Vec};
+use soroban_sdk::{
+ contracttype, log, panic_with_error, symbol_short, vec, Address, Env, Symbol, Vec,
+};
use crate::error::ContractError;
@@ -11,6 +13,7 @@ pub const LIFETIME_THRESHOLD: u32 = BUMP_AMOUNT - DAY_IN_LEDGERS;
// since we start counting from 1, default would be 1 as well
pub const DEFAULT_INDEX: u64 = 1;
pub const DEFAULT_LIMIT: u64 = 10;
+pub const ADMIN: Symbol = symbol_short!("ADMIN");
#[contracttype]
#[derive(Clone)]
@@ -30,6 +33,7 @@ pub struct ItemInfo {
pub item_id: u64,
pub minimum_price: Option,
pub buy_now_price: Option,
+ pub amount: u64,
}
#[derive(Clone, Debug, PartialEq)]
@@ -41,7 +45,7 @@ pub struct Auction {
pub highest_bid: Option,
pub end_time: u64,
pub status: AuctionStatus,
- pub currency: Address,
+ pub auction_token: Address,
}
#[derive(Clone, Debug, PartialEq)]
@@ -177,7 +181,8 @@ pub fn validate_input_params(env: &Env, values_to_check: &[&u64]) -> Result<(),
if i < &&1 {
log!(
&env,
- "Auction: Validate input: parameters cannot be less than 1"
+ "Auction: Validate input: parameter is less than 1: ",
+ **i
);
panic_with_error!(&env, ContractError::InvalidInputs);
}
@@ -198,14 +203,14 @@ pub fn set_initialized(env: &Env) {
.set(&DataKey::IsInitialized, &true);
}
-pub fn save_admin(env: &Env, admin: &Address) {
+pub fn save_admin_old(env: &Env, admin: &Address) {
env.storage().persistent().set(&DataKey::Admin, &admin);
env.storage()
.persistent()
.extend_ttl(&DataKey::Admin, LIFETIME_THRESHOLD, BUMP_AMOUNT);
}
-pub fn get_admin(env: &Env) -> Result {
+pub fn get_admin_old(env: &Env) -> Result {
let admin = env
.storage()
.persistent()
@@ -237,7 +242,7 @@ pub fn get_highest_bid(env: &Env, auction_id: u64) -> Result Result {
.storage()
.persistent()
.get(&DataKey::AuctionToken)
- .ok_or(ContractError::CurrencyNotFound)?;
+ .ok_or(ContractError::AuctionTokenNotFound)?;
env.storage()
.persistent()
@@ -307,7 +312,7 @@ mod test {
use super::validate_input_params;
#[test]
- #[should_panic(expected = "Auction: Validate input: parameters cannot be less than 1")]
+ #[should_panic(expected = "Auction: Validate input: parameter is less than 1: ")]
fn validate_input_params_should_fail_with_invalid_input() {
let env = Env::default();
let _ = validate_input_params(&env, &[&1, &2, &3, &0]);
diff --git a/contracts/auctions/src/test/bids.rs b/contracts/auctions/src/test/bids.rs
index d1927a26..e4193c1d 100644
--- a/contracts/auctions/src/test/bids.rs
+++ b/contracts/auctions/src/test/bids.rs
@@ -42,6 +42,7 @@ fn should_place_a_bid() {
item_id: 1u64,
minimum_price: Some(10),
buy_now_price: Some(50),
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &WEEKLY);
@@ -123,6 +124,7 @@ fn fail_to_place_bid_when_auction_inactive() {
item_id: 1u64,
minimum_price: Some(10),
buy_now_price: Some(50),
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &WEEKLY);
@@ -162,6 +164,7 @@ fn seller_tries_to_place_a_bid_should_fail() {
item_id: 1,
minimum_price: None,
buy_now_price: None,
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &WEEKLY);
@@ -203,6 +206,7 @@ fn buy_now_should_fail_when_auction_not_active() {
item_id: 1,
minimum_price: None,
buy_now_price: Some(50),
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &DAY);
@@ -244,6 +248,7 @@ fn buy_now_should_fail_when_no_buy_now_price_has_been_set() {
item_id: 1,
minimum_price: None,
buy_now_price: None,
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &DAY);
@@ -280,7 +285,7 @@ fn buy_now() {
None,
);
- collections_client.mint(&seller, &seller, &1, &1);
+ collections_client.mint(&seller, &seller, &1, &5);
collections_client.set_approval_for_transfer(&mp_client.address, &1u64, &true);
@@ -289,6 +294,7 @@ fn buy_now() {
item_id: 1,
minimum_price: Some(10),
buy_now_price: Some(50),
+ amount: 5,
};
mp_client.create_auction(&item_info, &seller, &WEEKLY);
@@ -348,7 +354,7 @@ fn buy_now() {
highest_bid: Some(50),
end_time: WEEKLY,
status: AuctionStatus::Ended,
- currency: token_client.address
+ auction_token: token_client.address
}
);
@@ -381,6 +387,7 @@ fn pause_changes_status_and_second_attempt_fails_to_pause() {
item_id: 1,
minimum_price: None,
buy_now_price: None,
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &WEEKLY);
@@ -432,6 +439,7 @@ fn pause_after_enddate_should_fail() {
item_id: 1,
minimum_price: None,
buy_now_price: None,
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &WEEKLY);
@@ -472,6 +480,7 @@ fn unpause_changes_status_and_second_attempt_fails_to_unpause() {
item_id: 1,
minimum_price: None,
buy_now_price: Some(10),
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &WEEKLY);
@@ -565,6 +574,7 @@ fn multiple_auction_by_multiple_sellers() {
item_id: 1,
minimum_price: Some(100),
buy_now_price: Some(500),
+ amount: 1,
};
collection_a_client.mint(&seller_a, &seller_a, &2, &1);
@@ -576,6 +586,7 @@ fn multiple_auction_by_multiple_sellers() {
item_id: 2,
minimum_price: Some(500),
buy_now_price: Some(900),
+ amount: 1,
};
mp_client.create_auction(&second_item_info_seller_a, &seller_a, &WEEKLY);
@@ -585,6 +596,7 @@ fn multiple_auction_by_multiple_sellers() {
item_id: 1,
minimum_price: Some(50),
buy_now_price: None,
+ amount: 1,
};
mp_client.create_auction(&item_info_seller_b, &seller_b, &WEEKLY);
@@ -594,6 +606,7 @@ fn multiple_auction_by_multiple_sellers() {
item_id: 1,
minimum_price: None,
buy_now_price: None,
+ amount: 1,
};
mp_client.create_auction(&item_info_seller_c, &seller_c, &DAY);
@@ -616,7 +629,7 @@ fn multiple_auction_by_multiple_sellers() {
highest_bid: None,
end_time: WEEKLY,
status: AuctionStatus::Active,
- currency: token_client.address.clone()
+ auction_token: token_client.address.clone()
},
Auction {
id: 2,
@@ -625,7 +638,7 @@ fn multiple_auction_by_multiple_sellers() {
highest_bid: None,
end_time: WEEKLY,
status: AuctionStatus::Active,
- currency: token_client.address.clone()
+ auction_token: token_client.address.clone()
}
]
);
@@ -641,7 +654,7 @@ fn multiple_auction_by_multiple_sellers() {
highest_bid: None,
end_time: WEEKLY,
status: AuctionStatus::Active,
- currency: token_client.address.clone()
+ auction_token: token_client.address.clone()
},
]
);
@@ -657,7 +670,7 @@ fn multiple_auction_by_multiple_sellers() {
highest_bid: None,
end_time: DAY,
status: AuctionStatus::Active,
- currency: token_client.address.clone()
+ auction_token: token_client.address.clone()
},
]
);
@@ -772,7 +785,7 @@ fn multiple_auction_by_multiple_sellers() {
highest_bid: Some(500),
end_time: WEEKLY,
status: AuctionStatus::Ended,
- currency: token_client.address.clone()
+ auction_token: token_client.address.clone()
},
Auction {
id: 2,
@@ -781,7 +794,7 @@ fn multiple_auction_by_multiple_sellers() {
highest_bid: Some(150),
end_time: WEEKLY,
status: AuctionStatus::Ended,
- currency: token_client.address.clone()
+ auction_token: token_client.address.clone()
}
]
);
@@ -797,7 +810,7 @@ fn multiple_auction_by_multiple_sellers() {
highest_bid: Some(150),
end_time: WEEKLY,
status: AuctionStatus::Ended,
- currency: token_client.address.clone()
+ auction_token: token_client.address.clone()
},
]
);
@@ -813,7 +826,7 @@ fn multiple_auction_by_multiple_sellers() {
highest_bid: Some(100),
end_time: DAY,
status: AuctionStatus::Ended,
- currency: token_client.address.clone()
+ auction_token: token_client.address.clone()
},
]
);
@@ -871,6 +884,7 @@ fn buy_now_should_fail_when_status_is_different_from_active() {
item_id: 1,
minimum_price: None,
buy_now_price: Some(10),
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &WEEKLY);
@@ -917,6 +931,7 @@ fn buy_now_should_work_when_no_previous_bid() {
item_id: 1,
minimum_price: Some(10),
buy_now_price: Some(50),
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &WEEKLY);
@@ -963,6 +978,7 @@ fn buy_now_should_refund_previous_buyer() {
item_id: 1,
minimum_price: Some(10),
buy_now_price: Some(50),
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &WEEKLY);
diff --git a/contracts/auctions/src/test/finalize_auction.rs b/contracts/auctions/src/test/finalize_auction.rs
index 45c6f0b9..ed5411cb 100644
--- a/contracts/auctions/src/test/finalize_auction.rs
+++ b/contracts/auctions/src/test/finalize_auction.rs
@@ -44,6 +44,7 @@ fn finalize_auction() {
item_id: 1,
minimum_price: None,
buy_now_price: None,
+ amount: 1,
};
collections_client.set_approval_for_transfer(&mp_client.address, &1, &true);
@@ -135,6 +136,7 @@ fn fail_to_finalyze_auction_when_endtime_not_reached() {
item_id: 1u64,
minimum_price: Some(10),
buy_now_price: Some(50),
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &WEEKLY);
@@ -178,6 +180,7 @@ fn finalize_auction_when_minimal_price_not_reached_should_refund_last_bidder() {
item_id: 1u64,
minimum_price: Some(10),
buy_now_price: Some(50),
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &WEEKLY);
@@ -203,7 +206,7 @@ fn finalize_auction_when_minimal_price_not_reached_should_refund_last_bidder() {
highest_bid: Some(5),
end_time: WEEKLY,
status: AuctionStatus::Ended,
- currency: token_client.address.clone()
+ auction_token: token_client.address.clone()
}
);
assert_eq!(token_client.balance(&mp_client.address), 0i128);
@@ -231,6 +234,7 @@ fn fail_to_finalyze_auction_when_not_correct_state() {
item_id: 1u64,
minimum_price: Some(10),
buy_now_price: Some(50),
+ amount: 1,
};
mp_client.create_auction(&item_info, &seller, &WEEKLY);
@@ -261,13 +265,19 @@ fn get_active_auctions_should_list_correct_number_of_active_auctions() {
None,
);
- nft_collection_client.mint_batch(&seller, &seller, &vec![&env, 1, 2, 3], &vec![&env, 1, 1, 1]);
+ nft_collection_client.mint_batch(
+ &seller,
+ &seller,
+ &vec![&env, 1, 2, 3],
+ &vec![&env, 10, 20, 15],
+ );
let first_item = ItemInfo {
collection_addr: nft_collection_client.address.clone(),
item_id: 1u64,
minimum_price: Some(10),
buy_now_price: Some(50),
+ amount: 10,
};
let second_item = ItemInfo {
@@ -275,6 +285,7 @@ fn get_active_auctions_should_list_correct_number_of_active_auctions() {
item_id: 2u64,
minimum_price: Some(10),
buy_now_price: Some(50),
+ amount: 20,
};
let third_item = ItemInfo {
@@ -282,6 +293,7 @@ fn get_active_auctions_should_list_correct_number_of_active_auctions() {
item_id: 3u64,
minimum_price: Some(10),
buy_now_price: Some(50),
+ amount: 15,
};
mp_client.create_auction(&first_item, &seller, &WEEKLY);
mp_client.create_auction(&second_item, &seller, &WEEKLY);
diff --git a/contracts/auctions/src/test/initialization.rs b/contracts/auctions/src/test/initialization.rs
index 8dcbf83f..2c17fe5d 100644
--- a/contracts/auctions/src/test/initialization.rs
+++ b/contracts/auctions/src/test/initialization.rs
@@ -1,5 +1,5 @@
extern crate std;
-use soroban_sdk::{testutils::Address as _, token, Address, Env};
+use soroban_sdk::{testutils::Address as _, Address, Env};
use crate::{
collection,
@@ -35,7 +35,7 @@ fn mp_should_create_auction() {
env.budget().reset_unlimited();
let seller = Address::generate(&env);
- let token_client = token::Client::new(&env, &Address::generate(&env));
+ let token_client = deploy_token_contract(&env, &Address::generate(&env));
let (mp_client, nft_collection_client) = generate_marketplace_and_collection_client(
&env,
&seller,
@@ -49,6 +49,7 @@ fn mp_should_create_auction() {
item_id: 1u64,
minimum_price: Some(10),
buy_now_price: Some(50),
+ amount: 1,
};
// check if we have minted two
@@ -64,7 +65,7 @@ fn mp_should_create_auction() {
highest_bid: None,
end_time: WEEKLY,
status: AuctionStatus::Active,
- currency: token_client.address
+ auction_token: token_client.address
}
);
}
@@ -100,7 +101,7 @@ fn mp_should_fail_to_create_auction_where_not_enought_balance_of_the_item() {
env.budget().reset_unlimited();
let seller = Address::generate(&env);
- let token_client = token::Client::new(&env, &Address::generate(&env));
+ let token_client = deploy_token_contract(&env, &Address::generate(&env));
// we don't want to use the collection from the setup method, as this will automatically
// mint an item for the auction.
let (mp_client, _) = generate_marketplace_and_collection_client(
@@ -125,6 +126,7 @@ fn mp_should_fail_to_create_auction_where_not_enought_balance_of_the_item() {
item_id: 1u64,
minimum_price: Some(10),
buy_now_price: Some(50),
+ amount: 1,
};
assert_eq!(
@@ -238,3 +240,33 @@ fn get_auction_by_seller_should_return_an_err_when_id_not_found() {
Err(Ok(ContractError::AuctionNotFound))
)
}
+
+#[test]
+fn mp_should_not_create_auction_with_item_info_with_zero_amount() {
+ let env = Env::default();
+ env.mock_all_auths();
+
+ let seller = Address::generate(&env);
+
+ let token_client = deploy_token_contract(&env, &Address::generate(&env));
+ let (mp_client, nft_collection_client) = generate_marketplace_and_collection_client(
+ &env,
+ &seller,
+ &token_client.address,
+ None,
+ None,
+ );
+
+ let item_info = ItemInfo {
+ collection_addr: nft_collection_client.address.clone(),
+ item_id: 1u64,
+ minimum_price: Some(10),
+ buy_now_price: Some(50),
+ amount: 0,
+ };
+
+ assert_eq!(
+ mp_client.try_create_auction(&item_info, &seller, &WEEKLY),
+ Err(Ok(ContractError::InvalidInputs))
+ );
+}
diff --git a/contracts/auctions/src/test/setup.rs b/contracts/auctions/src/test/setup.rs
index 958a6cd3..a12a978c 100644
--- a/contracts/auctions/src/test/setup.rs
+++ b/contracts/auctions/src/test/setup.rs
@@ -1,18 +1,31 @@
-use soroban_sdk::{testutils::Address as _, xdr::ToXdr, Address, Bytes, Env, String};
+use soroban_sdk::{
+ testutils::Address as _, token::TokenClient, xdr::ToXdr, Address, Bytes, Env, FromVal, String,
+};
use crate::{
collection::{self, Client},
contract::{MarketplaceContract, MarketplaceContractClient},
storage::ItemInfo,
- token,
};
pub const WEEKLY: u64 = 604_800u64;
pub const DAY: u64 = 86_400u64;
pub const FOUR_HOURS: u64 = 14_400u64;
+const TOKEN_WASM: &[u8] =
+ include_bytes!("../../../../target/wasm32-unknown-unknown/release/soroban_token_contract.wasm");
+
+pub fn deploy_token_contract<'a>(env: &Env, admin: &Address) -> TokenClient<'a> {
+ let token_contract = env.register(
+ TOKEN_WASM,
+ (
+ admin,
+ 7_u32,
+ String::from_val(env, &"name"),
+ String::from_val(env, &"symbol"),
+ ),
+ );
-pub fn deploy_token_contract<'a>(env: &Env, admin: &Address) -> token::Client<'a> {
- token::Client::new(env, &env.register_stellar_asset_contract(admin.clone()))
+ TokenClient::new(env, &token_contract)
}
pub mod auctions_wasm {
@@ -24,21 +37,20 @@ pub mod auctions_wasm {
pub fn generate_marketplace_and_collection_client<'a>(
env: &Env,
admin: &Address,
- currency: &Address,
+ auction_token: &Address,
name: Option,
symbol: Option,
) -> (MarketplaceContractClient<'a>, collection::Client<'a>) {
- let mp_client =
- MarketplaceContractClient::new(env, &env.register_contract(None, MarketplaceContract {}));
+ let mp_client = MarketplaceContractClient::new(env, &env.register(MarketplaceContract, ()));
- mp_client.initialize(admin, currency);
+ mp_client.initialize(admin, auction_token);
let alt_name = String::from_str(env, "Stellar kitties");
let alt_symbol = String::from_str(env, "STK");
let name = name.unwrap_or(alt_name);
let symbol = symbol.unwrap_or(alt_symbol);
- let collection_addr = env.register_contract_wasm(None, collection::WASM);
+ let collection_addr = env.register(collection::WASM, ());
let collection_client = collection::Client::new(env, &collection_addr);
collection_client.initialize(admin, &name, &symbol);
@@ -61,6 +73,7 @@ pub fn create_multiple_auctions(
item_id: idx as u64,
minimum_price: None,
buy_now_price: None,
+ amount: 1,
};
mp_client.create_auction(&item_info, seller, &WEEKLY);
}
@@ -83,7 +96,7 @@ pub fn create_and_initialize_collection<'a>(
let collection_addr = env
.deployer()
.with_address(Address::generate(env), salt)
- .deploy(env.deployer().upload_contract_wasm(collection::WASM));
+ .deploy_v2(env.deployer().upload_contract_wasm(collection::WASM), ());
let collection_client = collection::Client::new(env, &collection_addr);
collection_client.initialize(seller, &collection_name, &collection_symbol);
diff --git a/contracts/collections/src/contract.rs b/contracts/collections/src/contract.rs
index 72249074..1da18cdb 100644
--- a/contracts/collections/src/contract.rs
+++ b/contracts/collections/src/contract.rs
@@ -4,10 +4,10 @@ use crate::{
error::ContractError,
storage::{
utils::{
- get_admin, get_balance_of, is_initialized, save_admin, save_config, set_initialized,
- update_balance_of,
+ get_admin_old, get_balance_of, is_initialized, save_admin_old, save_config,
+ set_initialized, update_balance_of,
},
- Config, DataKey, OperatorApprovalKey, TransferApprovalKey, URIValue,
+ Config, DataKey, OperatorApprovalKey, TransferApprovalKey, URIValue, ADMIN,
},
ttl::{BUMP_AMOUNT, LIFETIME_THRESHOLD},
};
@@ -36,7 +36,7 @@ impl Collections {
}
save_config(&env, config)?;
- save_admin(&env, &admin)?;
+ save_admin_old(&env, &admin)?;
set_initialized(&env);
@@ -95,7 +95,7 @@ impl Collections {
operator: Address,
approved: bool,
) -> Result<(), ContractError> {
- let admin = get_admin(&env)?;
+ let admin = get_admin_old(&env)?;
admin.require_auth();
if admin == operator {
@@ -136,7 +136,7 @@ impl Collections {
nft_id: u64,
approved: bool,
) -> Result<(), ContractError> {
- let admin = get_admin(&env)?;
+ let admin = get_admin_old(&env)?;
admin.require_auth();
if admin == operator {
@@ -589,9 +589,8 @@ impl Collections {
}
#[allow(dead_code)]
- #[cfg(not(tarpaulin_include))]
pub fn upgrade(env: Env, new_wasm_hash: BytesN<32>) -> Result<(), ContractError> {
- let admin: Address = get_admin(&env)?;
+ let admin: Address = get_admin_old(&env)?;
admin.require_auth();
env.deployer().update_current_contract_wasm(new_wasm_hash);
@@ -599,21 +598,28 @@ impl Collections {
Ok(())
}
- #[cfg(test)]
#[allow(dead_code)]
+ pub fn migrate_admin(env: Env) -> Result<(), ContractError> {
+ let admin: Address = get_admin_old(&env)?;
+ admin.require_auth();
+
+ env.storage().instance().set(&ADMIN, &admin);
+
+ Ok(())
+ }
+
pub fn show_admin(env: &Env) -> Result {
- let maybe_admin = crate::storage::utils::get_admin(env)?;
+ let maybe_admin = crate::storage::utils::get_admin_old(env)?;
Ok(maybe_admin)
}
- #[cfg(test)]
- #[allow(dead_code)]
+
pub fn show_config(env: &Env) -> Result {
let mabye_config = crate::storage::utils::get_config(env)?;
Ok(mabye_config)
}
fn is_authorized_for_transfer(env: &Env, sender: &Address, nft_id: u64) -> bool {
- let admin = get_admin(env).expect("no admin found");
+ let admin = get_admin_old(env).expect("no admin found");
admin == sender.clone()
|| Self::is_approved_for_all(env.clone(), admin.clone(), sender.clone())
@@ -621,7 +627,7 @@ impl Collections {
}
fn is_authorized_for_all(env: &Env, sender: &Address) -> bool {
- let admin = get_admin(env).expect("no admin found");
+ let admin = get_admin_old(env).expect("no admin found");
admin == sender.clone() || Self::is_approved_for_all(env.clone(), admin, sender.clone())
}
diff --git a/contracts/collections/src/storage.rs b/contracts/collections/src/storage.rs
index fbc457a4..8622f6b9 100644
--- a/contracts/collections/src/storage.rs
+++ b/contracts/collections/src/storage.rs
@@ -1,9 +1,11 @@
-use soroban_sdk::{contracttype, Address, Bytes, String};
+use soroban_sdk::{contracttype, symbol_short, Address, Bytes, String, Symbol};
type NftId = u64;
type TokenId = u64;
type Balance = u64;
+pub const ADMIN: Symbol = symbol_short!("ADMIN");
+
// Struct to represent the operator approval status
#[derive(Clone)]
#[contracttype]
@@ -60,7 +62,7 @@ pub mod utils {
use crate::error::ContractError;
- use super::{Balance, Config, DataKey, TokenId};
+ use super::{Balance, Config, DataKey, TokenId, ADMIN};
pub fn get_balance_of(env: &Env, owner: &Address, id: u64) -> Result {
let balance_map: Map = env
@@ -104,7 +106,6 @@ pub mod utils {
}
#[allow(dead_code)]
- #[cfg(not(tarpaulin_include))]
pub fn get_config(env: &Env) -> Result {
let config = env
.storage()
@@ -115,14 +116,17 @@ pub mod utils {
Ok(config)
}
- pub fn save_admin(env: &Env, admin: &Address) -> Result<(), ContractError> {
+ pub fn save_admin_old(env: &Env, admin: &Address) -> Result<(), ContractError> {
env.storage().persistent().set(&DataKey::Admin, &admin);
Ok(())
}
- #[cfg(not(tarpaulin_include))]
- pub fn get_admin(env: &Env) -> Result {
+ pub fn _save_admin(env: &Env, admin: &Address) {
+ env.storage().instance().set(&ADMIN, admin);
+ }
+
+ pub fn get_admin_old(env: &Env) -> Result {
let admin = env
.storage()
.persistent()
@@ -131,6 +135,17 @@ pub mod utils {
Ok(admin)
}
+
+ pub fn _get_admin(env: &Env) -> Result {
+ let admin = env
+ .storage()
+ .instance()
+ .get(&ADMIN)
+ .ok_or(ContractError::AdminNotSet)?;
+
+ Ok(admin)
+ }
+
pub fn is_initialized(env: &Env) -> bool {
env.storage()
.persistent()
diff --git a/contracts/collections/src/test/setup.rs b/contracts/collections/src/test/setup.rs
index 3cbb097a..c701fcb9 100644
--- a/contracts/collections/src/test/setup.rs
+++ b/contracts/collections/src/test/setup.rs
@@ -8,7 +8,7 @@ pub fn initialize_collection_contract<'a>(
name: Option<&String>,
symbol: Option<&String>,
) -> CollectionsClient<'a> {
- let collections = CollectionsClient::new(env, &env.register_contract(None, Collections {}));
+ let collections = CollectionsClient::new(env, &env.register(Collections, ()));
let alt_admin = &Address::generate(env);
let alt_name = &String::from_str(env, "Stellar kitties");
diff --git a/contracts/collections/src/test/tests.rs b/contracts/collections/src/test/tests.rs
index c12e5b26..40bc973d 100644
--- a/contracts/collections/src/test/tests.rs
+++ b/contracts/collections/src/test/tests.rs
@@ -45,7 +45,7 @@ fn initialization_should_fail_when_done_twice() {
let name = &String::from_str(&env, "Stellar kitties");
let symbol = &String::from_str(&env, "STK");
- let collections = CollectionsClient::new(&env, &env.register_contract(None, Collections {}));
+ let collections = CollectionsClient::new(&env, &env.register(Collections, ()));
collections.initialize(&admin, name, symbol);
diff --git a/contracts/deployer/src/lib.rs b/contracts/deployer/src/lib.rs
index d703a516..ab9d07ae 100644
--- a/contracts/deployer/src/lib.rs
+++ b/contracts/deployer/src/lib.rs
@@ -1,8 +1,8 @@
#![no_std]
use soroban_sdk::{
- contract, contracterror, contractimpl, contractmeta, contracttype, log, vec, Address, BytesN,
- Env, IntoVal, String, Symbol, Val, Vec,
+ contract, contractimpl, contractmeta, contracttype, log, vec, Address, BytesN, Env, IntoVal,
+ String, Symbol, Val, Vec,
};
// Values used to extend the TTL of storage
@@ -51,7 +51,7 @@ impl CollectionsDeployer {
let deployed_collection = env
.deployer()
.with_address(admin.clone(), salt)
- .deploy(collections_wasm_hash);
+ .deploy_v2(collections_wasm_hash, ());
let init_fn = Symbol::new(&env, "initialize");
let init_fn_args: Vec = vec![
@@ -63,17 +63,17 @@ impl CollectionsDeployer {
let _: Val = env.invoke_contract(&deployed_collection, &init_fn, init_fn_args);
save_collection_with_generic_key(&env, name.clone());
- save_collection_with_admin_address_as_key(&env, name, admin);
+ save_collection_with_admin_address_as_key(&env, admin, deployed_collection.clone(), name);
deployed_collection
}
- pub fn query_all_collections(env: &Env) -> Result, ContractError> {
+ pub fn query_all_collections(env: &Env) -> Vec {
let maybe_all = env
.storage()
.persistent()
.get(&DataKey::AllCollections)
- .ok_or(ContractError::NoCollectionsSaved)?;
+ .unwrap_or(Vec::new(env));
env.storage()
.persistent()
@@ -86,19 +86,19 @@ impl CollectionsDeployer {
)
});
- Ok(maybe_all)
+ maybe_all
}
pub fn query_collection_by_creator(
env: &Env,
creator: Address,
- ) -> Result, ContractError> {
+ ) -> Vec {
let data_key = DataKey::Creator(creator);
let maybe_collections = env
.storage()
.persistent()
.get(&data_key)
- .ok_or(ContractError::CreatorHasNoCollections)?;
+ .unwrap_or(Vec::new(env));
env.storage().persistent().has(&data_key).then(|| {
env.storage()
@@ -106,12 +106,19 @@ impl CollectionsDeployer {
.extend_ttl(&data_key, LIFETIME_THRESHOLD, BUMP_AMOUNT)
});
- Ok(maybe_collections)
+ maybe_collections
}
}
// ---------- Storage types ----------
+#[contracttype]
+#[derive(Clone, Debug)]
+pub struct CollectionByCreatorResponse {
+ collection: Address,
+ name: String,
+}
+
#[contracttype]
#[derive(Clone)]
pub enum DataKey {
@@ -121,14 +128,6 @@ pub enum DataKey {
Creator(Address),
}
-#[contracterror]
-#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
-#[repr(u32)]
-pub enum ContractError {
- NoCollectionsSaved = 0,
- CreatorHasNoCollections = 1,
-}
-
pub fn set_initialized(env: &Env) {
env.storage().instance().set(&DataKey::IsInitialized, &());
env.storage()
@@ -197,16 +196,26 @@ pub fn save_collection_with_generic_key(env: &Env, name: String) {
);
}
-pub fn save_collection_with_admin_address_as_key(env: &Env, name: String, creator: Address) {
+pub fn save_collection_with_admin_address_as_key(
+ env: &Env,
+ creator: Address,
+ collection_addr: Address,
+ name: String,
+) {
let data_key = DataKey::Creator(creator);
- let mut existent_collection: Vec = env
+ let mut existent_collection: Vec = env
.storage()
.persistent()
.get(&data_key)
.unwrap_or(vec![&env]);
- existent_collection.push_back(name);
+ let new_collection = CollectionByCreatorResponse {
+ collection: collection_addr,
+ name: name.clone(),
+ };
+
+ existent_collection.push_back(new_collection);
env.storage()
.persistent()
diff --git a/contracts/deployer/src/tests.rs b/contracts/deployer/src/tests.rs
index 91560007..8e72ba34 100644
--- a/contracts/deployer/src/tests.rs
+++ b/contracts/deployer/src/tests.rs
@@ -1,4 +1,4 @@
-use crate::{CollectionsDeployer, CollectionsDeployerClient};
+use crate::{CollectionByCreatorResponse, CollectionsDeployer, CollectionsDeployerClient};
#[cfg(test)]
use soroban_sdk::{testutils::Address as _, vec, Address, BytesN, Env, String};
@@ -16,8 +16,7 @@ mod collections {
#[test]
fn test_deploy_collection_from_contract() {
let env = Env::default();
- let client =
- CollectionsDeployerClient::new(&env, &env.register_contract(None, CollectionsDeployer));
+ let client = CollectionsDeployerClient::new(&env, &env.register(CollectionsDeployer, ()));
// Upload the Wasm to be deployed from the deployer contract.
// This can also be called from within a contract if needed.
@@ -33,12 +32,12 @@ fn test_deploy_collection_from_contract() {
let name = String::from_str(&env, "Stellar Kitties");
let symbol = String::from_str(&env, "STK");
- client.deploy_new_collection(&salt, &creator, &name, &symbol);
+ let collection = client.deploy_new_collection(&salt, &creator, &name, &symbol);
assert_eq!(client.query_all_collections(), vec![&env, name.clone()]);
assert_eq!(
client.query_collection_by_creator(&creator),
- vec![&env, name]
+ vec![&env, CollectionByCreatorResponse { collection, name }]
);
}
@@ -47,8 +46,7 @@ fn test_deploy_multiple_collections() {
let env = Env::default();
env.mock_all_auths();
- let client =
- CollectionsDeployerClient::new(&env, &env.register_contract(None, CollectionsDeployer));
+ let client = CollectionsDeployerClient::new(&env, &env.register(CollectionsDeployer, ()));
// Upload the Wasm to be deployed from the deployer contract.
// This can also be called from within a contract if needed.
@@ -71,19 +69,19 @@ fn test_deploy_multiple_collections() {
let third_collection_name = String::from_str(&env, "Horror of Cthulhu");
let third_collection_symbol = String::from_str(&env, "HoC");
- client.deploy_new_collection(
+ let first = client.deploy_new_collection(
&first_salt,
&creator,
&first_collection_name,
&first_collection_symbol,
);
- client.deploy_new_collection(
+ let second = client.deploy_new_collection(
&second_salt,
&creator,
&second_collection_name,
&second_collection_symbol,
);
- client.deploy_new_collection(
+ let third = client.deploy_new_collection(
&third_salt,
&bob,
&third_collection_name,
@@ -102,12 +100,28 @@ fn test_deploy_multiple_collections() {
assert_eq!(
client.query_collection_by_creator(&creator),
- vec![&env, first_collection_name, second_collection_name]
+ vec![
+ &env,
+ CollectionByCreatorResponse {
+ collection: first,
+ name: first_collection_name,
+ },
+ CollectionByCreatorResponse {
+ collection: second,
+ name: second_collection_name,
+ },
+ ]
);
assert_eq!(
client.query_collection_by_creator(&bob),
- vec![&env, third_collection_name]
+ vec![
+ &env,
+ CollectionByCreatorResponse {
+ collection: third,
+ name: third_collection_name
+ }
+ ]
);
}
@@ -118,7 +132,7 @@ fn test_deploy_multiple_collections() {
fn initialize_twice() {
let env = Env::default();
let deployer_client =
- CollectionsDeployerClient::new(&env, &env.register_contract(None, CollectionsDeployer));
+ CollectionsDeployerClient::new(&env, &env.register(CollectionsDeployer, ()));
let wasm_hash = env.deployer().upload_contract_wasm(collections::WASM);
deployer_client.initialize(&wasm_hash);
diff --git a/contracts/token/Cargo.lock b/contracts/token/Cargo.lock
index 1630e280..a3591231 100644
--- a/contracts/token/Cargo.lock
+++ b/contracts/token/Cargo.lock
@@ -3,19 +3,22 @@
version = 3
[[package]]
-name = "addr2line"
-version = "0.21.0"
+name = "ahash"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
dependencies = [
- "gimli",
+ "cfg-if",
+ "once_cell",
+ "version_check",
+ "zerocopy",
]
[[package]]
-name = "adler"
-version = "1.0.2"
+name = "android-tzdata"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "android_system_properties"
@@ -36,37 +39,134 @@ dependencies = [
]
[[package]]
-name = "autocfg"
-version = "1.1.0"
+name = "ark-bls12-381"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488"
+dependencies = [
+ "ark-ec",
+ "ark-ff",
+ "ark-serialize",
+ "ark-std",
+]
[[package]]
-name = "backtrace"
-version = "0.3.69"
+name = "ark-ec"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
+checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba"
dependencies = [
- "addr2line",
- "cc",
- "cfg-if",
- "libc",
- "miniz_oxide",
- "object",
- "rustc-demangle",
+ "ark-ff",
+ "ark-poly",
+ "ark-serialize",
+ "ark-std",
+ "derivative",
+ "hashbrown 0.13.2",
+ "itertools",
+ "num-traits",
+ "zeroize",
]
[[package]]
-name = "base16ct"
-version = "0.2.0"
+name = "ark-ff"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
+checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba"
+dependencies = [
+ "ark-ff-asm",
+ "ark-ff-macros",
+ "ark-serialize",
+ "ark-std",
+ "derivative",
+ "digest",
+ "itertools",
+ "num-bigint",
+ "num-traits",
+ "paste",
+ "rustc_version",
+ "zeroize",
+]
+
+[[package]]
+name = "ark-ff-asm"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348"
+dependencies = [
+ "quote",
+ "syn 1.0.109",
+]
[[package]]
-name = "base32"
+name = "ark-ff-macros"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565"
+dependencies = [
+ "num-bigint",
+ "num-traits",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "ark-poly"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf"
+dependencies = [
+ "ark-ff",
+ "ark-serialize",
+ "ark-std",
+ "derivative",
+ "hashbrown 0.13.2",
+]
+
+[[package]]
+name = "ark-serialize"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5"
+dependencies = [
+ "ark-serialize-derive",
+ "ark-std",
+ "digest",
+ "num-bigint",
+]
+
+[[package]]
+name = "ark-serialize-derive"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "ark-std"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa"
+checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185"
+dependencies = [
+ "num-traits",
+ "rand",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+
+[[package]]
+name = "base16ct"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
[[package]]
name = "base64"
@@ -76,9 +176,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]]
name = "base64"
-version = "0.21.0"
+version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "base64ct"
@@ -97,9 +197,15 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.12.1"
+version = "3.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes-lit"
@@ -110,14 +216,17 @@ dependencies = [
"num-bigint",
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.79",
]
[[package]]
name = "cc"
-version = "1.0.79"
+version = "1.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
+checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1"
+dependencies = [
+ "shlex",
+]
[[package]]
name = "cfg-if"
@@ -127,44 +236,34 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
-version = "0.4.24"
+version = "0.4.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b"
+checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
dependencies = [
+ "android-tzdata",
"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",
+ "windows-targets",
]
[[package]]
name = "const-oid"
-version = "0.9.5"
+version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f"
+checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
[[package]]
name = "core-foundation-sys"
-version = "0.8.4"
+version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "cpufeatures"
-version = "0.2.7"
+version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58"
+checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0"
dependencies = [
"libc",
]
@@ -182,9 +281,9 @@ dependencies = [
[[package]]
name = "crypto-bigint"
-version = "0.5.2"
+version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15"
+checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
dependencies = [
"generic-array",
"rand_core",
@@ -204,26 +303,25 @@ dependencies = [
[[package]]
name = "ctor"
-version = "0.2.2"
+version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1586fa608b1dab41f667475b4a41faec5ba680aee428bfa5de4ea520fdc6e901"
+checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f"
dependencies = [
"quote",
- "syn 2.0.39",
+ "syn 2.0.79",
]
[[package]]
name = "curve25519-dalek"
-version = "4.1.1"
+version = "4.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c"
+checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
dependencies = [
"cfg-if",
"cpufeatures",
"curve25519-dalek-derive",
"digest",
"fiat-crypto",
- "platforms",
"rustc_version",
"subtle",
"zeroize",
@@ -231,102 +329,85 @@ dependencies = [
[[package]]
name = "curve25519-dalek-derive"
-version = "0.1.0"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b"
+checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.79",
]
[[package]]
-name = "cxx"
-version = "1.0.94"
+name = "darling"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93"
+checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
dependencies = [
- "cc",
- "cxxbridge-flags",
- "cxxbridge-macro",
- "link-cplusplus",
+ "darling_core",
+ "darling_macro",
]
[[package]]
-name = "cxx-build"
-version = "1.0.94"
+name = "darling_core"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b"
+checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
dependencies = [
- "cc",
- "codespan-reporting",
- "once_cell",
+ "fnv",
+ "ident_case",
"proc-macro2",
"quote",
- "scratch",
- "syn 2.0.39",
+ "strsim",
+ "syn 2.0.79",
]
[[package]]
-name = "cxxbridge-flags"
-version = "1.0.94"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb"
-
-[[package]]
-name = "cxxbridge-macro"
-version = "1.0.94"
+name = "darling_macro"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5"
+checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
- "proc-macro2",
+ "darling_core",
"quote",
- "syn 2.0.39",
+ "syn 2.0.79",
]
[[package]]
-name = "darling"
-version = "0.20.1"
+name = "data-encoding"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944"
-dependencies = [
- "darling_core",
- "darling_macro",
-]
+checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2"
[[package]]
-name = "darling_core"
-version = "0.20.1"
+name = "der"
+version = "0.7.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb"
+checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0"
dependencies = [
- "fnv",
- "ident_case",
- "proc-macro2",
- "quote",
- "strsim",
- "syn 2.0.39",
+ "const-oid",
+ "zeroize",
]
[[package]]
-name = "darling_macro"
-version = "0.20.1"
+name = "deranged"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
dependencies = [
- "darling_core",
- "quote",
- "syn 2.0.39",
+ "powerfmt",
+ "serde",
]
[[package]]
-name = "der"
-version = "0.7.6"
+name = "derivative"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17"
+checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
dependencies = [
- "const-oid",
- "zeroize",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
]
[[package]]
@@ -337,7 +418,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.79",
]
[[package]]
@@ -354,15 +435,15 @@ dependencies = [
[[package]]
name = "downcast-rs"
-version = "1.2.0"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
+checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
[[package]]
name = "ecdsa"
-version = "0.16.7"
+version = "0.16.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428"
+checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca"
dependencies = [
"der",
"digest",
@@ -373,9 +454,9 @@ dependencies = [
[[package]]
name = "ed25519"
-version = "2.2.2"
+version = "2.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d"
+checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53"
dependencies = [
"pkcs8",
"signature",
@@ -398,15 +479,15 @@ dependencies = [
[[package]]
name = "either"
-version = "1.8.1"
+version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
+checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]]
name = "elliptic-curve"
-version = "0.13.5"
+version = "0.13.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b"
+checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47"
dependencies = [
"base16ct",
"crypto-bigint",
@@ -450,9 +531,9 @@ dependencies = [
[[package]]
name = "fiat-crypto"
-version = "0.2.5"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7"
+checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
[[package]]
name = "fnv"
@@ -473,9 +554,9 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.11"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f"
+checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"js-sys",
@@ -484,12 +565,6 @@ dependencies = [
"wasm-bindgen",
]
-[[package]]
-name = "gimli"
-version = "0.28.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
-
[[package]]
name = "group"
version = "0.13.0"
@@ -509,9 +584,18 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "hashbrown"
-version = "0.14.3"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
+dependencies = [
+ "ahash",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
+checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb"
[[package]]
name = "hex"
@@ -539,26 +623,25 @@ dependencies = [
[[package]]
name = "iana-time-zone"
-version = "0.1.56"
+version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c"
+checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
- "windows",
+ "windows-core",
]
[[package]]
name = "iana-time-zone-haiku"
-version = "0.1.1"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
- "cxx",
- "cxx-build",
+ "cc",
]
[[package]]
@@ -580,12 +663,12 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "2.1.0"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
+checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
dependencies = [
"equivalent",
- "hashbrown 0.14.3",
+ "hashbrown 0.15.0",
"serde",
]
@@ -597,33 +680,33 @@ checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590"
[[package]]
name = "itertools"
-version = "0.11.0"
+version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
"either",
]
[[package]]
name = "itoa"
-version = "1.0.6"
+version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
name = "js-sys"
-version = "0.3.61"
+version = "0.3.70"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
+checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a"
dependencies = [
"wasm-bindgen",
]
[[package]]
name = "k256"
-version = "0.13.1"
+version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc"
+checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b"
dependencies = [
"cfg-if",
"ecdsa",
@@ -633,113 +716,87 @@ dependencies = [
[[package]]
name = "keccak"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940"
+checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654"
dependencies = [
"cpufeatures",
]
[[package]]
name = "libc"
-version = "0.2.150"
+version = "0.2.159"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
+checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5"
[[package]]
name = "libm"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb"
-
-[[package]]
-name = "link-cplusplus"
-version = "1.0.8"
+version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5"
-dependencies = [
- "cc",
-]
+checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
[[package]]
name = "log"
-version = "0.4.17"
+version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
-dependencies = [
- "cfg-if",
-]
+checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "memchr"
-version = "2.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
-
-[[package]]
-name = "miniz_oxide"
-version = "0.7.1"
+version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
-dependencies = [
- "adler",
-]
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "num-bigint"
-version = "0.4.3"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
+checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
dependencies = [
- "autocfg",
"num-integer",
"num-traits",
]
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
[[package]]
name = "num-derive"
-version = "0.4.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712"
+checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.79",
]
[[package]]
name = "num-integer"
-version = "0.1.45"
+version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
+checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
dependencies = [
- "autocfg",
"num-traits",
]
[[package]]
name = "num-traits"
-version = "0.2.17"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
-[[package]]
-name = "object"
-version = "0.32.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0"
-dependencies = [
- "memchr",
-]
-
[[package]]
name = "once_cell"
-version = "1.17.1"
+version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
+checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "p256"
@@ -755,9 +812,9 @@ dependencies = [
[[package]]
name = "paste"
-version = "1.0.12"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79"
+checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "pkcs8"
@@ -770,50 +827,53 @@ dependencies = [
]
[[package]]
-name = "platforms"
-version = "3.0.2"
+name = "powerfmt"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]]
name = "ppv-lite86"
-version = "0.2.17"
+version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
+dependencies = [
+ "zerocopy",
+]
[[package]]
name = "prettyplease"
-version = "0.2.4"
+version = "0.2.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ceca8aaf45b5c46ec7ed39fff75f57290368c1846d33d24a122ca81416ab058"
+checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba"
dependencies = [
"proc-macro2",
- "syn 2.0.39",
+ "syn 2.0.79",
]
[[package]]
name = "primeorder"
-version = "0.13.3"
+version = "0.13.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7dbe9ed3b56368bd99483eb32fe9c17fdd3730aebadc906918ce78d54c7eeb4"
+checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6"
dependencies = [
"elliptic-curve",
]
[[package]]
name = "proc-macro2"
-version = "1.0.69"
+version = "1.0.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
+checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.33"
+version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
+checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
@@ -858,38 +918,26 @@ dependencies = [
"subtle",
]
-[[package]]
-name = "rustc-demangle"
-version = "0.1.23"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
-
[[package]]
name = "rustc_version"
-version = "0.4.0"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
dependencies = [
"semver",
]
[[package]]
name = "ryu"
-version = "1.0.13"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
-
-[[package]]
-name = "scratch"
-version = "1.0.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1"
+checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
[[package]]
name = "sec1"
-version = "0.7.2"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e"
+checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc"
dependencies = [
"base16ct",
"der",
@@ -900,53 +948,55 @@ dependencies = [
[[package]]
name = "semver"
-version = "1.0.17"
+version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed"
+checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
[[package]]
name = "serde"
-version = "1.0.192"
+version = "1.0.210"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001"
+checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.192"
+version = "1.0.210"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1"
+checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.79",
]
[[package]]
name = "serde_json"
-version = "1.0.108"
+version = "1.0.128"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b"
+checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8"
dependencies = [
"itoa",
+ "memchr",
"ryu",
"serde",
]
[[package]]
name = "serde_with"
-version = "3.4.0"
+version = "3.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23"
+checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817"
dependencies = [
- "base64 0.21.0",
+ "base64 0.22.1",
"chrono",
"hex",
"indexmap 1.9.3",
- "indexmap 2.1.0",
+ "indexmap 2.6.0",
"serde",
+ "serde_derive",
"serde_json",
"serde_with_macros",
"time",
@@ -954,14 +1004,14 @@ dependencies = [
[[package]]
name = "serde_with_macros"
-version = "3.4.0"
+version = "3.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788"
+checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d"
dependencies = [
"darling",
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.79",
]
[[package]]
@@ -985,11 +1035,17 @@ dependencies = [
"keccak",
]
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
[[package]]
name = "signature"
-version = "2.1.0"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500"
+checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
dependencies = [
"digest",
"rand_core",
@@ -997,27 +1053,27 @@ dependencies = [
[[package]]
name = "smallvec"
-version = "1.10.0"
+version = "1.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
+checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
[[package]]
name = "soroban-builtin-sdk-macros"
-version = "21.2.0"
+version = "22.0.0-rc.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44877373b3dc6c662377cb1600e3a62706d75e484b6064f9cd22e467c676b159"
+checksum = "c45d2492cd44f05cc79eeb857985f153f12a4423ce51b4b746b5925024c473b1"
dependencies = [
"itertools",
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.79",
]
[[package]]
name = "soroban-env-common"
-version = "21.2.0"
+version = "22.0.0-rc.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "590add16843a61b01844e19e89bccaaee6aa21dc76809017b0662c17dc139ee9"
+checksum = "39b6d2ec8955243394278e1fae88be3b367fcfed9cf74e5044799a90786a8642"
dependencies = [
"arbitrary",
"crate-git-revision",
@@ -1034,9 +1090,9 @@ dependencies = [
[[package]]
name = "soroban-env-guest"
-version = "21.2.0"
+version = "22.0.0-rc.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05ec8dc43acdd6c7e7b371acf44fc1a7dac24934ae3b2f05fafd618818548176"
+checksum = "4002fc582cd20cc9b9fbb73959bc5d6b5b15feda11485cbfab0c28e78ecbab3e"
dependencies = [
"soroban-env-common",
"static_assertions",
@@ -1044,11 +1100,14 @@ dependencies = [
[[package]]
name = "soroban-env-host"
-version = "21.2.0"
+version = "22.0.0-rc.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e25aaffe0c62eb65e0e349f725b4b8b13ad0764d78a15aab5bbccb5c4797726"
+checksum = "8cb9be0260d39a648db0d33e1c6f8f494ec0c4f5be2b8a0a4e15ed4b7c6a92b0"
dependencies = [
- "backtrace",
+ "ark-bls12-381",
+ "ark-ec",
+ "ark-ff",
+ "ark-serialize",
"curve25519-dalek",
"ecdsa",
"ed25519-dalek",
@@ -1077,9 +1136,9 @@ dependencies = [
[[package]]
name = "soroban-env-macros"
-version = "21.2.0"
+version = "22.0.0-rc.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e16b761459fdf3c4b62b24df3941498d14e5246e6fadfb4774ed8114d243aa4"
+checksum = "a328297a568ae98999fdb06902e3362dfd8a2bfa9abea40beaeb7dc93a402fe7"
dependencies = [
"itertools",
"proc-macro2",
@@ -1087,14 +1146,14 @@ dependencies = [
"serde",
"serde_json",
"stellar-xdr",
- "syn 2.0.39",
+ "syn 2.0.79",
]
[[package]]
name = "soroban-ledger-snapshot"
-version = "21.4.0"
+version = "22.0.0-rc.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eaebb7961fc6d8f47e00d404d9240f51aba85df9d67a4f556ef1c6057b5327a8"
+checksum = "26d76fe31da93a3a9b234bd5004eaf7033167b9028afa082a3203028236e1457"
dependencies = [
"serde",
"serde_json",
@@ -1106,15 +1165,17 @@ dependencies = [
[[package]]
name = "soroban-sdk"
-version = "21.4.0"
+version = "22.0.0-rc.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60cd55eb88cbe1d9e7fe3ab1845c7c10c26b27e2d226e973150e5b55580aa359"
+checksum = "3c12a55fe699c0a98c5974da3a7a35721a222b7aafa18df9a95c47ccec918790"
dependencies = [
"arbitrary",
"bytes-lit",
"ctor",
+ "derive_arbitrary",
"ed25519-dalek",
"rand",
+ "rustc_version",
"serde",
"serde_json",
"soroban-env-guest",
@@ -1126,9 +1187,9 @@ dependencies = [
[[package]]
name = "soroban-sdk-macros"
-version = "21.4.0"
+version = "22.0.0-rc.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1916985d1871aa340d7eec834c387f74f80231c846801193c3252266a60a41e"
+checksum = "2af0486014f57d0e65059524cfe1a6ad769c1c7298a6a614fe65a2de9996c7f0"
dependencies = [
"crate-git-revision",
"darling",
@@ -1141,14 +1202,14 @@ dependencies = [
"soroban-spec",
"soroban-spec-rust",
"stellar-xdr",
- "syn 2.0.39",
+ "syn 2.0.79",
]
[[package]]
name = "soroban-spec"
-version = "21.4.0"
+version = "22.0.0-rc.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "439faff6a155975a9951f27aaa04ae8ef3fd8fe9413d202e2ea2ff094a593449"
+checksum = "89dda02aa7a350e2e1e532399372d5954ce95e77249d45d9c5be73ba9e62e20f"
dependencies = [
"base64 0.13.1",
"stellar-xdr",
@@ -1158,9 +1219,9 @@ dependencies = [
[[package]]
name = "soroban-spec-rust"
-version = "21.4.0"
+version = "22.0.0-rc.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20b2a571055f1ed15427ccb8d34ce4208b4135666eade124cfbecfc010fa2ea3"
+checksum = "c954e78b857b003f8593729eb9cc4e77c7597c4199f1c293b5a9fba3d9e013c7"
dependencies = [
"prettyplease",
"proc-macro2",
@@ -1168,7 +1229,7 @@ dependencies = [
"sha2",
"soroban-spec",
"stellar-xdr",
- "syn 2.0.39",
+ "syn 2.0.79",
"thiserror",
]
@@ -1182,9 +1243,9 @@ dependencies = [
[[package]]
name = "soroban-token-sdk"
-version = "21.4.0"
+version = "22.0.0-rc.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63be4a8070dab1ac67007da10e51e0c3366046ead5dbff974b3cec468532250b"
+checksum = "f71edefeace8a2cb48fdb63932c7cb5fee38bf84df44e6f405ef443b5f82756d"
dependencies = [
"soroban-sdk",
]
@@ -1210,9 +1271,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
[[package]]
name = "spki"
-version = "0.7.2"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a"
+checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
dependencies = [
"base64ct",
"der",
@@ -1226,20 +1287,20 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "stellar-strkey"
-version = "0.0.8"
+version = "0.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12d2bf45e114117ea91d820a846fd1afbe3ba7d717988fee094ce8227a3bf8bd"
+checksum = "5e3aa3ed00e70082cb43febc1c2afa5056b9bb3e348bbb43d0cd0aa88a611144"
dependencies = [
- "base32",
"crate-git-revision",
+ "data-encoding",
"thiserror",
]
[[package]]
name = "stellar-xdr"
-version = "21.2.0"
+version = "22.0.0-rc.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2675a71212ed39a806e415b0dbf4702879ff288ec7f5ee996dda42a135512b50"
+checksum = "c88dc0e928b9cb65ea43836b52560bb4ead3e32895f5019ca223dc7cd1966cbf"
dependencies = [
"arbitrary",
"base64 0.13.1",
@@ -1253,15 +1314,15 @@ dependencies = [
[[package]]
name = "strsim"
-version = "0.10.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "subtle"
-version = "2.5.0"
+version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"
+checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "syn"
@@ -1276,51 +1337,45 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.39"
+version = "2.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
+checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
-[[package]]
-name = "termcolor"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
-dependencies = [
- "winapi-util",
-]
-
[[package]]
name = "thiserror"
-version = "1.0.40"
+version = "1.0.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
+checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.40"
+version = "1.0.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
+checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.79",
]
[[package]]
name = "time"
-version = "0.3.20"
+version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
+ "deranged",
"itoa",
+ "num-conv",
+ "powerfmt",
"serde",
"time-core",
"time-macros",
@@ -1328,42 +1383,37 @@ dependencies = [
[[package]]
name = "time-core"
-version = "0.1.0"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
-version = "0.2.8"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
+ "num-conv",
"time-core",
]
[[package]]
name = "typenum"
-version = "1.16.0"
+version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]]
name = "unicode-ident"
-version = "1.0.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
-
-[[package]]
-name = "unicode-width"
-version = "0.1.10"
+version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
[[package]]
name = "version_check"
-version = "0.9.4"
+version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "wasi"
@@ -1373,34 +1423,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.84"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b"
+checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5"
dependencies = [
"cfg-if",
+ "once_cell",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.84"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
+checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.79",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.84"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5"
+checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -1408,28 +1459,28 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.84"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
+checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
dependencies = [
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.79",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.84"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
+checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
[[package]]
name = "wasmi_arena"
-version = "0.4.0"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468"
+checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073"
[[package]]
name = "wasmi_core"
@@ -1449,68 +1500,38 @@ version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a58e28b80dd8340cb07b8242ae654756161f6fc8d0038123d679b7b99964fa50"
dependencies = [
- "indexmap 2.1.0",
+ "indexmap 2.6.0",
"semver",
]
[[package]]
name = "wasmparser-nostd"
-version = "0.100.1"
+version = "0.100.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724"
+checksum = "d5a015fe95f3504a94bb1462c717aae75253e39b9dd6c3fb1062c934535c64aa"
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"
+name = "windows-core"
+version = "0.52.0"
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 = "windows"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
-version = "0.48.0"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
+ "windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
@@ -1519,48 +1540,89 @@ dependencies = [
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.48.0"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.48.0"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
-version = "0.48.0"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
-version = "0.48.0"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.48.0"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.48.0"
+version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.48.0"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "zerocopy"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
+dependencies = [
+ "byteorder",
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.79",
+]
[[package]]
name = "zeroize"
-version = "1.6.0"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
+dependencies = [
+ "zeroize_derive",
+]
+
+[[package]]
+name = "zeroize_derive"
+version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9"
+checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.79",
+]
diff --git a/contracts/token/README.md b/contracts/token/README.md
deleted file mode 100644
index 33cbfcc9..00000000
--- a/contracts/token/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# TOKEN
-
-```Follows the example of [Soroban token](https://github.com/stellar/soroban-examples/tree/main/token)```
diff --git a/contracts/token/src/admin.rs b/contracts/token/src/admin.rs
index a820bf04..0bbf0d55 100644
--- a/contracts/token/src/admin.rs
+++ b/contracts/token/src/admin.rs
@@ -2,11 +2,6 @@ use soroban_sdk::{Address, Env};
use crate::storage_types::DataKey;
-pub fn has_administrator(e: &Env) -> bool {
- let key = DataKey::Admin;
- e.storage().instance().has(&key)
-}
-
pub fn read_administrator(e: &Env) -> Address {
let key = DataKey::Admin;
e.storage().instance().get(&key).unwrap()
diff --git a/contracts/token/src/contract.rs b/contracts/token/src/contract.rs
index 3722b3dd..7651c1c2 100644
--- a/contracts/token/src/contract.rs
+++ b/contracts/token/src/contract.rs
@@ -1,6 +1,6 @@
//! This contract demonstrates a sample implementation of the Soroban token
//! interface.
-use crate::admin::{has_administrator, read_administrator, write_administrator};
+use crate::admin::{read_administrator, write_administrator};
use crate::allowance::{read_allowance, spend_allowance, write_allowance};
use crate::balance::{read_balance, receive_balance, spend_balance};
use crate::metadata::{read_decimal, read_name, read_symbol, write_metadata};
@@ -23,15 +23,11 @@ pub struct Token;
#[contractimpl]
impl Token {
- pub fn initialize(e: Env, admin: Address, decimal: u32, name: String, symbol: String) {
- if has_administrator(&e) {
- panic!("already initialized")
- }
- write_administrator(&e, &admin);
+ pub fn __constructor(e: Env, admin: Address, decimal: u32, name: String, symbol: String) {
if decimal > 18 {
panic!("Decimal must not be greater than 18");
}
-
+ write_administrator(&e, &admin);
write_metadata(
&e,
TokenMetadata {
@@ -67,7 +63,6 @@ impl Token {
TokenUtils::new(&e).events().set_admin(admin, new_admin);
}
- #[cfg_attr(not(test), allow(dead_code))]
#[cfg(test)]
pub fn get_allowance(e: Env, from: Address, spender: Address) -> Option {
let key = DataKey::Allowance(AllowanceDataKey { from, spender });
diff --git a/contracts/token/src/test.rs b/contracts/token/src/test.rs
index c3718c0e..1543ce69 100644
--- a/contracts/token/src/test.rs
+++ b/contracts/token/src/test.rs
@@ -5,13 +5,20 @@ use crate::{contract::Token, TokenClient};
use soroban_sdk::{
symbol_short,
testutils::{Address as _, AuthorizedFunction, AuthorizedInvocation},
- Address, Env, IntoVal, Symbol,
+ Address, Env, FromVal, IntoVal, String, Symbol,
};
fn create_token<'a>(e: &Env, admin: &Address) -> TokenClient<'a> {
- let token = TokenClient::new(e, &e.register_contract(None, Token {}));
- token.initialize(admin, &7, &"name".into_val(e), &"symbol".into_val(e));
- token
+ let token_contract = e.register(
+ Token,
+ (
+ admin,
+ 7_u32,
+ String::from_val(e, &"name"),
+ String::from_val(e, &"symbol"),
+ ),
+ );
+ TokenClient::new(e, &token_contract)
}
#[test]
@@ -231,23 +238,23 @@ fn transfer_from_insufficient_allowance() {
token.transfer_from(&user3, &user1, &user2, &101);
}
-#[test]
-#[should_panic(expected = "already initialized")]
-fn initialize_already_initialized() {
- let e = Env::default();
- let admin = Address::generate(&e);
- let token = create_token(&e, &admin);
-
- token.initialize(&admin, &10, &"name".into_val(&e), &"symbol".into_val(&e));
-}
-
#[test]
#[should_panic(expected = "Decimal must not be greater than 18")]
fn decimal_is_over_eighteen() {
let e = Env::default();
let admin = Address::generate(&e);
- let token = TokenClient::new(&e, &e.register_contract(None, Token {}));
- token.initialize(&admin, &19, &"name".into_val(&e), &"symbol".into_val(&e));
+ let _ = TokenClient::new(
+ &e,
+ &e.register(
+ Token,
+ (
+ admin,
+ 19_u32,
+ String::from_val(&e, &"name"),
+ String::from_val(&e, &"symbol"),
+ ),
+ ),
+ );
}
#[test]
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
index dcb84ff5..190a7344 100755
--- a/scripts/deploy.sh
+++ b/scripts/deploy.sh
@@ -30,7 +30,7 @@ echo "Contracts optimized."
echo "Deploy and install the deployer contract and capture its contract ID and hash..."
DEPLOYER_ADDR=$(
-stellar contract deploy \
+soroban contract deploy \
--wasm phoenix_nft_deployer.optimized.wasm \
--source $IDENTITY_STRING \
--network $NETWORK
@@ -48,7 +48,7 @@ echo "Deployer contract deployed and installed."
echo "Deploy and install the collections contract and capture its contract ID and hash..."
COLLECTIONS_ADDR=$(
-stellar contract deploy \
+soroban contract deploy \
--wasm phoenix_nft_collections.optimized.wasm \
--source $IDENTITY_STRING \
--network $NETWORK
@@ -63,7 +63,7 @@ soroban contract install \
echo "Collections contract deployed and installed."
-echo "Deploy and install the collections contract and capture its contract ID and hash..."
+echo "Deploy and install the auctions contract and capture its contract ID and hash..."
AUCTION_ADDR=$(
stellar contract deploy \
@@ -83,7 +83,6 @@ echo "Auctions contract deployed and installed."
echo "Initialize deployer with the collections hash..."
-
soroban contract invoke \
--id $DEPLOYER_ADDR \
--source $IDENTITY_STRING \