diff --git a/Cargo.lock b/Cargo.lock index 8d96697d..d3587dc4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,7 +27,7 @@ checksum = "0346d8c1f762b41b458ed3145eea914966bb9ad20b9be0d6d463b20d45586370" dependencies = [ "actix-utils", "actix-web", - "derive_more", + "derive_more 0.99.17", "futures-util", "log", "once_cell", @@ -50,7 +50,7 @@ dependencies = [ "brotli", "bytes", "bytestring", - "derive_more", + "derive_more 0.99.17", "encoding_rs", "flate2", "futures-core", @@ -167,7 +167,7 @@ dependencies = [ "bytestring", "cfg-if", "cookie", - "derive_more", + "derive_more 0.99.17", "encoding_rs", "futures-core", "futures-util", @@ -277,26 +277,27 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c37d89f69cb43901949ba29307ada8b9e3b170f94057ad4c04d6fd169d24d65f" dependencies = [ "alloy-consensus", + "alloy-contract", "alloy-core", "alloy-eips", "alloy-genesis", "alloy-network", - "alloy-node-bindings", "alloy-provider", + "alloy-pubsub", "alloy-rpc-client", "alloy-rpc-types", "alloy-serde", "alloy-signer", - "alloy-signer-aws", - "alloy-signer-gcp", - "alloy-signer-ledger", + "alloy-signer-local", "alloy-transport", "alloy-transport-http", - "reqwest 0.12.4", + "alloy-transport-ipc", + "alloy-transport-ws", ] [[package]] @@ -311,8 +312,9 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1468e3128e07c7afe4ff13c17e8170c330d12c322f8924b8bf6986a27e0aad3d" dependencies = [ "alloy-eips", "alloy-primitives", @@ -322,11 +324,32 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-contract" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335d62de1a887f1b780441f8a3037f39c9fb26839cc9acd891c9b80396145cd5" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-types-eth", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "thiserror", +] + [[package]] name = "alloy-core" -version = "0.7.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5af3faff14c12c8b11037e0a093dd157c3702becb8435577a2408534d0758315" +checksum = "88b095eb0533144b4497e84a9cc3e44a5c2e3754a3983c0376a55a2f9183a53e" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -336,16 +359,15 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "0.7.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6e6436a9530f25010d13653e206fab4c9feddacf21a54de8d7311b275bc56b" +checksum = "4004925bff5ba0a11739ae84dbb6601a981ea692f3bd45b626935ee90a6b8471" dependencies = [ "alloy-json-abi", "alloy-primitives", "alloy-sol-type-parser", "alloy-sol-types", "const-hex", - "derive_more", "itoa", "serde", "serde_json", @@ -353,14 +375,41 @@ dependencies = [ ] [[package]] -name = "alloy-eips" +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d319bb544ca6caeab58c39cea8921c55d924d4f68f2c60f24f914673f9a74a" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "k256", + "serde", +] + +[[package]] +name = "alloy-eips" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c35df7b972b06f1b2f4e8b7a53328522fa788054a9d3e556faf2411c5a51d5a" dependencies = [ + "alloy-eip2930", + "alloy-eip7702", "alloy-primitives", "alloy-rlp", "alloy-serde", "c-kzg", + "derive_more 1.0.0", "once_cell", "serde", "sha2", @@ -368,20 +417,20 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7210f9206c0fa2a83c824cf8cb6c962126bc9fdc4f41ade1932f14150ef5f6" dependencies = [ "alloy-primitives", "alloy-serde", "serde", - "serde_json", ] [[package]] name = "alloy-json-abi" -version = "0.7.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaeaccd50238126e3a0ff9387c7c568837726ad4f4e399b528ca88104d6c25ef" +checksum = "9996daf962fd0a90d3c93b388033228865953b92de7bb1959b891d78750a4091" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -391,10 +440,12 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8866562186d237f1dfeaf989ef941a24764f764bf5c33311e37ead3519c6a429" dependencies = [ "alloy-primitives", + "alloy-sol-types", "serde", "serde_json", "thiserror", @@ -403,14 +454,17 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe714e233f9eaf410de95a9af6bcd05d3a7f8c8de7a0817221e95a6b642a080" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-json-rpc", + "alloy-network-primitives", "alloy-primitives", "alloy-rpc-types-eth", + "alloy-serde", "alloy-signer", "alloy-sol-types", "async-trait", @@ -420,31 +474,28 @@ dependencies = [ ] [[package]] -name = "alloy-node-bindings" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +name = "alloy-network-primitives" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c5a38117974c5776a45e140226745a0b664f79736aa900995d8e4121558e064" dependencies = [ - "alloy-genesis", + "alloy-eips", "alloy-primitives", - "k256", - "serde_json", - "tempfile", - "thiserror", - "tracing", - "url", + "alloy-serde", + "serde", ] [[package]] name = "alloy-primitives" -version = "0.7.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f783611babedbbe90db3478c120fb5f5daacceffc210b39adc0af4fe0da70bad" +checksum = "411aff151f2a73124ee473708e82ed51b2535f68928b6a1caa8bc1246ae6f7cd" dependencies = [ "alloy-rlp", "bytes", "cfg-if", "const-hex", - "derive_more", + "derive_more 1.0.0", "hex-literal", "itoa", "k256", @@ -458,23 +509,24 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c65633d6ef83c3626913c004eaf166a6dd50406f724772ea8567135efd6dc5d3" dependencies = [ "alloy-chains", "alloy-consensus", "alloy-eips", "alloy-json-rpc", "alloy-network", - "alloy-node-bindings", + "alloy-network-primitives", "alloy-primitives", + "alloy-pubsub", "alloy-rpc-client", - "alloy-rpc-types-anvil", "alloy-rpc-types-eth", - "alloy-rpc-types-trace", - "alloy-signer-wallet", "alloy-transport", "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", "async-stream", "async-trait", "auto_impl", @@ -482,15 +534,35 @@ dependencies = [ "futures", "futures-utils-wasm", "lru", - "pin-project 1.1.5", + "pin-project", "reqwest 0.12.4", "serde", "serde_json", + "thiserror", "tokio", "tracing", "url", ] +[[package]] +name = "alloy-pubsub" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "949db89abae6193b44cc90ebf2eeb74eb8d2a474383c5e62b45bdcd362e84f8f" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-transport", + "bimap", + "futures", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.1", + "tracing", +] + [[package]] name = "alloy-rlp" version = "0.3.5" @@ -515,51 +587,66 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fc328bb5d440599ba1b5aa44c0b9ab0625fbc3a403bb5ee94ed4a01ba23e07" dependencies = [ "alloy-json-rpc", + "alloy-primitives", + "alloy-pubsub", "alloy-transport", "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", "futures", - "pin-project 1.1.5", + "pin-project", "reqwest 0.12.4", "serde", "serde_json", "tokio", "tokio-stream", - "tower", + "tower 0.5.1", "tracing", "url", ] [[package]] name = "alloy-rpc-types" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f8ff679f94c497a8383f2cd09e2a099266e5f3d5e574bc82b4b379865707dbb" dependencies = [ + "alloy-rpc-types-engine", "alloy-rpc-types-eth", "alloy-serde", + "serde", ] [[package]] -name = "alloy-rpc-types-anvil" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +name = "alloy-rpc-types-engine" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66bb45f4c5efe227bcb51d89c97221225169976e18097671a0bd4393d8248a4" dependencies = [ + "alloy-consensus", + "alloy-eips", "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types-eth", "alloy-serde", "serde", + "thiserror", ] [[package]] name = "alloy-rpc-types-eth" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a59b1d7c86e0a653e7f3d29954f6de5a2878d8cfd1f010ff93be5c2c48cd3b1" dependencies = [ "alloy-consensus", "alloy-eips", - "alloy-genesis", + "alloy-network-primitives", "alloy-primitives", "alloy-rlp", "alloy-serde", @@ -570,22 +657,11 @@ dependencies = [ "thiserror", ] -[[package]] -name = "alloy-rpc-types-trace" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" -dependencies = [ - "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", - "serde", - "serde_json", -] - [[package]] name = "alloy-serde" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51db8a6428a2159e01b7a43ec7aac801edd0c4db1d4de06f310c288940f16fd3" dependencies = [ "alloy-primitives", "serde", @@ -594,12 +670,11 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bebc1760c13592b7ba3fcd964abba546b8d6a9f10d15e8d92a8263731be33f36" dependencies = [ - "alloy-dyn-abi", "alloy-primitives", - "alloy-sol-types", "async-trait", "auto_impl", "elliptic-curve", @@ -608,62 +683,10 @@ dependencies = [ ] [[package]] -name = "alloy-signer-aws" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" -dependencies = [ - "alloy-consensus", - "alloy-network", - "alloy-primitives", - "alloy-signer", - "async-trait", - "aws-sdk-kms", - "k256", - "spki", - "thiserror", - "tracing", -] - -[[package]] -name = "alloy-signer-gcp" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" -dependencies = [ - "alloy-consensus", - "alloy-network", - "alloy-primitives", - "alloy-signer", - "async-trait", - "gcloud-sdk", - "k256", - "spki", - "thiserror", - "tracing", -] - -[[package]] -name = "alloy-signer-ledger" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" -dependencies = [ - "alloy-consensus", - "alloy-dyn-abi", - "alloy-network", - "alloy-primitives", - "alloy-signer", - "alloy-sol-types", - "async-trait", - "coins-ledger", - "futures-util", - "semver 1.0.23", - "thiserror", - "tracing", -] - -[[package]] -name = "alloy-signer-wallet" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +name = "alloy-signer-local" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bfb3508485aa798efb5725322e414313239274d3780079b7f8c6746b8ee6e1b" dependencies = [ "alloy-consensus", "alloy-network", @@ -677,13 +700,13 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.7.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bad41a7c19498e3f6079f7744656328699f8ea3e783bdd10d85788cd439f572" +checksum = "0458ccb02a564228fcd76efb8eb5a520521a8347becde37b402afec9a1b83859" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", "syn 2.0.66", @@ -691,16 +714,16 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.7.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd9899da7d011b4fe4c406a524ed3e3f963797dbc93b45479d60341d3a27b252" +checksum = "2bc65475025fc1e84bf86fc840f04f63fcccdcf3cf12053c99918e4054dfbc69" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", "const-hex", "heck 0.5.0", - "indexmap 2.2.6", - "proc-macro-error", + "indexmap", + "proc-macro-error2", "proc-macro2", "quote", "syn 2.0.66", @@ -710,9 +733,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.7.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32d595768fdc61331a132b6f65db41afae41b9b97d36c21eb1b955c422a7e60" +checksum = "6ed10f0715a0b69fde3236ff3b9ae5f6f7c97db5a387747100070d3016b9266b" dependencies = [ "alloy-json-abi", "const-hex", @@ -727,18 +750,19 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "0.7.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa2fbd22d353d8685bd9fee11ba2d8b5c3b1d11e56adb3265fcf1f32bfdf404" +checksum = "3edae8ea1de519ccba896b6834dec874230f72fe695ff3c9c118e90ec7cff783" dependencies = [ + "serde", "winnow 0.6.13", ] [[package]] name = "alloy-sol-types" -version = "0.7.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a49042c6d3b66a9fe6b2b5a8bf0d39fc2ae1ee0310a2a26ffedd79fb097878dd" +checksum = "1eb88e4da0a1b697ed6a9f811fdba223cf4d5c21410804fd1707836af73a462b" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -749,8 +773,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd5dc4e902f1860d54952446d246ac05386311ad61030a2b906ae865416d36e0" dependencies = [ "alloy-json-rpc", "base64 0.22.1", @@ -760,24 +785,63 @@ dependencies = [ "serde_json", "thiserror", "tokio", - "tower", + "tower 0.5.1", + "tracing", "url", ] [[package]] name = "alloy-transport-http" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy#230205751b8e07a455acdef50710d996fc89ea84" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1742b94bb814f1ca6b322a6f9dd38a0252ff45a3119e40e888fb7029afa500ce" dependencies = [ "alloy-json-rpc", "alloy-transport", "reqwest 0.12.4", "serde_json", - "tower", + "tower 0.5.1", "tracing", "url", ] +[[package]] +name = "alloy-transport-ipc" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be321aac6f06d86855d41d4ce9ff9feb877fe7e9fe1cafce7380b981c12398c7" +dependencies = [ + "alloy-json-rpc", + "alloy-pubsub", + "alloy-transport", + "bytes", + "futures", + "interprocess", + "pin-project", + "serde_json", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "alloy-transport-ws" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8ed861e7030001364c8ffa2db63541f7bae275a6e636de7616c20f2fd3dc0c3" +dependencies = [ + "alloy-pubsub", + "alloy-transport", + "futures", + "http 1.1.0", + "rustls 0.23.13", + "serde_json", + "tokio", + "tokio-tungstenite", + "tracing", + "ws_stream_wasm", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -930,23 +994,16 @@ dependencies = [ ] [[package]] -name = "arrayvec" -version = "0.7.4" +name = "arrayref" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] -name = "async-compression" -version = "0.4.11" +name = "arrayvec" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd066d0b4ef8ecb03a55319dc13aa6910616d0f44008a045bb1835af830abff5" -dependencies = [ - "flate2", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", -] +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-stream" @@ -981,6 +1038,17 @@ dependencies = [ "syn 2.0.66", ] +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version 0.4.0", +] + [[package]] name = "atoi" version = "2.0.0" @@ -1008,261 +1076,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] -name = "aws-credential-types" -version = "1.2.0" +name = "backtrace" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16838e6c9e12125face1c1eff1343c75e3ff540de98ff7ebd61874a89bcfeb9" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ - "aws-smithy-async", - "aws-smithy-runtime-api", - "aws-smithy-types", - "zeroize", + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", ] [[package]] -name = "aws-runtime" -version = "1.2.2" +name = "base-x" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75588e7ee5e8496eed939adac2035a6dbab9f7eb2acdd9ab2d31856dab6f3955" -dependencies = [ - "aws-credential-types", - "aws-sigv4", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "fastrand", - "http 0.2.12", - "http-body 0.4.6", - "percent-encoding", - "pin-project-lite", - "tracing", - "uuid", -] - -[[package]] -name = "aws-sdk-kms" -version = "1.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da951fb0dd1a02728a91c58af8464098766f1a0600af932dd3f8361b23e1bfc9" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "http 0.2.12", - "once_cell", - "regex-lite", - "tracing", -] - -[[package]] -name = "aws-sigv4" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31eed8d45759b2c5fe7fd304dd70739060e9e0de509209036eabea14d0720cce" -dependencies = [ - "aws-credential-types", - "aws-smithy-http", - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "form_urlencoded", - "hex", - "hmac", - "http 0.2.12", - "http 1.1.0", - "once_cell", - "percent-encoding", - "sha2", - "time", - "tracing", -] - -[[package]] -name = "aws-smithy-async" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" -dependencies = [ - "futures-util", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "aws-smithy-http" -version = "0.60.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7de001a1b9a25601016d8057ea16e31a45fdca3751304c8edf4ad72e706c08" -dependencies = [ - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "bytes-utils", - "futures-core", - "http 0.2.12", - "http-body 0.4.6", - "once_cell", - "percent-encoding", - "pin-project-lite", - "pin-utils", - "tracing", -] - -[[package]] -name = "aws-smithy-json" -version = "0.60.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" -dependencies = [ - "aws-smithy-types", -] - -[[package]] -name = "aws-smithy-runtime" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d3965f6417a92a6d1009c5958a67042f57e46342afb37ca58f9ad26744ec73" -dependencies = [ - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "fastrand", - "http 0.2.12", - "http-body 0.4.6", - "http-body 1.0.0", - "once_cell", - "pin-project-lite", - "pin-utils", - "tokio", - "tracing", -] - -[[package]] -name = "aws-smithy-runtime-api" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b570ea39eb95bd32543f6e4032bce172cb6209b9bc8c83c770d08169e875afc" -dependencies = [ - "aws-smithy-async", - "aws-smithy-types", - "bytes", - "http 0.2.12", - "http 1.1.0", - "pin-project-lite", - "tokio", - "tracing", - "zeroize", -] - -[[package]] -name = "aws-smithy-types" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe321a6b21f5d8eabd0ade9c55d3d0335f3c3157fc2b3e87f05f34b539e4df5" -dependencies = [ - "base64-simd", - "bytes", - "bytes-utils", - "http 0.2.12", - "http 1.1.0", - "http-body 0.4.6", - "http-body 1.0.0", - "http-body-util", - "itoa", - "num-integer", - "pin-project-lite", - "pin-utils", - "ryu", - "serde", - "time", -] - -[[package]] -name = "aws-types" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f734808d43702a67e57d478a12e227d4d038d0b90c9005a78c87890d3805922" -dependencies = [ - "aws-credential-types", - "aws-smithy-async", - "aws-smithy-runtime-api", - "aws-smithy-types", - "http 0.2.12", - "rustc_version 0.4.0", - "tracing", -] - -[[package]] -name = "axum" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" -dependencies = [ - "async-trait", - "axum-core", - "bitflags 1.3.2", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.29", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "mime", - "rustversion", - "tower-layer", - "tower-service", -] - -[[package]] -name = "backtrace" -version = "0.3.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" [[package]] name = "base16ct" @@ -1288,16 +1120,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "base64-simd" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" -dependencies = [ - "outref", - "vsimd", -] - [[package]] name = "base64ct" version = "1.6.0" @@ -1315,6 +1137,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "bimap" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" + [[package]] name = "bit-set" version = "0.5.3" @@ -1357,6 +1185,17 @@ dependencies = [ "wyz", ] +[[package]] +name = "blake2b_simd" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -1395,7 +1234,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.66", @@ -1472,16 +1311,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bytes-utils" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" -dependencies = [ - "bytes", - "either", -] - [[package]] name = "bytestring" version = "1.3.1" @@ -1505,15 +1334,24 @@ dependencies = [ "serde", ] +[[package]] +name = "cbor4ii" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544cf8c89359205f4f990d0e6f3828db42df85b5dac95d09157a250eb0749c4" +dependencies = [ + "serde", +] + [[package]] name = "cc" -version = "1.0.99" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -1544,26 +1382,17 @@ dependencies = [ ] [[package]] -name = "coins-ledger" -version = "0.11.1" +name = "cid" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "166ef757aa936b45f3e5d39c344047f65ef7d25a50067246a498021a816d074b" +checksum = "fd94671561e36e4e7de75f753f577edafb0e7c05d6e4547229fdf7938fbcd2c3" dependencies = [ - "async-trait", - "byteorder", - "cfg-if", - "const-hex", - "getrandom", - "hidapi-rusb", - "js-sys", - "log", - "nix", - "once_cell", - "thiserror", - "tokio", - "tracing", - "wasm-bindgen", - "wasm-bindgen-futures", + "core2", + "multibase", + "multihash", + "serde", + "serde_bytes", + "unsigned-varint 0.7.2", ] [[package]] @@ -1585,6 +1414,12 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + [[package]] name = "convert_case" version = "0.4.0" @@ -1618,6 +1453,15 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] + [[package]] name = "cpufeatures" version = "0.2.12" @@ -1724,17 +1568,79 @@ dependencies = [ "typenum", ] +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.66", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.66", +] + [[package]] name = "dashmap" -version = "5.5.3" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "data-encoding-macro" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +checksum = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f" dependencies = [ - "cfg-if", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", + "data-encoding", + "syn 1.0.109", ] [[package]] @@ -1782,6 +1688,27 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "unicode-xid", +] + [[package]] name = "digest" version = "0.9.0" @@ -1809,6 +1736,12 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "doctest-file" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" + [[package]] name = "dotenv" version = "0.15.0" @@ -1862,7 +1795,6 @@ dependencies = [ "ff", "generic-array", "group", - "pem-rfc7468", "pkcs8", "rand_core", "sec1", @@ -2019,6 +1951,7 @@ dependencies = [ name = "fplus-database" version = "2.0.2" dependencies = [ + "alloy", "anyhow", "chrono", "dotenv", @@ -2027,6 +1960,7 @@ dependencies = [ "log", "once_cell", "sea-orm", + "sea-orm-newtype", "serde", "serde_json", "serial_test", @@ -2042,7 +1976,6 @@ dependencies = [ "actix-cors", "actix-utils", "actix-web", - "alloy", "anyhow", "async-trait", "chrono", @@ -2075,15 +2008,16 @@ dependencies = [ "env_logger", "fplus-database", "futures", + "fvm_shared", "http 0.2.12", "hyper 0.14.29", "hyper-rustls", - "jsonwebtoken 8.3.0", + "jsonwebtoken", "log", "markdown", "octocrab", "once_cell", - "pem 1.1.1", + "pem", "rayon", "regex", "reqwest 0.11.27", @@ -2208,46 +2142,56 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" [[package]] -name = "gcemeta" -version = "0.2.3" +name = "fvm_ipld_blockstore" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d460327b24cc34c86d53d60a90e9e6044817f7906ebd9baa5c3d0ee13e1ecf" +checksum = "d064b957420f5ecc137a153baaa6c32e2eb19b674135317200b6f2537eabdbfd" dependencies = [ - "bytes", - "hyper 0.14.29", + "anyhow", + "cid", + "multihash", +] + +[[package]] +name = "fvm_ipld_encoding" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90608092e31d9a06236268c58f7c36668ab4b2a48afafe3a97e08f094ad7ae50" +dependencies = [ + "anyhow", + "cid", + "fvm_ipld_blockstore", + "multihash", "serde", - "serde_json", + "serde_ipld_dagcbor", + "serde_repr", + "serde_tuple", "thiserror", - "tokio", - "tracing", ] [[package]] -name = "gcloud-sdk" -version = "0.24.7" +name = "fvm_shared" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa57d45d9a9778e0bf38deb6a4c9dbe293fa021d0b70b126b5dc593979b08569" +checksum = "77cc1f28a1c99bc28f61c61896925cd945f08e44dfce5102a722048e24222987" dependencies = [ - "async-trait", - "chrono", - "futures", - "gcemeta", - "hyper 0.14.29", - "jsonwebtoken 9.3.0", - "once_cell", - "prost", - "prost-types", - "reqwest 0.11.27", - "secret-vault-value", + "anyhow", + "bitflags 2.5.0", + "blake2b_simd", + "cid", + "data-encoding", + "data-encoding-macro", + "fvm_ipld_encoding", + "lazy_static", + "multihash", + "num-bigint", + "num-derive", + "num-integer", + "num-traits", "serde", - "serde_json", - "tokio", - "tonic", - "tower", - "tower-layer", - "tower-util", - "tracing", - "url", + "serde_tuple", + "thiserror", + "unsigned-varint 0.8.0", ] [[package]] @@ -2268,10 +2212,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi", - "wasm-bindgen", ] [[package]] @@ -2309,7 +2251,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap", "slab", "tokio", "tokio-util", @@ -2380,18 +2322,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" -[[package]] -name = "hidapi-rusb" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efdc2ec354929a6e8f3c6b6923a4d97427ec2f764cfee8cd4bfe890946cdf08b" -dependencies = [ - "cc", - "libc", - "pkg-config", - "rusb", -] - [[package]] name = "hkdf" version = "0.12.4" @@ -2553,7 +2483,7 @@ dependencies = [ "hyper 0.14.29", "log", "rustls 0.21.12", - "rustls-native-certs 0.6.3", + "rustls-native-certs", "tokio", "tokio-rustls 0.24.1", ] @@ -2614,7 +2544,7 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", + "tower 0.4.13", "tower-service", "tracing", ] @@ -2642,6 +2572,12 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.5.0" @@ -2672,16 +2608,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.2.6" @@ -2703,6 +2629,21 @@ dependencies = [ "syn 2.0.66", ] +[[package]] +name = "interprocess" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f4e4a06d42fab3e85ab1b419ad32b09eab58b901d40c57935ff92db3287a13" +dependencies = [ + "doctest-file", + "futures-core", + "libc", + "recvmsg", + "tokio", + "widestring", + "windows-sys 0.52.0", +] + [[package]] name = "ipnet" version = "2.9.0" @@ -2729,15 +2670,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -2778,28 +2710,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ "base64 0.21.7", - "pem 1.1.1", + "pem", "ring 0.16.20", "serde", "serde_json", "simple_asn1", ] -[[package]] -name = "jsonwebtoken" -version = "9.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" -dependencies = [ - "base64 0.21.7", - "js-sys", - "pem 3.0.4", - "ring 0.17.8", - "serde", - "serde_json", - "simple_asn1", -] - [[package]] name = "k256" version = "0.13.3" @@ -2861,18 +2778,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "libusb1-sys" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da050ade7ac4ff1ba5379af847a10a10a8e284181e060105bf8d86960ce9ce0f" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "linux-raw-sys" version = "0.4.14" @@ -2930,12 +2835,6 @@ dependencies = [ "unicode-id", ] -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - [[package]] name = "md-5" version = "0.10.6" @@ -2952,31 +2851,12 @@ version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "mime" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "mime_guess" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" -dependencies = [ - "mime", - "unicase", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -3004,6 +2884,45 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "multibase" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" +dependencies = [ + "base-x", + "data-encoding", + "data-encoding-macro", +] + +[[package]] +name = "multihash" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" +dependencies = [ + "blake2b_simd", + "core2", + "multihash-derive", + "serde", + "serde-big-array", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "multihash-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" +dependencies = [ + "proc-macro-crate 1.1.3", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", +] + [[package]] name = "native-tls" version = "0.2.12" @@ -3021,19 +2940,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset", - "pin-utils", -] - [[package]] name = "nom" version = "7.1.3" @@ -3077,6 +2983,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "num-integer" version = "0.1.46" @@ -3166,10 +3083,10 @@ dependencies = [ "hyper 0.14.29", "hyper-rustls", "hyper-timeout", - "jsonwebtoken 8.3.0", + "jsonwebtoken", "once_cell", "percent-encoding", - "pin-project 1.1.5", + "pin-project", "secrecy", "serde", "serde_json", @@ -3177,7 +3094,7 @@ dependencies = [ "serde_urlencoded", "snafu", "tokio", - "tower", + "tower 0.4.13", "tower-http", "tracing", "url", @@ -3266,12 +3183,6 @@ dependencies = [ "syn 2.0.66", ] -[[package]] -name = "outref" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" - [[package]] name = "parity-scale-codec" version = "3.6.12" @@ -3292,7 +3203,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -3336,16 +3247,6 @@ dependencies = [ "base64 0.13.1", ] -[[package]] -name = "pem" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" -dependencies = [ - "base64 0.22.1", - "serde", -] - [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -3373,12 +3274,13 @@ dependencies = [ ] [[package]] -name = "pin-project" -version = "0.4.30" +name = "pharos" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef0f924a5ee7ea9cbcea77529dba45f8a9ba9f622419fe3386ca581a3ae9d5a" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" dependencies = [ - "pin-project-internal 0.4.30", + "futures", + "rustc_version 0.4.0", ] [[package]] @@ -3387,18 +3289,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ - "pin-project-internal 1.1.5", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "851c8d0ce9bebe43790dedfc86614c23494ac9f423dd618d3a61fc693eafe61e" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "pin-project-internal", ] [[package]] @@ -3474,6 +3365,16 @@ dependencies = [ "uint", ] +[[package]] +name = "proc-macro-crate" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" +dependencies = [ + "thiserror", + "toml", +] + [[package]] name = "proc-macro-crate" version = "3.1.0" @@ -3507,6 +3408,28 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "proc-macro2" version = "1.0.85" @@ -3530,42 +3453,10 @@ dependencies = [ "rand", "rand_chacha", "rand_xorshift", - "regex-syntax", - "rusty-fork", - "tempfile", - "unarray", -] - -[[package]] -name = "prost" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-derive" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" -dependencies = [ - "anyhow", - "itertools 0.12.1", - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "prost-types" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" -dependencies = [ - "prost", + "regex-syntax", + "rusty-fork", + "tempfile", + "unarray", ] [[package]] @@ -3668,6 +3559,12 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "recvmsg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" + [[package]] name = "redox_syscall" version = "0.4.1" @@ -3736,7 +3633,6 @@ version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "async-compression", "base64 0.21.7", "bytes", "encoding_rs", @@ -3746,19 +3642,15 @@ dependencies = [ "http 0.2.12", "http-body 0.4.6", "hyper 0.14.29", - "hyper-rustls", "hyper-tls 0.5.0", "ipnet", "js-sys", "log", "mime", - "mime_guess", "native-tls", "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.12", - "rustls-native-certs 0.6.3", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -3767,13 +3659,10 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls 0.24.1", - "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", "winreg 0.50.0", ] @@ -3946,16 +3835,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" -[[package]] -name = "rusb" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab9f9ff05b63a786553a4c02943b74b34a988448671001e9a27e2f0565cc05a4" -dependencies = [ - "libc", - "libusb1-sys", -] - [[package]] name = "rust_decimal" version = "1.35.0" @@ -4029,14 +3908,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ - "log", + "once_cell", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.4", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -4053,19 +3932,6 @@ dependencies = [ "security-framework", ] -[[package]] -name = "rustls-native-certs" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" -dependencies = [ - "openssl-probe", - "rustls-pemfile 2.1.2", - "rustls-pki-types", - "schannel", - "security-framework", -] - [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -4087,9 +3953,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" @@ -4103,9 +3969,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring 0.17.8", "rustls-pki-types", @@ -4231,6 +4097,28 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sea-orm-newtype" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f702fe98ba95b4dcdd8a800867a77005dc63ea96f9a29219d5ae5dbabb45c2" +dependencies = [ + "sea-orm", + "sea-orm-newtype-derive", +] + +[[package]] +name = "sea-orm-newtype-derive" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acf9f6f47c879ab2d2a59e2b2eab4e2d992e3e48539012414dcda0650fa3e6ca" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "sea-query" version = "0.30.7" @@ -4293,19 +4181,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "secret-vault-value" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f8cfb86d2019f64a4cfb49e499f401f406fbec946c1ffeea9d0504284347de" -dependencies = [ - "prost", - "prost-types", - "serde", - "serde_json", - "zeroize", -] - [[package]] name = "security-framework" version = "2.11.0" @@ -4353,6 +4228,12 @@ dependencies = [ "pest", ] +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + [[package]] name = "serde" version = "1.0.203" @@ -4362,6 +4243,24 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd31f59f6fe2b0c055371bb2f16d7f0aa7d8881676c04a55b1596d1a17cd10a4" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" version = "1.0.203" @@ -4373,6 +4272,18 @@ dependencies = [ "syn 2.0.66", ] +[[package]] +name = "serde_ipld_dagcbor" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e880e0b1f9c7a8db874642c1217f7e19b29e325f24ab9f0fcb11818adec7f01" +dependencies = [ + "cbor4ii", + "cid", + "scopeguard", + "serde", +] + [[package]] name = "serde_json" version = "1.0.117" @@ -4394,6 +4305,38 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "serde_tuple" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f025b91216f15a2a32aa39669329a475733590a015835d1783549a56d09427" +dependencies = [ + "serde", + "serde_tuple_macros", +] + +[[package]] +name = "serde_tuple_macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4076151d1a2b688e25aaf236997933c66e18b870d0369f8b248b8ab2be630d7e" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -4463,6 +4406,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4625,7 +4574,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.2.6", + "indexmap", "log", "memchr", "native-tls", @@ -4820,6 +4769,12 @@ dependencies = [ "unicode-properties", ] +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "strum" version = "0.25.0" @@ -4878,9 +4833,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.7.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d71e19bca02c807c9faa67b5a47673ff231b6e7449b251695188522f1dc44b2" +checksum = "4b95156f8b577cb59dc0b1df15c6f29a10afc5f8a7ac9786b0b5c68c19149278" dependencies = [ "paste", "proc-macro2", @@ -4906,6 +4861,18 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -5100,11 +5067,11 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.22.4", + "rustls 0.23.13", "rustls-pki-types", "tokio", ] @@ -5121,6 +5088,22 @@ dependencies = [ "tokio-util", ] +[[package]] +name = "tokio-tungstenite" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" +dependencies = [ + "futures-util", + "log", + "rustls 0.23.13", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.0", + "tungstenite", + "webpki-roots", +] + [[package]] name = "tokio-util" version = "0.7.11" @@ -5134,6 +5117,15 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + [[package]] name = "toml_datetime" version = "0.6.6" @@ -5146,37 +5138,23 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.6", + "indexmap", "toml_datetime", "winnow 0.5.40", ] [[package]] -name = "tonic" -version = "0.11.0" +name = "tower" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ - "async-stream", - "async-trait", - "axum", - "base64 0.21.7", - "bytes", - "h2", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.29", - "hyper-timeout", - "percent-encoding", - "pin-project 1.1.5", - "prost", - "rustls-native-certs 0.7.0", - "rustls-pemfile 2.1.2", - "rustls-pki-types", + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", "tokio", - "tokio-rustls 0.25.0", - "tokio-stream", - "tower", + "tokio-util", "tower-layer", "tower-service", "tracing", @@ -5184,22 +5162,16 @@ dependencies = [ [[package]] name = "tower" -version = "0.4.13" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" dependencies = [ "futures-core", "futures-util", - "indexmap 1.9.3", - "pin-project 1.1.5", "pin-project-lite", - "rand", - "slab", - "tokio", - "tokio-util", + "sync_wrapper", "tower-layer", "tower-service", - "tracing", ] [[package]] @@ -5223,27 +5195,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tower-util" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1093c19826d33807c72511e68f73b4a0469a3f22c2bd5f7d5212178b4b89674" -dependencies = [ - "futures-core", - "futures-util", - "pin-project 0.4.30", - "tower-service", -] +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -5283,6 +5243,26 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.1.0", + "httparse", + "log", + "rand", + "rustls 0.23.13", + "rustls-pki-types", + "sha1", + "thiserror", + "utf-8", +] + [[package]] name = "typenum" version = "1.17.0" @@ -5313,15 +5293,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -[[package]] -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" version = "0.3.15" @@ -5361,12 +5332,30 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +[[package]] +name = "unicode-xid" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" + [[package]] name = "unicode_categories" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" +[[package]] +name = "unsigned-varint" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" + +[[package]] +name = "unsigned-varint" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" + [[package]] name = "untrusted" version = "0.7.1" @@ -5397,6 +5386,12 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "uuid" version = "1.8.0" @@ -5433,12 +5428,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "vsimd" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" - [[package]] name = "wait-timeout" version = "0.2.0" @@ -5536,26 +5525,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] -name = "wasm-streams" -version = "0.4.0" +name = "web-sys" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ - "futures-util", "js-sys", "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", ] [[package]] -name = "web-sys" -version = "0.3.69" +name = "webpki-roots" +version = "0.26.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "0bd24728e5af82c6c4ec1b66ac4844bdf8156257fccda846ec58b42cd0cdbe6a" dependencies = [ - "js-sys", - "wasm-bindgen", + "rustls-pki-types", ] [[package]] @@ -5568,6 +5553,12 @@ dependencies = [ "wasite", ] +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + [[package]] name = "winapi" version = "0.3.9" @@ -5785,6 +5776,25 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ws_stream_wasm" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version 0.4.0", + "send_wrapper", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wyz" version = "0.5.1" diff --git a/Dockerfile b/Dockerfile index 4b70b645..dd85ff25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.76 AS builder +FROM rust:1.81 AS builder COPY ./fplus-lib /fplus-lib COPY ./fplus-http-server/Cargo.toml /fplus-http-server/Cargo.toml COPY ./Cargo.lock /fplus-http-server/Cargo.lock diff --git a/fplus-database/Cargo.toml b/fplus-database/Cargo.toml index 4aecf419..d46af1c5 100644 --- a/fplus-database/Cargo.toml +++ b/fplus-database/Cargo.toml @@ -24,4 +24,6 @@ serde = { version = "1.0.164", features = ["derive", "std", serial_test = "3.0.0" sha1 = "0.10.6" serde_json = "1.0.96" +alloy = { version = "0.3.2", features = ["signers"] } +sea-orm-newtype = "0.0.1" urlencoding = "2.1.3" diff --git a/fplus-database/src/database/applications.rs b/fplus-database/src/database/applications.rs index 43bf5ec1..c92a1f27 100644 --- a/fplus-database/src/database/applications.rs +++ b/fplus-database/src/database/applications.rs @@ -446,3 +446,14 @@ pub async fn delete_application( application.delete(&conn).await?; Ok(()) } + +pub async fn get_applications_by_client_id( + id: &String, +) -> Result, sea_orm::DbErr> { + let conn = get_database_connection().await?; + let result = Application::find() + .filter(Column::Id.eq(id)) + .all(&conn) + .await?; + Ok(result) +} diff --git a/fplus-database/src/database/autoallocations.rs b/fplus-database/src/database/autoallocations.rs new file mode 100644 index 00000000..eb96c558 --- /dev/null +++ b/fplus-database/src/database/autoallocations.rs @@ -0,0 +1,57 @@ +use crate::get_database_connection; +use crate::models::autoallocations::AddressWrapper; +use crate::models::autoallocations::{ + Column, Entity as Autoallocations, Model as AutoallocationModel, +}; +use alloy::primitives::Address; +use chrono::{DateTime, FixedOffset}; +use sea_orm::{entity::*, query::*, DbBackend, DbErr}; + +pub async fn get_last_client_autoallocation( + client_evm_address: impl Into, +) -> Result>, DbErr> { + let response = get_autoallocation(client_evm_address.into()).await?; + Ok(response.map(|allocation| allocation.last_allocation)) +} + +pub async fn create_or_update_autoallocation( + client_evm_address: &Address, + days_to_next_autoallocation: &i64, +) -> Result { + let conn = get_database_connection().await?; + let client_address = client_evm_address.to_checksum(None); + + let exec_res = conn + .execute(Statement::from_sql_and_values( + DbBackend::Postgres, + "INSERT INTO autoallocations (evm_wallet_address, last_allocation) + VALUES ($1, NOW()) + ON CONFLICT (evm_wallet_address) + DO UPDATE SET last_allocation = NOW() + WHERE autoallocations.last_allocation <= NOW() - (INTERVAL '1 day' * $2::int);", + [client_address.into(), (*days_to_next_autoallocation).into()], + )) + .await?; + Ok(exec_res.rows_affected()) +} + +pub async fn get_autoallocation( + client_evm_address: impl Into, +) -> Result, DbErr> { + let conn = get_database_connection().await?; + let response = Autoallocations::find() + .filter(Column::EvmWalletAddress.contains(client_evm_address.into())) + .one(&conn) + .await?; + Ok(response) +} + +pub async fn delete_autoallocation( + client_evm_address: impl Into, +) -> Result<(), sea_orm::DbErr> { + let conn = get_database_connection().await?; + Autoallocations::delete_by_id(client_evm_address.into()) + .exec(&conn) + .await?; + Ok(()) +} diff --git a/fplus-database/src/database/mod.rs b/fplus-database/src/database/mod.rs index 3a46bf79..e1b4aba1 100644 --- a/fplus-database/src/database/mod.rs +++ b/fplus-database/src/database/mod.rs @@ -1,3 +1,4 @@ pub mod allocation_amounts; pub mod allocators; pub mod applications; +pub mod autoallocations; diff --git a/fplus-database/src/models/autoallocations.rs b/fplus-database/src/models/autoallocations.rs new file mode 100644 index 00000000..39dd2d4a --- /dev/null +++ b/fplus-database/src/models/autoallocations.rs @@ -0,0 +1,41 @@ +use alloy::primitives::{Address, AddressError}; +use chrono::{DateTime, FixedOffset}; +use sea_orm::entity::prelude::*; +use sea_orm_newtype::DeriveNewType; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm(table_name = "autoallocations")] +pub struct Model { + #[sea_orm(primary_key, auto_increment = false)] + pub evm_wallet_address: AddressWrapper, + pub last_allocation: DateTime, +} + +#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] +pub enum Relation {} + +impl ActiveModelBehavior for ActiveModel {} + +#[derive(Clone, Debug, PartialEq, DeriveNewType, Eq, Serialize, Deserialize)] +#[sea_orm_newtype(try_from_into = "String", primary_key)] +pub struct AddressWrapper(pub Address); + +impl TryFrom for AddressWrapper { + type Error = AddressError; + fn try_from(value: String) -> Result { + Ok(AddressWrapper(Address::parse_checksummed(value, None)?)) + } +} + +impl From for String { + fn from(value: AddressWrapper) -> Self { + value.0.to_checksum(None) + } +} + +impl From
for AddressWrapper { + fn from(value: Address) -> Self { + AddressWrapper(value) + } +} diff --git a/fplus-database/src/models/mod.rs b/fplus-database/src/models/mod.rs index 250d09b6..97efdb54 100644 --- a/fplus-database/src/models/mod.rs +++ b/fplus-database/src/models/mod.rs @@ -5,3 +5,4 @@ pub mod prelude; pub mod allocation_amounts; pub mod allocators; pub mod applications; +pub mod autoallocations; diff --git a/fplus-http-server/Cargo.toml b/fplus-http-server/Cargo.toml index ddcb854c..d88a422d 100644 --- a/fplus-http-server/Cargo.toml +++ b/fplus-http-server/Cargo.toml @@ -29,6 +29,3 @@ async-trait = "0.1.73" uuidv4 = "1.0.0" log = "0.4.20" cron = "0.12.1" -alloy = { git = "https://github.com/alloy-rs/alloy", version = "0.1.0", features = [ - "signers", -] } diff --git a/fplus-http-server/src/main.rs b/fplus-http-server/src/main.rs index f001cafd..55692629 100644 --- a/fplus-http-server/src/main.rs +++ b/fplus-http-server/src/main.rs @@ -112,6 +112,8 @@ async fn main() -> std::io::Result<()> { .service(router::allocator::delete) .service(router::allocator::create_allocator_from_json) .service(router::allocator::update_allocator_force) + .service(router::autoallocator::last_client_allocation) + .service(router::autoallocator::trigger_autoallocation) // .service(router::allocator::get_installation_ids) }) .bind(("0.0.0.0", 8080))? diff --git a/fplus-http-server/src/router/autoallocator.rs b/fplus-http-server/src/router/autoallocator.rs new file mode 100644 index 00000000..e1d0a476 --- /dev/null +++ b/fplus-http-server/src/router/autoallocator.rs @@ -0,0 +1,23 @@ +use actix_web::{get, post, web, HttpResponse, Responder}; +use fplus_database::database::autoallocations as autoallocations_db; +use fplus_lib::core::autoallocator; +use fplus_lib::core::{LastAutoallocationQueryParams, TriggerAutoallocationInfo}; +#[get("/autoallocator/last_client_allocation")] +pub async fn last_client_allocation( + query: web::Query, +) -> impl Responder { + match autoallocations_db::get_last_client_autoallocation(query.evm_wallet_address).await { + Ok(last_client_allocation) => { + HttpResponse::Ok().body(serde_json::to_string_pretty(&last_client_allocation).unwrap()) + } + Err(e) => HttpResponse::BadRequest().body(e.to_string()), + } +} + +#[post("autoallocator/trigger_autoallocation")] +pub async fn trigger_autoallocation(info: web::Json) -> impl Responder { + match autoallocator::trigger_autoallocation(&info.into_inner()).await { + Ok(()) => HttpResponse::Ok().body(serde_json::to_string_pretty("Success").unwrap()), + Err(e) => HttpResponse::BadRequest().body(e.to_string()), + } +} diff --git a/fplus-http-server/src/router/mod.rs b/fplus-http-server/src/router/mod.rs index bc656d36..18f706d4 100644 --- a/fplus-http-server/src/router/mod.rs +++ b/fplus-http-server/src/router/mod.rs @@ -2,6 +2,7 @@ use actix_web::{get, HttpResponse, Responder}; pub mod allocator; pub mod application; +pub mod autoallocator; pub mod blockchain; pub mod verifier; diff --git a/fplus-lib/Cargo.toml b/fplus-lib/Cargo.toml index ac4b9d81..4d6c8f73 100644 --- a/fplus-lib/Cargo.toml +++ b/fplus-lib/Cargo.toml @@ -34,20 +34,10 @@ fplus-database = { path = "../fplus-database", version = "2.0.2" } pem = "1.0" anyhow = "1.0" regex = "1.0" -alloy = { git = "https://github.com/alloy-rs/alloy", version = "0.1.0", features = [ - "signers", - "providers", - "node-bindings", - "sol-types", - "json", - "network", - "rpc-types-eth", - "provider-http", - "dyn-abi", - "eip712", -] } tempfile = "3.10.1" size = "0.5.0-preview2" +alloy = { version = "0.3.2", features = ["full"] } +fvm_shared = "4.4.0" [dev-dependencies] actix-rt = "2.9.0" diff --git a/fplus-lib/src/config.rs b/fplus-lib/src/config.rs index 9cde769d..084e40b8 100644 --- a/fplus-lib/src/config.rs +++ b/fplus-lib/src/config.rs @@ -35,6 +35,12 @@ pub fn default_env_vars() -> &'static HashMap<&'static str, &'static str> { m.insert("RPC_URL", "https://mainnet.optimism.io"); m.insert("DMOB_API_URL", "https://api.datacapstats.io/public/api"); m.insert("DMOB_API_KEY", "5c993a17-7b18-4ead-a8a8-89dad981d87e"); + m.insert("DAYS_TO_NEXT_AUTOALLOCATION", "14"); + m.insert( + "ALLOCATOR_CONTRACT_ADDRESS", + "0x640bD4be149f40714D95aBcD414338bc7CfF39a3", + ); + m.insert("AUTOALLOCATION_AMOUNT", "68719476736"); // 68719476736 B == 64 GB m }) } diff --git a/fplus-lib/src/core/application/gitcoin_interaction.rs b/fplus-lib/src/core/application/gitcoin_interaction.rs index a1a6a2f7..1f83dba6 100644 --- a/fplus-lib/src/core/application/gitcoin_interaction.rs +++ b/fplus-lib/src/core/application/gitcoin_interaction.rs @@ -15,6 +15,11 @@ use crate::config::get_env_var_or_default; use crate::error::LDNError; use anyhow::Result; +pub trait ExpirableSolStruct: SolStruct { + fn get_expires_at(&self) -> &str; + fn get_issued_at(&self) -> &str; +} + sol! { #[allow(missing_docs)] function getScore(address user) view returns (uint256); @@ -28,6 +33,34 @@ sol! { string issued_at; string expires_at; } + + #[derive(Deserialize)] + struct KycAutoallocationApproval { + string message; + string client_fil_address; + string issued_at; + string expires_at; + } +} + +impl ExpirableSolStruct for KycApproval { + fn get_expires_at(&self) -> &str { + &self.expires_at + } + + fn get_issued_at(&self) -> &str { + &self.issued_at + } +} + +impl ExpirableSolStruct for KycAutoallocationApproval { + fn get_expires_at(&self) -> &str { + &self.expires_at + } + + fn get_issued_at(&self) -> &str { + &self.issued_at + } } pub async fn verify_on_gitcoin(address_from_signature: &Address) -> Result { @@ -73,8 +106,8 @@ fn calculate_score(response: Bytes) -> f64 { score as f64 / 10000.0 } -pub fn get_address_from_signature( - message: &KycApproval, +pub fn get_address_from_signature( + message: &T, signature: &str, ) -> Result { let domain = eip712_domain! { diff --git a/fplus-lib/src/core/autoallocator/metaallocator_interaction.rs b/fplus-lib/src/core/autoallocator/metaallocator_interaction.rs new file mode 100644 index 00000000..f8e1fd41 --- /dev/null +++ b/fplus-lib/src/core/autoallocator/metaallocator_interaction.rs @@ -0,0 +1,83 @@ +use std::str::FromStr; + +use crate::config::get_env_var_or_default; +use crate::error::LDNError; +use alloy::{ + network::{EthereumWallet, TransactionBuilder}, + primitives::{Address, Bytes, U256}, + providers::{Provider, ProviderBuilder}, + rpc::types::eth::TransactionRequest, + signers::local::PrivateKeySigner, + sol, + sol_types::SolCall, +}; +use anyhow::Result; +use fplus_database::config::get_env_or_throw; +use fvm_shared::address::{set_current_network, Address as FilecoinAddress, Network}; +sol! { + #[allow(missing_docs)] + function addVerifiedClient(bytes calldata clientAddress, uint256 amount); +} + +async fn get_provider() -> Result { + let private_key = get_env_or_throw("AUTOALLOCATOR_PRIVATE_KEY"); + let signer: PrivateKeySigner = private_key.parse().expect("Should parse private key"); + let wallet = EthereumWallet::from(signer); + let rpc_url = get_env_var_or_default("GLIF_NODE_URL"); + let provider = ProviderBuilder::new() + .with_recommended_fillers() + .wallet(wallet) + .on_builtin(&rpc_url) + .await + .map_err(|e| LDNError::New(format!("Building provider failed: {}", e)))?; + Ok(provider) +} + +pub async fn add_verified_client(address: &str, amount: &u64) -> Result<(), LDNError> { + let provider = get_provider().await?; + let fil_address = decode_filecoin_address(address)?; + let amount = U256::try_from(*amount) + .map_err(|e| LDNError::New(format!("Failed to prase amount to U256 /// {}", e)))?; + let call = addVerifiedClientCall { + clientAddress: fil_address.into(), + amount, + } + .abi_encode(); + let allocator_contract = + Address::parse_checksummed(get_env_var_or_default("ALLOCATOR_CONTRACT_ADDRESS"), None) + .map_err(|e| { + LDNError::New(format!( + "Parse ALLOCATOR_CONTRACT_ADDRESS to Address failed: {}", + e + )) + })?; + let input = Bytes::from(call); + + let tx = TransactionRequest::default() + .with_to(allocator_contract) + .with_input(input) + .with_gas_limit(45_000_000); + + provider + .send_transaction(tx) + .await + .map_err(|e| LDNError::New(format!("RPC error: {}", e)))? + .watch() + .await + .map_err(|e| LDNError::New(format!("Transaction failed: {}", e)))?; + Ok(()) +} + +fn decode_filecoin_address(address: &str) -> Result, LDNError> { + let address_prefix = address.get(0..1); + if let Some(address_prefix) = address_prefix { + if address_prefix.eq("f") { + set_current_network(Network::Mainnet); + } else if address_prefix.eq("t") { + set_current_network(Network::Testnet); + } + } + let fil_address = FilecoinAddress::from_str(address) + .map_err(|e| LDNError::New(format!("Failed to prase address from string /// {}", e)))?; + Ok(fil_address.to_bytes()) +} diff --git a/fplus-lib/src/core/autoallocator/mod.rs b/fplus-lib/src/core/autoallocator/mod.rs new file mode 100644 index 00000000..9416e17a --- /dev/null +++ b/fplus-lib/src/core/autoallocator/mod.rs @@ -0,0 +1,68 @@ +use crate::core::autoallocator::metaallocator_interaction::add_verified_client; +use crate::core::get_env_var_or_default; +use crate::core::verify_on_gitcoin; +use crate::core::{LDNApplication, TriggerAutoallocationInfo}; +use crate::error::LDNError; +use alloy::primitives::Address; +use fplus_database::database::applications::get_applications_by_client_id; +use fplus_database::database::autoallocations as autoallocations_db; + +pub mod metaallocator_interaction; + +pub async fn trigger_autoallocation(info: &TriggerAutoallocationInfo) -> Result<(), LDNError> { + let evm_address_from_signature = + LDNApplication::verify_kyc_data_and_get_eth_address(&info.message, &info.signature)?; + verify_on_gitcoin(&evm_address_from_signature).await?; + let fil_client_address = &info.message.client_fil_address; + let client_applications = get_applications_by_client_id(fil_client_address) + .await + .map_err(|e| LDNError::Load(format!("Get applications for client failed: {}", e)))?; + if !client_applications.is_empty() { + return Err(LDNError::Load( + "Client already has an application".to_string(), + )); + } + let amount = get_env_var_or_default("AUTOALLOCATION_AMOUNT") + .parse::() + .map_err(|e| { + LDNError::New(format!( + "Parse days to next allocation to i64 failed: {}", + e + )) + })?; + upsert_autoallocation_if_eligible(&evm_address_from_signature).await?; + match add_verified_client(fil_client_address, &amount).await { + Ok(_) => {} + Err(e) => { + autoallocations_db::delete_autoallocation(evm_address_from_signature) + .await + .map_err(|e| LDNError::New(format!("Delete autoallocation failed: {}", e)))?; + return Err(LDNError::New(format!("Add verified client failed: {}", e))); + } + } + Ok(()) +} + +async fn upsert_autoallocation_if_eligible(evm_client_address: &Address) -> Result<(), LDNError> { + let days_to_next_autoallocation = get_env_var_or_default("DAYS_TO_NEXT_AUTOALLOCATION") + .parse::() + .map_err(|e| { + LDNError::New(format!( + "Parse days to next allocation to i64 failed: {}", + e + )) + })?; + let rows_affected = autoallocations_db::create_or_update_autoallocation( + evm_client_address, + &days_to_next_autoallocation, + ) + .await + .map_err(|e| LDNError::New(format!("Create or update autoallocation failed: {}", e)))?; + if rows_affected == 0 { + return Err(LDNError::Load(format!( + "Last allocation was within {} days.", + days_to_next_autoallocation + ))); + } + Ok(()) +} diff --git a/fplus-lib/src/core/mod.rs b/fplus-lib/src/core/mod.rs index 6a46c623..b9ccabe7 100644 --- a/fplus-lib/src/core/mod.rs +++ b/fplus-lib/src/core/mod.rs @@ -2,6 +2,7 @@ use std::str::FromStr; use std::sync::Arc; use alloy::primitives::Address; + use chrono::{DateTime, Local, Utc}; use futures::future; use octocrab::models::{ @@ -18,7 +19,10 @@ use crate::{ config::get_env_var_or_default, core::application::{ file::Allocations, - gitcoin_interaction::{get_address_from_signature, verify_on_gitcoin, KycApproval}, + gitcoin_interaction::{ + get_address_from_signature, verify_on_gitcoin, ExpirableSolStruct, KycApproval, + KycAutoallocationApproval, + }, }, error::LDNError, external_services::{ @@ -48,6 +52,7 @@ use std::collections::HashSet; pub mod allocator; pub mod application; +pub mod autoallocator; #[derive(Deserialize)] pub struct CreateApplicationInfo { @@ -163,6 +168,16 @@ pub struct AllocatorUpdateForceInfo { pub allocators: Option>, } +#[derive(Deserialize, Debug)] +pub struct LastAutoallocationQueryParams { + pub evm_wallet_address: Address, +} + +#[derive(Deserialize)] +pub struct TriggerAutoallocationInfo { + pub message: KycAutoallocationApproval, + pub signature: String, +} #[derive(Deserialize)] pub struct GithubQueryParams { pub owner: String, @@ -3899,11 +3914,16 @@ _The initial issue can be edited in order to solve the request of the verifier. )) })?; let application_file = serde_json::from_str::(&app_str).unwrap(); - let address_from_signature = LDNApplication::verify_kyc_data_and_get_eth_address( - &info.message, - &info.signature, - &application_file.lifecycle.state, - )?; + + if application_file.lifecycle.state.clone() != AppState::KYCRequested { + return Err(LDNError::Load(format!( + "Application state is {:?}. Expected RequestKYC", + application_file.lifecycle.state + ))); + } + + let address_from_signature = + LDNApplication::verify_kyc_data_and_get_eth_address(&info.message, &info.signature)?; let score = verify_on_gitcoin(&address_from_signature).await?; let application_file = application_file.move_back_to_submit_state(); @@ -4000,30 +4020,23 @@ _The initial issue can be edited in order to solve the request of the verifier. Ok(current_timestamp < &issued_date_to_datetime) } - fn verify_kyc_data_and_get_eth_address( - message: &KycApproval, + fn verify_kyc_data_and_get_eth_address( + message: &T, signature: &str, - application_state: &AppState, ) -> Result { let address_from_signature = get_address_from_signature(message, signature)?; - if application_state.clone() != AppState::KYCRequested { - return Err(LDNError::Load(format!( - "Application state is {:?}. Expected RequestKYC", - application_state - ))); - } let current_timestamp = Local::now(); - if LDNApplication::date_is_expired(&message.expires_at, ¤t_timestamp)? { + if LDNApplication::date_is_expired(message.get_expires_at(), ¤t_timestamp)? { return Err(LDNError::Load(format!( "Message expired at {}", - message.expires_at + message.get_expires_at() ))); } - if LDNApplication::date_is_from_future(&message.issued_at, ¤t_timestamp)? { + if LDNApplication::date_is_from_future(message.get_issued_at(), ¤t_timestamp)? { return Err(LDNError::Load(format!( "Message issued date {} is from future", - message.issued_at + message.get_issued_at() ))); } Ok(address_from_signature) diff --git a/manual-migrations/2024-08-30.sql b/manual-migrations/2024-08-30.sql new file mode 100644 index 00000000..efe48e2d --- /dev/null +++ b/manual-migrations/2024-08-30.sql @@ -0,0 +1,6 @@ +CREATE TABLE autoallocations +( + evm_wallet_address character varying(42) NOT NULL, + last_allocation timestamp with time zone NOT NULL, + PRIMARY KEY (evm_wallet_address) +); \ No newline at end of file