diff --git a/stellar/Cargo.lock b/stellar/Cargo.lock index 3f2a0f3..a96799e 100644 --- a/stellar/Cargo.lock +++ b/stellar/Cargo.lock @@ -152,9 +152,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "base16ct" @@ -189,11 +189,20 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + [[package]] name = "bumpalo" -version = "3.20.2" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "bytes-lit" @@ -204,14 +213,14 @@ dependencies = [ "num-bigint", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] name = "cc" -version = "1.2.60" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" +checksum = "c89588d05638b5b4594a3348a2d6c20277e43a7f5c5202b05cc56888475a47b8" dependencies = [ "find-msvc-tools", "shlex", @@ -225,9 +234,9 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "chrono" -version = "0.4.44" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ "iana-time-zone", "num-traits", @@ -296,7 +305,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" dependencies = [ "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -323,7 +332,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -357,7 +366,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -370,7 +379,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -381,7 +390,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -392,14 +401,14 @@ checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ "darling_core 0.23.0", "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] name = "data-encoding" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" +checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" [[package]] name = "der" @@ -417,7 +426,6 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ - "powerfmt", "serde_core", ] @@ -440,7 +448,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -507,9 +515,9 @@ dependencies = [ [[package]] name = "either" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] name = "elliptic-curve" @@ -543,9 +551,9 @@ checksum = "2bfcf67fea2815c2fc3b90873fae90957be12ff417335dfadc7f52927feb03b2" [[package]] name = "ethnum" -version = "1.5.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca81e6b4777c89fd810c25a4be2b1bd93ea034fbe58e6a75216a34c6b82c539b" +checksum = "40404c3f5f511ec4da6fe866ddf6a717c309fdbb69fbbad7b0f3edab8f2e835f" [[package]] name = "ff" @@ -575,6 +583,30 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "futures-core" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" + +[[package]] +name = "futures-task" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" + +[[package]] +name = "futures-util" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "slab", +] + [[package]] name = "generic-array" version = "0.14.9" @@ -627,9 +659,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" [[package]] name = "hex" @@ -703,7 +735,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.17.0", + "hashbrown 0.17.1", "serde", "serde_core", ] @@ -731,11 +763,12 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "js-sys" -version = "0.3.95" +version = "0.3.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" +checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" dependencies = [ - "once_cell", + "cfg-if", + "futures-util", "wasm-bindgen", ] @@ -762,9 +795,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.184" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] name = "libm" @@ -774,21 +807,21 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "log" -version = "0.4.29" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "memchr" -version = "2.8.0" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "num-bigint" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" dependencies = [ "num-integer", "num-traits", @@ -796,9 +829,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" [[package]] name = "num-derive" @@ -808,7 +841,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -853,6 +886,12 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + [[package]] name = "pkcs8" version = "0.10.2" @@ -885,7 +924,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -899,27 +938,27 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.45" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] [[package]] name = "rand" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" dependencies = [ "libc", "rand_chacha", @@ -947,22 +986,22 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 3.0.3", ] [[package]] @@ -986,9 +1025,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "schemars" @@ -1035,9 +1074,9 @@ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ "serde_core", "serde_derive", @@ -1045,29 +1084,29 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 3.0.3", ] [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" dependencies = [ "itoa", "memchr", @@ -1078,11 +1117,12 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.18.0" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5414fad8e6907dbdd5bc441a50ae8d6e26151a03b1de04d89a5576de61d01f" +checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" dependencies = [ "base64 0.22.1", + "bs58", "chrono", "hex", "indexmap 1.9.3", @@ -1097,14 +1137,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.18.0" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3db8978e608f1fe7357e211969fd9abdcae80bac1ba7a3369bb7eb6b404eb65" +checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" dependencies = [ "darling 0.23.0", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -1120,9 +1160,9 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +checksum = "77fd7028345d415a4034cf8777cd4f8ab1851274233b45f84e3d955502d93874" dependencies = [ "digest", "keccak", @@ -1130,9 +1170,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" [[package]] name = "signature" @@ -1144,11 +1184,17 @@ dependencies = [ "rand_core", ] +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + [[package]] name = "smallvec" -version = "1.15.1" +version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" [[package]] name = "soroban-builtin-sdk-macros" @@ -1159,7 +1205,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -1239,7 +1285,7 @@ dependencies = [ "serde", "serde_json", "stellar-xdr", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -1295,7 +1341,7 @@ dependencies = [ "soroban-spec", "soroban-spec-rust", "stellar-xdr", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -1322,7 +1368,7 @@ dependencies = [ "sha2", "soroban-spec", "stellar-xdr", - "syn 2.0.117", + "syn 2.0.119", "thiserror", ] @@ -1341,9 +1387,9 @@ dependencies = [ [[package]] name = "spin" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" [[package]] name = "spki" @@ -1434,9 +1480,20 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.117" +version = "2.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" dependencies = [ "proc-macro2", "quote", @@ -1460,17 +1517,16 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] name = "time" -version = "0.3.47" +version = "0.3.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +checksum = "3e1d5e639ff6bab73cb6885cc7e7b1de96c3f32c68ec55f3952614bec1092244" dependencies = [ "deranged", - "itoa", "num-conv", "powerfmt", "serde_core", @@ -1480,25 +1536,40 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "time-macros" -version = "0.2.27" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" dependencies = [ "num-conv", "time-core", ] +[[package]] +name = "tinyvec" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "typenum" -version = "1.19.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "unicode-ident" @@ -1520,9 +1591,9 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasm-bindgen" -version = "0.2.118" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" +checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" dependencies = [ "cfg-if", "once_cell", @@ -1533,9 +1604,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.118" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" +checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1543,22 +1614,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.118" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" +checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.119", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.118" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" +checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" dependencies = [ "unicode-ident", ] @@ -1621,7 +1692,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -1632,7 +1703,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] @@ -1668,46 +1739,46 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.48" +version = "0.8.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +checksum = "b5a105cd7b140f6eeec8acff2ea38135d3cab283ada58540f629fe51e46696eb" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.48" +version = "0.8.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +checksum = "0fe976fb70c78cd64cccfe3a6fc142244e8a77b70959b30faf9d0ac37ee228eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] name = "zeroize" -version = "1.8.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" +checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.119", ] [[package]] name = "zmij" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/stellar/wraith-names/README.md b/stellar/wraith-names/README.md new file mode 100644 index 0000000..b3b64fa --- /dev/null +++ b/stellar/wraith-names/README.md @@ -0,0 +1,20 @@ +# wraith-names metadata resolver + +This package extends the existing `.wraith` name registry with optional on-chain metadata. The resolution path remains unchanged for the existing `resolve(name)` call, while metadata is exposed through dedicated owner-gated setters/getters. + +## Supported metadata + +- `text_records`: key/value text mappings such as `avatar`, `twitter`, and `description` +- `content_hash`: optional `BytesN<32>` content identifier for IPFS or similar content-addressed payloads + +## Design notes + +- Metadata is opt-in and does not change the existing name-to-meta-address `resolve` hot path. +- Ownership is enforced by the name owner before metadata storage can be updated. +- Event emission should be used to notify listeners when metadata is changed. + +## Validation + +- Per-record size limits are enforced. +- Total metadata payload size must remain within the configured limit. +- Invalid metadata size must return dedicated typed errors instead of falling through to generic resolution errors. diff --git a/stellar/wraith-names/src/lib.rs b/stellar/wraith-names/src/lib.rs index 2be3797..c2b992d 100644 --- a/stellar/wraith-names/src/lib.rs +++ b/stellar/wraith-names/src/lib.rs @@ -5,6 +5,9 @@ use soroban_sdk::{ String, }; +mod metadata; +use metadata::MetadataEntry; + /// Storage keys. #[contracttype] #[derive(Clone)] @@ -13,6 +16,8 @@ pub enum DataKey { Name(BytesN<32>), /// Reverse lookup: meta-address hash (BytesN<32>) to name hash (BytesN<32>). Reverse(BytesN<32>), + /// Optional metadata (text records + content hash) keyed by name hash. + Metadata(BytesN<32>), } /// A registered name entry. @@ -39,6 +44,11 @@ pub enum NamesError { InvalidMetaAddress = 5, NameNotFound = 6, NotOwner = 7, + MetadataKeyTooLong = 50, + MetadataValueTooLong = 51, + MetadataRecordTooLong = 52, + MetadataTotalTooLong = 53, + MetadataNotFound = 54, } #[contract] @@ -182,6 +192,11 @@ impl WraithNamesContract { .instance() .remove(&DataKey::Reverse(meta_hash)); + // Remove metadata if any + env.storage() + .instance() + .remove(&DataKey::Metadata(name_hash.clone())); + // Remove name env.storage().instance().remove(&name_key); @@ -219,6 +234,66 @@ impl WraithNamesContract { Ok(entry.name) } + /// Set metadata (text records + content hash) for a name. + /// Only the current owner can set metadata. + pub fn set_metadata( + env: Env, + owner: Address, + name: String, + metadata: MetadataEntry, + ) -> Result<(), NamesError> { + owner.require_auth(); + + let name_hash = Self::hash_name(&env, &name); + let name_key = DataKey::Name(name_hash.clone()); + + let entry: NameEntry = env + .storage() + .instance() + .get(&name_key) + .ok_or(NamesError::NameNotFound)?; + + if entry.owner != owner { + return Err(NamesError::NotOwner); + } + + metadata::validate_metadata_entry(&metadata).map_err(|e| match e { + metadata::MetadataError::MetadataKeyTooLong => NamesError::MetadataKeyTooLong, + metadata::MetadataError::MetadataValueTooLong => NamesError::MetadataValueTooLong, + metadata::MetadataError::MetadataRecordTooLong => NamesError::MetadataRecordTooLong, + metadata::MetadataError::MetadataTotalTooLong => NamesError::MetadataTotalTooLong, + metadata::MetadataError::MetadataNotFound => NamesError::MetadataNotFound, + })?; + + env.storage() + .instance() + .set(&DataKey::Metadata(name_hash.clone()), &metadata); + + env.events() + .publish((symbol_short!("mtadu"), name_hash), metadata); + + Ok(()) + } + + /// Get metadata for a name. + /// Returns `NameNotFound` if the name does not exist, + /// `MetadataNotFound` if the name exists but has no metadata. + pub fn get_metadata(env: Env, name: String) -> Result { + let name_hash = Self::hash_name(&env, &name); + + // Verify name exists + let _entry: NameEntry = env + .storage() + .instance() + .get(&DataKey::Name(name_hash.clone())) + .ok_or(NamesError::NameNotFound)?; + + env.storage() + .instance() + .get(&DataKey::Metadata(name_hash)) + .ok_or(NamesError::MetadataNotFound) + } + /// Hash a name string to BytesN<32> for use as storage key. fn hash_name(env: &Env, name: &String) -> BytesN<32> { let len = name.len() as usize; @@ -259,7 +334,7 @@ impl WraithNamesContract { mod test { use super::*; use soroban_sdk::testutils::Address as _; - use soroban_sdk::{Bytes, Env, String}; + use soroban_sdk::{Bytes, Env, Map, String}; #[test] fn test_register_and_resolve() { @@ -360,4 +435,265 @@ mod test { let result = client.try_register(&owner, &String::from_str(&env, "Alice"), &meta); assert_eq!(result, Err(Ok(NamesError::InvalidNameCharacter))); } + + // --- Metadata tests --- + + #[test] + fn test_set_and_get_metadata() { + let env = Env::default(); + env.mock_all_auths(); + + let contract_id = env.register(WraithNamesContract, ()); + let client = WraithNamesContractClient::new(&env, &contract_id); + + let owner = Address::generate(&env); + let name = String::from_str(&env, "eve"); + let meta = Bytes::from_slice(&env, &[1u8; 64]); + client.register(&owner, &name, &meta); + + let mut text_records = Map::::new(&env); + text_records.set( + String::from_str(&env, "avatar"), + String::from_str(&env, "https://example.com/avatar.png"), + ); + text_records.set( + String::from_str(&env, "twitter"), + String::from_str(&env, "@wraithprotocol"), + ); + + let metadata = MetadataEntry { + text_records: text_records.clone(), + content_hash: BytesN::from_array(&env, &[9u8; 32]), + }; + + client.set_metadata(&owner, &name, &metadata); + + let stored = client.get_metadata(&name); + assert_eq!(stored.text_records, text_records); + assert_eq!(stored.content_hash, BytesN::from_array(&env, &[9u8; 32])); + } + + #[test] + fn test_set_metadata_not_owner() { + let env = Env::default(); + env.mock_all_auths(); + + let contract_id = env.register(WraithNamesContract, ()); + let client = WraithNamesContractClient::new(&env, &contract_id); + + let owner = Address::generate(&env); + let attacker = Address::generate(&env); + let name = String::from_str(&env, "mallory"); + let meta = Bytes::from_slice(&env, &[2u8; 64]); + client.register(&owner, &name, &meta); + + let text_records = Map::::new(&env); + let metadata = MetadataEntry { + text_records, + content_hash: BytesN::from_array(&env, &[0u8; 32]), + }; + + let result = client.try_set_metadata(&attacker, &name, &metadata); + assert_eq!(result, Err(Ok(NamesError::NotOwner))); + } + + #[test] + fn test_set_metadata_key_too_long() { + let env = Env::default(); + env.mock_all_auths(); + + let contract_id = env.register(WraithNamesContract, ()); + let client = WraithNamesContractClient::new(&env, &contract_id); + + let owner = Address::generate(&env); + let name = String::from_str(&env, "frank"); + let meta = Bytes::from_slice(&env, &[3u8; 64]); + client.register(&owner, &name, &meta); + + // Key exactly 65 bytes (MAX 64) → should fail + let long_key = String::from_str( + &env, + "012345678901234567890123456789012345678901234567890123456789012345", + ); + let mut text_records = Map::::new(&env); + text_records.set(long_key, String::from_str(&env, "x")); + + let metadata = MetadataEntry { + text_records, + content_hash: BytesN::from_array(&env, &[0u8; 32]), + }; + + let result = client.try_set_metadata(&owner, &name, &metadata); + assert_eq!(result, Err(Ok(NamesError::MetadataKeyTooLong))); + } + + #[test] + fn test_set_metadata_value_too_long() { + let env = Env::default(); + env.mock_all_auths(); + + let contract_id = env.register(WraithNamesContract, ()); + let client = WraithNamesContractClient::new(&env, &contract_id); + + let owner = Address::generate(&env); + let name = String::from_str(&env, "grace"); + let meta = Bytes::from_slice(&env, &[4u8; 64]); + client.register(&owner, &name, &meta); + + // Value exactly 257 bytes (MAX 256) → should fail + let long_value = String::from_str(&env, &"x".repeat(257)); + let mut text_records = Map::::new(&env); + text_records.set(String::from_str(&env, "avatar"), long_value); + + let metadata = MetadataEntry { + text_records, + content_hash: BytesN::from_array(&env, &[0u8; 32]), + }; + + let result = client.try_set_metadata(&owner, &name, &metadata); + assert_eq!(result, Err(Ok(NamesError::MetadataValueTooLong))); + } + + #[test] + fn test_set_metadata_total_too_long() { + let env = Env::default(); + env.mock_all_auths(); + + let contract_id = env.register(WraithNamesContract, ()); + let client = WraithNamesContractClient::new(&env, &contract_id); + + let owner = Address::generate(&env); + let name = String::from_str(&env, "heidi"); + let meta = Bytes::from_slice(&env, &[5u8; 64]); + client.register(&owner, &name, &meta); + + let mut text_records = Map::::new(&env); + // 5 records each ~210 bytes (key=5, value=205) = 1050 total > 1024 limit + // Each record stays under the 256-byte per-value limit + text_records.set( + String::from_str(&env, "key00"), + String::from_str(&env, &"v".repeat(205)), + ); + text_records.set( + String::from_str(&env, "key01"), + String::from_str(&env, &"v".repeat(205)), + ); + text_records.set( + String::from_str(&env, "key02"), + String::from_str(&env, &"v".repeat(205)), + ); + text_records.set( + String::from_str(&env, "key03"), + String::from_str(&env, &"v".repeat(205)), + ); + text_records.set( + String::from_str(&env, "key04"), + String::from_str(&env, &"v".repeat(205)), + ); + + let metadata = MetadataEntry { + text_records, + content_hash: BytesN::from_array(&env, &[0u8; 32]), + }; + + let result = client.try_set_metadata(&owner, &name, &metadata); + assert_eq!(result, Err(Ok(NamesError::MetadataTotalTooLong))); + } + + #[test] + fn test_get_metadata_not_found() { + let env = Env::default(); + env.mock_all_auths(); + + let contract_id = env.register(WraithNamesContract, ()); + let client = WraithNamesContractClient::new(&env, &contract_id); + + let owner = Address::generate(&env); + let name = String::from_str(&env, "ivan"); + let meta = Bytes::from_slice(&env, &[6u8; 64]); + client.register(&owner, &name, &meta); + + // Name exists but no metadata set + let result = client.try_get_metadata(&name); + assert_eq!(result, Err(Ok(NamesError::MetadataNotFound))); + } + + #[test] + fn test_get_metadata_unregistered_name() { + let env = Env::default(); + + let contract_id = env.register(WraithNamesContract, ()); + let client = WraithNamesContractClient::new(&env, &contract_id); + + let name = String::from_str(&env, "nobody"); + let result = client.try_get_metadata(&name); + assert_eq!(result, Err(Ok(NamesError::NameNotFound))); + } + + #[test] + fn test_metadata_cleaned_on_release() { + let env = Env::default(); + env.mock_all_auths(); + + let contract_id = env.register(WraithNamesContract, ()); + let client = WraithNamesContractClient::new(&env, &contract_id); + + let owner = Address::generate(&env); + let name = String::from_str(&env, "judy"); + let meta = Bytes::from_slice(&env, &[7u8; 64]); + client.register(&owner, &name, &meta); + + let mut text_records = Map::::new(&env); + text_records.set( + String::from_str(&env, "avatar"), + String::from_str(&env, "https://example.com/pic.jpg"), + ); + let metadata = MetadataEntry { + text_records, + content_hash: BytesN::from_array(&env, &[0u8; 32]), + }; + + client.set_metadata(&owner, &name, &metadata); + + // Verify metadata exists + let stored = client.get_metadata(&name); + assert_eq!(stored.text_records.len(), 1); + + // Release should clean metadata + client.release(&owner, &name); + + // After release, get_metadata should return NameNotFound (name is gone) + let result = client.try_get_metadata(&name); + assert_eq!(result, Err(Ok(NamesError::NameNotFound))); + } + + #[test] + fn test_hot_path_unchanged_after_metadata() { + let env = Env::default(); + env.mock_all_auths(); + + let contract_id = env.register(WraithNamesContract, ()); + let client = WraithNamesContractClient::new(&env, &contract_id); + + let owner = Address::generate(&env); + let name = String::from_str(&env, "karen"); + let meta = Bytes::from_slice(&env, &[8u8; 64]); + client.register(&owner, &name, &meta); + + // Set metadata + let text_records = Map::::new(&env); + let metadata = MetadataEntry { + text_records, + content_hash: BytesN::from_array(&env, &[0u8; 32]), + }; + client.set_metadata(&owner, &name, &metadata); + + // Hot path: resolve still works + let resolved = client.resolve(&name); + assert_eq!(resolved, meta); + + // Hot path: name_of still works + let found_name = client.name_of(&meta); + assert_eq!(found_name, name); + } } diff --git a/stellar/wraith-names/src/metadata.rs b/stellar/wraith-names/src/metadata.rs new file mode 100644 index 0000000..07805be --- /dev/null +++ b/stellar/wraith-names/src/metadata.rs @@ -0,0 +1,154 @@ +use soroban_sdk::{contracterror, contracttype, BytesN, Map, String}; + +pub const MAX_TEXT_RECORD_KEY_BYTES: u32 = 64; +pub const MAX_TEXT_RECORD_VALUE_BYTES: u32 = 256; +pub const MAX_METADATA_TOTAL_BYTES: u32 = 1024; + +#[contracttype] +#[derive(Clone, Debug, Eq, PartialEq)] +pub struct MetadataEntry { + /// Optional text records keyed by names such as "avatar", "twitter", or "description". + pub text_records: Map, + /// Optional content hash for IPFS or similar content-addressed payloads. + pub content_hash: BytesN<32>, +} + +#[contracterror] +#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] +#[repr(u32)] +pub enum MetadataError { + MetadataKeyTooLong = 101, + MetadataValueTooLong = 102, + MetadataRecordTooLong = 103, + MetadataTotalTooLong = 104, + MetadataNotFound = 105, +} + +pub fn validate_text_record(key: &String, value: &String) -> Result<(), MetadataError> { + if key.len() > MAX_TEXT_RECORD_KEY_BYTES { + return Err(MetadataError::MetadataKeyTooLong); + } + + if value.len() > MAX_TEXT_RECORD_VALUE_BYTES { + return Err(MetadataError::MetadataValueTooLong); + } + + let record_len = key + .len() + .checked_add(value.len()) + .ok_or(MetadataError::MetadataRecordTooLong)?; + if record_len > MAX_METADATA_TOTAL_BYTES { + return Err(MetadataError::MetadataRecordTooLong); + } + + Ok(()) +} + +pub fn validate_text_records(text_records: &Map) -> Result<(), MetadataError> { + let mut total = 0u32; + + for (key, value) in text_records.iter() { + validate_text_record(&key, &value)?; + + total = total + .checked_add(key.len()) + .ok_or(MetadataError::MetadataTotalTooLong)?; + total = total + .checked_add(value.len()) + .ok_or(MetadataError::MetadataTotalTooLong)?; + } + + if total > MAX_METADATA_TOTAL_BYTES { + return Err(MetadataError::MetadataTotalTooLong); + } + + Ok(()) +} + +pub fn validate_metadata_entry(entry: &MetadataEntry) -> Result<(), MetadataError> { + validate_text_records(&entry.text_records)?; + + if entry.content_hash.len() != 32 { + return Err(MetadataError::MetadataRecordTooLong); + } + + Ok(()) +} + +#[cfg(test)] +mod test { + use super::*; + use soroban_sdk::{BytesN, Env, String}; + + #[test] + fn test_metadata_entry_validation_accepts_opt_in_fields() { + let env = Env::default(); + + let mut text_records = Map::::new(&env); + text_records.set( + String::from_str(&env, "avatar"), + String::from_str(&env, "https://example.com/avatar.png"), + ); + text_records.set( + String::from_str(&env, "twitter"), + String::from_str(&env, "@wraithprotocol"), + ); + + let metadata = MetadataEntry { + text_records, + content_hash: BytesN::from_array(&env, &[9u8; 32]), + }; + + assert_eq!(validate_metadata_entry(&metadata), Ok(())); + } + + #[test] + fn test_metadata_key_limit_is_enforced() { + let env = Env::default(); + let key = String::from_str(&env, "a"); + let value = String::from_str(&env, "x"); + + let long_key = String::from_str( + &env, + "012345678901234567890123456789012345678901234567890123456789012345", + ); + assert_eq!(validate_text_record(&key, &value), Ok(())); + assert_eq!( + validate_text_record(&long_key, &value), + Err(MetadataError::MetadataKeyTooLong) + ); + } + + #[test] + fn test_metadata_total_limit_is_enforced() { + let env = Env::default(); + let mut text_records = Map::::new(&env); + + // 5 records each ~206 bytes (key=1, value=205) = 1030 total > 1024 limit + text_records.set( + String::from_str(&env, "a"), + String::from_str(&env, &"v".repeat(205)), + ); + text_records.set( + String::from_str(&env, "b"), + String::from_str(&env, &"v".repeat(205)), + ); + text_records.set( + String::from_str(&env, "c"), + String::from_str(&env, &"v".repeat(205)), + ); + text_records.set( + String::from_str(&env, "d"), + String::from_str(&env, &"v".repeat(205)), + ); + text_records.set( + String::from_str(&env, "e"), + String::from_str(&env, &"v".repeat(205)), + ); + + assert_eq!( + validate_text_records(&text_records), + Err(MetadataError::MetadataTotalTooLong) + ); + } +} diff --git a/stellar/wraith-names/test_snapshots/test/test_get_metadata_not_found.1.json b/stellar/wraith-names/test_snapshots/test/test_get_metadata_not_found.1.json new file mode 100644 index 0000000..f22eec8 --- /dev/null +++ b/stellar/wraith-names/test_snapshots/test/test_get_metadata_not_found.1.json @@ -0,0 +1,190 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "ivan" + }, + { + "bytes": "06060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "Name" + }, + { + "bytes": "cd0b9452fc376fc4c35a60087b366f70d883fc901524daf1f122fbd319384f6a" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "name" + }, + "val": { + "string": "ivan" + } + }, + { + "key": { + "symbol": "owner" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "stealth_meta_address" + }, + "val": { + "bytes": "06060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Reverse" + }, + { + "bytes": "1352286f7dddf65efce52c789476c7e917ecdd98d1c1ca9ab2dde1e4964caefe" + } + ] + }, + "val": { + "bytes": "cd0b9452fc376fc4c35a60087b366f70d883fc901524daf1f122fbd319384f6a" + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/stellar/wraith-names/test_snapshots/test/test_get_metadata_unregistered_name.1.json b/stellar/wraith-names/test_snapshots/test/test_get_metadata_unregistered_name.1.json new file mode 100644 index 0000000..a90f00a --- /dev/null +++ b/stellar/wraith-names/test_snapshots/test/test_get_metadata_unregistered_name.1.json @@ -0,0 +1,76 @@ +{ + "generators": { + "address": 1, + "nonce": 0 + }, + "auth": [ + [], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": null + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/stellar/wraith-names/test_snapshots/test/test_hot_path_unchanged_after_metadata.1.json b/stellar/wraith-names/test_snapshots/test/test_hot_path_unchanged_after_metadata.1.json new file mode 100644 index 0000000..8a1d5b1 --- /dev/null +++ b/stellar/wraith-names/test_snapshots/test/test_hot_path_unchanged_after_metadata.1.json @@ -0,0 +1,298 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "karen" + }, + { + "bytes": "08080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "set_metadata", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "karen" + }, + { + "map": [ + { + "key": { + "symbol": "content_hash" + }, + "val": { + "bytes": "0000000000000000000000000000000000000000000000000000000000000000" + } + }, + { + "key": { + "symbol": "text_records" + }, + "val": { + "map": [] + } + } + ] + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "Metadata" + }, + { + "bytes": "904294d8c54b1c63e40832fa1d95bcde534b310df6d42882ce4baf28f3e0184a" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "content_hash" + }, + "val": { + "bytes": "0000000000000000000000000000000000000000000000000000000000000000" + } + }, + { + "key": { + "symbol": "text_records" + }, + "val": { + "map": [] + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Name" + }, + { + "bytes": "904294d8c54b1c63e40832fa1d95bcde534b310df6d42882ce4baf28f3e0184a" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "name" + }, + "val": { + "string": "karen" + } + }, + { + "key": { + "symbol": "owner" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "stealth_meta_address" + }, + "val": { + "bytes": "08080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Reverse" + }, + { + "bytes": "225eba79de1b87885554c16b2aac6b3bf873b62082a79f1a73420e01bc440ca3" + } + ] + }, + "val": { + "bytes": "904294d8c54b1c63e40832fa1d95bcde534b310df6d42882ce4baf28f3e0184a" + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/stellar/wraith-names/test_snapshots/test/test_metadata_cleaned_on_release.1.json b/stellar/wraith-names/test_snapshots/test/test_metadata_cleaned_on_release.1.json new file mode 100644 index 0000000..8ba6095 --- /dev/null +++ b/stellar/wraith-names/test_snapshots/test/test_metadata_cleaned_on_release.1.json @@ -0,0 +1,274 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "judy" + }, + { + "bytes": "07070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "set_metadata", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "judy" + }, + { + "map": [ + { + "key": { + "symbol": "content_hash" + }, + "val": { + "bytes": "0000000000000000000000000000000000000000000000000000000000000000" + } + }, + { + "key": { + "symbol": "text_records" + }, + "val": { + "map": [ + { + "key": { + "string": "avatar" + }, + "val": { + "string": "https://example.com/pic.jpg" + } + } + ] + } + } + ] + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "release", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "judy" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 1033654523790656264 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/stellar/wraith-names/test_snapshots/test/test_set_and_get_metadata.1.json b/stellar/wraith-names/test_snapshots/test/test_set_and_get_metadata.1.json new file mode 100644 index 0000000..fe0bfda --- /dev/null +++ b/stellar/wraith-names/test_snapshots/test/test_set_and_get_metadata.1.json @@ -0,0 +1,331 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "eve" + }, + { + "bytes": "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "set_metadata", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "eve" + }, + { + "map": [ + { + "key": { + "symbol": "content_hash" + }, + "val": { + "bytes": "0909090909090909090909090909090909090909090909090909090909090909" + } + }, + { + "key": { + "symbol": "text_records" + }, + "val": { + "map": [ + { + "key": { + "string": "avatar" + }, + "val": { + "string": "https://example.com/avatar.png" + } + }, + { + "key": { + "string": "twitter" + }, + "val": { + "string": "@wraithprotocol" + } + } + ] + } + } + ] + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "Metadata" + }, + { + "bytes": "85262adf74518bbb70c7cb94cd6159d91669e5a81edf1efebd543eadbda9fa2b" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "content_hash" + }, + "val": { + "bytes": "0909090909090909090909090909090909090909090909090909090909090909" + } + }, + { + "key": { + "symbol": "text_records" + }, + "val": { + "map": [ + { + "key": { + "string": "avatar" + }, + "val": { + "string": "https://example.com/avatar.png" + } + }, + { + "key": { + "string": "twitter" + }, + "val": { + "string": "@wraithprotocol" + } + } + ] + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Name" + }, + { + "bytes": "85262adf74518bbb70c7cb94cd6159d91669e5a81edf1efebd543eadbda9fa2b" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "name" + }, + "val": { + "string": "eve" + } + }, + { + "key": { + "symbol": "owner" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "stealth_meta_address" + }, + "val": { + "bytes": "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Reverse" + }, + { + "bytes": "7c8975e1e60a5c8337f28edf8c33c3b180360b7279644a9bc1af3c51e6220bf5" + } + ] + }, + "val": { + "bytes": "85262adf74518bbb70c7cb94cd6159d91669e5a81edf1efebd543eadbda9fa2b" + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 5541220902715666415 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/stellar/wraith-names/test_snapshots/test/test_set_metadata_key_too_long.1.json b/stellar/wraith-names/test_snapshots/test/test_set_metadata_key_too_long.1.json new file mode 100644 index 0000000..8f88d12 --- /dev/null +++ b/stellar/wraith-names/test_snapshots/test/test_set_metadata_key_too_long.1.json @@ -0,0 +1,190 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "frank" + }, + { + "bytes": "03030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "Name" + }, + { + "bytes": "77646f5a4f3166637627abe998e7a1470fe72d8b430f067dafa86263f1f23f94" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "name" + }, + "val": { + "string": "frank" + } + }, + { + "key": { + "symbol": "owner" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "stealth_meta_address" + }, + "val": { + "bytes": "03030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Reverse" + }, + { + "bytes": "6aa56c4bcd208911792ad24c7681fefb93bed51903afc54860c9bd37e41e5a31" + } + ] + }, + "val": { + "bytes": "77646f5a4f3166637627abe998e7a1470fe72d8b430f067dafa86263f1f23f94" + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/stellar/wraith-names/test_snapshots/test/test_set_metadata_not_owner.1.json b/stellar/wraith-names/test_snapshots/test/test_set_metadata_not_owner.1.json new file mode 100644 index 0000000..d6298be --- /dev/null +++ b/stellar/wraith-names/test_snapshots/test/test_set_metadata_not_owner.1.json @@ -0,0 +1,190 @@ +{ + "generators": { + "address": 3, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "mallory" + }, + { + "bytes": "02020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "Name" + }, + { + "bytes": "c0a497761b175379ed63397cc980546559faa84ca9cbeede773117c31508b6ac" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "name" + }, + "val": { + "string": "mallory" + } + }, + { + "key": { + "symbol": "owner" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "stealth_meta_address" + }, + "val": { + "bytes": "02020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Reverse" + }, + { + "bytes": "f83b332be4e6a5a4b1c56aaf6db52657da495e149870057d8590ab9d7a6167ad" + } + ] + }, + "val": { + "bytes": "c0a497761b175379ed63397cc980546559faa84ca9cbeede773117c31508b6ac" + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/stellar/wraith-names/test_snapshots/test/test_set_metadata_total_too_long.1.json b/stellar/wraith-names/test_snapshots/test/test_set_metadata_total_too_long.1.json new file mode 100644 index 0000000..be950f8 --- /dev/null +++ b/stellar/wraith-names/test_snapshots/test/test_set_metadata_total_too_long.1.json @@ -0,0 +1,190 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "heidi" + }, + { + "bytes": "05050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "Name" + }, + { + "bytes": "05a331a7f4f1929faaca289a66f98d5a05b387d9cbeb4f8c2dd8204a6b023a14" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "name" + }, + "val": { + "string": "heidi" + } + }, + { + "key": { + "symbol": "owner" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "stealth_meta_address" + }, + "val": { + "bytes": "05050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Reverse" + }, + { + "bytes": "b1bcccf15ed0a0bd63635ae686af9f75e522ab057c928e39f65ee83048d72c75" + } + ] + }, + "val": { + "bytes": "05a331a7f4f1929faaca289a66f98d5a05b387d9cbeb4f8c2dd8204a6b023a14" + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file diff --git a/stellar/wraith-names/test_snapshots/test/test_set_metadata_value_too_long.1.json b/stellar/wraith-names/test_snapshots/test/test_set_metadata_value_too_long.1.json new file mode 100644 index 0000000..f9d501e --- /dev/null +++ b/stellar/wraith-names/test_snapshots/test/test_set_metadata_value_too_long.1.json @@ -0,0 +1,190 @@ +{ + "generators": { + "address": 2, + "nonce": 0 + }, + "auth": [ + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "function_name": "register", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + }, + { + "string": "grace" + }, + { + "bytes": "04040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 22, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "Name" + }, + { + "bytes": "e010fd1ce1acc173e3b4835b7635f8d4600d774869102adb5cb7b5d7895649ba" + } + ] + }, + "val": { + "map": [ + { + "key": { + "symbol": "name" + }, + "val": { + "string": "grace" + } + }, + { + "key": { + "symbol": "owner" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + }, + { + "key": { + "symbol": "stealth_meta_address" + }, + "val": { + "bytes": "04040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404" + } + } + ] + } + }, + { + "key": { + "vec": [ + { + "symbol": "Reverse" + }, + { + "bytes": "cb4cdf1351c7b7812e52b873640ab20bd748a7142ffec144b18439bc8b833924" + } + ] + }, + "val": { + "bytes": "e010fd1ce1acc173e3b4835b7635f8d4600d774869102adb5cb7b5d7895649ba" + } + } + ] + } + } + } + }, + "ext": "v0" + }, + 4095 + ] + ], + [ + { + "contract_data": { + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "ledger_key_nonce": { + "nonce": 801925984706572462 + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + 6311999 + ] + ], + [ + { + "contract_code": { + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + [ + { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + 4095 + ] + ] + ] + }, + "events": [] +} \ No newline at end of file