diff --git a/.github/workflows/hos-dev.yml b/.github/workflows/hos-dev.yml new file mode 100644 index 0000000..9ab3ac8 --- /dev/null +++ b/.github/workflows/hos-dev.yml @@ -0,0 +1,56 @@ +name: Deploy HOS Dev + +on: + workflow_dispatch: # This allows the workflow to be manually triggered from the GitHub UI + +env: + PROJECT_NUMBER: "585357613426" + SERVICE_ACCOUNT_EMAIL: "github-actions@hos-gov-dev.iam.gserviceaccount.com" + PROJECT_ID: "hos-gov-dev" + REGION: "us-west1" + DOCKER_IMAGE: "us-west1-docker.pkg.dev/hos-gov-dev/indexer/near-sink-service" + +jobs: + deploy-dev: + runs-on: ubuntu-latest + environment: + name: hos-development + + permissions: + contents: read + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Authenticate to Google Cloud using OIDC + uses: google-github-actions/auth@v2 + with: + workload_identity_provider: projects/${{env.PROJECT_NUMBER}}/locations/global/workloadIdentityPools/github-identity-pool/providers/github + service_account: ${{env.SERVICE_ACCOUNT_EMAIL}} + + - name: Configure gcloud + run: gcloud config set project ${{env.PROJECT_ID}} + + - name: Login to Artifact Registry + run: gcloud auth configure-docker ${{env.REGION}}-docker.pkg.dev + + - name: Build Docker image + run: docker build -t ${{env.DOCKER_IMAGE}} . + + - name: Push Docker image to Artifact Registry + run: docker push ${{env.DOCKER_IMAGE}} + + - name: Docker cleanup on VM + run: | + gcloud compute ssh indexer-vm \ + --zone=${{env.REGION}}-a \ + --project=${{env.PROJECT_ID}} \ + --command="sudo docker system prune --all --force --volumes" + + - name: Restart Compute Engine VM + run: | + gcloud compute instances reset indexer-vm \ + --zone=${{env.REGION}}-a \ + --project=${{env.PROJECT_ID}} diff --git a/.github/workflows/hos-prd.yml b/.github/workflows/hos-prd.yml new file mode 100644 index 0000000..de73151 --- /dev/null +++ b/.github/workflows/hos-prd.yml @@ -0,0 +1,56 @@ +name: Deploy HOS Production + +on: + workflow_dispatch: # This allows the workflow to be manually triggered from the GitHub UI + +env: + PROJECT_NUMBER: "940440977694" + SERVICE_ACCOUNT_EMAIL: "github-actions@hos-gov-prd.iam.gserviceaccount.com" + PROJECT_ID: "hos-gov-prd" + REGION: "us-west1" + DOCKER_IMAGE: "us-west1-docker.pkg.dev/hos-gov-prd/indexer/near-sink-service" + +jobs: + deploy-prod: + runs-on: ubuntu-latest + environment: + name: hos-production + + permissions: + contents: read + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Authenticate to Google Cloud using OIDC + uses: google-github-actions/auth@v2 + with: + workload_identity_provider: projects/${{env.PROJECT_NUMBER}}/locations/global/workloadIdentityPools/github-identity-pool/providers/github + service_account: ${{env.SERVICE_ACCOUNT_EMAIL}} + + - name: Configure gcloud + run: gcloud config set project ${{env.PROJECT_ID}} + + - name: Login to Artifact Registry + run: gcloud auth configure-docker ${{env.REGION}}-docker.pkg.dev + + - name: Build Docker image + run: docker build -t ${{env.DOCKER_IMAGE}} . + + - name: Push Docker image to Artifact Registry + run: docker push ${{env.DOCKER_IMAGE}} + + - name: Docker cleanup on VM + run: | + gcloud compute ssh indexer-vm \ + --zone=${{env.REGION}}-a \ + --project=${{env.PROJECT_ID}} \ + --command="sudo docker system prune --all --force --volumes" + + - name: Restart Compute Engine VM + run: | + gcloud compute instances reset indexer-vm \ + --zone=${{env.REGION}}-a \ + --project=${{env.PROJECT_ID}} diff --git a/.github/workflows/hos-stg.yml b/.github/workflows/hos-stg.yml new file mode 100644 index 0000000..1442b46 --- /dev/null +++ b/.github/workflows/hos-stg.yml @@ -0,0 +1,56 @@ +name: Deploy HOS Staging + +on: + workflow_dispatch: # This allows the workflow to be manually triggered from the GitHub UI + +env: + PROJECT_NUMBER: "216712737016" + SERVICE_ACCOUNT_EMAIL: "github-actions@hos-gov-stg.iam.gserviceaccount.com" + PROJECT_ID: "hos-gov-stg" + REGION: "us-west1" + DOCKER_IMAGE: "us-west1-docker.pkg.dev/hos-gov-stg/indexer/near-sink-service" + +jobs: + deploy-staging: + runs-on: ubuntu-latest + environment: + name: hos-staging + + permissions: + contents: read + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Authenticate to Google Cloud using OIDC + uses: google-github-actions/auth@v2 + with: + workload_identity_provider: projects/${{env.PROJECT_NUMBER}}/locations/global/workloadIdentityPools/github-identity-pool/providers/github + service_account: ${{env.SERVICE_ACCOUNT_EMAIL}} + + - name: Configure gcloud + run: gcloud config set project ${{env.PROJECT_ID}} + + - name: Login to Artifact Registry + run: gcloud auth configure-docker ${{env.REGION}}-docker.pkg.dev + + - name: Build Docker image + run: docker build -t ${{env.DOCKER_IMAGE}} . + + - name: Push Docker image to Artifact Registry + run: docker push ${{env.DOCKER_IMAGE}} + + - name: Docker cleanup on VM + run: | + gcloud compute ssh indexer-vm \ + --zone=${{env.REGION}}-a \ + --project=${{env.PROJECT_ID}} \ + --command="sudo docker system prune --all --force --volumes" + + - name: Restart Compute Engine VM + run: | + gcloud compute instances reset indexer-vm \ + --zone=${{env.REGION}}-a \ + --project=${{env.PROJECT_ID}} diff --git a/.github/workflows/prod-2.yml b/.github/workflows/prod-2.yml new file mode 100644 index 0000000..82b39a7 --- /dev/null +++ b/.github/workflows/prod-2.yml @@ -0,0 +1,59 @@ +name: Deploy New Production + +on: + workflow_dispatch: # This allows the workflow to be manually triggered from the GitHub UI + push: + branches: + - main + +env: + PROJECT_NUMBER: "641188643433" + SERVICE_ACCOUNT_EMAIL: "github-actions@agora-near-25q4-prd.iam.gserviceaccount.com" + PROJECT_ID: "agora-near-25q4-prd" + REGION: "us-west1" + DOCKER_IMAGE: "us-west1-docker.pkg.dev/agora-near-25q4-prd/indexer/near-sink-service" + +jobs: + deploy-prod: + runs-on: ubuntu-latest + environment: + name: production + + permissions: + contents: read + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Authenticate to Google Cloud using OIDC + uses: google-github-actions/auth@v2 + with: + workload_identity_provider: projects/${{env.PROJECT_NUMBER}}/locations/global/workloadIdentityPools/github-identity-pool/providers/github + service_account: ${{env.SERVICE_ACCOUNT_EMAIL}} + + - name: Configure gcloud + run: gcloud config set project ${{env.PROJECT_ID}} + + - name: Login to Artifact Registry + run: gcloud auth configure-docker ${{env.REGION}}-docker.pkg.dev + + - name: Build Docker image + run: docker build -t ${{env.DOCKER_IMAGE}} . + + - name: Push Docker image to Artifact Registry + run: docker push ${{env.DOCKER_IMAGE}} + + - name: Docker cleanup on VM + run: | + gcloud compute ssh indexer-vm \ + --zone=${{env.REGION}}-a \ + --project=${{env.PROJECT_ID}} \ + --command="sudo docker system prune --all --force --volumes" + + - name: Restart Compute Engine VM + run: | + gcloud compute instances reset indexer-vm \ + --zone=${{env.REGION}}-a \ + --project=${{env.PROJECT_ID}} diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index dfdaae0..6bf7162 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -1,10 +1,10 @@ name: Deploy Prod -on: - workflow_dispatch: # This allows the workflow to be manually triggered from the GitHub UI - push: - branches: - - main +# on: +# workflow_dispatch: # This allows the workflow to be manually triggered from the GitHub UI +# push: +# branches: +# - main env: PROJECT_NUMBER: "237405837378" diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 352762b..8c71e41 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -42,16 +42,15 @@ jobs: - name: Push Docker image to Artifact Registry run: docker push ${{env.DOCKER_IMAGE}} - # Temp disabling - # - name: Docker cleanup on VM - # run: | - # gcloud compute ssh indexer-vm \ - # --zone=${{env.REGION}}-a \ - # --project=${{env.PROJECT_ID}} \ - # --command="sudo docker system prune --all --force --volumes" - - # - name: Restart Compute Engine VM - # run: | - # gcloud compute instances reset indexer-vm \ - # --zone=${{env.REGION}}-a \ - # --project=${{env.PROJECT_ID}} + - name: Docker cleanup on VM + run: | + gcloud compute ssh indexer-vm \ + --zone=${{env.REGION}}-a \ + --project=${{env.PROJECT_ID}} \ + --command="sudo docker system prune --all --force --volumes" + + - name: Restart Compute Engine VM + run: | + gcloud compute instances reset indexer-vm \ + --zone=${{env.REGION}}-a \ + --project=${{env.PROJECT_ID}} diff --git a/Cargo.lock b/Cargo.lock index 299433d..d910bc5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.1" @@ -19,9 +10,9 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -32,12 +23,6 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -49,9 +34,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.19" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", @@ -64,9 +49,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" @@ -79,35 +64,35 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.9" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "arbitrary" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" dependencies = [ "derive_arbitrary", ] @@ -118,37 +103,15 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - [[package]] name = "async-trait" -version = "0.1.88" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] @@ -172,21 +135,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "backtrace" -version = "0.3.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - [[package]] name = "base64" version = "0.21.7" @@ -201,17 +149,17 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.8.0" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" [[package]] name = "bitflags" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -244,11 +192,20 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + [[package]] name = "borsh" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" +checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f" dependencies = [ "borsh-derive", "cfg_aliases", @@ -256,15 +213,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" +checksum = "0686c856aa6aac0c4498f936d7d6a02df690f614c03e4d906d1018062b5c5e2c" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] @@ -275,9 +232,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" [[package]] name = "byteorder" @@ -287,9 +244,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" [[package]] name = "bytesize" @@ -302,10 +259,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.29" +version = "1.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1599538de2394445747c8cf7935946e3cc27e9625f889d979bfb2aaf569362" +checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" dependencies = [ + "find-msvc-tools", "jobserver", "libc", "shlex", @@ -313,9 +271,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cfg_aliases" @@ -325,11 +283,10 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", @@ -340,9 +297,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.41" +version = "4.5.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9" +checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394" dependencies = [ "clap_builder", "clap_derive", @@ -350,9 +307,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.41" +version = "4.5.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d" +checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00" dependencies = [ "anstream", "anstyle", @@ -362,21 +319,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.41" +version = "4.5.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] name = "clap_lex" -version = "0.7.5" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" +checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" [[package]] name = "colorchoice" @@ -395,17 +352,18 @@ dependencies = [ [[package]] name = "config" -version = "0.15.13" +version = "0.15.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b1eb4fb07bc7f012422df02766c7bd5971effb894f573865642f06fa3265440" +checksum = "b30fa8254caad766fc03cb0ccae691e14bf3bd72bfff27f72802ce729551b3d6" dependencies = [ "async-trait", - "convert_case", + "convert_case 0.6.0", "json5", "pathdiff", "ron", "rust-ini", - "serde", + "serde-untagged", + "serde_core", "serde_json", "toml", "winnow", @@ -433,7 +391,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "once_cell", "tiny-keccak", ] @@ -447,6 +405,15 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -474,9 +441,9 @@ dependencies = [ [[package]] name = "crc" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" dependencies = [ "crc-catalog", ] @@ -519,9 +486,9 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", "typenum", @@ -529,19 +496,20 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.4.7" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f93780a459b7d656ef7f071fe699c4d3d2cb201c4b24d085b6ddc505276e73" +checksum = "73736a89c4aff73035ba2ed2e565061954da00d4970fc9ac25dcc85a2a20d790" dependencies = [ + "dispatch2", "nix", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "curve25519-dalek" -version = "4.2.0" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b7c5dbd637569a2cca66e8d66b8c446a1e7bf064ea321d265d7b3dfe7c97e" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", "cpufeatures", @@ -561,14 +529,14 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] name = "darling" -version = "0.20.11" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" dependencies = [ "darling_core", "darling_macro", @@ -576,27 +544,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.11" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] name = "darling_macro" -version = "0.20.11" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] @@ -612,43 +580,46 @@ dependencies = [ [[package]] name = "deranged" -version = "0.4.0" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" dependencies = [ "powerfmt", - "serde", + "serde_core", ] [[package]] name = "derive_arbitrary" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] name = "derive_more" -version = "1.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "1.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ + "convert_case 0.10.0", "proc-macro2", "quote", - "syn 2.0.104", + "rustc_version", + "syn 2.0.114", + "unicode-xid", ] [[package]] @@ -663,6 +634,18 @@ dependencies = [ "subtle", ] +[[package]] +name = "dispatch2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +dependencies = [ + "bitflags", + "block2", + "libc", + "objc2", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -671,7 +654,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] @@ -691,9 +674,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "easy-ext" @@ -757,7 +740,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] @@ -766,14 +749,25 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +[[package]] +name = "erased-serde" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e8918065695684b2b0702da20382d5ae6065cf3327bc2d6436bd49a71ce9f3" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + [[package]] name = "errno" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -789,9 +783,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.4.0" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ "concurrent-queue", "parking", @@ -800,9 +794,9 @@ dependencies = [ [[package]] name = "fastnear-neardata-fetcher" -version = "0.30.1" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8962f853524f50603dc8b22d92a3d0cee6e7142b5e64bb0b284f34b86756290" +checksum = "b60281f03f5499c89790e94bb18dd1a0b424a32bec6e75911fca59a67ee16a5b" dependencies = [ "fastnear-primitives", "flate2", @@ -817,9 +811,9 @@ dependencies = [ [[package]] name = "fastnear-primitives" -version = "0.30.1" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b8f3ca184094e2292300a431f026c7dbcf2546d23be235211ef80a6dfd239c6" +checksum = "52817aba04a7f4c398ed7c8ac26d696cdd6038cff86417fce0c6cd4f6c486986" dependencies = [ "borsh", "near-indexer-primitives", @@ -835,22 +829,27 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fiat-crypto" -version = "0.3.0" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "filetime" -version = "0.2.25" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" +checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db" dependencies = [ "cfg-if", "libc", "libredox", - "windows-sys 0.59.0", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" + [[package]] name = "fixed-hash" version = "0.7.0" @@ -862,9 +861,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.1.2" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369" dependencies = [ "crc32fast", "miniz_oxide", @@ -910,9 +909,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] @@ -1007,42 +1006,36 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "js-sys", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasip2", "wasm-bindgen", ] -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - [[package]] name = "h2" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" dependencies = [ "atomic-waker", "bytes", @@ -1050,7 +1043,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.10.0", + "indexmap 2.13.0", "slab", "tokio", "tokio-util", @@ -1071,22 +1064,28 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", "equivalent", "foldhash", ] +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + [[package]] name = "hashlink" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" dependencies = [ - "hashbrown 0.15.4", + "hashbrown 0.15.5", ] [[package]] @@ -1130,21 +1129,20 @@ dependencies = [ [[package]] name = "home" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "http" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" dependencies = [ "bytes", - "fnv", "itoa", ] @@ -1179,19 +1177,21 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ + "atomic-waker", "bytes", "futures-channel", - "futures-util", + "futures-core", "h2", "http", "http-body", "httparse", "itoa", "pin-project-lite", + "pin-utils", "smallvec", "tokio", "want", @@ -1211,7 +1211,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.1", + "webpki-roots 1.0.5", ] [[package]] @@ -1232,9 +1232,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.15" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" +checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" dependencies = [ "base64 0.22.1", "bytes", @@ -1258,9 +1258,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.63" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1282,9 +1282,9 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ "displaydoc", "potential_utf", @@ -1295,9 +1295,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ "displaydoc", "litemap", @@ -1308,11 +1308,10 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" dependencies = [ - "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", @@ -1323,42 +1322,38 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "2.0.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ - "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", "icu_provider", - "potential_utf", "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "2.0.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" dependencies = [ "displaydoc", "icu_locale_core", - "stable_deref_trait", - "tinystr", "writeable", "yoke", "zerofrom", @@ -1374,9 +1369,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -1406,24 +1401,14 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.10.0" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", - "hashbrown 0.15.4", + "hashbrown 0.16.1", "serde", -] - -[[package]] -name = "io-uring" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" -dependencies = [ - "bitflags", - "cfg-if", - "libc", + "serde_core", ] [[package]] @@ -1434,9 +1419,9 @@ checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "iri-string" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" dependencies = [ "memchr", "serde", @@ -1444,40 +1429,40 @@ dependencies = [ [[package]] name = "is_terminal_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itertools" -version = "0.12.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "jobserver" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.4", "libc", ] [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ "once_cell", "wasm-bindgen", @@ -1520,25 +1505,25 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.174" +version = "0.2.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" [[package]] name = "libm" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.4" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ "bitflags", "libc", - "redox_syscall", + "redox_syscall 0.7.0", ] [[package]] @@ -1553,31 +1538,30 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.9.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "lock_api" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" dependencies = [ - "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.27" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "lru-slab" @@ -1587,11 +1571,11 @@ checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] @@ -1606,9 +1590,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "mime" @@ -1623,17 +1607,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", + "simd-adler32", ] [[package]] name = "mio" -version = "1.0.4" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" dependencies = [ "libc", - "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.59.0", + "wasi", + "windows-sys 0.61.2", ] [[package]] @@ -1655,9 +1640,9 @@ dependencies = [ [[package]] name = "near-account-id" -version = "1.1.3" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8542f031adc257a27ba46ad904c241a88470ee95130663a9e5c08cf8e124f4d4" +checksum = "91f75ff8eee73815c247d0e17f3c0b705f0e993922a5548acd2ad377aeb67fca" dependencies = [ "borsh", "serde", @@ -1665,9 +1650,9 @@ dependencies = [ [[package]] name = "near-config-utils" -version = "0.30.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb6045fa1f9503c61665af42d1534b04a854a6b4aeecb33fd53a5acaa4635b7" +checksum = "1765fbfda84d4618fc0bd6763639d1b33073580c22eb4b59aa23995da087b686" dependencies = [ "anyhow", "json_comments", @@ -1677,9 +1662,9 @@ dependencies = [ [[package]] name = "near-crypto" -version = "0.30.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c635fb7ddbd807d92e1a8a3dc57d45e92faa15eaf2a8f0fbc977f6bc8fda6ce" +checksum = "5798f5ae583148b61ae9c2ca5d1d198a5ed253249254614bba5cbaaa156680af" dependencies = [ "blake2", "borsh", @@ -1702,13 +1687,23 @@ dependencies = [ [[package]] name = "near-fmt" -version = "0.30.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d6b26918e71a60b56b0fe6604198d0b29df4e0b27dc944cad7af3e1ada6976" +checksum = "ed8fc978ebff361c88852377b3ff8516408b1927f966c67afb094bd7cd0ea531" dependencies = [ "near-primitives-core", ] +[[package]] +name = "near-gas" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cecd5d9463587f34f2b7ff4c7104297483a543be8a68a4a04a8ac96c419d1a1" +dependencies = [ + "borsh", + "serde", +] + [[package]] name = "near-indexer" version = "0.1.0" @@ -1734,20 +1729,19 @@ dependencies = [ [[package]] name = "near-indexer-primitives" -version = "0.30.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8b146466a55c36171928136ca7a0b4dc7dc651ac23253ac9148ecdef32178f" +checksum = "68596e42b95829c0beb2fa2b515a297203cfccf1ca53fd76f8d5018bb4a9e065" dependencies = [ "near-primitives", "serde", - "serde_json", ] [[package]] name = "near-parameters" -version = "0.30.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e364f850512d7f1ee1eb398e1da85fd3ef95eb3cbce8db2d505eed054bbe848" +checksum = "7dc57fdc6c9d09914d7ed536812f29c36ab6fd072699d6ba9f13b5e88ec61fa8" dependencies = [ "borsh", "enum-map", @@ -1764,9 +1758,9 @@ dependencies = [ [[package]] name = "near-primitives" -version = "0.30.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca734a17b2a973e4753658dd4370f6b35e106ff6c0f9620cbe5283988597833" +checksum = "119f6930b65852c8096039e6f282bfda96bf5fbdc3f47576cb42611345b42953" dependencies = [ "arbitrary", "base64 0.21.7", @@ -1774,7 +1768,6 @@ dependencies = [ "borsh", "bytes", "bytesize", - "cfg-if", "chrono", "derive_more", "easy-ext", @@ -1795,6 +1788,7 @@ dependencies = [ "serde_json", "serde_with", "sha3", + "smallvec", "smart-default", "strum", "thiserror", @@ -1804,9 +1798,9 @@ dependencies = [ [[package]] name = "near-primitives-core" -version = "0.30.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953534fb0dff03f2042a12a933e31d86dd79601c2640338307bba724919e1876" +checksum = "bcb6f3d48550b6b131075f6d600e33c15cd9b97f041f34e67afa2454eeb5a4ba" dependencies = [ "arbitrary", "base64 0.21.7", @@ -1815,25 +1809,28 @@ dependencies = [ "derive_more", "enum-map", "near-account-id", + "near-gas", "near-schema-checker-lib", + "near-token", "num-rational", "serde", "serde_repr", + "serde_with", "sha2", "thiserror", ] [[package]] name = "near-schema-checker-core" -version = "0.30.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecf3abb048646186aef4796d5bcda22c2c9246beaabaf3ea568c0cce2229257b" +checksum = "5bdb7e133b1446035fb1e3d75845d93e16495a79363ce27e2c6610e3cb54be9d" [[package]] name = "near-schema-checker-lib" -version = "0.30.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1416c5b236ea30152895df73213eca04c997c7bd60d83a1c18141f8705759865" +checksum = "b5bd07bdb768ca5afa4280299d535643b08b76a9874af7fba3832680c8dcd8b5" dependencies = [ "near-schema-checker-core", "near-schema-checker-macro", @@ -1841,26 +1838,37 @@ dependencies = [ [[package]] name = "near-schema-checker-macro" -version = "0.30.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a60d29f7f64c2fc6d2fd25139863a6887b4d7fbcc79db8caad9c72eca67f05e9" +checksum = "bc83e346da04fbc822e6ab0b84c3682151b27ec1fdc0b3d84868b9bddcabdf97" [[package]] name = "near-stdx" -version = "0.30.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13869f432b1b457c36c9332471d868da6b0ee971e2da0b94deb376aba8d27e6b" +checksum = "51fcd70712031f1533733495e930fd0423427b098de6829efccd18264ea27338" [[package]] name = "near-time" -version = "0.30.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1b143d7249e64ebfd1f6da7b1c15f4a9d0ee5d9be3556771a5b4b665a2c22cb" +checksum = "30d6bd6a6d9595daf97cae7136f77f1c1b65ce2bd76540e14353e0c7db0c6a8c" dependencies = [ + "parking_lot", "serde", "time", ] +[[package]] +name = "near-token" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34de6b54d82d0790b2a56b677e7b4ecb7f021a7e8559f8611065c890d56cfcda" +dependencies = [ + "borsh", + "serde", +] + [[package]] name = "nix" version = "0.30.1" @@ -1875,12 +1883,11 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "overload", - "winapi", + "windows-sys 0.61.2", ] [[package]] @@ -1896,11 +1903,10 @@ dependencies = [ [[package]] name = "num-bigint-dig" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" dependencies = [ - "byteorder", "lazy_static", "libm", "num-integer", @@ -1913,9 +1919,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" [[package]] name = "num-integer" @@ -1961,14 +1967,20 @@ dependencies = [ ] [[package]] -name = "object" -version = "0.36.7" +name = "objc2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" dependencies = [ - "memchr", + "objc2-encode", ] +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + [[package]] name = "once_cell" version = "1.21.3" @@ -1977,15 +1989,15 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "once_cell_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "openssl" -version = "0.10.73" +version = "0.10.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" dependencies = [ "bitflags", "cfg-if", @@ -2004,7 +2016,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] @@ -2015,9 +2027,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.109" +version = "0.9.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" dependencies = [ "cc", "libc", @@ -2047,12 +2059,6 @@ dependencies = [ "hashbrown 0.14.5", ] -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "parking" version = "2.2.1" @@ -2061,9 +2067,9 @@ checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", "parking_lot_core", @@ -2071,15 +2077,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.11" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.18", "smallvec", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -2099,26 +2105,25 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.8.1" +version = "2.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" +checksum = "2c9eb05c21a464ea704b53158d358a31e6425db2f63a1a7312268b05fe2b75f7" dependencies = [ "memchr", - "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.8.1" +version = "2.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb056d9e8ea77922845ec74a1c4e8fb17e7c218cc4fc11a15c5d25e189aa40bc" +checksum = "68f9dbced329c441fa79d80472764b1a2c7e57123553b8519b36663a2fb234ed" dependencies = [ "pest", "pest_generator", @@ -2126,22 +2131,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.1" +version = "2.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e404e638f781eb3202dc82db6760c8ae8a1eeef7fb3fa8264b2ef280504966" +checksum = "3bb96d5051a78f44f43c8f712d8e810adb0ebf923fc9ed2655a7f66f63ba8ee5" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] name = "pest_meta" -version = "2.8.1" +version = "2.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edd1101f170f5903fde0914f899bb503d9ff5271d7ba76bbb70bea63690cc0d5" +checksum = "602113b5b5e8621770cfd490cfd90b9f84ab29bd2b0e49ad83eb6d186cef2365" dependencies = [ "pest", "sha2", @@ -2188,9 +2193,9 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "potential_utf" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" dependencies = [ "zerovec", ] @@ -2222,27 +2227,27 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" dependencies = [ "toml_edit", ] [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "quinn" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626214629cda6781b6dc1d316ba307189c85ba657213ce642d9c77670f8202c8" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" dependencies = [ "bytes", "cfg_aliases", @@ -2260,14 +2265,14 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.12" +version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" dependencies = [ "bytes", - "getrandom 0.3.3", + "getrandom 0.3.4", "lru-slab", - "rand 0.9.1", + "rand 0.9.2", "ring", "rustc-hash", "rustls", @@ -2281,23 +2286,23 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcebb1209ee276352ef14ff8732e24cc2b02bbac986cd74a4c81bcb2f9881970" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" dependencies = [ "cfg_aliases", "libc", "once_cell", "socket2", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "quote" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] @@ -2328,12 +2333,12 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -2353,7 +2358,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -2362,97 +2367,79 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "serde", ] [[package]] name = "rand_core" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.4", ] [[package]] name = "redox_syscall" -version = "0.5.13" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ "bitflags", ] [[package]] -name = "ref-cast" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" -dependencies = [ - "ref-cast-impl", -] - -[[package]] -name = "ref-cast-impl" -version = "1.0.24" +name = "redox_syscall" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +checksum = "49f3fe0889e69e2ae9e41f4d6c4c0181701d00e4697b356fb1f74173a5e0ee27" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", + "bitflags", ] [[package]] -name = "regex" -version = "1.11.1" +name = "ref-cast" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", + "ref-cast-impl", ] [[package]] -name = "regex-automata" -version = "0.1.10" +name = "ref-cast-impl" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ - "regex-syntax 0.6.29", + "proc-macro2", + "quote", + "syn 2.0.114", ] [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "reqwest" -version = "0.12.22" +version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ "base64 0.22.1", "bytes", @@ -2489,7 +2476,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 1.0.1", + "webpki-roots 1.0.5", ] [[package]] @@ -2500,7 +2487,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.16", + "getrandom 0.2.17", "libc", "untrusted", "windows-sys 0.52.0", @@ -2508,21 +2495,23 @@ dependencies = [ [[package]] name = "ron" -version = "0.8.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" +checksum = "fd490c5b18261893f14449cbd28cb9c0b637aebf161cd77900bfdedaff21ec32" dependencies = [ - "base64 0.21.7", "bitflags", + "once_cell", "serde", "serde_derive", + "typeid", + "unicode-ident", ] [[package]] name = "rsa" -version = "0.9.8" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b" +checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" dependencies = [ "const-oid", "digest", @@ -2540,20 +2529,14 @@ dependencies = [ [[package]] name = "rust-ini" -version = "0.21.2" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7295b7ce3bf4806b419dc3420745998b447178b7005e2011947b38fc5aa6791" +checksum = "796e8d2b6696392a43bea58116b667fb4c29727dc5abd27d6acf338bb4f688c7" dependencies = [ "cfg-if", "ordered-multimap", ] -[[package]] -name = "rustc-demangle" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" - [[package]] name = "rustc-hash" version = "2.1.1" @@ -2571,22 +2554,22 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.8" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] name = "rustls" -version = "0.23.29" +version = "0.23.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" +checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" dependencies = [ "once_cell", "ring", @@ -2598,9 +2581,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.12.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" dependencies = [ "web-time", "zeroize", @@ -2608,9 +2591,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.4" +version = "0.103.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" dependencies = [ "ring", "rustls-pki-types", @@ -2619,23 +2602,23 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" [[package]] name = "schannel" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -2652,9 +2635,9 @@ dependencies = [ [[package]] name = "schemars" -version = "1.0.4" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" +checksum = "54e910108742c57a770f492731f99be216a52fadd361b06c8fb59d74ccc267d2" dependencies = [ "dyn-clone", "ref-cast", @@ -2701,9 +2684,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.14.0" +version = "2.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" dependencies = [ "core-foundation-sys", "libc", @@ -2711,40 +2694,63 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-untagged" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" +dependencies = [ + "erased-serde", + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "itoa", "memchr", - "ryu", "serde", + "serde_core", + "zmij", ] [[package]] @@ -2755,16 +2761,16 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] name = "serde_spanned" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83" +checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -2781,19 +2787,18 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.14.0" +version = "3.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2c45cd61fefa9db6f254525d46e392b852e0e61d9a1fd36e5bd183450a556d5" +checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.10.0", + "indexmap 2.13.0", "schemars 0.9.0", - "schemars 1.0.4", - "serde", - "serde_derive", + "schemars 1.2.0", + "serde_core", "serde_json", "serde_with_macros", "time", @@ -2801,14 +2806,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.14.0" +version = "3.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f" +checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] @@ -2817,7 +2822,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.13.0", "itoa", "ryu", "serde", @@ -2873,10 +2878,11 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] @@ -2890,11 +2896,17 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "simd-adler32" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" + [[package]] name = "slab" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" @@ -2913,17 +2925,17 @@ checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] name = "socket2" -version = "0.5.10" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -2975,9 +2987,9 @@ dependencies = [ "futures-intrusive", "futures-io", "futures-util", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "hashlink", - "indexmap 2.10.0", + "indexmap 2.13.0", "log", "memchr", "once_cell", @@ -3005,7 +3017,7 @@ dependencies = [ "quote", "sqlx-core", "sqlx-macros-core", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] @@ -3028,7 +3040,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 2.0.104", + "syn 2.0.114", "tokio", "url", ] @@ -3141,9 +3153,9 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "static_assertions" @@ -3209,9 +3221,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.104" +version = "2.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" dependencies = [ "proc-macro2", "quote", @@ -3235,7 +3247,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] @@ -3278,35 +3290,35 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.20.0" +version = "3.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" dependencies = [ "fastrand", - "getrandom 0.3.3", + "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] @@ -3320,30 +3332,30 @@ dependencies = [ [[package]] name = "time" -version = "0.3.41" +version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5" dependencies = [ "deranged", "itoa", "num-conv", "powerfmt", - "serde", + "serde_core", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.4" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.22" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4" dependencies = [ "num-conv", "time-core", @@ -3360,9 +3372,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ "displaydoc", "zerovec", @@ -3370,9 +3382,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" dependencies = [ "tinyvec_macros", ] @@ -3385,33 +3397,30 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.46.1" +version = "1.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" dependencies = [ - "backtrace", "bytes", - "io-uring", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", - "slab", "socket2", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] @@ -3426,9 +3435,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ "rustls", "tokio", @@ -3436,9 +3445,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" dependencies = [ "futures-core", "pin-project-lite", @@ -3447,12 +3456,10 @@ dependencies = [ [[package]] name = "tokio-test" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2468baabc3311435b55dd935f702f42cd1b8abb7e754fb7dfb16bd36aa88f9f7" +checksum = "3f6d24790a10a7af737693a3e8f1d03faef7e6ca0cc99aae5066f533766de545" dependencies = [ - "async-stream", - "bytes", "futures-core", "tokio", "tokio-stream", @@ -3460,9 +3467,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.15" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", @@ -3473,57 +3480,52 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.2" +version = "0.9.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0aee96c12fa71097902e0bb061a5e1ebd766a6636bb605ba401c45c1650eac" +checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" dependencies = [ - "serde", + "serde_core", "serde_spanned", - "toml_datetime 0.7.0", + "toml_datetime", "toml_parser", "winnow", ] [[package]] name = "toml_datetime" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" - -[[package]] -name = "toml_datetime" -version = "0.7.0" +version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" dependencies = [ - "serde", + "serde_core", ] [[package]] name = "toml_edit" -version = "0.22.27" +version = "0.23.10+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ - "indexmap 2.10.0", - "toml_datetime 0.6.11", + "indexmap 2.13.0", + "toml_datetime", + "toml_parser", "winnow", ] [[package]] name = "toml_parser" -version = "1.0.1" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97200572db069e74c512a14117b296ba0a80a30123fbbb5aa1f4a348f639ca30" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" dependencies = [ "winnow", ] [[package]] name = "tower" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", @@ -3536,9 +3538,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ "bitflags", "bytes", @@ -3566,9 +3568,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "log", "pin-project-lite", @@ -3578,20 +3580,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", @@ -3610,14 +3612,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "sharded-slab", "smallvec", "thread_local", @@ -3632,11 +3634,17 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + [[package]] name = "typenum" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "ucd-trie" @@ -3664,24 +3672,24 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unicode-normalization" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" dependencies = [ "tinyvec", ] [[package]] name = "unicode-properties" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" +checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" [[package]] name = "unicode-segmentation" @@ -3689,6 +3697,12 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "unsafe-libyaml" version = "0.2.11" @@ -3703,13 +3717,14 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.4" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -3758,12 +3773,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" +name = "wasip2" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" dependencies = [ - "wit-bindgen-rt", + "wit-bindgen", ] [[package]] @@ -3774,37 +3789,25 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn 2.0.104", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.50" +version = "0.4.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" dependencies = [ "cfg-if", + "futures-util", "js-sys", "once_cell", "wasm-bindgen", @@ -3813,9 +3816,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3823,31 +3826,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ + "bumpalo", "proc-macro2", "quote", - "syn 2.0.104", - "wasm-bindgen-backend", + "syn 2.0.114", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.77" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" dependencies = [ "js-sys", "wasm-bindgen", @@ -3869,55 +3872,33 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.1", + "webpki-roots 1.0.5", ] [[package]] name = "webpki-roots" -version = "1.0.1" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8782dd5a41a24eed3a4f40b606249b3e236ca61adf1f25ea4d45c73de122b502" +checksum = "12bed680863276c63889429bfd6cab3b99943659923822de1c8a39c49e4d722c" dependencies = [ "rustls-pki-types", ] [[package]] name = "whoami" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" dependencies = [ - "redox_syscall", + "libredox", "wasite", ] -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-core" -version = "0.61.2" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement", "windows-interface", @@ -3928,37 +3909,37 @@ dependencies = [ [[package]] name = "windows-implement" -version = "0.60.0" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] name = "windows-interface" -version = "0.59.1" +version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] name = "windows-link" -version = "0.1.3" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-registry" -version = "0.5.3" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" dependencies = [ "windows-link", "windows-result", @@ -3967,18 +3948,18 @@ dependencies = [ [[package]] name = "windows-result" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" -version = "0.4.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ "windows-link", ] @@ -4003,20 +3984,20 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.59.0" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.52.6", + "windows-targets 0.53.5", ] [[package]] name = "windows-sys" -version = "0.60.2" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-targets 0.53.2", + "windows-link", ] [[package]] @@ -4052,18 +4033,19 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.2" +version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] [[package]] @@ -4080,9 +4062,9 @@ checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" [[package]] name = "windows_aarch64_msvc" @@ -4098,9 +4080,9 @@ checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_aarch64_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" [[package]] name = "windows_i686_gnu" @@ -4116,9 +4098,9 @@ checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnu" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" [[package]] name = "windows_i686_gnullvm" @@ -4128,9 +4110,9 @@ checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" [[package]] name = "windows_i686_msvc" @@ -4146,9 +4128,9 @@ checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_i686_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" [[package]] name = "windows_x86_64_gnu" @@ -4164,9 +4146,9 @@ checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnu" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" [[package]] name = "windows_x86_64_gnullvm" @@ -4182,9 +4164,9 @@ checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" [[package]] name = "windows_x86_64_msvc" @@ -4200,33 +4182,30 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "windows_x86_64_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winnow" -version = "0.7.12" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" dependencies = [ "memchr", ] [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "wit-bindgen" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags", -] +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" [[package]] name = "writeable" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "wyz" @@ -4239,9 +4218,9 @@ dependencies = [ [[package]] name = "xattr" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af3a19837351dc82ba89f8a125e22a3c475f05aba604acc023d62b2739ae2909" +checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" dependencies = [ "libc", "rustix", @@ -4249,9 +4228,9 @@ dependencies = [ [[package]] name = "yaml-rust2" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ce2a4ff45552406d02501cea6c18d8a7e50228e7736a872951fe2fe75c91be7" +checksum = "2462ea039c445496d8793d052e13787f2b90e750b833afee748e601c17621ed9" dependencies = [ "arraydeque", "encoding_rs", @@ -4260,11 +4239,10 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ - "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -4272,34 +4250,34 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.26" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +checksum = "71ddd76bcebeed25db614f82bf31a9f4222d3fbba300e6fb6c00afa26cbd4d9d" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.26" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +checksum = "d8187381b52e32220d50b255276aa16a084ec0a9017a0ca2152a1f55c539758d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] [[package]] @@ -4319,21 +4297,21 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", "synstructure", ] [[package]] name = "zeroize" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" [[package]] name = "zerotrie" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" dependencies = [ "displaydoc", "yoke", @@ -4342,9 +4320,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.2" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" dependencies = [ "yoke", "zerofrom", @@ -4353,15 +4331,21 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.114", ] +[[package]] +name = "zmij" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02aae0f83f69aafc94776e879363e9771d7ecbffe2c7fbb6c14c5e00dfe88439" + [[package]] name = "zstd" version = "0.13.3" @@ -4382,9 +4366,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.15+zstd.1.5.7" +version = "2.0.16+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 5f98218..a54fe4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,8 +5,8 @@ edition = "2021" [dependencies] # FastNEAR dependencies -fastnear-neardata-fetcher = "0.30.1" -fastnear-primitives = "0.30.1" +fastnear-neardata-fetcher = "0.34.2" +fastnear-primitives = "0.34.2" # Async runtime tokio = { version = "1.37", features = ["full"] } diff --git a/Dockerfile b/Dockerfile index 79c360d..c52e989 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use Rust slim image -FROM rust:1.86-slim +FROM rust:1.88-slim # Install all dependencies (build + runtime + gcloud CLI) RUN apt-get update && apt-get install -y \ diff --git a/README.md b/README.md index b8ae173..710ee7c 100644 --- a/README.md +++ b/README.md @@ -151,4 +151,19 @@ ORDER BY votes_cast DESC; SELECT delegator, delegate, delegation_timestamp FROM delegation_events ORDER BY delegation_timestamp DESC; -``` \ No newline at end of file +``` + +### On/offchain data abstraction + +For each of the respective data views there is a corresponding set of actions being performed on-chain. Some of this data is actually reflected in contract state. +This table can be used to determine which view is an amalgamation of contract actions vs. having a direct relationship to contract storage. See [this](https://github.com/houseofstake/house-of-stake-contracts) repo for the contracts. + +| Data view | Contract State? | Storage Contract | Actions | Off-chain only | +| --- | --- | --- | --- | ---| +| proposals | Yes | `voting-contract` | `create_proposal`, `get_proposal` | No +| registered_voters | No | N/A | N/A | Yes +| proposal_voting_history | No | N/A | `vote` | Yes +| user_activities | No | N/A | N/A | Yes +| delegation_events | No | N/A | N/A | Yes +| approved_proposals | Yes | `voting-contract` | `update` | No +| proposal_non_voters | No | No | `update` | Yes diff --git a/RUNBOOK.md b/RUNBOOK.md index 9074b9a..211f403 100644 --- a/RUNBOOK.md +++ b/RUNBOOK.md @@ -396,4 +396,10 @@ git push origin main # Monitor deployment in GitHub Actions # Navigate to: GitHub repo → Actions → Latest workflow run + +gcloud compute ssh indexer-vm \ + --zone=us-west1-a \ + --project=hos-gov-dev + +sudo docker logs -f $(sudo docker ps -q --filter ancestor=us-west1-docker.pkg.dev/hos-gov-dev/indexer/near-sink-service) ``` \ No newline at end of file diff --git a/configs/development.toml b/configs/development.toml new file mode 100644 index 0000000..841f09f --- /dev/null +++ b/configs/development.toml @@ -0,0 +1,31 @@ +# DEVELOPMENT Configuration for NEAR Indexer +# This configuration file provides development environment values for the NEAR indexer running on mainnet. +# Values marked with "set_in_env" and any other settings can be overridden +# by environment variables using the format "INDEXER_{SECTION}_{KEY}" +# For example: INDEXER_DB_HOST=localhost will override db_host + +# Database Configuration - set via environment variables +# db_host, db_database, db_username, db_password set via INDEXER_* env vars +db_database = "postgres" +db_port = 5432 +db_schema = "fastnear" +db_max_connections = 16 + +# Indexer Configuration +start_block = 167570560 # the latest mainnet test contract starts at 167,570,566 https://nearblocks.io/txns/8UZZbLJB74f7CpUMY3xNbmNLLJJNDqQJedDJnyVbyHfv +poll_interval = 2 # this is the timeout +retry_delay = 1 +num_threads = 32 + +# Other +log_level = "info" +app_version = "v1.0.0" + +# DataDog Configuration - set via environment variables +# dd_api_key, environment, dd_environment set via INDEXER_* env vars +datadog_enabled = true + +# Contract Configuration +hos_contract = 'voteagora.near' +venear_contract_prefix = 'vt' +voting_contract_prefix = 'vote-dev' diff --git a/configs/mainnet.toml b/configs/mainnet.toml index c0a0ebe..e594972 100644 --- a/configs/mainnet.toml +++ b/configs/mainnet.toml @@ -27,3 +27,5 @@ datadog_enabled = true # Contract Configuration hos_contract = 'voteagora.near' +venear_contract_prefix = 'v' +voting_contract_prefix = 'vote' diff --git a/configs/production.toml b/configs/production.toml new file mode 100644 index 0000000..23d3fcc --- /dev/null +++ b/configs/production.toml @@ -0,0 +1,31 @@ +# PRODUCTION Configuration for NEAR Indexer +# This configuration file provides production environment values for the NEAR indexer running on mainnet. +# Values marked with "set_in_env" and any other settings can be overridden +# by environment variables using the format "INDEXER_{SECTION}_{KEY}" +# For example: INDEXER_DB_HOST=localhost will override db_host + +# Database Configuration - set via environment variables +# db_host, db_database, db_username, db_password set via INDEXER_* env vars +db_database = "postgres" +db_port = 5432 +db_schema = "fastnear" +db_max_connections = 32 + +# Indexer Configuration +start_block = 167673622 # first block (minus 10) when `dao` was created 167,673,632 https://nearblocks.io/txns/JAMzi8bzmakDutgQKo3XAZC7MLrso54uqqHtQZoHBewW +poll_interval = 5 # this is the timeout +retry_delay = 1 +num_threads = 4 + +# Other +log_level = "info" +app_version = "v1.0.0" + +# DataDog Configuration - set via environment variables +# dd_api_key, environment, dd_environment set via INDEXER_* env vars +datadog_enabled = true + +# Contract Configuration +hos_contract = 'dao' +venear_contract_prefix = 'venear' +voting_contract_prefix = 'vote' diff --git a/configs/staging.toml b/configs/staging.toml new file mode 100644 index 0000000..e35a6fd --- /dev/null +++ b/configs/staging.toml @@ -0,0 +1,31 @@ +# STAGING Configuration for NEAR Indexer +# This configuration file provides staging environment values for the NEAR indexer running on mainnet. +# Values marked with "set_in_env" and any other settings can be overridden +# by environment variables using the format "INDEXER_{SECTION}_{KEY}" +# For example: INDEXER_DB_HOST=localhost will override db_host + +# Database Configuration - set via environment variables +# db_host, db_database, db_username, db_password set via INDEXER_* env vars +db_database = "postgres" +db_port = 5432 +db_schema = "fastnear" +db_max_connections = 24 + +# Indexer Configuration +start_block = 167565317 # first block (minus 10) when `stagingdao.near` was created 167,565,327 https://nearblocks.io/blocks/GmMw4oUL8SRMWZ7J82uJeSYwDkaov2rtGUw8LgjjqSTP +poll_interval = 5 # this is the timeout +retry_delay = 1 +num_threads = 4 + +# Other +log_level = "info" +app_version = "v1.0.0" + +# DataDog Configuration - set via environment variables +# dd_api_key, environment, dd_environment set via INDEXER_* env vars +datadog_enabled = true + +# Contract Configuration +hos_contract = 'stagingdao.near' +venear_contract_prefix = 'venear' +voting_contract_prefix = 'vote' diff --git a/rust-toolchain.toml b/rust-toolchain.toml index a1f1213..1e93a04 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.86.0" +channel = "1.88.0" components = ["rustfmt", "clippy"] targets = ["wasm32-unknown-unknown"] \ No newline at end of file diff --git a/scripts/fetch_secrets.sh b/scripts/fetch_secrets.sh index f9d24a6..bedb69a 100755 --- a/scripts/fetch_secrets.sh +++ b/scripts/fetch_secrets.sh @@ -31,4 +31,11 @@ export INDEXER_DD_ENVIRONMENT=${INDEXER_DD_ENVIRONMENT:-${DD_ENVIRONMENT:-develo # Set RUST_LOG if not already set export RUST_LOG=${RUST_LOG:-${INDEXER_LOG_LEVEL:-info}} -echo "Environment variables configured for NEAR indexer (chain: $INDEXER_API_CHAIN_ID, env: $INDEXER_ENVIRONMENT)" \ No newline at end of file +echo "Environment variables configured for NEAR indexer (chain: $INDEXER_API_CHAIN_ID, env: $INDEXER_ENVIRONMENT)" + +# Debug output for verification +echo "INDEXER_DB_HOST: $INDEXER_DB_HOST" +echo "INDEXER_DB_USERNAME: $INDEXER_DB_USERNAME" +echo "INDEXER_DB_PASSWORD: ${INDEXER_DB_PASSWORD:0:4}****" +echo "INDEXER_DD_API_KEY: ${INDEXER_DD_API_KEY:0:4}****" +echo "INDEXER_API_AUTH_TOKEN: ${INDEXER_API_AUTH_TOKEN:0:4}****" \ No newline at end of file diff --git a/sql_files/views/approved_proposals.sql b/sql_files/views/approved_proposals.sql index 0357847..8a0f4b0 100644 --- a/sql_files/views/approved_proposals.sql +++ b/sql_files/views/approved_proposals.sql @@ -12,29 +12,22 @@ DROP VIEW IF EXISTS {SCHEMA_NAME}.approved_proposals CASCADE; CREATE VIEW {SCHEMA_NAME}.approved_proposals AS -WITH execution_outcomes_prep AS ( - SELECT - receipt_id - , status - , logs - FROM {SCHEMA_NAME}.execution_outcomes -) -, approve_proposal_action_prep AS ( +WITH approve_proposal_action_prep AS ( SELECT decode(ra.args_base64, 'base64') AS args , eo.status , eo.logs , ra.* FROM {SCHEMA_NAME}.receipt_actions AS ra - INNER JOIN execution_outcomes_prep AS eo + INNER JOIN {SCHEMA_NAME}.execution_outcomes AS eo ON ra.receipt_id = eo.receipt_id AND eo.status = 'SuccessReceiptId' WHERE ra.action_kind = 'FunctionCall' AND ra.method_name = 'approve_proposal' AND ra.receiver_id IN ( --House of Stake contracts - 'v.{HOS_CONTRACT}' --veNEAR contract - , 'vote.{HOS_CONTRACT}' --Voting contract + '{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}' --veNEAR contract + , '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}' --Voting contract ) ORDER BY block_height DESC ) diff --git a/sql_files/views/delegation_events.sql b/sql_files/views/delegation_events.sql index 66eeeb0..88d00cb 100644 --- a/sql_files/views/delegation_events.sql +++ b/sql_files/views/delegation_events.sql @@ -16,28 +16,22 @@ DROP VIEW IF EXISTS {SCHEMA_NAME}.delegation_events CASCADE; CREATE VIEW {SCHEMA_NAME}.delegation_events AS -WITH execution_outcomes_prep AS ( - SELECT - receipt_id - , status - , logs - FROM {SCHEMA_NAME}.execution_outcomes -) -, receipt_actions_prep AS ( +WITH receipt_actions_prep AS ( SELECT decode(ra.args_base64, 'base64') AS args , eo.status , eo.logs , ra.* FROM {SCHEMA_NAME}.receipt_actions AS ra - INNER JOIN execution_outcomes_prep AS eo + INNER JOIN {SCHEMA_NAME}.execution_outcomes AS eo ON ra.receipt_id = eo.receipt_id AND eo.status IN ('SuccessReceiptId', 'SuccessValue') WHERE ra.action_kind = 'FunctionCall' + AND ra.method_name IN ('delegate_all', 'undelegate') AND ra.receiver_id IN ( --House of Stake contracts - 'v.{HOS_CONTRACT}' --veNEAR contract - , 'vote.{HOS_CONTRACT}' --Voting contract + '{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}' --veNEAR contract + , '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}' --Voting contract ) ) , delegate_undelegate_events AS ( @@ -45,16 +39,16 @@ WITH execution_outcomes_prep AS ( ra.* , ROW_NUMBER() OVER (PARTITION BY ra.predecessor_id ORDER BY ra.block_timestamp DESC) AS row_num FROM receipt_actions_prep AS ra - WHERE - ra.method_name IN ('delegate_all', 'undelegate') ) SELECT MD5(CONCAT(ra.receipt_id, '_', - CASE - WHEN safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->>'error' IS NULL - THEN safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->'data'->0->>'owner_id' - ELSE NULL - END)) AS id + ( + SELECT safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->'data'->0->>'owner_id' + FROM UNNEST(ra.logs) AS t(l) + WHERE safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->>'error' IS NULL + AND safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->>'event' = 'ft_mint' + LIMIT 1 + ))) AS id , ra.receipt_id , DATE(ra.block_timestamp) AS event_date , ra.block_timestamp AS event_timestamp @@ -66,32 +60,54 @@ SELECT ELSE NULL END AS delegatee_id --null for the undelegate event , ra.method_name AS delegate_method - , CASE - WHEN safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->>'error' IS NULL - THEN safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->>'event' - ELSE NULL - END AS delegate_event + , ( + SELECT safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->>'event' + FROM UNNEST(ra.logs) AS t(l) + WHERE safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->>'error' IS NULL + AND safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->>'event' IN ('ft_mint', 'ft_burn') + LIMIT 1 + ) AS delegate_event + , CASE WHEN row_num = 1 THEN TRUE ELSE FALSE END AS is_latest_delegator_event - , CASE - WHEN safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->>'error' IS NULL - THEN safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->'data'->0->>'owner_id' - ELSE NULL - END AS owner_id - , CASE - WHEN safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->>'error' IS NULL - THEN (safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->'data'->0->>'amount')::NUMERIC - ELSE NULL - END AS near_amount + + , ( + SELECT safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->'data'->0->>'owner_id' + FROM UNNEST(ra.logs) AS t(l) + WHERE safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->>'error' IS NULL + AND safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->>'event' = 'ft_mint' + LIMIT 1 + ) AS owner_id + + , COALESCE( + ( + SELECT (safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->'data'->0->>'amount')::NUMERIC + FROM UNNEST(ra.logs) AS t(l) + WHERE safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->>'error' IS NULL + AND safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->>'event' = 'ft_burn' + LIMIT 1 + ), + ( + SELECT (safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->'data'->0->>'amount')::NUMERIC + FROM UNNEST(ra.logs) AS t(l) + WHERE safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->>'error' IS NULL + AND safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->>'event' = 'ft_mint' + AND safe_json_parse(REPLACE(l, 'EVENT_JSON:', ''))->'data'->0->>'owner_id' = + CASE + WHEN safe_json_parse(CONVERT_FROM(ra.args, 'UTF8'))->>'error' IS NULL + THEN safe_json_parse(CONVERT_FROM(ra.args, 'UTF8'))->>'receiver_id' + ELSE NULL + END + LIMIT 1 + ) + ) AS near_amount --Block Data , ra.block_height , ra.block_hash , ra.block_timestamp FROM delegate_undelegate_events AS ra - LEFT JOIN LATERAL UNNEST(ra.logs) AS unnested_logs - ON TRUE ORDER BY ra.block_timestamp DESC ; diff --git a/sql_files/views/proposal_voting_history.sql b/sql_files/views/proposal_voting_history.sql index 6f2372c..d8437d1 100644 --- a/sql_files/views/proposal_voting_history.sql +++ b/sql_files/views/proposal_voting_history.sql @@ -15,27 +15,21 @@ DROP VIEW IF EXISTS {SCHEMA_NAME}.proposal_voting_history CASCADE; CREATE VIEW {SCHEMA_NAME}.proposal_voting_history AS -WITH execution_outcomes_prep AS ( - SELECT - receipt_id - , status - , logs - FROM {SCHEMA_NAME}.execution_outcomes -) -, receipt_actions_prep AS ( +WITH receipt_actions_prep AS ( SELECT decode(ra.args_base64, 'base64') AS args , ra.* , eo.logs FROM {SCHEMA_NAME}.receipt_actions AS ra - INNER JOIN execution_outcomes_prep AS eo + INNER JOIN {SCHEMA_NAME}.execution_outcomes AS eo ON ra.receipt_id = eo.receipt_id AND eo.status = 'SuccessValue' WHERE ra.action_kind = 'FunctionCall' + AND ra.method_name IN ('create_proposal', 'vote') AND ra.receiver_id IN ( --House of Stake contracts - 'v.{HOS_CONTRACT}' --veNEAR contract - , 'vote.{HOS_CONTRACT}' --Voting contract + '{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}' --veNEAR contract + , '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}' --Voting contract ) ) , proposal_metadata AS ( @@ -124,13 +118,16 @@ WITH execution_outcomes_prep AS ( THEN (safe_json_parse(convert_from(ra.args, 'UTF8'))->>'proposal_id')::NUMERIC ELSE NULL END IS NOT NULL - ORDER BY proposal_id ASC, voted_at ASC ) , latest_vote_per_proposal_and_voter AS ( - SELECT + SELECT DISTINCT ON (proposal_id, voter_id) * - , ROW_NUMBER() OVER (PARTITION BY proposal_id, voter_id ORDER BY voted_at DESC) AS row_num FROM proposal_voting_history + ORDER BY + proposal_id, + voter_id, -- DISTINCT ON key + voted_at DESC, -- "latest" first + receipt_id DESC -- deterministic tie-breaker ) SELECT l.id @@ -153,6 +150,4 @@ SELECT FROM latest_vote_per_proposal_and_voter AS l LEFT JOIN proposal_metadata AS pm ON l.proposal_id = pm.proposal_id -WHERE - l.row_num = 1 ; diff --git a/sql_files/views/proposals.sql b/sql_files/views/proposals.sql index 5a490c6..81a1b4b 100644 --- a/sql_files/views/proposals.sql +++ b/sql_files/views/proposals.sql @@ -11,37 +11,28 @@ DROP VIEW IF EXISTS {SCHEMA_NAME}.proposals CASCADE; CREATE VIEW {SCHEMA_NAME}.proposals AS -WITH execution_outcomes_prep AS ( - SELECT - receipt_id - , status - , logs - , results_json - FROM {SCHEMA_NAME}.execution_outcomes -) -, receipt_actions_prep AS ( +WITH receipt_actions_prep AS ( SELECT decode(ra.args_base64, 'base64') AS args_decoded - , eo.status AS action_status , eo.logs AS action_logs , eo.results_json , ra.* FROM {SCHEMA_NAME}.receipt_actions AS ra - INNER JOIN execution_outcomes_prep AS eo + INNER JOIN {SCHEMA_NAME}.execution_outcomes AS eo ON ra.receipt_id = eo.receipt_id AND eo.status IN ('SuccessReceiptId', 'SuccessValue') WHERE ra.action_kind = 'FunctionCall' + AND ra.method_name IN ('create_proposal', 'approve_proposal', 'on_get_snapshot','reject_proposal') AND ra.receiver_id IN ( --House of Stake contracts - 'v.{HOS_CONTRACT}' --veNEAR contract - , 'vote.{HOS_CONTRACT}' --Voting contract + '{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}' --veNEAR contract + , '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}' --Voting contract ) ) , create_proposal AS ( SELECT ra.receipt_id AS id , ra.receipt_id AS receipt_id - , DATE(ra.block_timestamp) AS proposal_created_date , ra.block_timestamp AS proposal_created_at --Proposal Details @@ -130,6 +121,8 @@ WITH execution_outcomes_prep AS ( FROM receipt_actions_prep AS ra INNER JOIN approve_proposal AS ap ON ra.receipt_id = ap.snapshot_receipt_id + WHERE + ra.method_name = 'on_get_snapshot' ) , reject_proposal as ( SELECT @@ -221,10 +214,11 @@ WITH execution_outcomes_prep AS ( , cp.block_hash FROM create_proposal AS cp - LEFT JOIN approve_proposal ap - ON cp.proposal_id = ap.proposal_id LEFT JOIN approve_proposal_snapshot_metadata AS aps ON cp.proposal_id = aps.proposal_id + LEFT JOIN approve_proposal ap + ON cp.proposal_id = ap.proposal_id + AND ap.receipt_id = aps.approve_proposal_receipt_id LEFT JOIN reject_proposal AS rp ON cp.proposal_id = rp.proposal_id LEFT JOIN proposal_votes AS pv diff --git a/sql_files/views/registered_voters.sql b/sql_files/views/registered_voters.sql index 468277b..5b42aef 100644 --- a/sql_files/views/registered_voters.sql +++ b/sql_files/views/registered_voters.sql @@ -1,6 +1,6 @@ /* Primary key on this table is receipt_id. - Every single row in this table is a unique, successful deploy_lockup action, which translates into a voter registration action. + Every row represents the first successful on_lockup_deployed registration callback for a voter. ("Successful" is defined by pulling only receipt_ids flagged as successful from the execution_outcomes table.) In this view, each row is associated with: @@ -9,8 +9,8 @@ 3. Boolean flag indicating whether registered voter is currently delegating their NEAR (Sourced from the fastnear.delegation_events view) 4. A delegatee ID (The account to which the registered voter has delegated their entire NEAR balance, NULL if the voter has not delegated their balance) 5. The related House of Stake Contract (veNEAR contract address, v.voteagora.near) - 6. The registerd voter's current voting power (Calculated via aggregating the voting power from initial vote registration, the user's latest lock or unlock action, any delegated balances, and accrued rewards aka extra venear earned) - 7. The registered voter's initial voting power, aka voting power from vote registration (Sourced from the storage_deposit event that is emitted upon a user's vote registration action) + 6. The registered voter's current voting power (Calculated via aggregating the voting power from initial vote registration, the user's latest lock or unlock action, any delegated balances, and accrued rewards aka extra venear earned) + 7. The registered voter's initial voting power, aka voting power from vote registration (Sourced from storage_deposit event logs) 8. the registered voter's voting power from locks and unlocks (Sourced from the latest on_lockup_update event that is emitted upon a user's latest lock or unlock action) 9. The registered voter's principal balance (Calculated as the sum of a user's initial voting power and their voting power from locks or unlocks) 10. The extra venear earned on a principal balance (The voting power a registered voter earns from it's principal NEAR balance, calculated using an APY growth rate sourced from the contract upon contract definition) @@ -18,7 +18,7 @@ 12. The extra venear earned on a delegated balance (Equivalent to the extra venear earned on principal for the associated delegator account) 13. The registered voter's proposal participation rate (Calculated as a count of the vote_options - only considering the latest vote_option per proposal - a user makes on any of the 10 most recently approved proposals for the veNEAR contract, always a percentage out of 10) 14. The timestamp at which the voter registration action occurred - 15. The block-related data for this deploy_lockup action (Block hash or id, block height) + 15. The block-related data for this voter registration action (Block hash or id, block height) */ @@ -32,18 +32,26 @@ WITH receipt_actions_prep AS ( SELECT decode(ra.args_base64, 'base64') AS args_decoded - , eo.status AS action_status , eo.logs AS action_logs - , ra.* + , ra.id + , ra.receipt_id + , ra.receiver_id + , ra.signer_account_id + , ra.predecessor_id + , ra.method_name + , ra.block_timestamp + , ra.block_height + , ra.block_hash FROM {SCHEMA_NAME}.receipt_actions AS ra INNER JOIN {SCHEMA_NAME}.execution_outcomes AS eo ON ra.receipt_id = eo.receipt_id AND eo.status IN ('SuccessReceiptId', 'SuccessValue') WHERE ra.action_kind = 'FunctionCall' - AND ra.receiver_id IN ( --House of Stake contracts - 'v.{HOS_CONTRACT}' --veNEAR contract - , 'vote.{HOS_CONTRACT}' --Voting contract + AND ra.method_name IN ('new', 'storage_deposit', 'on_lockup_update', 'on_lockup_deployed') + AND ra.receiver_id IN ( ---House of Stake contracts + '{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}' --veNEAR contract + , '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}' --Voting contract ) ) /* Sourcing APY Growth Rate Variables (to calc Voting Power from Rewards) */ @@ -61,190 +69,205 @@ receipt_actions_prep AS ( ELSE NULL END AS growth_rate_denominator_ns FROM receipt_actions_prep AS ra - WHERE - ra.method_name = 'new' - -) -/* Sourcing Voting Power from Vote Registration */ -, voting_power_from_vote_registration AS ( - SELECT vpvr.* - FROM ( - SELECT - ra.block_timestamp - , ra.receipt_id - , COALESCE( - CASE - WHEN safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->>'error' IS NULL - THEN safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->'data'->0->>'owner_id' - ELSE NULL END - , ra.signer_account_id - ) AS registered_voter_id - , CASE - WHEN safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->>'error' IS NULL - THEN (safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->'data'->0->>'amount')::NUMERIC - ELSE NULL - END AS voting_power_from_vote_registration - FROM receipt_actions_prep AS ra - WHERE - ra.method_name = 'storage_deposit' - ) AS vpvr - WHERE - vpvr.voting_power_from_vote_registration IS NOT NULL -) -/* Sourcing Latest Voting Power from Locks + Unlocks */ -, voting_power_from_locks_unlocks AS ( - SELECT - vplu.* - FROM ( - SELECT - ra.block_timestamp - , ra.receipt_id - , COALESCE(CASE - WHEN safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->>'error' IS NULL - THEN safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->'data'->0->>'account_id' - ELSE NULL - END - , ra.signer_account_id) AS registered_voter_id - , CASE - WHEN safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->>'error' IS NULL - THEN (safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->'data'->0->>'locked_near_balance')::NUMERIC - ELSE NULL - END AS voting_power_from_locks_unlocks - , CASE - WHEN safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->>'error' IS NULL - THEN (safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->'data'->0->>'timestamp')::NUMERIC - ELSE NULL - END AS lockup_update_at_ns --Timestamp (nanoseconds) when user locks or unlocks near - , ROW_NUMBER() OVER (PARTITION BY signer_account_id ORDER BY block_timestamp DESC) AS row_num - FROM receipt_actions_prep AS ra - WHERE - ra.method_name = 'on_lockup_update' - ) AS vplu - WHERE - vplu.row_num = 1 -) -/* Sourcing Registered Voters from Deploy Lockup Event (Excluding dupes due to account already being registered) */ - --Whenever a user registers to vote, there should always be a non-null storage deposit, aka, initial voting power amount. - --Inner join excludes scenarios where a vote registration action (aka deploy_lockup for a given user) is duped bc the user's account was already registered and the subsequent storage_deposit event tracks a null initial_voting_power amount. -, registered_voters_prep AS ( - SELECT - ra.* - , (EXTRACT(EPOCH FROM ra.block_timestamp) * 1e9)::BIGINT AS registered_at_ns - FROM receipt_actions_prep AS ra - INNER JOIN voting_power_from_vote_registration AS vpvr - ON ra.receipt_id = vpvr.receipt_id - WHERE - ra.method_name = 'deploy_lockup' -) --------------------------------------- ---PROPOSAL PARTICIPATION CALCULATION-- --------------------------------------- -/* VI. Sourcing Proposal Participation (from 10 most recently approved proposals) */ -, ten_most_recently_approved_proposals AS ( - SELECT * - FROM {SCHEMA_NAME}.approved_proposals - ORDER BY proposal_approved_at DESC - LIMIT 10 -) -, registered_voter_proposal_voting_history AS ( - SELECT - rv.signer_account_id AS registered_voter_id - , pvh.proposal_id - , CASE - WHEN t.proposal_id IS NULL THEN 0 - ELSE 1 - END AS is_proposal_from_ten_most_recently_approved - FROM registered_voters_prep AS rv - INNER JOIN {SCHEMA_NAME}.proposal_voting_history AS pvh - ON rv.signer_account_id = pvh.voter_id - LEFT JOIN ten_most_recently_approved_proposals AS t - ON pvh.proposal_id = t.proposal_id -) -, proposal_participation AS ( - SELECT - registered_voter_id - , SUM(is_proposal_from_ten_most_recently_approved)::NUMERIC AS num_recently_approved_proposals_voted_on - , SUM(is_proposal_from_ten_most_recently_approved)::NUMERIC / 10 AS proposal_participation_rate - FROM registered_voter_proposal_voting_history - GROUP BY 1 -) ------------------------------------------- ---REGISTERED VOTERS + BASIC VOTING POWER-- ------------------------------------------- -, table_joins AS ( - SELECT - ra.* - - --New Field Additions - , CASE - WHEN vplu.registered_voter_id IS NULL THEN FALSE - ELSE TRUE - END AS has_locked_unlocked_near - - , CASE - WHEN de.delegator_id IS NULL THEN FALSE - ELSE TRUE - END AS is_actively_delegating - - , de.delegatee_id - , pp.proposal_participation_rate - - --Voting Power from Rewards - Calculation Variables - , gc.growth_rate_numerator_ns - , gc.growth_rate_denominator_ns - , (EXTRACT(EPOCH FROM NOW()) * 1e9)::NUMERIC AS now_ns - , vplu.lockup_update_at_ns AS latest_lockup_update_at_ns - - --Voting Powers - , COALESCE(vplu.voting_power_from_locks_unlocks, 0) AS voting_power_from_locks_unlocks - , COALESCE(vpvr.voting_power_from_vote_registration, 0) AS voting_power_from_vote_registration --aka initial voting power, as a registered voter - , COALESCE(vplu.voting_power_from_locks_unlocks, 0) - + COALESCE(vpvr.voting_power_from_vote_registration, 0) AS principal_balance - - FROM registered_voters_prep AS ra --Sourced from the deploy_lockup event - LEFT JOIN venear_contract_growth_config AS gc --Sourced from method_name = 'new', function call sets up the contract state when it is first deployed - ON ra.receiver_id = gc.hos_contract_address - LEFT JOIN voting_power_from_locks_unlocks AS vplu --Sourced from the voter's most recent on_lockup_update event - ON ra.signer_account_id = vplu.registered_voter_id - LEFT JOIN voting_power_from_vote_registration AS vpvr --Sourced from the voter's storage_deposit event associated with the vote registration action - ON ra.signer_account_id = vpvr.registered_voter_id - LEFT JOIN proposal_participation AS pp - ON ra.signer_account_id = pp.registered_voter_id - LEFT JOIN {SCHEMA_NAME}.delegation_events AS de - ON ra.signer_account_id = de.delegator_id - AND de.is_latest_delegator_event = TRUE - AND de.delegate_method = 'delegate_all' - AND de.delegate_event = 'ft_mint' -) ------------------------------------------ ---CALCULATING VOTING POWER FROM REWARDS-- ------------------------------------------ -, voting_power_from_rewards AS ( - SELECT - tj.* - - --Calculating Voting Power from Rewards - , CASE - WHEN has_locked_unlocked_near = TRUE - THEN - ( (FLOOR(principal_balance/1e21)*1e21) ) - * ( growth_rate_numerator_ns / growth_rate_denominator_ns ) - * ( (FLOOR(now_ns/1e9)*1e9) - (FLOOR(latest_lockup_update_at_ns/1e9)*1e9) ) - ELSE - ( (FLOOR(principal_balance/1e21)*1e21) ) - * ( growth_rate_numerator_ns / growth_rate_denominator_ns ) - * ( (FLOOR(now_ns/1e9)*1e9) - (FLOOR(registered_at_ns/1e9)*1e9) ) --If a user has not had any locks or unlocks, we use the timestamp of when they registered to vote - END AS extra_venear_on_principal - - FROM table_joins AS tj -) -, delegated_voting_power AS ( - SELECT - delegatee_id - , SUM(principal_balance) AS delegated_balance - , SUM(extra_venear_on_principal) AS delegated_extra_venear - FROM voting_power_from_rewards - GROUP BY 1 + WHERE ra.method_name = 'new' + ORDER BY ra.signer_account_id, ra.block_timestamp ASC, ra.receipt_id ASC +), +registration_callbacks_by_receipt AS ( + SELECT + ra.id, + ra.receipt_id, + ra.receiver_id, + ra.predecessor_id, + ra.method_name, + ra.block_timestamp, + ra.block_height, + ra.block_hash, + COALESCE( + CASE + WHEN safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->>'error' IS NULL + THEN safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->'data'->0->>'account_id' + ELSE NULL + END, + CASE + WHEN safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'error' IS NULL + THEN safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'account_id' + ELSE NULL + END + ) AS registered_voter_id, + (EXTRACT(EPOCH FROM ra.block_timestamp) * 1e9)::BIGINT AS registered_at_ns + FROM receipt_actions_prep AS ra + WHERE ra.method_name = 'on_lockup_deployed' +), +first_registration_per_voter AS ( + SELECT DISTINCT ON (r.registered_voter_id) + r.* + FROM registration_callbacks_by_receipt AS r + WHERE r.registered_voter_id IS NOT NULL + ORDER BY r.registered_voter_id, r.block_timestamp ASC, r.receipt_id ASC +), +storage_deposit_events AS ( + SELECT + ra.block_timestamp, + ra.receipt_id, + COALESCE( + CASE + WHEN safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->>'error' IS NULL + THEN safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->'data'->0->>'owner_id' + ELSE NULL + END, + CASE + WHEN safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'error' IS NULL + THEN safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'account_id' + ELSE NULL + END + ) AS registered_voter_id, + CASE + WHEN safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->>'error' IS NULL + THEN (safe_json_parse(REPLACE(ra.action_logs[1], 'EVENT_JSON:', ''))->'data'->0->>'amount')::NUMERIC + ELSE NULL + END AS voting_power_from_vote_registration + FROM receipt_actions_prep AS ra + WHERE ra.method_name = 'storage_deposit' +), +first_storage_deposit_per_voter AS ( + SELECT DISTINCT ON (sd.registered_voter_id) + sd.registered_voter_id, + sd.voting_power_from_vote_registration + FROM storage_deposit_events AS sd + WHERE sd.voting_power_from_vote_registration IS NOT NULL + ORDER BY sd.registered_voter_id, sd.block_timestamp ASC, sd.receipt_id ASC +), +voting_power_from_locks_unlocks AS ( + SELECT DISTINCT ON (vplu_prep.registered_voter_id) + vplu_prep.block_timestamp, + vplu_prep.receipt_id, + vplu_prep.registered_voter_id, + vplu_prep.voting_power_from_locks_unlocks, + vplu_prep.lockup_update_at_ns + FROM ( + SELECT + rap.block_timestamp, + rap.receipt_id, + CASE + WHEN safe_json_parse(REPLACE(rap.action_logs[1], 'EVENT_JSON:', ''))->>'error' IS NULL + THEN safe_json_parse(REPLACE(rap.action_logs[1], 'EVENT_JSON:', ''))->'data'->0->>'account_id' + ELSE NULL + END AS registered_voter_id, + CASE + WHEN safe_json_parse(REPLACE(rap.action_logs[1], 'EVENT_JSON:', ''))->>'error' IS NULL + THEN (safe_json_parse(REPLACE(rap.action_logs[1], 'EVENT_JSON:', ''))->'data'->0->>'locked_near_balance')::NUMERIC + ELSE NULL + END AS voting_power_from_locks_unlocks, + CASE + WHEN safe_json_parse(REPLACE(rap.action_logs[1], 'EVENT_JSON:', ''))->>'error' IS NULL + THEN (safe_json_parse(REPLACE(rap.action_logs[1], 'EVENT_JSON:', ''))->'data'->0->>'timestamp')::NUMERIC + ELSE NULL + END AS lockup_update_at_ns + FROM receipt_actions_prep AS rap + WHERE rap.method_name = 'on_lockup_update' + ) AS vplu_prep + ORDER BY vplu_prep.registered_voter_id, vplu_prep.block_timestamp DESC, vplu_prep.receipt_id DESC +), +registered_voters_prep AS ( + SELECT + fr.id, + fr.receipt_id, + fr.receiver_id, + fr.predecessor_id, + fr.method_name, + fr.block_timestamp, + fr.block_height, + fr.block_hash, + fr.registered_at_ns, + fr.registered_voter_id, + sd.voting_power_from_vote_registration AS voting_power_from_vote_registrations + FROM first_registration_per_voter AS fr + INNER JOIN first_storage_deposit_per_voter AS sd + ON fr.registered_voter_id = sd.registered_voter_id +), +ten_most_recently_approved_proposals AS ( + SELECT proposal_id + FROM {SCHEMA_NAME}.approved_proposals + ORDER BY proposal_approved_at DESC + LIMIT 10 +), +registered_voter_proposal_voting_history AS ( + SELECT + rv.registered_voter_id, + pvh.proposal_id, + CASE WHEN t.proposal_id IS NULL THEN 0 ELSE 1 END AS is_proposal_from_ten_most_recently_approved + FROM registered_voters_prep AS rv + INNER JOIN {SCHEMA_NAME}.proposal_voting_history AS pvh + ON rv.registered_voter_id = pvh.voter_id + LEFT JOIN ten_most_recently_approved_proposals AS t + ON pvh.proposal_id = t.proposal_id +), +proposal_participation AS ( + SELECT + registered_voter_id, + SUM(is_proposal_from_ten_most_recently_approved)::NUMERIC AS num_recently_approved_proposals_voted_on, + SUM(is_proposal_from_ten_most_recently_approved)::NUMERIC / 10 AS proposal_participation_rate + FROM registered_voter_proposal_voting_history + GROUP BY 1 +), +latest_delegate_all_events AS ( + SELECT DISTINCT ON (de.delegator_id) + de.delegator_id, + de.delegatee_id + FROM {SCHEMA_NAME}.delegation_events AS de + WHERE + de.is_latest_delegator_event = TRUE + AND de.delegate_method = 'delegate_all' + AND de.delegate_event = 'ft_mint' + ORDER BY de.delegator_id, de.block_timestamp DESC, de.receipt_id DESC +), +table_joins AS ( + SELECT + rv.*, + CASE WHEN vplu.registered_voter_id IS NULL THEN FALSE ELSE TRUE END AS has_locked_unlocked_near, + CASE WHEN de.delegator_id IS NULL THEN FALSE ELSE TRUE END AS is_actively_delegating, + de.delegatee_id, + pp.proposal_participation_rate, + gc.growth_rate_numerator_ns, + gc.growth_rate_denominator_ns, + (EXTRACT(EPOCH FROM NOW()) * 1e9)::NUMERIC AS now_ns, + vplu.lockup_update_at_ns AS latest_lockup_update_at_ns, + COALESCE(vplu.voting_power_from_locks_unlocks, 0) AS voting_power_from_locks_unlocks, + COALESCE(rv.voting_power_from_vote_registrations, 0) AS voting_power_from_vote_registration, + COALESCE(vplu.voting_power_from_locks_unlocks, 0) + COALESCE(rv.voting_power_from_vote_registrations, 0) AS principal_balance + FROM registered_voters_prep AS rv + LEFT JOIN venear_contract_growth_config AS gc + ON rv.receiver_id = gc.hos_contract_address + LEFT JOIN voting_power_from_locks_unlocks AS vplu + ON rv.registered_voter_id = vplu.registered_voter_id + LEFT JOIN proposal_participation AS pp + ON rv.registered_voter_id = pp.registered_voter_id + LEFT JOIN latest_delegate_all_events AS de + ON rv.registered_voter_id = de.delegator_id +), +voting_power_from_rewards AS ( + SELECT + tj.*, + CASE + WHEN has_locked_unlocked_near = TRUE THEN + (FLOOR(principal_balance / 1e21) * 1e21) + * (growth_rate_numerator_ns / growth_rate_denominator_ns) + * ((FLOOR(now_ns / 1e9) * 1e9) - (FLOOR(latest_lockup_update_at_ns / 1e9) * 1e9)) + ELSE + (FLOOR(principal_balance / 1e21) * 1e21) + * (growth_rate_numerator_ns / growth_rate_denominator_ns) + * ((FLOOR(now_ns / 1e9) * 1e9) - (FLOOR(registered_at_ns / 1e9) * 1e9)) + END AS extra_venear_on_principal + FROM table_joins AS tj +), +delegated_voting_power AS ( + SELECT + delegatee_id, + SUM(principal_balance) AS delegated_balance, + SUM(extra_venear_on_principal) AS delegated_extra_venear + FROM voting_power_from_rewards + WHERE delegatee_id IS NOT NULL + GROUP BY 1 ) ------------- --FINAL CTE-- @@ -254,7 +277,7 @@ SELECT , ra.receipt_id , DATE(ra.block_timestamp) AS registered_date , ra.block_timestamp AS registered_at - , ra.signer_account_id AS registered_voter_id + , ra.registered_voter_id , ra.receiver_id AS hos_contract_address , ra.has_locked_unlocked_near , ra.is_actively_delegating @@ -278,11 +301,11 @@ SELECT ) END AS current_voting_power - --Block Details (For the deploy_lockup - aka "vote registration" - action on the veNEAR HOS contract address) + --Block Details (For the vote registration action on the veNEAR HOS contract address) , ra.block_height , ra.block_hash FROM voting_power_from_rewards AS ra LEFT JOIN delegated_voting_power AS dvp - ON ra.signer_account_id = dvp.delegatee_id + ON ra.registered_voter_id = dvp.delegatee_id ORDER BY ra.block_timestamp ASC ; diff --git a/sql_files/views/user_activities.sql b/sql_files/views/user_activities.sql index 1a5a20c..3ab1b4f 100644 --- a/sql_files/views/user_activities.sql +++ b/sql_files/views/user_activities.sql @@ -16,14 +16,7 @@ DROP VIEW IF EXISTS {SCHEMA_NAME}.user_activities CASCADE; CREATE VIEW {SCHEMA_NAME}.user_activities AS -WITH execution_outcomes_prep AS ( - SELECT - receipt_id - , status - , logs - FROM {SCHEMA_NAME}.execution_outcomes -) -, receipt_actions_prep AS ( +WITH receipt_actions_prep AS ( SELECT decode(ra.args_base64, 'base64') AS args_decoded , CASE @@ -35,10 +28,11 @@ WITH execution_outcomes_prep AS ( , eo.logs AS logs , ra.* FROM {SCHEMA_NAME}.receipt_actions AS ra - LEFT JOIN execution_outcomes_prep AS eo + LEFT JOIN {SCHEMA_NAME}.execution_outcomes AS eo ON ra.receipt_id = eo.receipt_id WHERE ra.action_kind = 'FunctionCall' + AND ra.method_name IN ('on_lockup_deployed', 'lock_near', 'on_lockup_update', 'delegate_all', 'undelegate', 'begin_unlock_near', 'lock_pending_near', 'withdraw_from_staking_pool', 'withdraw_all_from_staking_pool', 'unstake', 'unstake_all') ) -------------------- --Account Creation-- @@ -58,8 +52,8 @@ WITH execution_outcomes_prep AS ( , ra.signer_account_id AS account_id , ra.predecessor_id AS hos_contract_address , CASE - WHEN safe_json_parse(CONVERT_FROM(DECODE(ra.args_base64, 'base64'), 'UTF8'))->>'error' IS NULL - THEN (safe_json_parse(CONVERT_FROM(DECODE(ra.args_base64, 'base64'), 'UTF8'))->>'lockup_deposit')::NUMERIC + WHEN safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'error' IS NULL + THEN (safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'lockup_deposit')::NUMERIC ELSE NULL END AS near_amount , CASE @@ -73,8 +67,8 @@ WITH execution_outcomes_prep AS ( WHERE ra.method_name = 'on_lockup_deployed' AND ra.receiver_id IN ( - 'v.{HOS_CONTRACT}' - , 'vote.{HOS_CONTRACT}' + '{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}' + , '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}' ) ) ------------- @@ -94,9 +88,9 @@ WITH execution_outcomes_prep AS ( , ra.event_status , ra.signer_account_id AS account_id , SUBSTRING(ra.receiver_id FROM POSITION('.' IN ra.receiver_id) + 1) AS hos_contract_address - , CASE - WHEN safe_json_parse(CONVERT_FROM(DECODE(ra.args_base64, 'base64'), 'UTF8'))->>'error' IS NULL - THEN (safe_json_parse(CONVERT_FROM(DECODE(ra.args_base64, 'base64'), 'UTF8'))->>'amount')::NUMERIC + , CASE + WHEN safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'error' IS NULL + THEN (safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'amount')::NUMERIC ELSE NULL END AS near_amount , CASE @@ -110,8 +104,8 @@ WITH execution_outcomes_prep AS ( WHERE ra.method_name = 'lock_near' AND SUBSTRING(ra.receiver_id FROM POSITION('.' IN ra.receiver_id) + 1) IN ( - 'v.{HOS_CONTRACT}' - , 'vote.{HOS_CONTRACT}' + '{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}' + , '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}' ) ) , on_lockup_update_prep AS ( @@ -150,8 +144,8 @@ WITH execution_outcomes_prep AS ( WHERE ra.method_name = 'on_lockup_update' AND ra.receiver_id IN ( - 'v.{HOS_CONTRACT}' - , 'vote.{HOS_CONTRACT}' + '{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}' + , '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}' ) GROUP BY 1,2,3,4,5,6,7,8,9 ) @@ -197,12 +191,12 @@ WITH execution_outcomes_prep AS ( ELSE NULL END, ra.signer_account_id) AS account_id , ra.receiver_id AS hos_contract_address - , CASE + , CASE WHEN safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->>'error' IS NULL THEN (safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->'data'->0->>'amount')::NUMERIC ELSE NULL END AS near_amount - , NULL::NUMERIC AS locked_near_balance --This does NOT exist FOR delegate_all AND undelegate events + , NULL::NUMERIC AS locked_near_balance --This does NOT exist FOR delegate_all AND undelegate events , ra.block_height , ra.block_hash FROM receipt_actions_prep AS ra @@ -211,8 +205,8 @@ WITH execution_outcomes_prep AS ( WHERE ra.method_name IN ('delegate_all', 'undelegate') AND ra.receiver_id IN ( - 'v.{HOS_CONTRACT}' - , 'vote.{HOS_CONTRACT}' + '{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}' + , '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}' ) ) --------------------- @@ -229,8 +223,8 @@ WITH execution_outcomes_prep AS ( , ra.signer_account_id AS account_id , SUBSTRING(ra.receiver_id FROM POSITION('.' IN ra.receiver_id) + 1) AS hos_contract_address , CASE - WHEN safe_json_parse(CONVERT_FROM(DECODE(ra.args_base64, 'base64'), 'UTF8'))->>'error' IS NULL - THEN (safe_json_parse(CONVERT_FROM(DECODE(ra.args_base64, 'base64'), 'UTF8'))->>'amount')::NUMERIC + WHEN safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'error' IS NULL + THEN (safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'amount')::NUMERIC ELSE NULL END AS near_amount , NULL::NUMERIC AS locked_near_balance --There ARE NO logs FOR this event_type @@ -240,8 +234,8 @@ WITH execution_outcomes_prep AS ( WHERE ra.method_name = 'begin_unlock_near' AND SUBSTRING(ra.receiver_id FROM POSITION('.' IN ra.receiver_id) + 1) IN ( - 'v.{HOS_CONTRACT}' - , 'vote.{HOS_CONTRACT}' + '{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}' + , '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}' ) ) ------------------------ @@ -258,8 +252,8 @@ WITH execution_outcomes_prep AS ( , ra.signer_account_id AS account_id , SUBSTRING(ra.receiver_id FROM POSITION('.' IN ra.receiver_id) + 1) AS hos_contract_address , CASE - WHEN safe_json_parse(CONVERT_FROM(DECODE(ra.args_base64, 'base64'), 'UTF8'))->>'error' IS NULL - THEN (safe_json_parse(CONVERT_FROM(DECODE(ra.args_base64, 'base64'), 'UTF8'))->>'amount')::NUMERIC + WHEN safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'error' IS NULL + THEN (safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'amount')::NUMERIC ELSE NULL END AS near_amount , NULL::NUMERIC AS locked_near_balance --There ARE NO logs FOR this event_type @@ -269,8 +263,86 @@ WITH execution_outcomes_prep AS ( WHERE ra.method_name = 'lock_pending_near' AND SUBSTRING(ra.receiver_id FROM POSITION('.' IN ra.receiver_id) + 1) IN ( - 'v.{HOS_CONTRACT}' - , 'vote.{HOS_CONTRACT}' + '{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}' + , '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}' + ) + ) +---------------------------- +--Withdraw From Staking Pool-- +---------------------------- +, withdraw_from_staking_pool AS ( + SELECT + ra.receipt_id AS id + , ra.receipt_id + , ra.block_timestamp AS event_timestamp + , method_name AS event_type + , ra.method_name + , ra.event_status + , ra.signer_account_id AS account_id + , SUBSTRING(ra.receiver_id FROM POSITION('.' IN ra.receiver_id) + 1) AS hos_contract_address + , COALESCE( + CASE + WHEN safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'error' IS NULL + THEN (safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'amount')::NUMERIC + ELSE NULL + END, + CASE + WHEN safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->>'error' IS NULL + THEN (safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->'data'->0->>'amount')::NUMERIC + ELSE NULL + END, + 0 + ) AS near_amount + , NULL::NUMERIC AS locked_near_balance + , ra.block_height + , ra.block_hash + FROM receipt_actions_prep AS ra + LEFT JOIN LATERAL UNNEST(ra.logs) AS unnested_logs ON TRUE + WHERE + ra.method_name IN ('withdraw_from_staking_pool', 'withdraw_all_from_staking_pool') + AND ra.event_status = 'succeeded' + AND SUBSTRING(ra.receiver_id FROM POSITION('.' IN ra.receiver_id) + 1) IN ( + '{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}' + , '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}' + ) + ) +----------- +--Unstake-- +----------- +, unstake AS ( + SELECT + ra.receipt_id AS id + , ra.receipt_id + , ra.block_timestamp AS event_timestamp + , method_name AS event_type + , ra.method_name + , ra.event_status + , ra.signer_account_id AS account_id + , SUBSTRING(ra.receiver_id FROM POSITION('.' IN ra.receiver_id) + 1) AS hos_contract_address + , COALESCE( + CASE + WHEN safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'error' IS NULL + THEN (safe_json_parse(CONVERT_FROM(ra.args_decoded, 'UTF8'))->>'amount')::NUMERIC + ELSE NULL + END, + CASE + WHEN safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->>'error' IS NULL + THEN (safe_json_parse(REPLACE(unnested_logs, 'EVENT_JSON:', ''))->'data'->0->>'amount')::NUMERIC + ELSE NULL + END, + 0 + ) AS near_amount + , NULL::NUMERIC AS locked_near_balance + , ra.block_height + , ra.block_hash + FROM receipt_actions_prep AS ra + LEFT JOIN LATERAL UNNEST(ra.logs) AS unnested_logs ON TRUE + WHERE + ra.method_name IN ('unstake', 'unstake_all') + AND ra.event_status = 'succeeded' + AND SUBSTRING(ra.receiver_id FROM POSITION('.' IN ra.receiver_id) + 1) IN ( + '{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}' + , '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}' ) ) ---------- @@ -288,6 +360,10 @@ WITH execution_outcomes_prep AS ( SELECT * FROM begin_unlock_near UNION ALL SELECT * FROM relock_pending_near + UNION ALL + SELECT * FROM withdraw_from_staking_pool + UNION ALL + SELECT * FROM unstake ) SELECT id diff --git a/src/config.rs b/src/config.rs index 6f52ecf..e1c4799 100644 --- a/src/config.rs +++ b/src/config.rs @@ -5,9 +5,10 @@ use dotenvy; /* * CONFIGURATION SOURCES HIERARCHY (in order of precedence): * - * 1. CONFIG FILES (.toml) - Base configuration loaded from configs/testnet.toml or configs/mainnet.toml + * 1. CONFIG FILES (.toml) - Base configuration loaded from environment-specific config files * - Contains default values for non-sensitive settings - * - File selection based on INDEXER_API_CHAIN_ID environment variable + * - File selection based on INDEXER_ENVIRONMENT environment variable + * - Supported environments: development, staging, produdction * * 2. TERRAFORM VARIABLES (TF_VARS) - Non-sensitive environment variables set by Terraform deployment * - Passed as INDEXER_* environment variables from terraform vm.tf @@ -43,6 +44,8 @@ pub struct Settings { // Contract Configuration pub hos_contract: String, // [CONFIG] - HOS contract address to monitor + pub venear_contract_prefix: String, // [CONFIG] - veNEAR contract prefix (e.g., 'v', 'vt') + pub voting_contract_prefix: String, // [CONFIG] - Voting contract prefix (e.g., 'vote', 'vote-dev') // Logging Configuration #[allow(dead_code)] @@ -63,17 +66,18 @@ impl Settings { // Load .env file if present, so env vars are available for config dotenvy::dotenv().ok(); - // Determine config file based on required INDEXER_API_CHAIN_ID environment variable - let chain_id = std::env::var("INDEXER_API_CHAIN_ID") + // Determine config file based on INDEXER_ENVIRONMENT environment variable + let environment = std::env::var("INDEXER_ENVIRONMENT") .map_err(|_| ConfigError::Message( - "INDEXER_API_CHAIN_ID environment variable is required. Set to 'testnet' or 'mainnet'".to_string() + "INDEXER_ENVIRONMENT environment variable is required. Set to 'development', 'staging', 'production'".to_string() ))?; - let config_file = match chain_id.as_str() { - "testnet" => "configs/testnet.toml", - "mainnet" => "configs/mainnet.toml", + let config_file = match environment.as_str() { + "development" => "configs/development.toml", + "staging" => "configs/staging.toml", + "production" => "configs/production.toml", _ => return Err(ConfigError::Message( - format!("Unsupported chain_id '{}'. Must be 'testnet' or 'mainnet'", chain_id) + format!("Unsupported environment '{}'. Must be 'development', 'staging', 'production'", environment) )), }; @@ -98,6 +102,7 @@ impl Settings { } pub fn is_hos_contract(&self, account_id: &str) -> bool { - account_id.contains(&self.hos_contract) + let suffix = format!(".{}", self.hos_contract.to_lowercase()); + account_id.to_lowercase().ends_with(&suffix) } } diff --git a/src/database.rs b/src/database.rs index b7d6969..051f214 100644 --- a/src/database.rs +++ b/src/database.rs @@ -233,6 +233,10 @@ impl Database { // Replace HOS contract placeholder with actual contract address from config let schema_content = schema_content.replace("{HOS_CONTRACT}", &settings.hos_contract); + // Replace contract prefix placeholders with actual prefixes from config + let schema_content = schema_content.replace("{VENEAR_CONTRACT_PREFIX}", &settings.venear_contract_prefix); + let schema_content = schema_content.replace("{VOTING_CONTRACT_PREFIX}", &settings.voting_contract_prefix); + // Split the schema into individual statements let statements: Vec<&str> = schema_content .split(';') @@ -268,6 +272,10 @@ impl Database { // Replace HOS contract placeholder with actual contract address let content = content.replace("{HOS_CONTRACT}", &settings.hos_contract); + // Replace contract prefix placeholders with actual prefixes + let content = content.replace("{VENEAR_CONTRACT_PREFIX}", &settings.venear_contract_prefix); + let content = content.replace("{VOTING_CONTRACT_PREFIX}", &settings.voting_contract_prefix); + // For helper functions, execute the entire content as a single statement // since they may contain dollar-quoted strings and semicolons within function bodies let trimmed_content = content.trim(); @@ -336,6 +344,10 @@ impl Database { // Replace HOS contract placeholder with actual contract address let content = content.replace("{HOS_CONTRACT}", &settings.hos_contract); + // Replace contract prefix placeholders with actual prefixes + let content = content.replace("{VENEAR_CONTRACT_PREFIX}", &settings.venear_contract_prefix); + let content = content.replace("{VOTING_CONTRACT_PREFIX}", &settings.voting_contract_prefix); + let trimmed_content = content.trim(); if trimmed_content.is_empty() { return Err(anyhow::anyhow!("View file '{}' is empty", file_name)); @@ -403,7 +415,7 @@ impl Database { } pub async fn store_block(&self, block: &BlockWithTxHashes) -> Result<()> { - let start_time = std::time::Instant::now(); + let _start_time = std::time::Instant::now(); let header = &block.block.header; // Convert timestamp from nanoseconds to DateTime @@ -457,7 +469,7 @@ impl Database { &self, actions: Vec, ) -> Result<()> { - let start_time = std::time::Instant::now(); + let _start_time = std::time::Instant::now(); for action in actions { let query = Self::store_receipt_action_query(&action); @@ -487,7 +499,7 @@ impl Database { &self, outcomes: Vec, ) -> Result<()> { - let start_time = std::time::Instant::now(); + let _start_time = std::time::Instant::now(); for outcome in outcomes { let query = Self::store_execution_outcome_query(&outcome); diff --git a/src/indexer.rs b/src/indexer.rs index 882c7df..c39e589 100644 --- a/src/indexer.rs +++ b/src/indexer.rs @@ -78,6 +78,7 @@ impl Indexer { let fetcher_config = fetcher::FetcherConfig { num_threads: self.settings.num_threads, + num_lookahead_threads: self.settings.num_threads, start_block_height: Some(BlockHeight::try_from(start_block_height).unwrap()), end_block_height: None, chain_id, @@ -86,10 +87,10 @@ impl Indexer { disable_archive_sync: false, auth_bearer_token: self.settings.api_auth_token.clone(), finality: Finality::Final, - enable_r2_archive_sync: false, user_agent: None, }; + // Create channel for receiving blocks let (sender, receiver) = mpsc::channel(1000); diff --git a/src/processor.rs b/src/processor.rs index c973092..ab8597e 100644 --- a/src/processor.rs +++ b/src/processor.rs @@ -158,7 +158,7 @@ impl Processor { chunk_hash: chunk_hash.clone(), author: block_author.clone(), method_name: method_name.clone(), - gas: *gas as i64, + gas: gas.as_gas() as i64, deposit: deposit.to_string(), args_base64, args_json, @@ -178,8 +178,8 @@ impl Processor { .collect(); // Parse tokens_burnt as f64 - let tokens_burnt = outcome.tokens_burnt as f64 / 1e24; // Convert from yoctoNEAR to NEAR - let gas_used = outcome.gas_burnt as f64; // Gas used is the same as gas burnt for most cases + let tokens_burnt = outcome.tokens_burnt.as_yoctonear() as f64 / 1e24; // Convert from yoctoNEAR to NEAR + let gas_used = outcome.gas_burnt.as_gas() as f64; // Gas used is the same as gas burnt for most cases // Extract only the status variant name without inner data let status = match &outcome.status { @@ -198,7 +198,7 @@ impl Processor { block_hash: block_hash.clone(), chunk_hash: chunk_hash.clone(), shard_id: shard_id.clone(), - gas_burnt: outcome.gas_burnt as i64, + gas_burnt: outcome.gas_burnt.as_gas() as i64, gas_used, tokens_burnt, executor_account_id: outcome.executor_id.to_string(), diff --git a/tests/config_unit_tests.rs b/tests/config_unit_tests.rs index 7a87b8e..1296951 100644 --- a/tests/config_unit_tests.rs +++ b/tests/config_unit_tests.rs @@ -4,7 +4,7 @@ use std::env; // Helper function to create test settings fn create_test_settings() -> Settings { // Set test environment variables - env::set_var("INDEXER_API_CHAIN_ID", "testnet"); + env::set_var("INDEXER_ENVIRONMENT", "testnet"); env::set_var("INDEXER_DB_HOST", "localhost"); env::set_var("INDEXER_DB_PORT", "5432"); env::set_var("INDEXER_DB_DATABASE", "test_db"); diff --git a/tests/database_integration_tests.rs b/tests/database_integration_tests.rs index 29ec887..8053188 100644 --- a/tests/database_integration_tests.rs +++ b/tests/database_integration_tests.rs @@ -19,7 +19,7 @@ async fn create_test_database() -> Result> // Use existing settings configuration system // Set test-specific environment variables - env::set_var("INDEXER_API_CHAIN_ID", "testnet"); + env::set_var("INDEXER_ENVIRONMENT", "testnet"); env::set_var("INDEXER_DB_HOST", "localhost"); env::set_var("INDEXER_DB_PORT", "5432"); env::set_var("INDEXER_DB_DATABASE", "postgres"); diff --git a/tests/metrics_unit_tests.rs b/tests/metrics_unit_tests.rs index 3a310af..bef0a63 100644 --- a/tests/metrics_unit_tests.rs +++ b/tests/metrics_unit_tests.rs @@ -4,7 +4,7 @@ use std::env; // Helper function to create test settings fn create_test_settings() -> Settings { - env::set_var("INDEXER_API_CHAIN_ID", "testnet"); + env::set_var("INDEXER_ENVIRONMENT", "testnet"); env::set_var("INDEXER_DB_HOST", "localhost"); env::set_var("INDEXER_DB_PORT", "5432"); env::set_var("INDEXER_DB_DATABASE", "test_db");