From 56b7100fa0a05207197af5b33f879a0853b1c149 Mon Sep 17 00:00:00 2001 From: jhernadnezb Date: Sun, 21 Jan 2024 13:43:06 -0600 Subject: [PATCH] remove custom binding for funding fairburn pool --- Cargo.lock | 386 +++++++++++------- Cargo.toml | 3 +- .../minters/vending-minter/src/contract.rs | 4 +- packages/sg1/Cargo.toml | 11 +- packages/sg1/src/lib.rs | 68 ++- 5 files changed, 290 insertions(+), 182 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index acbf5ae2b..bb5565eee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,11 +44,17 @@ dependencies = [ "memchr", ] +[[package]] +name = "anybuf" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a03eb4d55fa21466cac727930be07f82581223ee04bcaf61f934e98b7ecb859" + [[package]] name = "anyhow" -version = "1.0.69" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "arrayvec" @@ -176,7 +182,7 @@ checksum = "e4655ae1a7b0cdf149156f780c5bf3f1352bc53cbd9e0a361a7ef7b22947e965" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -193,7 +199,7 @@ checksum = "b84f9ebcc6c1f5b8cb160f6990096a5c127f423fcb6e1ccc46c370cbdfb75dfc" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -222,7 +228,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -283,8 +289,8 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "schemars", "serde", "sg-std", @@ -301,8 +307,8 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cw721 0.18.0", "cw721-base 0.18.0", "schemars", @@ -403,7 +409,7 @@ dependencies = [ "pbkdf2", "rand_core 0.6.4", "ripemd", - "sha2 0.10.6", + "sha2 0.10.8", "subtle", "zeroize", ] @@ -442,7 +448,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -524,7 +530,7 @@ dependencies = [ "borsh-schema-derive-internal", "proc-macro-crate 0.1.5", "proc-macro2", - "syn", + "syn 1.0.109", ] [[package]] @@ -535,7 +541,7 @@ checksum = "186b734fa1c9f6743e90c95d7233c9faab6360d1a96d4ffa19d9cfd1e9350f8a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -546,7 +552,7 @@ checksum = "99b7ff1008316626f485991b960ade129253d4034014616b94f309a15366cc49" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -595,7 +601,7 @@ checksum = "e31225543cb46f81a7e224762764f4a6a0f097b1db0b175f69e8065efaa42de5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -654,13 +660,13 @@ dependencies = [ "bincode", "bs58", "coins-core", - "digest 0.10.6", + "digest 0.10.7", "getrandom", "hmac", "k256 0.11.6", "lazy_static", "serde", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", ] @@ -677,7 +683,7 @@ dependencies = [ "hmac", "pbkdf2", "rand", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", ] @@ -691,13 +697,13 @@ dependencies = [ "base64 0.12.3", "bech32 0.7.3", "blake2", - "digest 0.10.6", + "digest 0.10.7", "generic-array 0.14.6", "hex", "ripemd", "serde", "serde_derive", - "sha2 0.10.6", + "sha2 0.10.8", "sha3", "thiserror", ] @@ -831,7 +837,7 @@ version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ed6aa9f904de106fa16443ad14ec2abe75e94ba003bb61c681c0e43d4c58d2a" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "ecdsa 0.16.7", "ed25519-zebra", "k256 0.13.1", @@ -845,7 +851,7 @@ version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40abec852f3d4abec6d44ead9a58b78325021a1ead1e7229c3471414e57b2e49" dependencies = [ - "syn", + "syn 1.0.109", ] [[package]] @@ -869,7 +875,7 @@ checksum = "8bf12f8e20bb29d1db66b7ca590bc2f670b548d21e9be92499bc0f9022a994a8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -889,7 +895,7 @@ dependencies = [ "schemars", "serde", "serde-json-wasm", - "sha2 0.10.6", + "sha2 0.10.8", "static_assertions", "thiserror", ] @@ -968,7 +974,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1026,7 +1032,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", + "cw-utils 1.0.3", "schemars", "serde", "thiserror", @@ -1041,9 +1047,9 @@ dependencies = [ "anyhow", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", + "cw-utils 1.0.3", "derivative", - "itertools", + "itertools 0.10.5", "k256 0.11.6", "prost 0.9.0", "schemars", @@ -1051,6 +1057,25 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cw-multi-test" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579e2c2f2c0877b839c5cad85e67811074e854a50c1ff3085eb8290b1c27809c" +dependencies = [ + "anyhow", + "cosmwasm-std", + "cw-storage-plus 1.1.0", + "cw-utils 1.0.3", + "derivative", + "itertools 0.11.0", + "prost 0.12.3", + "schemars", + "serde", + "sha2 0.10.8", + "thiserror", +] + [[package]] name = "cw-ownable" version = "0.5.1" @@ -1062,7 +1087,7 @@ dependencies = [ "cw-address-like", "cw-ownable-derive", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", + "cw-utils 1.0.3", "thiserror", ] @@ -1074,7 +1099,7 @@ checksum = "a1d3bf2e0f341bb6cc100d7d441d31cf713fbd3ce0c511f91e79f14b40a889af" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1116,13 +1141,13 @@ dependencies = [ [[package]] name = "cw-utils" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c80e93d1deccb8588db03945016a292c3c631e6325d349ebb35d2db6f4f946f7" +checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw2 1.1.0", + "cw2 1.1.2", "schemars", "semver", "serde", @@ -1144,14 +1169,15 @@ dependencies = [ [[package]] name = "cw2" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ac2dc7a55ad64173ca1e0a46697c31b7a5c51342f55a1e84a724da4eb99908" +checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", "schemars", + "semver", "serde", "thiserror", ] @@ -1179,8 +1205,8 @@ dependencies = [ "cosmwasm-std", "cw-controllers 1.1.0", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cw4", "schemars", "serde", @@ -1208,7 +1234,7 @@ checksum = "e3c4d286625ccadc957fe480dd3bdc54ada19e0e6b5b9325379db3130569e914" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-utils 1.0.1", + "cw-utils 1.0.3", "schemars", "serde", ] @@ -1240,8 +1266,8 @@ dependencies = [ "cosmwasm-std", "cw-ownable", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cw721 0.18.0", "cw721-base 0.16.0", "schemars", @@ -1277,7 +1303,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1288,7 +1314,7 @@ checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1311,9 +1337,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", "const-oid", @@ -1376,7 +1402,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" dependencies = [ "der 0.7.8", - "digest 0.10.6", + "digest 0.10.7", "elliptic-curve 0.13.5", "rfc6979 0.4.0", "signature 2.1.0", @@ -1434,7 +1460,7 @@ dependencies = [ "base16ct 0.1.1", "crypto-bigint 0.4.9", "der 0.6.1", - "digest 0.10.6", + "digest 0.10.7", "ff 0.12.1", "generic-array 0.14.6", "group 0.12.1", @@ -1453,7 +1479,7 @@ checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" dependencies = [ "base16ct 0.2.0", "crypto-bigint 0.5.3", - "digest 0.10.6", + "digest 0.10.7", "ff 0.13.0", "generic-array 0.14.6", "group 0.13.0", @@ -1494,7 +1520,7 @@ checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" dependencies = [ "aes", "ctr", - "digest 0.10.6", + "digest 0.10.7", "hex", "hmac", "pbkdf2", @@ -1502,7 +1528,7 @@ dependencies = [ "scrypt", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "sha3", "thiserror", "uuid", @@ -1563,7 +1589,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "hex", - "sha2 0.10.6", + "sha2 0.10.8", "sha3", ] @@ -1590,7 +1616,7 @@ dependencies = [ "serde", "serde_json", "strum", - "syn", + "syn 1.0.109", "thiserror", "tiny-keccak", "unicode-xid", @@ -1610,7 +1636,7 @@ dependencies = [ "ethers-core", "hex", "rand", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", ] @@ -1785,7 +1811,7 @@ checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1983,7 +2009,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -2144,7 +2170,7 @@ checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2190,6 +2216,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.6" @@ -2225,7 +2260,7 @@ dependencies = [ "cfg-if", "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.6", + "sha2 0.10.8", "sha3", ] @@ -2239,7 +2274,7 @@ dependencies = [ "ecdsa 0.16.7", "elliptic-curve 0.13.5", "once_cell", - "sha2 0.10.6", + "sha2 0.10.8", "signature 2.1.0", ] @@ -2343,7 +2378,7 @@ checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2401,8 +2436,8 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "sg-metadata", "sg-std", "sg1", @@ -2418,8 +2453,8 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cw721-base 0.18.0", "open-edition-factory", "semver", @@ -2456,7 +2491,7 @@ dependencies = [ "bytes", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2498,7 +2533,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2536,10 +2571,10 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "hmac", "password-hash", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] @@ -2605,7 +2640,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2616,7 +2651,7 @@ checksum = "5e3b284b1f13a20dc5ebc90aff59a51b8d7137c221131b52a7260c08cbc1cc80" dependencies = [ "once_cell", "pest", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] @@ -2636,7 +2671,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2735,7 +2770,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -2752,9 +2787,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.52" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -2779,6 +2814,16 @@ dependencies = [ "prost-derive 0.11.8", ] +[[package]] +name = "prost" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +dependencies = [ + "bytes", + "prost-derive 0.12.3", +] + [[package]] name = "prost-derive" version = "0.9.0" @@ -2786,10 +2831,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2799,10 +2844,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ea9b0f8cbe5e15a8a042d030bd96668db28ecb567ec37d691971ff5731d2b1b" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", - "syn", + "syn 1.0.109", +] + +[[package]] +name = "prost-derive" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +dependencies = [ + "anyhow", + "itertools 0.11.0", + "proc-macro2", + "quote", + "syn 2.0.48", ] [[package]] @@ -2831,14 +2889,14 @@ checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "quote" -version = "1.0.26" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -2968,7 +3026,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -3004,7 +3062,7 @@ checksum = "ff26ed6c7c4dfc2aa9480b86a60e3c7233543a270a680e10758a507c5a4ce476" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3025,7 +3083,7 @@ checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3149,7 +3207,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3163,9 +3221,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "schemars_derive", @@ -3175,14 +3233,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn", + "syn 1.0.109", ] [[package]] @@ -3194,7 +3252,7 @@ dependencies = [ "hmac", "pbkdf2", "salsa20", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] @@ -3266,15 +3324,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] name = "serde" -version = "1.0.156" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "314b5b092c0ade17c00142951e50ced110ec27cea304b1037c6969246c2469a4" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] @@ -3299,13 +3357,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.156" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7e29c4601e36bcec74a223228dce795f4cd3616341a4af93520ca1a837c087d" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] @@ -3316,7 +3374,7 @@ checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3338,7 +3396,7 @@ checksum = "395627de918015623b32e7669714206363a7fc00382bf477e72c1f7533e8eafc" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3348,7 +3406,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", + "cw-utils 1.0.3", "schemars", "serde", "sg-std", @@ -3363,10 +3421,10 @@ dependencies = [ "async-std", "cosmwasm-schema", "cosmwasm-std", - "cw-multi-test", + "cw-multi-test 0.18.0", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "ethereum-verify", "ethers-core", "ethers-signers", @@ -3382,7 +3440,7 @@ dependencies = [ "sg1", "sg2", "sg721-base", - "sha2 0.10.6", + "sha2 0.10.8", "sha3", "thiserror", "vending-factory", @@ -3421,7 +3479,7 @@ dependencies = [ "proc-macro2", "quote", "sg-controllers", - "syn", + "syn 1.0.109", ] [[package]] @@ -3432,7 +3490,7 @@ checksum = "20744734b8049c64747bfb083bbc06a3c7204d1d34881ed3d89698e182aa9f97" dependencies = [ "anyhow", "cosmwasm-std", - "cw-multi-test", + "cw-multi-test 0.16.2", "schemars", "serde", "sg-std", @@ -3446,8 +3504,8 @@ dependencies = [ "cosmwasm-std", "cw-controllers 1.1.0", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cw4", "schemars", "serde", @@ -3464,7 +3522,7 @@ checksum = "4db53aebc2b4f981dc20a51213544adde8beaace6880345627f4babe2e1bc3ab" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-utils 1.0.1", + "cw-utils 1.0.3", "cw721 0.18.0", "schemars", "serde", @@ -3478,8 +3536,8 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "rust_decimal", "schemars", "serde", @@ -3495,8 +3553,8 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "rust_decimal", "schemars", "serde", @@ -3509,8 +3567,9 @@ dependencies = [ name = "sg1" version = "3.4.0" dependencies = [ + "anybuf", "cosmwasm-std", - "cw-utils 1.0.1", + "cw-utils 1.0.3", "serde", "sg-std", "thiserror", @@ -3523,7 +3582,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", + "cw-utils 1.0.3", "schemars", "serde", "sg721", @@ -3547,9 +3606,9 @@ version = "3.4.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-multi-test", + "cw-multi-test 0.18.0", "cw-ownable", - "cw-utils 1.0.1", + "cw-utils 1.0.3", "cw721-base 0.18.0", "serde", "thiserror", @@ -3563,8 +3622,8 @@ dependencies = [ "cosmwasm-std", "cw-ownable", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cw721 0.18.0", "cw721-base 0.18.0", "serde", @@ -3581,7 +3640,7 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-ownable", - "cw2 1.1.0", + "cw2 1.1.2", "cw721 0.18.0", "cw721-base 0.18.0", "schemars", @@ -3598,8 +3657,8 @@ version = "3.4.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cw721 0.18.0", "cw721-base 0.18.0", "schemars", @@ -3615,10 +3674,10 @@ version = "3.4.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-multi-test", + "cw-multi-test 0.18.0", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cw721 0.18.0", "cw721-base 0.18.0", "schemars", @@ -3639,7 +3698,7 @@ checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -3669,13 +3728,13 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -3684,7 +3743,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "keccak", ] @@ -3703,7 +3762,7 @@ version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "rand_core 0.6.4", ] @@ -3713,7 +3772,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "rand_core 0.6.4", ] @@ -3793,7 +3852,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn", + "syn 1.0.109", ] [[package]] @@ -3822,6 +3881,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sync_wrapper" version = "0.1.2" @@ -3836,7 +3906,7 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "unicode-xid", ] @@ -3970,7 +4040,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8901a55b0a7a06ebc4a674dcca925170da8e613fa3b163a1df804ed10afb154d" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3983,11 +4053,11 @@ dependencies = [ "base-minter", "cosmwasm-schema", "cosmwasm-std", - "cw-multi-test", + "cw-multi-test 0.18.0", "cw-ownable", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cw4", "cw4-group", "cw721 0.18.0", @@ -4016,7 +4086,7 @@ dependencies = [ "sg721-base", "sg721-nt", "sg721-updatable", - "sha2 0.10.6", + "sha2 0.10.8", "shuffle", "thiserror", "url", @@ -4027,22 +4097,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.39" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.39" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] @@ -4131,7 +4201,7 @@ checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -4280,7 +4350,7 @@ checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -4410,8 +4480,8 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "schemars", "serde", "sg-std", @@ -4428,8 +4498,8 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cw721 0.18.0", "cw721-base 0.18.0", "rand_core 0.6.4", @@ -4443,7 +4513,7 @@ dependencies = [ "sg2", "sg4", "sg721", - "sha2 0.10.6", + "sha2 0.10.8", "shuffle", "thiserror", "url", @@ -4457,8 +4527,8 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cw721 0.18.0", "cw721-base 0.18.0", "rand_core 0.6.4", @@ -4472,7 +4542,7 @@ dependencies = [ "sg2", "sg4", "sg721", - "sha2 0.10.6", + "sha2 0.10.8", "shuffle", "thiserror", "url", @@ -4539,7 +4609,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -4573,7 +4643,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4621,8 +4691,8 @@ dependencies = [ "cosmwasm-std", "cw-controllers 0.16.0", "cw-storage-plus 1.1.0", - "cw-utils 1.0.1", - "cw2 1.1.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "schemars", "serde", "sg-std", @@ -4786,6 +4856,6 @@ checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "synstructure", ] diff --git a/Cargo.toml b/Cargo.toml index a8a91ec9c..3565741d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ cw4 = "1.1.0" cw4-group = "1.1.0" cw721 = "0.18.0" cw721-base = "0.18.0" -cw-multi-test = "0.16.2" +cw-multi-test = "0.18.0" cw-storage-plus = "1.1.0" cw-utils = "1.0.1" schemars = "0.8.11" @@ -61,6 +61,7 @@ sg-eth-airdrop = { version = "3.4.0", path = "contracts/sg-eth-airdrop" } test-suite = { version = "3.4.0", path = "test-suite" } semver = "1" cw-ownable = "0.5.1" +anybuf = "0.3.0" [profile.release.package.sg721] codegen-units = 1 diff --git a/contracts/minters/vending-minter/src/contract.rs b/contracts/minters/vending-minter/src/contract.rs index 535f407fa..9d2cc8257 100644 --- a/contracts/minters/vending-minter/src/contract.rs +++ b/contracts/minters/vending-minter/src/contract.rs @@ -55,9 +55,9 @@ pub fn bucket_get(storage: &dyn Storage, bucket: u16) -> Option { let key = bucket_key(bucket); storage.get(&key).map(Into::into) } -pub fn bucket_set(storage: &mut dyn Storage, bucket: u16, randomness: &HexBinary) { +pub fn bucket_set(storage: &mut dyn Storage, bucket: u16, array: &HexBinary) { let key = bucket_key(bucket); - storage.set(&key, randomness); + storage.set(&key, array); } // no serde fn bucket_key(bucket: u16) -> [u8; 5] { diff --git a/packages/sg1/Cargo.toml b/packages/sg1/Cargo.toml index fb648803f..aa071f00c 100644 --- a/packages/sg1/Cargo.toml +++ b/packages/sg1/Cargo.toml @@ -9,8 +9,9 @@ repository = { workspace = true } license = { workspace = true } [dependencies] -cosmwasm-std = { workspace = true } -cw-utils = { workspace = true } -serde = { workspace = true } -sg-std = { workspace = true } -thiserror = { workspace = true } +cosmwasm-std = { workspace = true, features = ["stargate"] } +cw-utils = { workspace = true } +serde = { workspace = true } +sg-std = { workspace = true } +thiserror = { workspace = true } +anybuf = { workspace = true } diff --git a/packages/sg1/src/lib.rs b/packages/sg1/src/lib.rs index a4b28745c..9a2422e27 100644 --- a/packages/sg1/src/lib.rs +++ b/packages/sg1/src/lib.rs @@ -1,8 +1,11 @@ -use cosmwasm_std::{coin, coins, Addr, BankMsg, Coin, Decimal, Event, MessageInfo, Uint128}; +use anybuf::Anybuf; +use cosmwasm_std::{ + coin, coins, Addr, BankMsg, Coin, CosmosMsg, Decimal, Event, MessageInfo, Response, SubMsg, + Uint128, +}; use cw_utils::{may_pay, PaymentError}; -use sg_std::{create_fund_fairburn_pool_msg, Response, SubMsg, NATIVE_DENOM}; +use sg_std::NATIVE_DENOM; use thiserror::Error; - // governance parameters const FEE_BURN_PERCENT: u64 = 50; const FOUNDATION: &str = "stars1xqz6xujjyz0r9uzn7srasle5uynmpa0zkjr5l8"; @@ -21,7 +24,7 @@ pub fn checked_fair_burn( }; if payment.u128() != 0u128 { - fair_burn(fee, developer, res); + fair_burn(info.sender.to_string(), fee, developer, res); } Ok(()) @@ -71,7 +74,7 @@ pub fn ibc_denom_fair_burn( } /// Burn and distribute fees, assuming the right fee is passed in -pub fn fair_burn(fee: u128, developer: Option, res: &mut Response) { +pub fn fair_burn(sender: String, fee: u128, developer: Option, res: &mut Response) { let mut event = Event::new("fair-burn"); // calculate the fair burn fee @@ -92,17 +95,36 @@ pub fn fair_burn(fee: u128, developer: Option, res: &mut Response) { event = event.add_attribute("dev", dev.to_string()); event = event.add_attribute("dev_amount", Uint128::from(remainder).to_string()); } else { - res.messages - .push(SubMsg::new(create_fund_fairburn_pool_msg(coins( - remainder, - NATIVE_DENOM, - )))); + let msg_fund_fairburn_pool = CosmosMsg::Stargate { + type_url: "/publicawesome.stargaze.alloc.v1beta1.MsgFundFairburnPool".to_string(), + value: encode_msg_fund_fairburn_pool(sender, &coin(remainder, NATIVE_DENOM)).into(), + }; + res.messages.push(SubMsg::new(msg_fund_fairburn_pool)); event = event.add_attribute("dist_amount", Uint128::from(remainder).to_string()); } res.events.push(event); } +fn create_fund_fairburn_pool_msg(sender: String, amount: &Coin) -> CosmosMsg { + CosmosMsg::Stargate { + type_url: "/publicawesome.stargaze.alloc.v1beta1.MsgFundFairburnPool".to_string(), + value: encode_msg_fund_fairburn_pool(sender, amount).into(), + } +} +/// Encode the message to fund the fairburn pool +/// following the protobuf spec in +/// https://github.com/public-awesome/stargaze/blob/efdb9212e037e05fc429c0cfbcf425ad11855e15/proto/publicawesome/stargaze/alloc/v1beta1/tx.proto#L49 +fn encode_msg_fund_fairburn_pool(sender: String, amount: &Coin) -> Vec { + let coin = Anybuf::new() + .append_string(1, &amount.denom) + .append_string(2, amount.amount.to_string()); + Anybuf::new() + .append_string(1, sender) + .append_message(2, &coin) + .into_vec() +} + #[derive(Error, Debug, PartialEq, Eq)] pub enum FeeError { #[error("Insufficient fee: expected {0}, got {1}")] @@ -114,8 +136,9 @@ pub enum FeeError { #[cfg(test)] mod tests { - use cosmwasm_std::{coins, Addr, BankMsg}; - use sg_std::{create_fund_fairburn_pool_msg, Response, NATIVE_DENOM}; + use crate::create_fund_fairburn_pool_msg; + use cosmwasm_std::{coin, coins, Addr, BankMsg, Response}; + use sg_std::NATIVE_DENOM; use crate::{fair_burn, SubMsg}; @@ -123,11 +146,14 @@ mod tests { fn check_fair_burn_no_dev_rewards() { let mut res = Response::new(); - fair_burn(9u128, None, &mut res); + fair_burn(Addr::unchecked("sender").to_string(), 9u128, None, &mut res); let burn_msg = SubMsg::new(BankMsg::Burn { amount: coins(4, "ustars".to_string()), }); - let dist_msg = SubMsg::new(create_fund_fairburn_pool_msg(coins(5, NATIVE_DENOM))); + let dist_msg = SubMsg::new(create_fund_fairburn_pool_msg( + Addr::unchecked("sender").to_string(), + &coin(5, NATIVE_DENOM), + )); assert_eq!(res.messages.len(), 2); assert_eq!(res.messages[0], burn_msg); assert_eq!(res.messages[1], dist_msg); @@ -137,7 +163,12 @@ mod tests { fn check_fair_burn_with_dev_rewards() { let mut res = Response::new(); - fair_burn(9u128, Some(Addr::unchecked("geordi")), &mut res); + fair_burn( + Addr::unchecked("sender").to_string(), + 9u128, + Some(Addr::unchecked("geordi")), + &mut res, + ); let bank_msg = SubMsg::new(BankMsg::Send { to_address: "geordi".to_string(), amount: coins(5, NATIVE_DENOM), @@ -154,7 +185,12 @@ mod tests { fn check_fair_burn_with_dev_rewards_different_amount() { let mut res = Response::new(); - fair_burn(1420u128, Some(Addr::unchecked("geordi")), &mut res); + fair_burn( + Addr::unchecked("sender").to_string(), + 1420u128, + Some(Addr::unchecked("geordi")), + &mut res, + ); let bank_msg = SubMsg::new(BankMsg::Send { to_address: "geordi".to_string(), amount: coins(710, NATIVE_DENOM),